PDA

View Full Version : Hail is broken!!


codyscafe7
06-20-2007, 04:18 PM
Whenever i hail someone on my server it never works. I look in my quests folder and find different people who have quests and when i go back into the game and hail them it doesnt work. For example here is a quest:

sub EVENT_SAY {
if($text=~/hail/i){
quest::say("Hello. Nice day, isn't it? It would be nicer if I didnt have to spend it killing these disgusting rodents that have infested town. Hey, I have an idea! How about you go kill some of them for me and collect four of their whiskers? I will reward you, of course.");
}
}

sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 13071 => 4)){
quest::say("Here are you coins as promised. Have a nice day. I wish I could.");
quest::faction(212,5);
quest::faction(8,5);
quest::givecash(1,1,1,0);
}
}


and when i hail him in the game nothing happens.Ive tried hailing many npc's with quests but the same thing happens, nothing.
my plugins is in my eqemu folder and not my quest folder and ive searched and searched for answers but none work. Ive tried using angelox's database and project eq but the same thing still nothing. could someone please help me!!

moydock
06-20-2007, 05:46 PM
are the names of your files in the 'Firstname_Lastname' format?

image
06-20-2007, 05:57 PM
Perl scripts are setup in the following format: questdirectory/zoneshortname/npcid.qst

Depending on your database those npc ids may be different, I would make sure that the ID's that are in the database are the same as the id on the quest file.

codyscafe7
06-21-2007, 12:32 AM
They are in the format quest\zonename\npc's first_lastname. Its weird because im doing everything right but the stupid hail button doesnt work.

image
06-21-2007, 05:25 AM
I am looking in the source code for embparser.cpp

(Mean't to use .pl up above by the way)

I see quests/zone/npcid.pl but there is also a naming version as well fnw implemented with quests/zone/npcname

To get naming version you need the QUEST_SCRIPTS_BYNAME define in features.h to be on (looks like its on by default in 0.7.0 release).

It looks like the names have to be the same as the database minus any numbers, il tell you the top two line of this code says ( line 498 ):
//Father Nitwit's naming hack.
//untested on windows...
So you get to find out I guess :)

But, it by default checks for npcid.pl as well before it even searches for npcname.pl

devn00b
06-21-2007, 05:57 AM
Lmao I decided to peak at the code myself...and its a joke.


char tmpname[64];
int count0 = 0;
bool filefound = false;
tmpf = fopen(filename.c_str(), "r");
if(tmpf != NULL) {
fclose(tmpf);
filefound = true;
}

WTF is tmpname doing there? its not even used.

or how about


filename = "quests/";
filename += QUEST_TEMPLATES_DIRECTORY;
filename += "/";
filename += tmpname;
filename += ".pl";


Come on put that shit on one line. Talk about sloppy.

or hey here is some really great code

