Jump to content
  • 0

OnNPCKillEvent is it a problem?


Rikimaru

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  658
  • Reputation:   57
  • Joined:  11/20/11
  • Last Seen:  

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

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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 by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  658
  • Reputation:   57
  • Joined:  11/20/11
  • Last Seen:  

Thank you,totally forgot about if.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

OnNPCKillEvent2:

OnNPCKillEvent3:

this doesnt exists ~

Link to comment
Share on other sites

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.

×
×
  • Create New...