View Single Post
  #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