tmpname[0] = 0;
//if there is no file for the NPC's ID, try for the NPC's name
if(! filefound) {
//revert to just path
filename = bnfilename;
const NPCType *npct = database.GetNPCType(npcid);
if(npct == NULL) {
//LogFile->write(EQEMuLog::Debug, " no npc type");
//revert and go on with life
filename += itoa(npcid);
filename += ".pl";
curmode = questByID;
} else {
//trace out the ` characters, turn into -

int nlen = strlen(npct->name);
if(nlen < 64) { //just to make sure
int r;
//this should get our NULL as well..
for(r = 0; r <= nlen; r++) {
tmpname[r] = npct->name[r];

//watch for 00 delimiter
if(tmpname[r] == '0') {
count0++;
if(count0 > 1) { //second '0'
//stop before previous 0
tmpname[r-1] = '\0';
break;
}
} else {
count0 = 0;
}

//rewrite ` to be more file name friendly
if(tmpname[r] == '`')
tmpname[r] = '-';

}
filename += tmpname;
filename += ".pl";
curmode = questByName;
} else {
//LogFile->write(EQEMuLog::Debug, " namelen too long");
//revert and go on with life, again
filename += itoa(npcid);
filename += ".pl";
curmode = questByID;
}
}


Wow you know if i did shit like that at work, id be fired on the spot. not only fired id be laughed out of the fucking building and shot.

You know back in the day we had a project leader that would inspect changes like this.

Wtf not tested on windows?! Whats that bs? It compiles SHIP IT! If your going to write code just for nix fork the project and release the code as "nix compile". My oh my how eqemu has degraded. I almost hate saying this, but where is hogie when ya need him.

codyscafe7
06-21-2007, 01:43 PM
Im still confused. What should i do to get the hail button to work?

Angelox
06-21-2007, 02:12 PM
Im still confused. What should i do to get the hail button to work?

First of all, do any of your quests work ?
If they do not, then you have a problem with your Perl install. If Perl is not working, then your quests will not work. This only means you didn't follow instructions on install, and need to read again.

what name did you give to the NPC that's related to the perl file?

It seems to me, you want to do too much, too soon. If you are not familiar with Perl or MySql, you need to start by learning some of that first.

What database are you using?

codyscafe7
06-22-2007, 02:56 AM
nope none of my quests work. I named the perl file after the npcs name firstname_lastname format. Ill try re-installing perl and see if that will work. I tried using your database and peq database. ill re-install perl right now.

codyscafe7
06-22-2007, 03:37 AM
I re-installed pearl but it still doesnt work. I noticed that the .pl files changed into like a ghecko thing. Before that they had a notepad icon. I thought that had fixed it but when i started my server and logged in the hail button still didnt work. Whats wrong with my server, i dont see any other people with this problem. Is it just me?

image
06-22-2007, 06:41 AM
Maybe you should paste all the output from the zone bootup here so people can get an idea of what your server is doing.

codyscafe7
06-22-2007, 12:48 PM
alright here is my zone.

[Debug] Starting Log: logs/eqemu_debug_zone_5064.log
[Debug] [ZONE__INIT] Loading server configuration..
[Debug] [ZONE__INIT] Log settings loaded from log.ini
[Debug] [ZONE__INIT] Connecting to MySQL...
[Status] Starting Log: logs/eqemu_zone_5064.log
[Status] Using database 'peq' at localhost:3306
[Debug] [ZONE__INIT] CURRENT_ZONE_VERSION: EQEMu 0.7.0
[Debug] [ZONE__INIT] Log settings loaded from ./log.ini
[Debug] [ZONE__INIT] Mapping Incoming Opcodes
[Debug] [ZONE__INIT] Loading Variables
[Debug] [ZONE__INIT] Loading zone names
[Debug] [ZONE__INIT] Loading items
[Status] EMuShareMem loaded
[Status] Loading items from database: count=54307
[Debug] [ZONE__INIT] Loading npc faction lists
[Status] Loading NPC Faction Lists from database...
[Debug] [ZONE__INIT] Loading loot tables
[Status] Loading Loot tables from database...
[Debug] [ZONE__INIT] Loading skill caps
[Status] Loading skill caps from database...
[Debug] [ZONE__INIT] Loading guilds
[Debug] [ZONE__INIT] Loading factions
[Debug] [ZONE__INIT] Loading titles
[Debug] [ZONE__INIT] Loading AA effects
[Debug] [ZONE__INIT] Loading swarm spells
[Debug] [ZONE__INIT] Loading tributes
[Debug] [ZONE__INIT] Loading corpse timers
[Debug] [ZONE__INIT] Loading commands
[Debug] command_init(): - Command 'appearance' set to access level 150.
[Debug] command_init(): - Command 'attack' set to access level 150.
[Debug] command_init(): - Command 'cast' set to access level 100.
[Debug] command_init(): - Command 'castspell' set to access level 100.
[Debug] command_init(): - Command 'chat' set to access level 200.
[Debug] command_init(): - Command 'copychar' set to access level 200.
[Debug] command_init(): - Command 'crashtest' set to access level 201.
[Debug] command_init(): - Command 'damage' set to access level 100.
[Debug] command_init(): - Command 'date' set to access level 150.
[Debug] command_init(): - Command 'dbspawn2' set to access level 200.
[Debug] command_init(): - Command 'delacct' set to access level 200.
[Debug] command_init(): - Command 'depop' set to access level 100.
[Debug] command_init(): - Command 'depopzone' set to access level 100.
[Debug] command_init(): - Command 'emote' set to access level 150.
[Debug] command_init(): - Command 'finditem' set to access level 100.
[Debug] command_init(): - Command 'findspell' set to access level 100.
[Debug] command_init(): - Command 'flymode' set to access level 100.
[Debug] command_init(): - Command 'freeze' set to access level 100.
[Debug] command_init(): - Command 'gender' set to access level 100.
[Debug] command_init(): - Command 'gm' set to access level 100.
[Debug] command_init(): - Command 'gmspeed' set to access level 100.
[Debug] command_init(): - Command 'haste' set to access level 100.
[Debug] command_init(): - Command 'heal' set to access level 100.
[Debug] command_init(): - Command 'hideme' set to access level 150.
[Debug] command_init(): - Command 'invul' set to access level 150.
[Debug] command_init(): - Command 'invulnerable' set to access level 150.
[Debug] command_init(): - Command 'itemsearch' set to access level 100.
[Debug] command_init(): - Command 'kick' set to access level 150.
[Debug] command_init(): - Command 'kill' set to access level 100.
[Debug] command_init(): - Command 'level' set to access level 100.
[Debug] command_init(): - Command 'listnpcs' set to access level 100.
[Debug] command_init(): - Command 'lock' set to access level 150.
[Debug] command_init(): - Command 'makepet' set to access level 100.
[Debug] command_init(): - Command 'mana' set to access level 100.
[Debug] command_init(): - Command 'memspell' set to access level 100.
[Debug] command_init(): - Command 'motd' set to access level 150.
[Debug] command_init(): - Command 'movechar' set to access level 100.
[Debug] command_init(): - Command 'npccast' set to access level 150.
[Debug] command_init(): - Command 'npcloot' set to access level 150.
[Debug] command_init(): - Command 'npcspecialattk' set to access level 100.
[Debug] command_init(): - Command 'npcstats' set to access level 150.
[Debug] command_init(): - Command 'npctypespawn' set to access level 100.
[Debug] command_init(): - Command 'nukebuffs' set to access level 100.
[Debug] command_init(): - Command 'permaclass' set to access level 150.
[Debug] command_init(): - Command 'permagender' set to access level 150.
[Debug] command_init(): - Command 'permarace' set to access level 150.
[Debug] command_init(): - Command 'pvp' set to access level 100.
[Debug] command_init(): - Command 'race' set to access level 100.
[Debug] command_init(): - Command 'repop' set to access level 100.
[Debug] command_init(): - Command 'rules' set to access level 200.
[Debug] command_init(): - Command 'save' set to access level 100.
[Debug] command_init(): - Command 'search' set to access level 100.
[Debug] command_init(): - Command 'sendzonespawns' set to access level 200.
[Debug] command_init(): - Command 'serverinfo' set to access level 201.
[Debug] command_init(): - Command 'setaapts' set to access level 100.
[Debug] command_init(): - Command 'setaaxp' set to access level 100.
[Debug] command_init(): - Command 'setallskill' set to access level 100.
[Debug] command_init(): - Command 'setskill' set to access level 100.
[Debug] command_init(): - Command 'setskillall' set to access level 100.
[Debug] command_init(): - Command 'setxp' set to access level 100.
[Debug] command_init(): - Command 'showbuffs' set to access level 100.
[Debug] command_init(): - Command 'showpetspell' set to access level 250.
[Debug] command_init(): - Command 'shutdown' set to access level 200.
[Debug] command_init(): - Command 'size' set to access level 150.
[Debug] command_init(): - Command 'spawn' set to access level 100.
[Debug] command_init(): - Command 'spawnstatus' set to access level 100.
[Debug] command_init(): - Command 'spfind' set to access level 100.
[Debug] command_init(): - Command 'summon' set to access level 100.
[Debug] command_init(): - Command 'summonitem' set to access level 100.
[Debug] command_init(): - Command 'texture' set to access level 100.
[Debug] command_init(): - Command 'title' set to access level 100.
[Debug] command_init(): - Command 'unfreeze' set to access level 100.
[Debug] command_init(): - Command 'unlock' set to access level 150.
[Debug] command_init(): - Command 'weather' set to access level 150.
[Debug] command_init(): - Command 'worldshutdown' set to access level 200.
[Debug] command_init(): - Command 'zclip' set to access level 150.
[Debug] command_init(): - Command 'zcolor' set to access level 150.
[Debug] command_init(): - Command 'zheader' set to access level 150.
[Debug] command_init(): - Command 'zone' set to access level 0.
[Debug] command_init(): - Command 'zonebootup' set to access level 150.
[Debug] command_init(): - Command 'zoneshutdown' set to access level 150.
[Debug] command_init(): - Command 'zsafecoords' set to access level 100.
[Debug] command_init(): - Command 'zsave' set to access level 200.
[Debug] command_init(): - Command 'zsky' set to access level 150.
[Debug] command_init(): - Command 'zstats' set to access level 150.
[Debug] command_init(): - Command 'zuwcoords' set to access level 100.
[Debug] [ZONE__INIT] 194 commands loaded
[Debug] [RULES__CHANGE] Loading rule set 'default' (2)
[Debug] [ZONE__INIT] Loaded default rule set 'default'
[Debug] [ZONE__INIT] Loading embedded perl XS
[Debug] [ZONE__INIT] Loading quests
[Quest] Starting Log: logs/eqemu_quest_zone_5064.log
[Quest] Tying perl output to eqemu logs
[Quest] Creating EQEmuIO=HASH(0x116d60c)
[Quest] Creating EQEmuIO=HASH(0x116d954)
[Quest] Loading perlemb plugins.
[Quest] Loading perl commands...
[Debug] [NET__WORLD] WorldConnection connect: Connecting to the server 127.0.0.1:9000 failed: TCPConnection::Connect(): connect() failed. Error: 10061
[Debug] [ZONE__INIT_ERR] worldserver.Connect() FAILED!
[Debug] [ZONE__INIT] Entering sleep mode
[Debug] [NET__IDENTIFY] Registered patch 6.2
[Debug] [NET__IDENTIFY] Registered patch Titanium
[Debug] [NET__IDENTIFY] Registered patch Live


heres my xml
<?xml version="1.0">
<server>
<world>
<shortname>cody</shortname>
<longname>codys test server</longname>

<!-- Only specify these two if you really think you need to. -->
<!--<address>Serving Machines IP</address>-->
<!--<localaddress>127.0.0.1</localaddress>-->

<!-- Loginserver information. -->
<loginserver>
<host>eqemulator.net</host>
<port>5998</port>
<account></account>
<password></password>
</loginserver>

<!-- Sets the shared key used by zone/launcher to connect to world -->
<key>some long random string</key>

<!-- Enable and set the port for the HTTP service. -->
<http port="9080" enabled="true" mimefile="mime.types" />
</world>

<!-- Database configuration, replaces db.ini. -->
<database>
<host>localhost</host>
<port>3306</port>
<username>root</username>
<password>********</password>
<db>peq</db>
</database>
</server>

hope this helps.:)

