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-07-2004, 02:21 AM
Adh87
Sarnak
 
Join Date: Oct 2004
Posts: 35
Default Noob Perl user

Here are some small simple events I have made while being in my Accounting class...any help/suggestions would be appreciated.



Sub EVENT_SAY
{
if ($text=~/Hail/i){quest::say(“Hello, welcome to my world!”);}
}




sub EVENT_SAY
{
if ($text=~ /Hail/i){quest::say("Why hello there mister!");}
}





sub EVENT_SAY
{
if ($text=~/Hail/i){quest::say("When someone is slain…they will return to where their soul has been bound. I can [bind your soul] if you would like.”);}
if ($text=~/bind my soul/i)
{
quest::say(“Binding your soul sir.”);
quest::castspell($userid,2049);
}
}



sub EVENT_SAY
{
if ($text=~/Hail/i){quest::say(“Hello, you look like you could use a [Big Soul Devour]. Would you like one?”);}
if ($text=~/Big Soul Devour/i)
{
quest::say(“Alright give me a minute and I’ll craft ya a knew one!”);
quest::summonitem(11001);}
}








sub EVENT_SAY
{
if ($text=~/Hail/i){quest::say(“Hello there! I am Tunare…mother of the Elves. You look very hot, would you like my forces to [summon a rainstorm]?”);}
if ($text=~/summon a rainstorm/i)
{
quest::rain(1);
quest::say(“There ya go! Cool down a bit.”);}
}
Reply With Quote
  #2  
Old 10-07-2004, 03:07 AM
x-scythe
Discordant
 
Join Date: Jun 2003
Posts: 449
Default

try to space out your code
like

Code:
sub EVENT_SAY
{
  if($text=~/what up yo/i)
   {
     quest::say("Nothin much, lets go shoot up some homies!");
   }
}
makes it easier to read and find mistakes
Reply With Quote
  #3  
Old 10-07-2004, 03:26 AM
Adh87
Sarnak
 
Join Date: Oct 2004
Posts: 35
Default Alright thanks

But so far I'm doing this right?
Reply With Quote
  #4  
Old 10-07-2004, 09:20 AM
Malignus Wingnut
Hill Giant
 
Join Date: Sep 2004
Posts: 233
Default

Yes, what x-scythe said, definitely take it into consideration. As a long time programmer in many languages I know how important it is to space out your code and, as dumb as it sounds, USE COMMENTS. As soon as you make a large quest file...then say you dont look at it for about a month. You then return to edit the file and uh-oh its jumbled and you cant figure out what stuff does! But the syntax of all of your code seems to be correct.
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:03 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