View Single Post
  #3  
Old 05-28-2019, 02:50 PM
Maze_EQ
Demi-God
 
Join Date: Mar 2012
Posts: 1,106
Default

Quote:
Originally Posted by Sturm View Post
You have a syntax error else if should be elsif in Perl.

Code:
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") . "] ?");
	}
	elsif($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
	}
}
Also ensure the file is named #Arias.pl not #arias.pl - pretty sure their case sensitive.

An easy way to check your syntax is to open a command window then change directory to where your quests are located:

cd C:/EQ_Emu/quests (or whatever your path is to that folder)

then:

perl -c #Arias.pl

That should spit out any error's and tell you what line it's on or near, then you just gotta figure out what's wrong there.

Oh! Right nearly forgot the in-game command is: #reloadquests

Happy Scripting!
To avoid dealing with the names of NPCs you can alternatively use the NPCID.

Create a text file in each folder where you make scripts to identify 295001.pl = #Arias

As Sturm said, use perl -c 295001.pl to verify syntax is correct.

I prefer the NPCID method because it's common to have multiple npcs with the same name to perform different functions.
__________________
"No, thanks, man. I don't want you fucking up my life, too."

Skype:
Comerian1
Reply With Quote