Pls help me to correct this code!

dungpt8782

New member
Messages
63
Points
0
Age
43
Emulator
- script HS_ItemDrop -1,{OnNPCKillEvent: switch (getmonsterinfo(killedrid,21)) { case 0x120: if (rand(5)==1) getitem 30710,1; break; //treasure case 0x37B5: if (rand(20)==1) getitem 30710,1; break; //mvp default: if (rand(1000)==1) getitem 30710,1; break; //default } switch (getmonsterinfo(killedrid,20)) { case 0: if (rand(150)==1) getitem 30711,1; break; //neutral case 1: if (rand(150)==1) getitem 30726,1; break; //Water case 2: if (rand(150)==1) getitem 30741,1; break; //Earth case 3: if (rand(150)==1) getitem 30756,1; break; //Fire case 4: if (rand(150)==1) getitem 30771,1; break; //Wind case 5: if (rand(150)==1) getitem 30786,1; break; //Poison case 6: if (rand(150)==1) getitem 30801,1; break; //Holly case 7: if (rand(150)==1) getitem 30816,1; break; //Shadow case 8: if (rand(150)==1) getitem 30831,1; break; //Ghost case 9: if (rand(150)==1) getitem 30846,1; break; //Undead } end;}
It work perfect with rathena but in Hercules, its not work with Treasure chest.

Thank you.

 
work perfect in rathena ?

no don't think so

both rathena and hercules never change the behavior of OnNPCKillEvent

prontera,158,184,5 script kjsdhfksjf 100,{ monster "this",-1,-1, "--ja--",1002,1,""; monster "this",-1,-1, "--ja--",1002,1,strnpcinfo(0)+"::Onaaa"; end;Onaaa: dispbottom "test1"; end;OnNPCKillEvent: dispbottom "test2"; end;}it only execute 1 or the other, OnNPCKillevent doesn't execute both
since all castle monster already has monster label attached to them, you have to edit the castle script

using OnNPCKillEvent doesn't work

 
Back
Top