Im attempting to use this as part of a Perl script that will allow NPC's to Add/remove loot to their loot tables according to wether or not they have a specific TASK.
I Have Tried these two different scripts:
Code:
sub EVENT_SIGNAL {
if($signal == 11) && (plugin::check_hasitem($npc, 3233)) {
$npc->NukeItem(3233);
quest::shout("got signal from trigger, removing 1 heart");
}
}
^^ Receives a signal from an outside trigger ^^
And simply
Code:
sub EVENT_EXIT
{
if (quest::istaskactivityactive(500,0)) {
$client->Message(4, "left area, removing 1 heart");
$npc->NukeItem(3233);
}
}
Neither one seems to fire off at all, debugging using alot of client messages and shout messages... everytime perl gets to the $npc->NukeItem(3233); it simply just stops... not sure what else i can do to remove the items... I tried using signalwiths because i figured that the entity $npc hadnt been defined because its in the sub EVENT_EXIT (which is all $client) - I Think????
The situation is... Trakanon spawns, sets a radius... If anyone with a task enters the radius it adds 1 quest item (this parts working). Problem is, if characters leave and re-enter the radius he adds an extra heart - this is what im trying to combat. What i want to do is have it so that when the players leave the radius it will remove the same heart that was added when they entered.
Any responses will be greatly appreciated! =)