Angelox
06-22-2007, 01:11 PM
Do you mean you have perl installed and it doesn't work for EqEmu, or it doesn't work at all?
here's a test:
Can you run a command window , type in "perl" and hit enter key , what happens? do you get a "perl is not reconized ... (etc)" error?
In that same command window, type in PATH and hit enter - do you see something like "C:\Perl\bin" in there?
If Perl is not in the path, then you need to re-install and make sure you select that option. also try and change the path and install to "C:\Perl\bin", as that is how it originally was with EqEmu.

codyscafe7
06-23-2007, 01:48 AM
When i typed that in nothing happens it just goes to the next line and doesnt say anything. I tried re-installing perl, the quest still dont work and when i type those commands in on the command prompt nothing happens, no errors or anything. Is this just me?

Darkonig
06-23-2007, 01:54 AM
when testing perl setup, type perl --version
that should display a bunch of text which basically verifies perl is present and available.

Next, What version of the emulator are you using? Are you using the downloaded binaries or did you compile it yourself?

Angelox
06-23-2007, 02:01 AM
When i typed that in nothing happens it just goes to the next line and doesnt say anything. I tried re-installing perl, the quest still dont work and when i type those commands in on the command prompt nothing happens, no errors or anything. Is this just me?

Your Perl is working, EqEmu just can't find it - what about your path? Type PATH and hit enter in a command shell

