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 04-03-2015, 11:36 AM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default Quest help

Im having an issue with this quest. At first she was literally handing out the first aug on the reward list upon hail as long as the Lastblood flag was there. It removes the flag making it respond with a lack of flag command.

I altered it a tad bit changing what was originally "lastbloods" to "aug" in the say links. She was still handing out the aug with a hail unless you selected "last bloods" saylink then she would show you the list and respond according to your selection.

So I tried altering it a little more removing all "/hail"'s from the reward section and now she sits there and stares at me doing nothing.

#edit# Changed it back to where she is handing out the first aug upon hail. Also she always gives the "scam" message with every dialogue script.

Code:
#Lastblood and fallen saint quest, out of Theater of Blood via Eodue the Pure - Static mob

sub EVENT_SAY {

my $things = quest::saylink("things");
my $saints = quest::saylink("saints");
my $aug = quest::saylink("aug");
	my @artifacts = (33323, 33324, 33325, 33326, 33327, 33328, 33329, 33330, 33331, 33332, 33333, 33334, 33335, 33336, 33337, 33338, 33339, 33340,33341, 33342, 33343, 33344, 33345, 33346, 33347, 33348, 33350);
	my %rewards = (0 => 33350,
	1 => 33323,
	2 => 33324,
	3 => 33325,
	4 => 33326,
	5 => 33327,
	6 => 33328,
	7 => 33329,
	8 => 33330,
	9 => 33331,
	10 => 33332,
	11 => 33333,
	12 => 33334,
	13 => 33335,
	14 => 33336,
	15 => 33337,
	16 => 33338,
	17 => 33339,
	18 => 33340,
	19 => 33341,
	20 => 33342,
	21 => 33343,
	22 => 33344,
	23 => 33345,
	24 => 33346,
	25 => 33347,
	26 => 33348);
	my $n = 0;
	my $match = 0;




  if ($text=~/hail/i) {
    plugin::Whisper("Hail $name! Before you venture into this zone I have to tell you about some things. These [$things] might be of great use to you!");
  }
  elsif ($text=~/things/i) {
  plugin::Whisper("I have managed to uncover some armor from the overthrown [$saints] . Ive also found some way to improve a last blood and turn it into an[$aug] of many types.");}

  elsif ($text=~/saints/i) {
  plugin::Whisper("I have found an entire set of Fallen saint armor. But it is gonna cost you. In order for me to leave this place I need some inspirations. Cassindra will get you Boots, Rizlona - Gloves, Johnathan - Helmet, Tuyen - Greaves, Ervaj - Arms and Denon , Breastplate. I have yet to uncover bracers but rumor is Mayong loved them so he may have them.");}

	elsif($text=~/aug/i)
	{
		plugin::Whisper("Hello $name, I can show you the Artifacts using a " . quest::saylink("Let me see the lastbloods, please.", 0, "lastbloods") . ", if you are interested in it.");
	}
  elsif ($text =~/lastbloods/i && $qglobals{"lastblood"} == 1)
	{
		plugin::Whisper("Great job! To claim your reward say the number related to which Artifact you want...");
		foreach $artifact (@artifacts)
		{
			plugin::Whisper(quest::varlink($artifact) . " ($n)");
			$n++;
		}
	}
	elsif($text=~/lastbloods/i && $qglobals{"lastblood"} == 0)
	{
		plugin::Whisper("You haven't given me my item yet!");
	}
	while(my($key, $value) = each %rewards)
	{
		if($text !~ /Hail/i && $text !~ /lastbloods/i && $text !~ /Itemlink/i && $text == $key && $qglobals{"lastblood"} == 1)
		{
			plugin::Whisper("Here is your reward!");
			quest::summonitem($rewards{$key});
			quest::setglobal("lastblood", 0, 5, "F");
			$match++;
		}
		elsif($text !~ /Hail/i && $text !~ /lastbloods/i && $text !~ /Itemlink/i && $text == $key && $qglobals{"lastblood"} == 0)
		{
			$match-=2;
		}
	}
	
	if($text !~ /Hail/i && $text !~ /lastbloods/i && $text !~ /Itemlink/i && $match == 0)
	{
		plugin::Whisper("That is not a valid artifact!");
	}
	
	if($text !~ /Hail/i && $text !~ /lastbloods/i && $text !~ /Itemlink/i && $match == -2)
	{
		plugin::Whisper("You haven't handed me my item, stop trying to scam me!");
	}
}

