Jump to content

Question

Posted (edited)
Hi all, currently doing a script that will revive player if death count < 3, and if more than 3 auto warp out.

 


OnPCDieEvent:

if (strcharinfo(3) == "ordeal_1-1") {

set .death,.death+1;

if(.death<3) {

announce "You have died "+.death+" times",bc_map;

dispbottom "You'll be revived in 3 seconds";

sleep2 3000;

if(HP == 0) atcommand "@alive";

percentheal 100,100;

}

else {

dispbottom "Died more than 3 times" ;

end;

}

 

}

end;


 

Edit : The script works. But how do I tie to per player? Currently it records death for everyone.

 

Thank you in advance.

 

 

}

Edited by tofubeng

3 answers to this question

Recommended Posts

  • 0
Posted

Change ".death" to "death".

Variable prefixed with a . means it is a variable attached to an NPC.

I also recommend you to change the variable name to something unique when dealing with player variable to avoid conflicts like "MyEvent_Death".

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