codyscafe7
06-23-2007, 04:23 AM
here is what it says when i type in PATH.

Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.

C:\DOCUME~1\OWNER>PATH
PATH=C:\Perl\bin\site\bin;C:\Perl\bin\bin;C:\Perl\ bin\;C:\PROGRA~1\PHP\;c:\perl\site\bin;c:\perl\bin ;C:\Windows\;C:\Windows\Syst

C:\DOCUME~1\OWNER>

Angelox
06-23-2007, 07:48 AM
It all looks OK, appears you are not un-installing Perl before re-install, but that shouldn't matter.
Are you using default install directory for Eqemu? "C:\EQEMU" , with Quests in "C:\EQEMU\QUESTS".

codyscafe7
06-23-2007, 04:54 PM
yep the quests are as follows c\EQEmu\Quests. what could be wrong with my hail button? why wont it work??

codyscafe7
06-24-2007, 07:07 AM
What should i do??

Angelox
06-24-2007, 07:45 AM
Your biggest problem is , your not searching for the answers; you're waiting for us to search for you.
I don't know what happened with your install, but i can assure you you didn't follow instructions and left something out , or did something wrong (during install). As to what it was, there are many reasons, you have to figure for yourself. here is a forum search for "perl doesn't work";
http://eqemulator.net/forums/search.php?searchid=490793
You need to look for your answers, this way you'll get faster response.

