Jump to content
  • 0
Sign in to follow this  
dungpt8782

Pls help me to correct this code!

Question

-	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.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.