Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 07-12-2006, 05:21 AM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default fixer-uper collection quests

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
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com
Reply With Quote
  #2  
Old 07-25-2006, 11:28 AM
Sarepean
Discordant
 
Join Date: Sep 2004
Posts: 253
Default

I can't remember, but I think you can use || for 'OR', so instead of the massive amounts of 'AND' checks, you could just use one 'OR' check...
Reply With Quote
  #3  
Old 07-27-2006, 12:09 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

$itemcount should prolly be used instead of $item... theres not many reasons to use $item unless you need specific items in specific slots.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:22 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3