codyscafe7
06-25-2007, 12:51 PM
Ive looked everywhere. I checked the forums. I looked at wiki I searched in google. I even uninstalled everything! and re-installed it only to get the same problem. could someone please help me? Why is my server acting like this. im so confused!!!. Could someone please help me?

EmanonCow
06-25-2007, 01:44 PM
perl --version
outputs what?

Darkonig
06-26-2007, 03:35 AM
More to the point, you have not said what version of the emulator you are trying to use or whether you are running the binary or compiling yourself.

codyscafe7
06-28-2007, 03:26 PM
im using 7.0-992, also what do you mean by compiling you mean when i click on start.bat or what? im using perl 5.8.8.820.and by outputs you mean?

techguy84
06-28-2007, 04:34 PM
perl 5.8.8.820

This version of perl does not allow command line installations of the needed components like IO stringy and DBD-Mysql. When you open the Command line from your start menu and type in perl, it should bring up a Perl Interface with a Windows GUI. From this point you have to enable searchign for all packages and then in the text box in the top, type in the packages needed by the emulator. For more info my PDF guide as it points out everything.

You have to make sure that you select to search all packages though. If you do not choose to look at all packages, you will find one package easy, one will come up not exactly as it says it should be, and the other will be no where to be found.

RULES: None of the packages needed are preinstalled, and they WILL have the same name as what is reference in the wiki guide and in the PDF guide.

If you are having trouble witht that version, use this link to download a older versoin of Perl that has the command line interface for installing perl packages.

http://www.activestate.com/store/download_file.aspx?binGUID=5f03b75f-2bf0-4380-99b2-d55cff4bc233 (Version 5.6.1.638)

To use this, install as normal, making sure to select adding to Windows PATH, and then open up the command prompt and type in perl. Once its up and your able to enter commands type

Install "Package Name"

Where Package name is the names of the three packages from the guide.

This may be completly useless post, but I have seen roughly four users have issues with perl becuase of the new GUI's stupid package managment feautres, but I still recommend using it as it works when used properly and it is a newer up-to-date version.

John Adams
06-29-2007, 08:09 AM
Not that this has a thing to do with the original post... but when I made my server, I didn't feel like installing everything completely. So I picked out perl58.dll, threw it into the server exe folder, and quests work.

Not sure what else I am missing, since I haven't fully tested all aspects. I just hate the fact you have to install all these packages to get one thing to work. And I keep remembering a rumor that perl was no longer needed - but I think that was bogus ;)

ksmith08
07-09-2007, 08:32 AM
Here's my two cents worth (coming from someone going through the process of setting up a new server.)

