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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 08-04-2004, 11:02 PM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default

In all my quests i add similar code like that to a seperate sub, that way if the mob is involved in quests, you can use the effect several times without having to retype it.

e.g
Code:
sub EVENT_ITEM
 {
   if($itemcount {xx} && $itemcount {xxxx} == 1)
     {
       quest::say("Thanks for the stuff i needed $name.");
      }
      else
       {
         NoNeed();
        }
      if($itemcount {xx} && $itemcount {xxxx} == 1)
       {
         quest::say('thanks for this name);
        }
        else
         {
           NoNeed();
          }
         }

sub NoNeed
 {
   if($item1 != "")
    {
      quest::summonitem($item1,0);
     }
   if($item2 != "")
    {
      quest::summonitem($item2,0);
     }
   if($item3 != "")
    {
      quest::summonitem($item3,0);
     }
   if($item4 != "")
    {
      quest::summonitem($item4,0);
     }
   if($platnium != 0 || $gold != 0 || $silver != 0 || $copper != 0)
     {
       quest::givecash($platnium, $gold,$silver,$copper);
    }
You Could also just make the second if an elsif, that way you only need one call of the NoNeed. but this was just a simple example.
__________________
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
 


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 03:36 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