Quote:
Originally Posted by cofruben
I'm guessing you would need to code a bit...If that's not implemented in perl, you will need to add a new perl function that calls CastToNPC()->AddItem(itemid, quantity) I think. It should not be that hard. Good luck..if still having problems just say.
|
adding the item is not the problem... the issue is I want it to pick a random item from my database and add it to the corpse.
I dont think I have functions tho just yet.
sub EVENT_DEATH
{
quest::say("I'll get you back $name!");
my @items = (all the item numbers go here 1,22,33,433,40.);
quest::AddItem("$items[int(rand($#items+1))]"); <-- this is wrong need the item on the npc's corpse.
quest::shout("I've just died!");
}