Are your quests and maps in the correct directories? I made the simple mistake of extracting the files into a sub directories in the folders, and had the identical symptoms. I could not hail or interact in any way with the NPC's.

x-scythe
07-09-2007, 11:03 PM
wow, kind of amazing to see devn00b and image posting here
i dont come here like...ever anymore. forums are dead and i dont recognize anyone that is posting here.

in regards to your problem... i just skimmed through this briefly so sorry if you already tried this (too much to read) but did you try the npcid.pl method like image suggested? thats how i always did it


and btw, shouldnt this be in the quest Q&A section? does this forum still have moderators? haha

Nasyr
09-19-2007, 06:40 AM
Hi everyone,

i have exactly the same problem with Hail and Quests. Nothing of both workds. After searching a bit i checked the log folder and found following:


[09.19. - 20:15:12] Starting Log: logs/eqemu_quest_zone_0724.log
[09.19. - 20:15:12] Tying perl output to eqemu logs
[09.19. - 20:15:12] Creating EQEmuIO=HASH(0x116eb70)
[09.19. - 20:15:12] Creating EQEmuIO=HASH(0x116eeb8)
[09.19. - 20:15:12] Loading perlemb plugins.
[09.19. - 20:15:12] Loading perl commands...
[09.19. - 20:15:56] WARNING: error compiling quest file quests/gfaydark/orc_pawn.pl: Perl runtime error: Undefined subroutine &main::eval_file called.
(reverting to default questfile)
[09.19. - 20:15:56] WARNING: error compiling quest file quests/gfaydark/a_drunkard.pl: Perl runtime error: Undefined subroutine &main::eval_file called.
(reverting to default questfile)
[09.19. - 20:15:56] WARNING: error compiling quest file quests/gfaydark/Guard_Moonwind.pl: Perl runtime error: Undefined subroutine &main::eval_file called.
(reverting to default questfile)
[09.19. - 20:15:56] WARNING: error compiling quest file quests/gfaydark/Guard_Starstrike.pl: Perl runtime error: Undefined subroutine &main::eval_file called.
(reverting to default questfile)
[09.19. - 20:15:56] WARNING: error compiling quest file quests/gfaydark/orc_centurion.pl: Perl runtime error: Undefined subroutine &main::eval_file called.
(reverting to default questfile)
[09.19. - 20:15:56] WARNING: error compiling quest file quests/gfaydark/orc_centurion.pl: Perl runtime error: Undefined subroutine &main::eval_file called.
(reverting to default questfile)
[09.19. - 20:15:56] WARNING: error compiling quest file quests/gfaydark/orc_centurion.pl: Perl runtime error: Undefined subroutine &main::eval_file called.
...


Anyone can tell me how to fix this issue?
What exactly does the logfile try to tell me? :confused:

Thanks for any help

Nasyr

Lalolyen
09-19-2007, 02:34 PM
Perl scripts are setup in the following format: questdirectory/zoneshortname/npcid.qst

Depending on your database those npc ids may be different, I would make sure that the ID's that are in the database are the same as the id on the quest file.

"questdirectory/zoneshortname/npcid.qst"

thought it was NPCNAME.pl? or NPCID.pl (if you want a specific spawn to do it) Least thats how I have mine setup...

gernblan
09-19-2007, 05:02 PM
My guess is that your perl install on the server is borked.

Nasyr
09-19-2007, 05:45 PM
Hmm tried several Versions of Perl now. Also droped and reinstalled all tables. Nothing helped so far. Perl seems to work fine as "perl --version" works.
PATH is set too...

Nasyr
09-20-2007, 06:24 PM
ok got it fixed, should have followed the PDF-Tutorial instead the html one :)

mwmdragon
09-22-2007, 06:50 PM
Please make sure you leave 2 blank lines after the code in your quests, it will make it so the quests work.

If this doesn't work... then at least i tried ;)

PS. i miss playing EQ classic with the tons of players liek live used to have :(

Astaldoath
10-03-2007, 12:21 PM
ok got it fixed, should have followed the PDF-Tutorial instead the html one :)

how did you fix your problem im having the same one.