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 12-28-2014, 02:40 AM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default Getting double response from NPC

So I wrote up a simple quest for one of my npcs modeled of another quest I know is working. And for whatever reason Im getting his first 2 lines of text upon hailing. All responses are working however. Any ideas how to fix this slight annoyance?


Code:
#Quest file for Mesa - Bridle Apprentice

sub EVENT_SAY {
  if($text=~/hail/i) {
    quest::say("Hail $class. Do you seek to earn a [bridle]");
  }
  if($text=~/bridle/i) {
    quest::say("I suspect, as most of us these days,that you are a bit low on platinum? Well no need to worry! Simply handle a...well,[situation] for me");
  }
  if($text=~/situation/i) {
    quest::say("I have a high intolerance for the Tuffien these days. If you would be willing to bring me back one of their hides I will be willing to [reward] you");
	}
if($text=~/reward/i) {
    quest::say("Bring me back any color hide and I will give you the corresponding bridle");
  }
	}

	sub EVENT_ITEM { 
	if(plugin::check_handin(\%itemcount, 0 => 1)){ # Black Tuffien Hide
		quest::summonitem(21810); # Black Rope Bridle*
	}
  elsif (plugin::check_handin(\%itemcount, 0 => 1, 13317 => 1)) { # White Tuffien Hide
  quest::summonitem(21805); # White Rope Bridle*
	}
	elsif (plugin::check_handin(\%itemcount, 0 => 1, 13317 => 1)) { # Tan Tuffien Hide
  quest::summonitem(21800); # Tan Rope Bridle*
	}
	elsif (plugin::check_handin(\%itemcount, 0 => 1, 13317 => 1)) { # Brown Tuffien Hide
  quest::summonitem(21815); # Brown Rope Bridle*
	}
	}
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #2  
Old 12-28-2014, 02:48 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

Is its name 'Bridle Apprentice'? If so, you're saying hail and bridle, $text=~/bridle/i checks the whole string for "bridle" and $text=~/hail/i checks the whole string, too. Due to them both being if conditionals it checks each of them individually rather than checking sequentially and stops when it find one. Maybe try this:
Code:
sub EVENT_SAY {
	if($text=~/hail/i) {
		quest::say("Hail $class. Do you seek to earn a [bridle]");
	} elsif($text=~/bridle/i) {
		quest::say("I suspect, as most of us these days,that you are a bit low on platinum? Well no need to worry! Simply handle a...well,[situation] for me");
	} elsif($text=~/situation/i) {
		quest::say("I have a high intolerance for the Tuffien these days. If you would be willing to bring me back one of their hides I will be willing to [reward] you");
	} elsif($text=~/reward/i) {
		quest::say("Bring me back any color hide and I will give you the corresponding bridle");
	}
}
Reply With Quote
  #3  
Old 12-28-2014, 03:57 AM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

flawless fix,ty sir.
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #4  
Old 12-28-2014, 01:24 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

You're welcome, here's a version with saylinks to keep people from spamming the chat.
Code:
sub EVENT_SAY {
	if($text=~/hail/i) {
		quest::say("Hail $class. Do you seek to earn a " . quest::saylink("bridle", 1) . "?");
	} elsif($text=~/bridle/i) {
		quest::say("I suspect, as most of us these days,that you are a bit low on platinum? Well no need to worry! Simply handle a...well, " . quest::saylink("situation", 1) . " for me.");
	} elsif($text=~/situation/i) {
		quest::say("I have a high intolerance for the Tuffien these days. If you would be willing to bring me back one of their hides I will be willing to " . quest::saylink("reward", 1) . " you.");
	} elsif($text=~/reward/i) {
		quest::say("Bring me back any color hide and I will give you the corresponding bridle.");
	}
}
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 11:59 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3