Log in

View Full Version : Quest Problem...please help


kimura
05-29-2012, 06:20 PM
this quest works great for everything, except when it awards the epic 1.5 it also says the text "$name, Do you really think I don't know what items I need? Try again!!" and then it gives the turn in items back as well.

it does give them back and gives that text when you give wrong items or in the wrong order just the way i want, but obviously do not want the items given back if you hand them in correctly.

thanks for any help!





sub EVENT_SAY {
if(!quest::istaskactive(224)){

if($text=~/hail/i) {
quest::say("Greetings $name, Do you want to [quest] for epic 1.5");
}
if($text=~/quest/i) {
quest::say("Are you sure you are [ready] for such a difficult task?");
}

if($text=~/want/i) {
quest::say("Very well, Good Luck!! When you have finished your mission, let me

know when you [want to combine].");
quest::assigntask(224);
quest::assigntask(225);
quest::assigntask(226);
quest::assigntask(227);
quest::assigntask(228);
quest::assigntask(229);
}
}

if ($text =~/want to combine/i) { quest::say ("$name, Wow! You have aquired the

Prismatic Shard Of Power and the $class emblem? Very well indeed! Give them to me and I will reward you with a

weapon of untold power!!");
}


sub EVENT_ITEM

{
if ($item1== 1261 && $item2== 16268)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(77631,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16271)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(9955,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16279)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(12665,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16277)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(52911,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 32000)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(18398,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16276)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(62863,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16281)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(52952,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16280)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(19092,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16275)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(61025,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16278)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(62581,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16269)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(64031,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16272)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(62627,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16273)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(52347,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16270)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(50003,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}



if ($item1== 1261 && $item2== 16274)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(57400,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}

if ($item1== 1261 && $item2== 16267)
{
quest::emote("hands begin to glow and then a magnificant weapon materializes!");
quest::say("This is yours! Care for it well! Mighty $name, $class of Kimura!!");
$client->SummonItem(60321,0,0,0,0,0,0,0);
quest::shout2("Congratulations $name on obtaining your Epic 1.5!!");
}

else {
quest::say("$name, Do you really think I don't know what items I need? Try again!!");
plugin::return_items(\%itemcount);
}
}
}

lerxst2112
05-29-2012, 09:58 PM
You need to use

if()
elsif()
elsif()
else

If you want the last else to only happen if all of the if clauses failed.

sorvani
05-29-2012, 10:30 PM
also, as has been stated many times around the forum, the return plugin should be outside any if statement, at the end of the routine.

sub EVENT_ITEM {
...some code here...
#very last thing
plugin::return_items(\%itemcount);
}

kimura
05-30-2012, 03:47 AM
Thanks so much guys, i am still wet behind the ears! Lol