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-20-2007, 04:18 PM
codyscafe7
Fire Beetle
 
Join Date: Nov 2006
Posts: 17
Exclamation 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!!
Reply With Quote
  #2  
Old 06-20-2007, 05:46 PM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default

are the names of your files in the 'Firstname_Lastname' format?
__________________
-Croup (the rogue)
Creator of Pandemic (PvP-Racewars)
Reply With Quote
  #3  
Old 06-20-2007, 05:57 PM
image
Demi-God
 
Join Date: Jan 2002
Posts: 1,290
Default

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.
__________________
www.eq2emu.com
EQ2Emu Developer
Former EQEMu Developer / GuildWars / Zek Seasons Servers
Member of the "I hate devn00b" club.
Reply With Quote
  #4  
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
  #5  
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
  #6  
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
  #7  
Old 09-19-2007, 02:34 PM
Lalolyen
Banned
 
Join Date: Aug 2007
Location: Sneeking up behind a admin IRL
Posts: 169
Default

Quote:
Originally Posted by image View Post
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...
Reply With Quote
Reply


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 12:52 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3