npc finds player and gives an item?
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. Code:
sub EVENT_SPAWN 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. |
Whenever I am trying anything new like that, I always test it by setting quest::say to report what the quest is actually getting. So, when you get the owner ID, I would add a quest::say after that to see exactly what ID it is getting, if any:
Code:
sub EVENT_SPAWN { Code:
sub EVENT_SPAWN { Code:
sub EVENT_SPAWN { If that doesn't work, you might be able to use something like this: Code:
sub EVENT_SPAWN { |
thanks the first one worked..
ps. the sec one did not work but its all good. |
All times are GMT -4. The time now is 07:05 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.