So i made a quest EVERYTHING works on it BUT the quest::summonitem part i have even added a check to make sure that section is working and it is.. the npc just wont summon the item any ideas where i went wrong?
Code:
sub EVENT_SAY
{
my $weapon = quest::saylink ("weapon");
if ($text =~/Hail/i && !defined $qglobals{"Epic"})
{
quest::say("Hello $name, Along my journies i have aquired knowledge on how to create a [$weapon] with power like none seen before.");
}
if ($text =~/weapon/i)
{
quest::say("In order for me to make you this special weapon i need a few items. The first item I need is a greatsword from Acryila Caverns.");
}
elsif ($qglobals{"Epic"} == 1)
{
quest::say("The next item you need is an eye from a evil unicorn in Lesser Faydark.");
}
elsif ($qglobals{"Epic"} == 2)
{
quest::say("The next item i need is a Polished Shard from Droga.");
}
elsif ($qglobals{"Epic"} == 3)
{
quest::say("The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
}
elsif ($qglobals{"Epic"} == 4)
{
quest::say("The next item I need is dryad parts from Jagged Pine Forest.");
}
elsif ($qglobals{"Epic"} == 5)
{
quest::say("The next item i need is werewolf talon from Castle Mistmoore.");
}
elsif ($qglobals{"Epic"} == 6)
{
quest::say("The next item i need is a snowball from permafrost.");
}
elsif ($qglobals{"Epic"} == 7)
{
quest::say("This last part will not be so easy. I need Kallis' Head.");
}
elsif (($class eq "Wizard") && ($qglobals{"Epic"} == 8))
{
$client->Message(315, "$NPCNAME whispers to you, 'Congrats on your Epic!'");
quest::summonitem(32374);
}
else
{
quest::say("you are not a wizard somthing is wrong");
}
}
sub EVENT_ITEM
{
if ($item1== 51261 && !defined $qglobals{"Epic"})
{
quest::say("This is just what i was looking for! The next item you need is an eye from a evil unicorn in Lesser Faydark.");
quest::setglobal("Epic", 1, 1, "F");
}
elsif ($item1== 1815 && ($qglobals {"Epic"} == 1))
{
quest::say("Wow you are making incredible time getting me these items. The next item i need is a Polished Shard from Droga.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 81116 && ($qglobals {"Epic"} == 2))
{
quest::say("You are getting closer to greatness. The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 9429 && ($qglobals {"Epic"} == 3))
{
quest::say("Incdredible! The weapon is almost complete. The next item I need is dryad parts from Jagged Pine Forest.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 8107 && ($qglobals {"Epic"} == 4))
{
quest::say("You are half way there. The next item i need is werewolf talon from Castle Mistmoore.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 13746 && ($qglobals {"Epic"} == 5))
{
quest::say("The weapon is starting to glow. The next item i need is a snowball from permafrost.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 19034 && ($qglobals {"Epic"} == 6))
{
quest::say("Just one more peice to go. This last part will not be so easy. I need Kallis' Head.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 31420 && ($qglobals {"Epic"} == 7))
{
quest::say("That is everything. Give me a few seconds to get your weapon made.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
else
{
quest::say("I cannot use that at this time. Please give me the items in the correct order as I have instructed.");
}
sub EVENT_SAY
{
my $weapon = quest::saylink ("weapon");
if ($text =~/Hail/i && !defined $qglobals{"Epic"})
{
quest::say("Hello $name, Along my journies i have aquired knowledge on how to create a [$weapon] with power like none seen before.");
}
if ($text =~/weapon/i)
{
quest::say("In order for me to make you this special weapon i need a few items. The first item I need is a greatsword from Acryila Caverns.");
}
elsif ($qglobals{"Epic"} == 1)
{
quest::say("The next item you need is an eye from a evil unicorn in Lesser Faydark.");
}
elsif ($qglobals{"Epic"} == 2)
{
quest::say("The next item i need is a Polished Shard from Droga.");
}
elsif ($qglobals{"Epic"} == 3)
{
quest::say("The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
}
elsif ($qglobals{"Epic"} == 4)
{
quest::say("The next item I need is dryad parts from Jagged Pine Forest.");
}
elsif ($qglobals{"Epic"} == 5)
{
quest::say("The next item i need is werewolf talon from Castle Mistmoore.");
}
elsif ($qglobals{"Epic"} == 6)
{
quest::say("The next item i need is a snowball from permafrost.");
}
elsif ($qglobals{"Epic"} == 7)
{
quest::say("This last part will not be so easy. I need Kallis' Head.");
}
elsif (($class eq "Ranger") && ($qglobals{"Epic"} == 8))
{
$client->Message(315, "$NPCNAME whispers to you, 'Congrats on your Epic!'");
quest::summonitem(1119);
}
else
{
quest::say("you are not a wizard somthing is wrong");
}
}
sub EVENT_ITEM
{
if ($item1== 51261 && !defined $qglobals{"Epic"})
{
quest::say("This is just what i was looking for! The next item you need is an eye from a evil unicorn in Lesser Faydark.");
quest::setglobal("Epic", 1, 1, "F");
}
elsif ($item1== 1815 && ($qglobals {"Epic"} == 1))
{
quest::say("Wow you are making incredible time getting me these items. The next item i need is a Polished Shard from Droga.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 81116 && ($qglobals {"Epic"} == 2))
{
quest::say("You are getting closer to greatness. The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 9429 && ($qglobals {"Epic"} == 3))
{
quest::say("Incdredible! The weapon is almost complete. The next item I need is dryad parts from Jagged Pine Forest.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 8107 && ($qglobals {"Epic"} == 4))
{
quest::say("You are half way there. The next item i need is werewolf talon from Castle Mistmoore.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 13746 && ($qglobals {"Epic"} == 5))
{
quest::say("The weapon is starting to glow. The next item i need is a snowball from permafrost.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 19034 && ($qglobals {"Epic"} == 6))
{
quest::say("Just one more peice to go. This last part will not be so easy. I need Kallis' Head.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 31420 && ($qglobals {"Epic"} == 7))
{
quest::say("That is everything. Give me a few seconds to get your weapon made.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
else
{
quest::say("I cannot use that at this time. Please give me the items in the correct order as I have instructed.");
}
plugin::return_items(\%itemcount);
}
}