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 10-12-2009, 10:22 PM
reddogut
Sarnak
 
Join Date: Jun 2007
Posts: 83
Default Spell Scriber Quest

I am trying to create a quest that will scribe spells for a level 10 or under Ranger only. I want the NPC to turn away any other class and any Rangers over level 10.

This is what I have so far, but I can't even get the npc to reply.

Code:
sub EVENT_SAY {

  if ($text=~/hail/i) {
    quest::say ("Good day to you, $name. For free I will teach all Rangers level 10 and under all of your [spells] up to level 10. After that it will cost you, although not much."); }
  if ($text=~/spells/i && $class != "Ranger") {
    quest::say ("I am sorry $class, but I cannot help you"); }
  elseif ($text=~/spells/i && $class == "Ranger" && $ulevel >=11) {
    quest::say ("Yes, you are a Ranger, but your level is too high for me. Go see NAME."); }
  elseif ($text=~/spells/i && $class == "Ranger" && $ulevel <= 10) {
    quest::say ("Good, stand where you are while I begin your lessons");
    quest::scribespells($ulevel); }

}
__________________
-Red Dog
My Windows Server install guide - http://www.eqemulator.net/wiki/wikka.php?wakka=Windows
My guide for configuring a solo-able server - http://www.eqemulator.net/wiki/wikka.php?wakka=How
Reply With Quote
  #2  
Old 10-12-2009, 10:40 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Give this a try and see if it works for you:

Code:
sub EVENT_SAY {

	my $spells = quest::saylink("Please teach me all of my spells up to $ulevel.", 0, "spells");

	if ($text=~/hail/i)
	{
		if ($class eq "Ranger")
		{
			if ($ulevel <= 10)
			{
				quest::say ("Good day to you, $name. For free I will teach all Rangers level 10 and under all of your [$spells] up to level 10. After that it will cost you, although not much.");
			}
			else
			{
				quest::say ("Yes, you are a Ranger, but your level is too high for me. Go see NAME.");
			}
		}
		else
		{
			quest::say ("I am sorry $class, but I cannot help you");
		}
	}
	
	if ($text=~/spells/i && $class eq "Ranger" && $ulevel <= 10)
	{
		quest::say ("Good, stand where you are while I begin your lessons");
		quest::scribespells($ulevel);
	}

}
If that doesn't work, you may need to replace the double quotes (") around "Ranger" with single quotes (') like this:

Code:
$class eq 'Ranger'
I forget which one it needs or if it even matters in this case.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 10-12-2009, 10:52 PM
reddogut
Sarnak
 
Join Date: Jun 2007
Posts: 83
Default

It worked perfectly Trevius. You rock!

-Mike
__________________
-Red Dog
My Windows Server install guide - http://www.eqemulator.net/wiki/wikka.php?wakka=Windows
My guide for configuring a solo-able server - http://www.eqemulator.net/wiki/wikka.php?wakka=How
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 05:26 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