Jump to content
  • 0

Move npc


pajodex

Question


  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

guild_vs2,51,30,0 script ohh yeas 100,1,1,{ OnTouch: movenpc strnpcinfo(0),.@rand_x,.@rand_y; }

Hi,

Based on the script, how can i make it warped to the same map "guild_vs2". When i approach the npc, it just disappears. Also, I dont want it to be clickable like the warps. Ty

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

You need a value for both .@rand_x and .@rand_y variable.

Your current script move the NPC to coordinate 0,0 .. hence it disappeared.

 

use something like rand(<number>) to return a random coordinate for the npc to move. 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

If you put an "end;" before the on touch label, the script won't run when a player clicks it.

How are you defining the new coordinates? Don't forget you can use dispbottom or debugmes and output the vars so you can see where it's moved to.

Link to comment
Share on other sites

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.

×
×
  • Create New...