cincalok Posted June 3, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 05/13/16 Last Seen: February 3 Share 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 Link to comment Share on other sites More sharing options...
0 Secrets Posted June 3, 2016 Group: Developer Topic Count: 36 Topics Per Day: 0.01 Content Count: 588 Reputation: 437 Joined: 01/26/16 Last Seen: Wednesday at 03:00 PM Share 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 Link to comment Share on other sites More sharing options...
0 Promise Posted June 3, 2016 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 386 Reputation: 38 Joined: 04/28/13 Last Seen: March 22, 2024 Share Posted June 3, 2016 variables // Character variables .variables // NPC variables #variables // Account Variables Quote Link to comment Share on other sites More sharing options...
0 cincalok Posted June 5, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 05/13/16 Last Seen: February 3 Author Share Posted June 5, 2016 Hi Secrets, Promise, Thank you for your help, and the additional info is definitely very useful for me. Cheers. Quote Link to comment Share on other sites More sharing options...
Question
cincalok
Edited by tofubeng
Link to comment
Share on other sites
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.