Jump to content
  • 0

Best way to keep track of deaths in an instance


sizenine

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  149
  • Reputation:   12
  • Joined:  02/17/12
  • Last Seen:  

Anyone know the best way to do this? OnPCDieEvent doesn't exactly work right? Since that command doesn't bind to maps individually?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

It doesn't bind to maps individually but it i the best method to track deaths, in comparison to other methods such as seeing if anyone dropped to 0 HP in a continuous every second.

 

Just add a map check with the OnPCDieEvent to compare it to it's instanced version.

OnPCDieEvent:
if( instance_mapname(strcharinfo(3)) == instance_mapname("prontera") ){end;}
dispbottom "A shame. Maybe next time. Come back when your stronger kid.";
instance_destroy;
end;

I don't know why it is like this, but from my tests, the if(statement) needs to be == instead of != to actually end. Otherwise people outside of an instance would trigger the event. But it could just be that my revision is outdated. At any rate, you should be able to properly run a similar check to fit your needs, so that you can perform script functions without interference from other scripts.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  149
  • Reputation:   12
  • Joined:  02/17/12
  • Last Seen:  

Thanks Ocean, I will test this out. Guess my revision is too outdated, don't have instance_mapname, or at least its not listed in the script_commands.txt yet. And nice seeing you again. :)

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