EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Creating a new NPC (https://www.eqemulator.org/forums/showthread.php?t=31096)

kameko 04-19-2010 07:38 AM

Creating a new NPC
 
Hey everyone,

I'm trying to make a new npc in Halas and am having some trouble getting her to respond to hails etc.

I added her to the database, and spawn her on entering the zone.

I made a script file for her but it's not working.

Her name is Sabrina nightingale, and the script file is called Sabrina_Nightingale.pl

here it is:
Code:

## Sabrina_Nightingale.pl
##
## Buffer NPC.  This character will allow the player to get all spells scribed for the players
## current level

sub EVENT_SAY{
        my $spells = quest::saylink("spells");
       
        if($text=~/hail/i){
                plugin::Whisper("Why hello there $name!  I have heard many great things about you!  I am new in town
                        and specialise in $spells.  If you're interested I can teach you what I know.");
        }
       
        if($text=~/spells/i){
                plugin::Whisper("Great...  just give me a moment to gather what spells I can for you.");
                quest::emote("flips through the pages of her spell book...");
                quest::pause(10):
                plugin::Whisper("Ok!  found all the spells I can teach you....");
                plugin::scribespells():
        }
}

Am I missing something? I thought I could just write a file with the name of the npc for it to work

Thanks for any help here :)

EDIT: I found the problem.... typos!

Auxie 04-26-2010 11:50 AM

note sure if it'd break the quest but should:

Code:

quest::pause(10):
be

Code:

quest::pause(10);
that's all I've got for why it wouldn't work.

trevius 04-26-2010 04:40 PM

You said your NPC name is "Sabrina nightingale", but I assume you mean "Sabrina Nightingale" If the last name isn't capital on the NPC, but it is on the script, that will probably cause it to fail.

Also, scribespells() requires a level argument, and you have a colon there as well, so change that to this:

Code:

plugin::scribespells($ulevel);


All times are GMT -4. The time now is 05:05 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.