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 10-05-2004, 01:33 PM
mrea
Discordant
 
Join Date: Sep 2004
Location: Camp Hill,PA
Posts: 370
Default Anyone know whats wrong with this?

Here is the code I'm trying to use:
Code:
sub EVENT_SAY 
{
 {
  if ($text=~ /Hail/i) { quest::say("You look like a strong adventurer. Possibly you could take on this [problem] that ails our citizens of late.");} 
  if ($text=~ /Problem/i) { quest::say("You see, a brooding Dragon is in the sewers of Freeport.  I need you to find him and slay him. If you bring me one of his teeth I will reward you greatly.");} 
 }
  if ($item1 == 00001){ quest::say("Ah yes, I heard the screeches. Congratulations $name!");
  quest::summonitem("21820");
  quest::shout("All praise $name!");}
}
I can get the mob to do the summon item and shout, but only after I hail them after i do the turn in. Obviously thats not what I wanted.
Reply With Quote
  #2  
Old 10-05-2004, 01:47 PM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

You have an extra bracket set around each one. it should be this.

Code:
sub EVENT_SAY { 
if ($text=~ /Hail/i) { 
	quest::say("You look like a strong adventurer. Possibly you could take on this [problem] that ails our citizens of late.");
} 
if ($text=~ /Problem/i) { 
	quest::say("You see, a brooding Dragon is in the sewers of Freeport. I need you to find him and slay him. If you bring me one of his teeth I will reward you greatly.");
}
if ($item1 == 00001){
	quest::say("Ah yes, I heard the screeches. Congratulations $name!"); 
	quest::summonitem("21820"); 
	quest::shout("All praise $name!");
}
}
Also make sure you have at least 2 blank lines after the entire script.
Reply With Quote
  #3  
Old 10-05-2004, 01:51 PM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

Relocate your if($item ...) block to a new sub, EVENT_ITEM.
Code:
sub EVENT_SAY
{
   if [text x] then do action y
   etc.
}

sub EVENT_ITEM
{
   if [item x] then do action y
   etc.
}
Probably the $item variable is getting pushed to your script when it attempts to run EVENT_ITEM, but since the sub does not exist, there is no effect, other than assigning the variable a value inside the module. Upon the next hail, EVENT_SAY is triggered again, and the $item variable now has the expected value assigned.
Reply With Quote
  #4  
Old 10-05-2004, 01:55 PM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

oh duh. lmfao i didnt even notice he didnt make an event_item sub...

/me makes retard motion with hand. durrrrrrh
Reply With Quote
  #5  
Old 10-05-2004, 01:57 PM
mrea
Discordant
 
Join Date: Sep 2004
Location: Camp Hill,PA
Posts: 370
Default Wow...

I'm just starting but even I should know that lol, thanks both of you though (this isn't my first) shocking isn't it?!
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 02:50 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3