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 03-24-2012, 09:16 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by chrsschb View Post
Definitely. This is my first time writing this kind of quest and first time putting a saylink within the items portion. Appreciate the info. Can you shed any light on why my successful handins are giving me the items returned message though?
First of all you are trying to access your qglobal like it is a local variable defined, in which under your sub EVENT_SAY you have $hateblade defined as a saylink.

To access your qglobal it needs to be accessed as such:

Code:
$qglobals{"hateblade"}
Ex:
Code:
elsif(plugin::check_handin(\%itemcount, 2668=>1) && $qglobals{"hateblade"} == 4})
Help?

Also you can debug your quests by spitting out what the value of your qglobal actually holds by doing this:

Code:
quest::say($qglobals{"hateblade"});
Reply With Quote
  #2  
Old 03-24-2012, 09:23 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 905
Default

In your example:

elsif(plugin::check_handin(\%itemcount, 2668=>1) && $qglobals{"hateblade"} == 4})

Where is that other bracket coming from?
Reply With Quote
  #3  
Old 03-24-2012, 11:07 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 905
Default

Below is the updated trader quest. I moved the saylink to the item section.

Still existing issues: Whenever I hand the platinum to the trader I get the failed turn in message even though the turn in is successful (and I get the global).

Once I have hateblade==1 flag, I'm getting 4 messages when I hail the trader. The messages for hateblade==0 and the messages for hateblade==1. Why is this? I've tried using !defined, hateblade==undef, and hateblade==0. No matter which I use my warrior is sitll getting 4 messages.

I have a shaman standing nearby who is only receiving the first message (which is perfect).

Code:
###Description: Quest NPC for the Hateblade Quest
###Created By: Specialty & Gnomicide of Clumsy's World.
###NPC: Maldan the Trader
###Zone: East Commons

#######################################
####           Saylinks            ####
#######################################

sub EVENT_SAY
	{

	my $deal = quest::saylink("deal", 1);
	my $coin = quest::saylink("coin", 1);
	my $estate = quest::saylink("Estate", 1);
	my $inny = quest::saylink("Innoruuk", 1);
	my $bladesmith = quest::saylink("bladesmith", 1);

#######################################
####        Quest Dialogue         ####
#######################################

	if($text=~/hail/i && $globals{"hateblade"} == 0)
		{
		plugin::Whisper("Where have all the traders gone?");
		if($class eq "Warrior")
			{
			plugin::Whisper("Hello fellow Warrior, I may have a splendid [$deal] for you!");
			}
		}

	if($text=~/hail/i && $qglobals{"hateblade"} == 1)
		{
		plugin::Whisper("I said it was splendid; I did not say it was useful!");
		quest::doanim(54);
		plugin::Whisper("It truly IS one of a kind... literally; however, I hear it may be of more use when forged with a rare sword from the old [$estate].");
		}
		
	if($text=~/hail/i && $globals{"hateblade"} == 2)	
		{
		plugin::Whisper("Did you fashion the blade? Let me see it!");
		}

			
	if($text=~/hail/i && $globals{"hateblade"} == 3)
		{
		plugin::Whisper("Seek out Tirapulin V'Thex, the master bladesmith.");
		}

	if($text=~/hail/i && $globals{"hateblade"} == 4)
		{
		plugin::Whisper("You have returned! Let me see the blade!");
		}

	if($text=~/hail/i && $globals{"hateblade"} == 5)
		{
		plugin::Whisper("Ever have the strangest feeling of dejavu?");
		}

	if($text=~/hail/i && $globals{"hateblade"} == 6)
		{
		plugin::Whisper("Ever have the strangest feeling of dejavu?");
		}

	if($text=~/hail/i && $globals{"hateblade"} == 7)
		{
		plugin::Whisper("Ever have the strangest feeling of dejavu?");
		}			
			
	if($text=~/deal/i && $class eq "Warrior")
		{
		plugin::Whisper("If you have the [$coin], I may be able to provide you with a splendid blade!");
		}	
			
	if($text=~/coin/i && $class eq "Warrior")
		{
		plugin::Whisper("For a measly 250 platinum pieces, I will provide you with a blade no warrior has seen the likes of!");
		}	
			
	if($text=~/estate/i && $globals{"hateblade"} == 1)
		{
		plugin::Whisper("Unrest of course.  Here, take these notes.  Now leave me alone.");
		quest::summonitem(2669);
		quest::setglobal("hateblade", 2, 5, "F");
		}	
		
		
	if($text=~/innoruuk/i && $globals{"hateblade"} == 2)
		{
		plugin::Whisper("That is right, Innoruuk himself gave a blade to King Thex of the Tier'Dal, that has resemblance to that of which you hold.  Perhaps a maaster Tier'Dal [$bladesmith] may assist you further.");
		}	
			
	if($text=~/bladesmith/i && $globals{"hateblade"} == 2)
		{
		plugin::Whisper("Seek out Tirapulin V'Thex in the Bazaar.  I imagine he has migrated his wares there like every other trader.");
		quest::setglobal("hateblade", 3, 5, "F");
		}	
		
	}
	
#######################################
####           Turn-Ins            ####
#######################################	

sub EVENT_ITEM
	{

	my $inny = quest::saylink("Innoruuk", 1);
	
	if($platinum==250 && $class eq "Warrior")
		{
		quest::summonitem(2667);
		quest::setglobal("hateblade", 1, 5, "F");
		}
		
	if(plugin::check_handin(\%itemcount, 2666=>1) && $qglobals{"hateblade"} == 2)
		{
		plugin::Whisper("I told you it was a blade no warrior had seen the likes of!  Legend tells it may be a shard of King Thex's royal blade!  Perhaps it was forged by [$inny] himself.");
		quest::summonitem(2666);
		}
		
	if(plugin::check_handin(\%itemcount, 2668=>1) && $qglobals{"hateblade"} == 4)
		{
		plugin::Whisper("It's mine! Finally!  At last my King will have his Hateblade returned to him once and for all!");
		quest::emote("runs towards Nektulos Forest");
		quest::setglobal("hateblade", 5, 5, "F");
		$npc->MoveTo(837, 1281, -17, 128, 0);
		quest::settimer("depop", 30);
		}		
		
	else 
		{
		plugin::return_items(\%itemcount);
		plugin::Whisper("It looks like you forgot something.");
		}	
		
	}	

#######################################
####         Despawn Timer         ####
#######################################		
	
sub EVENT_TIMER
	{
   
	if ($timer eq "depop")
		{
		quest::depop();
		quest::stoptimer("depop");
		}	
		
	}
Reply With Quote
Reply

Thread Tools
Display Modes

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:04 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3