Hey was just gonna throw up one of the 5 similar collection quests i have for in a zone. the quest works perfectly but if anyone has any tips on how i could make it a little cleaner,if possible, thatd be cool.
Code:
sub EVENT_SAY
{
quest::settimer("h672",10);
if (($text=~/Hail/i) && (!defined $spidervenomsac))
{
quest::say("Hail adventurer! give me 4 spider venom sacs for a tank quest.");
}
if (($text=~/Hail/i) && ($spidervenomsac == "0"))
{
quest::say("Hail adventurer! I have no more quests for you.");
}
}
sub EVENT_TIMER
{
if ($timer eq "h672")
{
$npc->SetHeading(190);
quest::stoptimer("h672");
}
}
sub EVENT_ITEM
{
##SPIDER VENOM SAC QUEST
if (($item1 == 21) && ($item2 == 21) && ($item3 == 21) && ($item4 == 21))
{
if (!defined $spidervenomsac)
{
quest::say("Thx for the spider venom sacs, heres some cripper exp");
quest::exp(4500);
quest::ding();
quest::targlobal("spidervenomsac","0","F",672,$charid,33);
quest::save();
if ($snakeskin = $beetlelegs = $ratskinning = $creatureoneidol = $batwings = 1)
{
quest::say("grats nigga, you can go to felwithe now");
quest::set_zone_flag(61);
}
}
if ($spidervenomsac == "0")
{
quest::say("you already did this quest.");
plugin::return_items(\%itemcount);
quest::save();
}
}
elsif
((($item1 == 21) && ($item2 == 21) && ($item3 == 21) && ($item4 != 21) && (!defined $spidervenomsac)) ||
(($item1 == 21) && ($item2 == 21) && ($item3 != 21) && ($item4 == 21) && (!defined $spidervenomsac)) ||
(($item1 == 21) && ($item2 != 21) && ($item3 == 21) && ($item4 == 21) && (!defined $spidervenomsac)) ||
(($item1 != 21) && ($item2 == 21) && ($item3 == 21) && ($item4 == 21) && (!defined $spidervenomsac)) ||
(($item1 == 21) && ($item2 == 21) && ($item3 != 21) && ($item4 != 21) && (!defined $spidervenomsac)) ||
(($item1 == 21) && ($item2 != 21) && ($item3 != 21) && ($item4 == 21) && (!defined $spidervenomsac)) ||
(($item1 != 21) && ($item2 != 21) && ($item3 == 21) && ($item4 == 21) && (!defined $spidervenomsac)) ||
(($item1 != 21) && ($item2 == 21) && ($item3 != 21) && ($item4 == 21) && (!defined $spidervenomsac)) ||
(($item1 == 21) && ($item2 != 21) && ($item3 == 21) && ($item4 != 21) && (!defined $spidervenomsac)) ||
(($item1 != 21) && ($item2 == 21) && ($item3 == 21) && ($item4 != 21) && (!defined $spidervenomsac)) ||
(($item1 == 21) && ($item2 != 21) && ($item3 != 21) && ($item4 != 21) && (!defined $spidervenomsac)) ||
(($item1 != 21) && ($item2 == 21) && ($item3 != 21) && ($item4 != 21) && (!defined $spidervenomsac)) ||
(($item1 != 21) && ($item2 != 21) && ($item3 == 21) && ($item4 != 21) && (!defined $spidervenomsac)) ||
(($item1 != 21) && ($item2 != 21) && ($item3 != 21) && ($item4 == 21) && (!defined $spidervenomsac)))
{
quest::say("Not enough spider venom sacs!!! go collect more..");
plugin::return_items(\%itemcount);
quest::save();
}
else
{
plugin::return_items(\%itemcount);
quest::say("I dont want.");
quest::save();
}
}
thx