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 06-22-2004, 07:45 PM
nilar
Hill Giant
 
Join Date: Dec 2003
Location: The moon
Posts: 230
Default Help with Perl script

Can anyone tell me whats wrong with this script? The second sub Event_Say and the sub Event_Attack work but I can't get the first sub Event_say to work.

Code:
sub EVENT_SAY(){
  if ($text=~/Hail/i){quest::say("Hello there $name. I am the Avatar of Anarchy. If you are wishing to turn to the dark side, I can call upon Cazic Thule to free you from the chains of order. This will convert you into a Player Killer who can kill and be killed by other Player Killers. Do you wish to [convert]?");  }
}
sub EVENT_SAY(){
  if ($text=~/convert/i){quest::say("Very well then $name. Bring Anarchy upon this world!"); quest::pvp("on");  }
}
sub EVENT_ATTACK(){
  quest::shout("FOOL! You have dug your own grave!");
}
__________________
"I can imagine a world without war, a world without hate. And I can imagine myself attacking that world. They would never expect it"

Nilar Nightwolf- SaltyBoogers Non Legit ServerOp
Ascendra Custom Legit ServerOp
GM-Mgmt Jezebells Everquest Server
Senyen of the Abyss [65 Forest Stalker] Dil's World
Reply With Quote
  #2  
Old 06-22-2004, 08:25 PM
red1234
Fire Beetle
 
Join Date: Jun 2004
Posts: 13
Default

Both 'if' statements should be in one EVENT_SAY I believe.

Syntax looks right for the first 'if' statement, too.
Reply With Quote
  #3  
Old 06-22-2004, 08:30 PM
KhaN's Avatar
KhaN
Dragon
 
Join Date: Mar 2004
Location: France, Bordeaux.
Posts: 677
Default

Code:
sub EVENT_SAY
{
 if ($text=~/Hail/i)
 {
  quest::say("Hello there $name. I am the Avatar of Anarchy. If you are wishing to turn to the dark side, I can call upon Cazic Thule to free you from the chains of order. This will convert you into a Player Killer who can kill and be killed by other Player Killers. Do you wish to [convert]?");
 }
 if ($text=~/convert/i)
 {
  quest::say("Very well then $name. Bring Anarchy upon this world!");
  quest::pvp("on");
 }
}
sub EVENT_ATTACK
{
 quest::shout("FOOL! You have dug your own grave!"); 
}
__________________

Reply With Quote
  #4  
Old 06-23-2004, 01:03 AM
animepimp
Dragon
 
Join Date: Jan 2004
Posts: 860
Default

You're not allowed to have two subs with the same name. The program is reaching that second one, finding an error and quiting.
Reply With Quote
  #5  
Old 06-23-2004, 05:47 AM
nilar
Hill Giant
 
Join Date: Dec 2003
Location: The moon
Posts: 230
Default

Ah alright I've been using QST which allowed more than one Event_Say. Thanks guys
__________________
"I can imagine a world without war, a world without hate. And I can imagine myself attacking that world. They would never expect it"

Nilar Nightwolf- SaltyBoogers Non Legit ServerOp
Ascendra Custom Legit ServerOp
GM-Mgmt Jezebells Everquest Server
Senyen of the Abyss [65 Forest Stalker] Dil's World
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:45 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