sub EVENT_ITEM 
{
	if(plugin::check_handin(\%itemcount, 33315 => 1))
	{
		quest::setglobal("lastblood", 1, 5, "F");
		plugin::Whisper("Thank you, talk to me again about choosing your artifact!");
	}
	elsif(plugin::check_handin(\%itemcount, 52594 => 1))
	{
	quest::summonitem(83603);
	}
	elsif(plugin::check_handin(\%itemcount, 52595 => 1))
	{
	quest::summonitem(83572);
	}
	elsif(plugin::check_handin(\%itemcount, 52596 => 1))
	{
	quest::summonitem(83560);
	}
	elsif(plugin::check_handin(\%itemcount, 52597 => 1))
	{
	quest::summonitem(83568);
	}
	elsif(plugin::check_handin(\%itemcount, 52598 => 1))
	{
	quest::summonitem(83564);
	}
	elsif(plugin::check_handin(\%itemcount, 52599 => 1))
	{
	quest::summonitem(83607);
	}
}
Reply With Quote
  #2  
Old 04-06-2015, 11:54 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Odd script.

The item id numbering is nice, with the exception of the 33323 artifact resulting in a 33350 reward and the 33350 as an artifact resulting in a 33348. Anyway.

Not too sure why there is a one value per key hash for the rewards but the artifacts were in an array. I would consider doing either of these two (I tend to stick to arrays when there are only two values, less typing):

Code:
my @artifacts	= (33323,33324,33325,33326,33327,33328,33329,33330,33331,33332,33333,33334,33335,33336,33337,33338,33339,33340,33341,33342,33343,33344,33345,33346,33347,33348,33350);
my @rewards		= (33350,33323,33324,33325,33326,33327,33328,33329,33330,33331,33332,33333,33334,33335,33336,33337,33338,33339,33340,33341,33342,33343,33344,33345,33346,33347,33348);
or toss both values in a hash:

Code:
my %matches = 
	{
		0	=>	{
					artifact	=>	33323,
					reward		=>	33350,
				},
		1	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		2	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		3	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		4	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		5	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		6	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		7	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		8	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		9	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		10	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		11	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		12	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		13	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		14	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		15	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		16	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		17	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		18	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		19	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		20	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		21	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		22	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		23	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		24	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		25	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		26	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		27	=>	{
					artifact	=>	130,
					reward		=>	808,
				}
	};
Note, I didn't assign the proper values in the hash, more work than I want to do atm having just got in from vacation.

That said, I'm really not entirely sure what this script is supposed to do. I can look at it and tell you what it does, though, the "style" is so unique that, I'm not sure how to approach it.

Could you instead, tell us what is supposed to happen, given what conditions, using item numbers in your examples and such?
Reply With Quote
  #3  
Old 04-10-2015, 07:38 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

I want the dialogue to read like this :

Hail Eodue the Pure
EoP whispers: Hail $name! Before you venture into this zone I have to tell you about some things. These [$things] might be of great use to you!"

Player: $things

EoP: I have managed to uncover some armor from the overthrown [$saints] . Ive also found some way to improve a last blood and turn it into an[$aug] of many types."

Player: $aug

EoP: I can show you a <list>
Show:
List:
Here:
EoP: All I require is a last blood.

Turn in Last Blood:
EoP: Here is your selection tell me which number you want

Player says a number w.o turn in global
EoP: You haven't given me my item yet!

-------------------------------------------------


Hopefully that's a tad bit clearer of what I want lol
As far as the mismatched rewards I fixed that on my server just forgot to post updated code.

Right now she will hand out aug #1 based on a simple hail as long as you have the global to receive an aug. Id be happy if I could get that to stop atleast lol
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 02:40 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