Jump to content
  • 0

How to detect if player teleported


girotto000

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  01/18/15
  • Last Seen:  

I would like to execute a script when player login and when player teleport to any other map.

To load on the login event its simple:

 

OnPCLoginEvent:

 

But to do when the player change the map, how to proceed?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


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

OnPCLoadMap:

some simple scripting trick and loadevent mapflag

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  01/18/15
  • Last Seen:  

OnPCLoadMap:

some simple scripting trick and loadevent mapflag

 

Just add this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Add OnPCLoadMapEvent in your script so it looks like this:

OnPCLoginEvent:
OnPCLoadMapEvent:
/npc/scripts_mapflags.conf - add this line:

npc: npc/mapflag/loadevent.txt
/npc/mapflag/loadevent.txt <-- create this file, and add the map(s) that you want OnPCLoadMapEvent to trigger on. If you want every map, use this file: http://pastebin.com/raw.php?i=K5d4b3bp
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...