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 02-11-2013, 07:19 AM
Disorder
Hill Giant
 
Join Date: Apr 2010
Location: USA
Posts: 133
Default

I changed to this but I am having troubles with unscribespells and untraindiscs.

Code:
  sub EVENT_SAY
{
	$menuHelp = quest::saylink("Server Information");
	$menuScribeSpells = quest::saylink("Scribe your spells");
	$menuUnscribeSpells = quest::saylink("Unscribe your spells");
	$menuUnscribeDiscs = quest::saylink("Unscribe your disciplines");
	$menuTrainDiscs = quest::saylink("Learn your disciplines");
	
	if ($text=~/menu/i)
	{
		$client->Message(315, "What would you like to do? Would you like [$menuHelp]?");
		$client->Message(315, "Wold you like to [$menuScribeSpells]?");
		$client->Message(315, "Would you like to [$menuUnscribeSpells]?");		
		$client->Message(315, "Would you like to [$menuTrainDiscs]?");
		$client->Message(315, "Would you like to [$menuUnscribeDiscs]?");		
	}
	
	elsif($text=~/Server Information/i)
	{
		Taken out for length
                my $Yel = plugin::PWColor("Yellow");
		my $Blu = plugin::PWColor("Light Blue");
		my $Red = plugin::PWColor("Red");
		my $grn = plugin::PWColor("Forest Green");
		quest::popup("Welcome", 
		"$Yel $TextToCenter <br>
		$Yel $TextToCenter2 </c> <br>
		$Yel $TextToCenter3 </c> <br>
		$Yel $TextToCenter4 </c> <br>
		$Yel $TextToCenter5 </c> <br>
		$Yel $TextToCenter6 </c> <br>
		$Yel $TextToCenter7 </7> <br>
		$Yel $TextToCenter8 </7> <br>
		$Yel $TextToCenter9 </7> <br> <br>
		$Indent $globalload <br>
		$Indent $spellfile
		");
	}
	
	elsif ($text=~/Scribe your spells/i)
	{
		quest::scribespells($ulevel);
	}
	
	elsif ($text=~/Unscribe your spells/i)
	{
		quest::unscribespells();
		
	}
	
	elsif ($text=~/Learn your disciplines/i)
	{
		quest::traindiscs($ulevel);
		
	}
	
	elsif ($text=~/Unscribe your disciplines/i)
	{
		quest::untraindiscs();		
		
	}
	
}

	
}
The untrain and unscribe refuse to work. Not sure what I am doing wrong.
__________________
Disorder
Reply With Quote
  #2  
Old 02-11-2013, 07:48 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Quote:
Originally Posted by Disorder View Post
The untrain and unscribe refuse to work. Not sure what I am doing wrong.
What client are you using? Did you zone or relog after you did it?
Reply With Quote
  #3  
Old 02-11-2013, 09:26 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Gonna guess that when you try to use unscribe spells, it scribes them again. This might be because "/Unscribe your spells/i" also contains "/Scribe your spells/i" when it searches for $text that contains the phrase and doesn't match case because you set "i" at the end. And because you are using elsif instead of just if, it matches the first one then stops. You might want to add a "^" at the beginning to make sure the line starts with what you want it to start with and not match both. Though, that doesn't explain why your disc one isn't working. Also, there isn't really a reason to use a bunch of elsifs like that, regulate ifs should be good enough as long as you set your matching correctly.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 05:13 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