View Single Post
  #1  
Old 05-28-2019, 09:03 AM
Melandril
Sarnak
 
Join Date: Jun 2003
Posts: 75
Default Adding PL scripts to NPCs

TL;DR;
I read http://www.eqemulator.org/forums/sho...t=pearl+script and 1) #reloadpl was not recognized and 2) no matter if I used an existing NPC (eg #arias in tutorialb) or spawned and created a new npc, the script did not load

longer version
before starting, #arias did not respond to me....which I assumed was quest related...so, I ignored this. Then I thought perhaps #arias was different from "arias", checked the DB on that assumption, and there is only #arias.

either way, I wanted to play with the two most basic scripts I could find: a read-response script and a teleport script (pasted below). I know the coordinates are wrong, but I could not get even the "hail" portion to work, not with a #reloadqst (which did appear to work?) or with a full shutdown and restart of the emu server.

sub EVENT_SAY {
if($text=~/hail/i) {
quest::say("$name, where do you want to go today? I can send you to the [". quest::saylink("temple") . "] ?");
}
else if($text=~/temple/i) {
quest::say("Let me know if this spell works....I just wrote it!");
quest::movepc(729,-55,44,-158.81); # TODO: fix coordinates later
}
}

The script is located in the "\eqemu_server\quests\tutorialb" once each for #arias.pl and the teleporter.pl I added. As for why I thought this should work....it's basically the same functions that came with #arias on a fresh download....which I am sure are working for other people and assumed would work for me.

With all that said, I guess, what I'm trying to ask is, how do I get this script to trigger for either the existing #arias or the new spawn teleporter npcs, given that I think I've placed the script in the right folder? Is there an extra step to attach script to npc spawn or object?

Thank you
Reply With Quote