Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 06-21-2007, 12:32 AM
codyscafe7
Fire Beetle
 
Join Date: Nov 2006
Posts: 17
Default

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.
Reply With Quote
  #2  
Old 06-21-2007, 05:25 AM
image
Demi-God
 
Join Date: Jan 2002
Posts: 1,290
Default

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
__________________
www.eq2emu.com
EQ2Emu Developer
Former EQEMu Developer / GuildWars / Zek Seasons Servers
Member of the "I hate devn00b" club.

Last edited by image; 06-21-2007 at 01:28 PM..
Reply With Quote
  #3  
Old 06-21-2007, 05:57 AM
devn00b's Avatar
devn00b
Demi-God
 
Join Date: Jan 2002
Posts: 15,658
Default

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.
__________________
(Former)Senior EQEMu Developer
GuildWars Co-Founder / World Builder.
World Builder and Co-Founder Zek [PVP/Guild Wars/City Takeovers]
Member of the "I hate devn00b" Club
Most Senior EQEMu Member.

Current Work: EverQuest 2 Emulator. Zeklabs Server
Reply With Quote
  #4  
Old 06-21-2007, 01:43 PM
codyscafe7
Fire Beetle
 
Join Date: Nov 2006
Posts: 17
Default

Im still confused. What should i do to get the hail button to work?
Reply With Quote
  #5  
Old 06-21-2007, 02:12 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by codyscafe7 View Post
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?
Reply With Quote
  #6  
Old 06-22-2007, 02:56 AM
codyscafe7
Fire Beetle
 
Join Date: Nov 2006
Posts: 17
Default

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.
Reply With Quote
  #7  
Old 06-22-2007, 03:37 AM
codyscafe7
Fire Beetle
 
Join Date: Nov 2006
Posts: 17
Default

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?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:15 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3