cincalok Posted June 3, 2016 Posted June 3, 2016 (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 June 3, 2016 by tofubeng Quote
0 Secrets Posted June 3, 2016 Posted June 3, 2016 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". Quote
0 Promise Posted June 3, 2016 Posted June 3, 2016 variables // Character variables .variables // NPC variables #variables // Account Variables Quote
0 cincalok Posted June 5, 2016 Author Posted June 5, 2016 Hi Secrets, Promise, Thank you for your help, and the additional info is definitely very useful for me. Cheers. Quote
Question
cincalok
Edited by tofubeng
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.