Map Cords

smoochy boys on tour

solvent

LOMCN Veteran
Veteran
Jul 24, 2006
457
0
63
On The Sun
Can some one just remind me on how to make a script run from when a player steps on certain cords ?

Cheers
 

paul.obrien

LOMCN Veteran
Veteran
Aug 28, 2008
453
4
65
you can not do it for a spot but you can on entry to a map.
In the mapinfo of the map your about to enter add

CHECKQUEST(Q1404) NEEDSET_ON(404)

for example if i wanted a script to run when i enterd bw
on the mapinfo 0 i would put CHECKQUEST(Q1404) NEEDSET_ON(404)

in the mapquest i would make a file call Q1401
in there i would write my script

#IF
CHECK [404] 1
#ACT
BREAK
CLOSE

#ELSESAY
Sorry <$USERNAME>.\
It would appear that you do not have full acess to this cave.\
Please gain full acess then try again.\ \

<Exit/@exit>

the first bit will allow the player to pass threw the door way if the flag is set 1
If not the elsesay bit runs.

You could add anything here even quests or mob spawns etc for door defences.
 
Upvote 0

solvent

LOMCN Veteran
Veteran
Jul 24, 2006
457
0
63
On The Sun
Code:
#IF
CHECK [404] 1
#ACT
BREAK
CLOSE

#ELSESAY
Sorry <$USERNAME>.\
It would appear that you do not have full acess to this cave.\
Please gain full acess then try again.\ \

<Exit/@exit>
how would this script know if u got "full acess" ??
 
Upvote 0

paul.obrien

LOMCN Veteran
Veteran
Aug 28, 2008
453
4
65
because the flag in question would be set to 1.

For example do a search in your files for [404]
if theres no scripts with [404] in it then you no its a free flag.
Then put this on to the mapinfo where you put DARk,LIGHT.NORECALL etc. as part of that small scirpt i mentioned in my first post.

that means that when you try and enter on to that map [404] is the trigger.
so the player will have to do something to turn on that flag.

For example

CHECKQUEST(Q1404) NEEDSET_ON(404)

in the mapquest folder make a new .txt file called Q1401.txt

in there you can do a small quest that the player must complete in order to pass to that map.
This could be on a cave door for example

[@main]
#IF
CHECK [404] 1 = This will check [404] 1..If it is it will allow the
#ACT player to pass.
BREAK
CLOSE

#ELSESAY = If [404] is no 1 then this will trigger this script
Sorry <$USERNAME>.\
To gain acces to this cave you must give me 10 x GoldChestNuts.\
When you have the 10 x GoldChectNuts return to me and i will allow you \
safe passage to the cave beyond my doorway.\ \

<I have you chectnuts/@give>\
<Ok thanks/@exit>

[@give]
#IF
CHECKITEM goldchestnut 10
#ACT
TAKE goldchestnut 10
SET [404] 1

#SAY
Thanks <$USERNAME>.\
The door is now open to you\
Have fun in the next cave.\ \

<Exit/@exit>

#ELSESAY
Sorry <$USERNAME>.\
It would appear that you do not have 10 x GoldChestNuts to give me.\
GoldChestBNuts can be found around Bichon-Province.\
Attcak the trees and they may drop some for you.\
Return to me when you have x 10,Only then will i allow you to pass.\ \

<Exit/@exit>
 
Upvote 0

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
I know with TD's files you could make an NPC appear when a player stepped on certain coords on a map. Thats pretty much the same thing, all they have to do then is click it, as long as it's in screen view. :P

Check TBL_Merchant, should have some attributes in there towards the end of the table that deal with it. Can't for the life of me remember how it works, been ages since i used TD's files (Haven't even got the DB setup anymore).

I'll have a look see if i can find how it works.

p

PS: If you're not using TD's files then this post is of no help to you whatsoever! :P
 
Upvote 0

jasper

Golden Oldie
Golden Oldie
Sep 10, 2005
890
3
125
ρяєα¢нєя;719831 said:
I know with TD's files you could make an NPC appear when a player stepped on certain coords on a map. Thats pretty much the same thing, all they have to do then is click it, as long as it's in screen view. :P

Check TBL_Merchant, should have some attributes in there towards the end of the table that deal with it. Can't for the life of me remember how it works, been ages since i used TD's files (Haven't even got the DB setup anymore).

I'll have a look see if i can find how it works.

p

PS: If you're not using TD's files then this post is of no help to you whatsoever! :P


in tbl merchant, there is a show x and show y, for a player to see them they need to be stood on the coords you set

either that or search for needhole
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
just do what pob siad with the checkquest stuff

say u got map A and map B

you step on coords 100 100 at map A it can take u to map B... put the checkquest **** in map B mapinfo bit
 
Upvote 0