Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 09-14-2008, 02:55 AM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default

Man this is about to drive me frikken crazy, I copied your quest directly from this page into a file called a_gnoll.pl in the blackburrow folder. I also have the quest that gives the flags on an NPC. I hail, it says I have the flag. I kill a gnoll...I get normal xp....why does my server hate me :( Can anyone see anything wrong with this script?

Code:
sub EVENT_KILLED_MERIT {

#Checking if the anti-AE global is defined to stop credits from being earned if it is
  if (!defined($qglobals{anti_ae})) {

#Optional code to randomly spawn a named NPC when the target dies.
my $x = $npc->GetX();
my $y = $npc->GetY();
my $z = $npc->GetZ();
my $named = quest::ChooseRandom(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50);

  if ($named == 50) {
    quest::unique_spawn(quest::ChooseRandom(2700667,2700670,2700673,2700676,2700683,2700685),0,0,$x,$y,$z);
    $named = undef;}

#Checking if the exp_credit global is defined for this character
    if (defined($qglobals{exp_credits})) {
#Making sure the character is not already level 70+
      if ($ulevel <= 69) {
#Adding 1 point/credit to the exp_credits global
        quest::setglobal("exp_credits", $qglobals{exp_credits}+1, 5, "F");

#Checking the character's level range        
        if ($ulevel >= 1 && $ulevel <= 55) {
#Variable to define how many exp_credits are needed to level in this level range.
        my $exp_req = 24;
          if ($qglobals{exp_credits} >= $exp_req) {
            quest::level($ulevel+1);
#subtract the actual exp_credits global points. Note that this has to be 1 more than the exp_req global is set to.
            quest::setglobal("exp_credits", $qglobals{exp_credits}-25, 5, "F");
          }
my $exp_needed = ($exp_req - $qglobals{exp_credits});
$client->Message(5, "You currently need $exp_needed experience credits for your next level.");
        }
#same thing as above, but for the next higher level range
        if ($ulevel >= 56 && $ulevel <= 60) {
        my $exp_req = 29;
          if ($qglobals{exp_credits} >= $exp_req) {
            quest::level($ulevel+1);
            quest::setglobal("exp_credits", $qglobals{exp_credits}-30, 5, "F");
          }
my $exp_needed = ($exp_req - $qglobals{exp_credits});
$client->Message(5, "You currently need $exp_needed experience credits for your next level.");
        }
        if ($ulevel >= 61 && $ulevel <= 65) {
        my $exp_req = 34;
          if ($qglobals{exp_credits} >= $exp_req) {
            quest::level($ulevel+1);
            quest::setglobal("exp_credits", $qglobals{exp_credits}-35, 5, "F");
          }
my $exp_needed = ($exp_req - $qglobals{exp_credits});
$client->Message(5, "You currently need $exp_needed experience credits for your next level.");
        }
        if ($ulevel >= 66 && $ulevel <= 69) {
        my $exp_req = 39;
          if ($qglobals{exp_credits} >= $exp_req) {
            quest::level($ulevel+1);
            quest::setglobal("exp_credits", $qglobals{exp_credits}-40, 5, "F");
          }
my $exp_needed = ($exp_req - $qglobals{exp_credits});
$client->Message(5, "You currently need $exp_needed experience credits for your next level.");
        }

      }
#If the character is level 70+, delete the exp_credit global for them since it is no longer needed.
      if ($ulevel >= 70) {
        quest::delglobal("exp_credits"); 
      }      
      
    }

#Checking if the new_credits global is defined for this character
    if (defined($qglobals{new_credits})) {
#Adding 1 point/credit to the new_credits global
      quest::setglobal("new_credits", $qglobals{new_credits}+1, 5, "F");
#Setting the anti_ae global after all credits are applied.
      quest::setglobal("anti_ae", 1, 7, "S5");
my $total_credits = ($qglobals{new_credits} + 1);
$client->Message(5, "You currently have $total_credits Credits.");
    }
      
  }
   
}
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 01: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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3