Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-15-2004, 08:25 AM
jimbox114
Hill Giant
 
Join Date: Jun 2004
Posts: 231
Default Trouble with some code

I have looked at this over and over again. I have tried many different ways, and compared it to other similar quests and just can't seem to find whats wrong with it. What this basically does is spawns 4 mobs that each drop a item. You then turn those 4 items into the quest npc and get a item in return. Here is the code as of now:

Code:
sub EVENT_SAY
{
 if ($text=~ /Hail/i){quest::say("What business do you have in my realm?  I did not request your presence?  Has [somebody] sent you to me?");}
 if ($text=~ /somebody/i){quest::say("Who told you to speak with me?  Speak there name!");}
 if ($text=~ /phexor/i){quest::say("Oh you you are here on the matter of Father Time.  Well before I waste my time helping you, I expect you to pass a [test].  If you are indeed a worthy soldier, you will have no problem passing this test.");}
 if ($text=~ /test/i){quest::say("Yes, I will summon forth some of my most honorable soldiers.  Fight them and return to me each of there gems. Let me know when you are [ready] to start.");}
 if ($text=~ /ready/i){quest::say("Very Well, Hand me 500 pieces of platinum to start.");} 
      
sub EVENT_ITEM {
   if ($itemcount{69117} == 4){
      quest::say("Very well $name, I see you have the will of a noble soldier.  Take this Symbol as proof of our meeting. Now you must venture to Paludal Caverns where you will meet The Duke of Below."); 
      quest::summonitem(69113); 
   }
   if ($platinum == 500) {quest:say("Below me is four soldiers.  Fight them and bring me there symbol's as proof of your actions.");
   quest::spawn(281234,0,0,-170,2438,463);
   quest::spawn(281234,0,0,-170,2311,466);
   quest::spawn(281234,0,0,180,2283,463);
   quest::spawn(281234,0,0,180,2431,463);}
}
Oh he does nothing when hailed. He basically is only doing the default quest for the server, so it is not reading any of the quest from his file.
Reply With Quote
  #2  
Old 08-15-2004, 09:06 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Try this.
Code:
sub EVENT_SAY
{
if($text=~/hail/i)
  {
  quest::say("What business do you have in my realm?  I did not request your presence!  Has [somebody] sent you to me?");
  }
if($text=~/somebody/i)
  {
  quest::say("Who told you to speak with me?  Speak their name!");
  }
if($text=~/phexor/i)
  {
  quest::say("Oh you you are here on the matter of Father Time.  Well before I waste my time helping you, I expect you to pass a [test].  If you are indeed a worthy soldier, you will have no problem passing this test.");
  }
if($text=~/test/i)
  {
  quest::say("Yes, I will summon forth some of my most honorable soldiers.  Fight them and return to me each of there gems. Let me know when you are [ready] to start.");
  }
if($text=~/ready/i)
  {
  quest::say("Very Well, Hand me 500 pieces of platinum to start.");
  }
}
sub EVENT_ITEM
{
if($platinum == "500")
  {
  quest::say("Below me is four soldiers.  Fight them and bring me there symbol's as proof of your actions.");
  quest::spawn(281234,0,0,-170,2438,463); 
  quest::spawn(281234,0,0,-170,2311,466); 
  quest::spawn(281234,0,0,180,2283,463); 
  quest::spawn(281234,0,0,180,2431,463);
  }
if($itemcount{69117} == "4")
  {
  quest::say("Very well $name, I see you have the will of a noble soldier.  Take this Symbol as proof of our meeting. Now you must venture to Paludal Caverns where you will meet The Duke of Below.");
  quest::summonitem(69113);
  }
}
After looking at my formatted code compared to yours, I noticed a very simple problem. You didn't close EVENT_SAY. Remember to READ the output of zone.exe and it will usually tell you exactly what is wrong.

~Cisyouc
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #3  
Old 08-15-2004, 09:30 AM
jimbox114
Hill Giant
 
Join Date: Jun 2004
Posts: 231
Default

That is most certainly a big improvement. I think the biggest problem was my lack of "500" for the platinum. At one point I did have the } for the event_say, it must have gotten removed when i was playing with it.

Only problem now is it only spawns 1 of the 4 things. It basically spawns the first spawn, and skips the rest. I went back and double checked the locations and they check out. It might have something to do with the same reason my spell scriber don't work. I have tried 3 different codes word for word that other servers use, and mine still don't work.
Reply With Quote
  #4  
Old 08-15-2004, 09:46 AM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default

you gotta space out all the { from ) like.. if ($text=~/poop/i) {
gotta space that out not cram it together
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com
Reply With Quote
  #5  
Old 08-15-2004, 09:57 AM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default

That won't effect the compile cripp, but it makes it alot more readable.

Best tip i learned while doing perl quests was from sandy i think... i don't remember really, someone did! anyway if you have perl installed on your computer, just open a command prompt and type perl $EQEMUQUESTDIR$/quest.pl

and it will tell you all the errors you have, if any, another option is to do perl -c $QUESTDIR$/quest.pl which only checks syntax instead of running the quest, but since there is no main sub to run in these quests you don't really need the -c, just running the quest will check syntax for you.
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
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 04:01 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