Rikimaru Posted December 25, 2011 Posted December 25, 2011 Hello rathena board, I'm scripting a new Quest NPC and I want the NPC to count Mob kills,now I have the OnNPCKillEvent. If I have more mobs I'm going to choose Porings,Fabres and Chonchons,and they need to kill 100 of them,it's going to be like this: OnNPCKillEvent: if(killedrid == 1002) //1002 = Poring { set PoringKills,PoringKills + 1; } end; OnNPCKillEvent2: if(killedrid == 1007) //1007 = Fabre { set FabreKills,FabreKills + 1; } end; OnNPCKillEvent3: if(killedrid == 1011) //1011 = Chonchon { set ChonKills,ChonKills + 1; } end; I have the Kills like this now,but if I check my NPC the Kills of Fabres and Chonchons doesn't increase after killing them,what's the problem? Thank you, Riki Quote
QQfoolsorellina Posted December 25, 2011 Posted December 25, 2011 (edited) http://rathena.org/wiki/If you can use if... else if... OnNPCKillEvent: if (<condition 1>){ dothis; }else if (<condition 2>){ do that; } else if (<condition 3>){ dotheother; } end; Edited December 25, 2011 by QQfoolsorellina Quote
Rikimaru Posted December 25, 2011 Author Posted December 25, 2011 Thank you,totally forgot about if. Quote
Emistry Posted December 25, 2011 Posted December 25, 2011 OnNPCKillEvent2: OnNPCKillEvent3: this doesnt exists ~ Quote
Question
Rikimaru
Hello rathena board,
I'm scripting a new Quest NPC and I want the NPC to count Mob kills,now I have the OnNPCKillEvent. If I have more mobs I'm going to choose Porings,Fabres and Chonchons,and they need to kill 100 of them,it's going to be like this:
I have the Kills like this now,but if I check my NPC the Kills of Fabres and Chonchons doesn't increase after killing them,what's the problem?
Thank you,
Riki
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.