spider661
12-22-2008, 12:00 AM
i made a new spell that spawns a pet. not i wish to get the owner of that pet have the npc give the owner a random item then kill off the pet. how would i do that?
i know to kill the pet i make the owner cast reclaim energy.
i know how to pick a random item
what i dont know is how to get the pets owner and then make them call the script parts related to the client.
this is what im working with so far.
sub EVENT_SPAWN
{
quest::say("im up.");
$target = $npc->GetOwnerID();
$clientwho = $EntityList->GetClientByID($target);
$clientset->SummonItem(1333);
}
of course this don't work and its pissing me off been working on this for hours.. anyone go a clue on how to do this or a diff way to do it even?
what im trying to do is have a gift time when someone cast the spell on it it summons a invis pet (so he can run a script) gives a random item then despawns.. it dont even have to be a pet actually i would prefer that but i figure its easyer to get the pet owner then the person that caster the spell.
i know to kill the pet i make the owner cast reclaim energy.
i know how to pick a random item
what i dont know is how to get the pets owner and then make them call the script parts related to the client.
this is what im working with so far.
sub EVENT_SPAWN
{
quest::say("im up.");
$target = $npc->GetOwnerID();
$clientwho = $EntityList->GetClientByID($target);
$clientset->SummonItem(1333);
}
of course this don't work and its pissing me off been working on this for hours.. anyone go a clue on how to do this or a diff way to do it even?
what im trying to do is have a gift time when someone cast the spell on it it summons a invis pet (so he can run a script) gives a random item then despawns.. it dont even have to be a pet actually i would prefer that but i figure its easyer to get the pet owner then the person that caster the spell.