Ozzara
01-24-2010, 10:27 PM
Is it possible to use summonitem(); inside a sub EVENT_TIMER routine based on a sub EVENT_ITEM routine? It just wont summon the item i want after the timer has expired.
Example:
sub EVENT_ITEM
{
if(($itemcount{16905} == 1) && ($itemcount{13006} == 1) && ($itemcount{12018} == 1) && ($platinum >= 80)) {
quest::say("Text goes here");
$theclienteid = $client->GetID(); #store client id
$thename = $name; #store client name
$theclient = $client; #store client
quest::settimer("1",10);
}
else {
plugin::return_items(\%itemcount);
quest::say("text goes here ");
}
}
sub EVENT_TIMER {
if ($timer eq "1") {
quest::say("text goes here $thename.");
quest::stoptimer("1");
$theclient->summonitem(5555,$theclienteid);
}
}
Example:
sub EVENT_ITEM
{
if(($itemcount{16905} == 1) && ($itemcount{13006} == 1) && ($itemcount{12018} == 1) && ($platinum >= 80)) {
quest::say("Text goes here");
$theclienteid = $client->GetID(); #store client id
$thename = $name; #store client name
$theclient = $client; #store client
quest::settimer("1",10);
}
else {
plugin::return_items(\%itemcount);
quest::say("text goes here ");
}
}
sub EVENT_TIMER {
if ($timer eq "1") {
quest::say("text goes here $thename.");
quest::stoptimer("1");
$theclient->summonitem(5555,$theclienteid);
}
}