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 08-17-2011, 03:12 AM
Apoc.Index
Sarnak
 
Join Date: Aug 2011
Posts: 67
Default Spell/Disc scriber

Ok, so I have gotten to hang of makeing quests. However my spell scriber and disc trainer dont appear to be working properly
Here is the Disc trainer script:
sub EVENT_SAY {

if ($text =~/Hail/i)
{ quest::say("Hello! Would you like me to set all your Discs?"); }

if($text=~/Discs/i)
{quest::traindiscs();}


}
}

And here is the spell scriber script (Thanks trev)

#A conversation to Scribe ALL spells For Player (up to curr. level)
sub EVENT_SAY {

if ($text =~/hail/i) {
quest::say ("Good day to you, $name. Would you like me to teach you all of your [spells]? Or maybe you are a [bard] in need of music lessons?"); }

if ($text =~/bard/i) {
quest::say ("Yes, normally you would think of a bard as being an adept student of music. For some reason, these lands slow the music learning ability to such an extent that I am willing to use my magic to train their abilities. Are you [ready] to learn?"); }

if ($text =~/ready/i) {
quest::say ("Listen closely as the essence of music fills your soul!");
quest::addskill(12,255);
quest::addskill(41,255);
quest::addskill(49,255);
quest::addskill(54,255);
quest::addskill(70,255); }

if ($text =~/spells/i) {
quest::say ("Good, stand where you are while I begin your lessons");
quest::scribespells(); }

}

Last edited by Apoc.Index; 08-17-2011 at 03:13 AM.. Reason: Correction
Reply With Quote
  #2  
Old 08-17-2011, 04:22 AM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

Quote:

quest::scribespells(); }
{quest::traindiscs();} <----- Did not specify level range
I just created a spell and disc trainer today, and here is my script for it. It's not the best one, but it should help you a little.

Code:
#####
#NPC: Galmoran (Tomes and Quests NPC)
#Author: Warlore
#####

sub EVENT_SAY
{

my $tomes = quest::saylink("Tomes");
my $spells = quest::saylink("Spells");
my $learn = quest::saylink("learn");
my $knowing = quest::saylink("knowing");


  if($text=~/Hail/i)
    {
      plugin::Whisper("Hi there $name, I am Galmoran, keeper of [$tomes] and [$spells]. How can I help you today?");
    }
    elsif($text=~/tomes/i)
      {
        plugin::Whisper("Yes, I know all the Tomes in the land. Just let me know if you wish to [$learn] them as well.");
      }
    elsif($text=~/spells/i)
      {
        plugin::Whisper("Spells, So many in the land. Would you be interesting in [$knowing] a few?");
      }
        elsif($text=~/learn/i)
          {
            quest::traindiscs($ulevel);
          }
        elsif($text=~/knowing/i)
          {
            quest::scribespells($ulevel);
          }
}
Here I used $ulevel to determine what level the spells should be scribe to, but you can always change it to something like:

Code:
{
quest::scribespells(75, 1);
}
OR

Code:
{
quest::scribespells($ulevel);   <----- Determines players level and scribes all spells TO that level (Think this is what you're wanting)
}
Hope this helps.
Reply With Quote
  #3  
Old 08-17-2011, 01:00 PM
Apoc.Index
Sarnak
 
Join Date: Aug 2011
Posts: 67
Default

Ok, thanks for the reply! I edited the code
quest::scribespells(); } to reflect (75, 1)

However even after changing that, the NPC still would not do the spells.
is there a chance I am missing a file somewhere for the DB to know what spells to scribe?

Note, I also directly tried your code and had the same result, that is why I am thinking I am missing spell file somewhere.

****Solved the issue, there were more syntax errors that I was missing**** Sorry.

Last edited by Apoc.Index; 08-17-2011 at 01:09 PM.. Reason: Solved
Reply With Quote
  #4  
Old 08-17-2011, 04:31 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

Here is your quest, I redid it a little to make it all work together properly.

Code:

sub EVENT_SAY 
{
  if ($text =~/Hail/i)
    {  
      quest::say("Hello! Would you like me to set all your [Discs]?"); 
      quest::say ("Good day to you, $name. Would you like me to teach you all of your [spells]? Or maybe you are a [bard] in need of music lessons?");    #A conversation to Scribe ALL spells For Player (up to curr. level)
    }
    elsif($text=~/Discs/i)
      {
        quest::traindiscs($ulevel);   #Trainsdiscs to the users CURRENT Level
      }
    elsif ($text =~/bard/i)
      {
quest::say ("Yes, normally you would think of a bard as being an adept student of music. For some reason, these lands slow the music learning ability to such an extent that I am willing to use my magic to train their abilities. Are you [ready] to learn?"); 
      }
      elsif ($text =~/ready/i) 
        {
          quest::say ("Listen closely as the essence of music fills your soul!");
          quest::addskill(12,255);
          quest::addskill(41,255);
          quest::addskill(49,255);
          quest::addskill(54,255);
          quest::addskill(70,255); 
        }
      elsif ($text =~/spells/i) 
        {
        quest::say ("Good, stand where you are while I begin your lessons");
        quest::scribespells($ulevel); 
        }
}
Maybe this will help a little. I am not too sure of the double sub EVENT_SAY, but I know you can make it do what you want with only one.

I tested the script on my server and it works the way it should.

A side note for $ulevel, if someone already knows the spells UP to that level, and they go up and accidentally tells him "Spells" again, it will not relearn all the spells. Should there be an error with spells not working properly, you can add another line that will unscribe their spells, and then they can rescribe them should a spell or two not be in the book.

Code:
quest::unscribespells()
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:04 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