iFoxkun Posted November 29, 2011 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 189 Reputation: 16 Joined: 11/20/11 Last Seen: January 4, 2014 Share 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 Link to comment Share on other sites More sharing options...
0 Z3R0 Posted November 29, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 iFoxkun Posted November 29, 2011 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 189 Reputation: 16 Joined: 11/20/11 Last Seen: January 4, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
0 Sneaky Posted November 29, 2011 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 392 Reputation: 47 Joined: 11/18/11 Last Seen: July 8, 2024 Share Posted November 29, 2011 I don't think there's any. Quote Link to comment Share on other sites More sharing options...
0 Z3R0 Posted November 29, 2011 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 iFoxkun Posted November 29, 2011 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 189 Reputation: 16 Joined: 11/20/11 Last Seen: January 4, 2014 Author Share Posted November 29, 2011 Thats fine, can you give me the commands for the still and moving. Thanks c; Quote Link to comment Share on other sites More sharing options...
0 Sneaky Posted November 29, 2011 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 392 Reputation: 47 Joined: 11/18/11 Last Seen: July 8, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Brian Posted November 29, 2011 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted November 29, 2011 Here's the diff to add an is_sitting() script command: http://eathena.kpaste.net/7f8c76eb4 Quote Link to comment Share on other sites More sharing options...
0 iFoxkun Posted November 29, 2011 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 189 Reputation: 16 Joined: 11/20/11 Last Seen: January 4, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
0 Brian Posted November 29, 2011 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted November 29, 2011 That is_sitting() diff is in the unified diff format. The + lines in green are the ones you add. Quote Link to comment Share on other sites More sharing options...
0 iFoxkun Posted November 29, 2011 Group: Members Topic Count: 24 Topics Per Day: 0.00 Content Count: 189 Reputation: 16 Joined: 11/20/11 Last Seen: January 4, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
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?
Link to comment
Share on other sites
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.