Jump to content
  • 0

Auto get item when mob is killed


Question

5 answers to this question

Recommended Posts

  • 0
Posted
36 minutes ago, NightJar said:

Hi,

 

can i ask how to auto get item when a mob is killed?? 

I want the gold automatically add the gold on inventory.

Thanks! Here is my script. 

goldroom.txt

put this script at then end of script

-	script	Drop_extra	-1,{

OnNPCKillEvent:
if( strcharinfo(3) != "ordeal_3-2" ) {end;}
if( rand( 100 ) <= 10) {
{ .@item_id = 969;

getitem .@item_id,1;  }
end; 
}


}

player will get gold with probability rate 10% and only at map ordeal_3_2

  • 0
Posted
1 hour ago, hendra814 said:

put this script at then end of script


-	script	Drop_extra	-1,{

OnNPCKillEvent:
if( strcharinfo(3) != "ordeal_3-2" ) {end;}
if( rand( 100 ) <= 10) {
{ .@item_id = 969;

getitem .@item_id,1;  }
end; 
}


}

player will get gold with probability rate 10% and only at map ordeal_3_2

hi, at the very end of the script ? 

  • 0
Posted
6 minutes ago, NightJar said:

I want it to get gold every time a peco is kileed not random :'( Thanks!

-	script	Drop_extra	-1,{

OnNPCKillEvent:
if( strcharinfo(3) != "ordeal_3-2" ) {end;}
getitem .@item_id,1; 
end;

OnInit:
.@item_id = 969;
end;
}

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...