Jump to content
  • 0

The "On" command


Question

Posted

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

  • 0
Posted

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...

  • 0
Posted

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

  • 0
Posted

*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.

  • 0
Posted (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 by iFoxkun

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...