prontera,154,179,4 script summoner 100,{
if(countitem(512) > 500){
delitem 512,500;
monster "prontera", 0, 0, "Poring", 1005, 1, strnpcinfo(0) + "::OnMobKilled";
monster "prontera", 0, 0, "Poring", 1115, 1, strnpcinfo(0) + "::OnMobKilled";
} else {
mes "sorry you need 500 apple to summon";
close;
}
end;
OnMobKilled:
set .@amount, rand(1,5); //quantity of different items
set .@whatItem, rand(.size); //Which item was chosen
set .@amountItem, rand(1,10); //Quantity of item you will receive
for (.@i = 0; .@i < .@amount; .@i++)
getitem .@whatItem, .@amountItem;
end;
OnInit:
setarray .listItems[0], 500, 501, 502, 503, 504, 505, 506, 507; //Items
.size = getarraysize(.listItems);
}
There are still a few problems with the script but I don't have time.
If you want the item to look like it dropped.
https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L4827