Jump to content
  • 0

Best way to keep track of deaths in an instance


Question

2 answers to this question

Recommended Posts

Posted

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
Posted

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

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