iFoxkun Posted November 29, 2011 Posted November 29, 2011 I'm making a event for someone, but then, the event needs to have a command where it checks if the player is moving, sitting, or standing still. Is there an "On" command like OnTouch, OnClock command for this? Quote
0 Z3R0 Posted November 29, 2011 Posted November 29, 2011 yes, you can use the OnTouch and specify the x1,y1 for the OnTouch after the NPC's id... eg: prontera,158,173 script mynpc -1,10,10,{ } would make it so if anyone was within +10x or -10x and +10y and -10y of the npc, it would trigger the OnTouch: label... Quote
0 iFoxkun Posted November 29, 2011 Author Posted November 29, 2011 for OnTouch I was giving an example, I want to know if it possible to have a command that notifies the NPC that the player is sitting, stand or staying still. Quote
0 Z3R0 Posted November 29, 2011 Posted November 29, 2011 still and moving yes, but would require you to check every second... (crazy checks) sitting... sadly no... although I think Brian was going to look into an is_sitting function lol Quote
0 iFoxkun Posted November 29, 2011 Author Posted November 29, 2011 Thats fine, can you give me the commands for the still and moving. Thanks c; Quote
0 Sneaky Posted November 29, 2011 Posted November 29, 2011 *getmapxy("<variable for map name>",<variable for x>,<variable for y>,<type>{,"<search string>"}) This function will locate a character object, NPC object or pet's coordinates and place their coordinates into the variables specified when calling it. It will return 0 if the search was successful, and -1 if the parameters given were not variables or the search was not successful. Type is the type of object to search for: 0 - Character object 1 - NPC object 2 - Pet object 3 - Monster object. While 3 is meant to look for a monster object, no searching will be done if you specify type 3, and the function will always return -1. Just check the character's position every second, if it doesn't change, he's still, if it does, then he moved. This is also not accurate. Quote
0 Brian Posted November 29, 2011 Posted November 29, 2011 Here's the diff to add an is_sitting() script command: http://eathena.kpaste.net/7f8c76eb4 Quote
0 iFoxkun Posted November 29, 2011 Author Posted November 29, 2011 (edited) *getmapxy("<variable for map name>",<variable for x>,<variable for y>,<type>{,"<search string>"}) This function will locate a character object, NPC object or pet's coordinates and place their coordinates into the variables specified when calling it. It will return 0 if the search was successful, and -1 if the parameters given were not variables or the search was not successful. Type is the type of object to search for: 0 - Character object 1 - NPC object 2 - Pet object 3 - Monster object. While 3 is meant to look for a monster object, no searching will be done if you specify type 3, and the function will always return -1. Just check the character's position every second, if it doesn't change, he's still, if it does, then he moved. This is also not accurate. Alright, one more question, how would I make it do this. If Still, stay in event. if Still, but then Move, kick out of event. If Move, kick out of event. Here's the diff to add an is_sitting() script command: http://eathena.kpaste.net/7f8c76eb4 Hmm. After look at the diff it says save map point, will this mean that the user's save place will be saved that the place the command is used? How do i diff a client, with TurtoiseSVN correct? Edited November 29, 2011 by iFoxkun Quote
0 Brian Posted November 29, 2011 Posted November 29, 2011 That is_sitting() diff is in the unified diff format. The + lines in green are the ones you add. Quote
0 iFoxkun Posted November 29, 2011 Author Posted November 29, 2011 That is_sitting() diff is in the unified diff format. The + lines in green are the ones you add. Alright thanks ! Quote
Question
iFoxkun
I'm making a event for someone, but then, the event needs to have a command where it checks if the player is moving, sitting, or standing still. Is there an "On" command like OnTouch, OnClock command for this?
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.