EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Hail is broken!! (https://www.eqemulator.org/forums/showthread.php?t=22985)

codyscafe7 06-20-2007 04:18 PM

Hail is broken!!
 
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.

Code:

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

Code:

        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
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

Quote:

Originally Posted by codyscafe7 (Post 134095)
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.

Code:

[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
Code:

<?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?


All times are GMT -4. The time now is 01:51 AM.

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