luizragna Posted July 22, 2017 Posted July 22, 2017 (edited) Hello. I'm doing an NPC in the persagem receive damage while listening to him. I would like to do with that when he got out of close looks from receiving damage. pay_arche,63,145,4 script Guard#2 45,3,3,{ OnTouch: set @fire,1; while (@fire == 1){ specialeffect2 49,"+strcharinfo(0)+"; heal -2,0; sleep2 500; } } I don't know if I'm doing the right way.... Basically I wish the variable @fire came back to = 0 Edited July 22, 2017 by luizragna Quote
2 Z3R0 Posted July 22, 2017 Posted July 22, 2017 (edited) You need to include a check for getmapxy () and see if the char is still within the area... if not set char var fire to 0 Edited July 22, 2017 by Z3R0 2 Quote
1 luizragna Posted July 22, 2017 Author Posted July 22, 2017 59 minutes ago, Z3R0 said: You need to include a check for getmapxy () and see if the char is still within the area... if not set char var fire to 0 Thanks! I Solved! pay_arche,63,145,4 script Guard#2 45,3,3,{ OnTouch: set @fire,1; while (@fire == 1){ specialeffect2 49,"+strcharinfo(0)+"; heal -2,0; sleep2 500; getmapxy(@mapname$, @mapx, @mapy, UNITTYPE_PC, ""+strcharinfo(0)+""); if ((@mapx < 60) || (@mapx > 65) || (@mapy < 143) || (@mapy > 147)) @fire = 0; } } 1 Quote
Question
luizragna
Hello. I'm doing an NPC in the persagem receive damage while listening to him. I would like to do with that when he got out of close looks from receiving damage.
I don't know if I'm doing the right way....
Basically I wish the variable @fire came back to = 0
Edited by luizragna3 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.