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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2008, 12:49 AM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default

Still doesn't work for me. I changed what you posted. Hailed the NPC for the flags. It says I got them. Zoned to gukbottom and killed something. All I get is normal xp. Do you have to have aaxp on for the quest to work at all or will it work anyways? On my server all I have is old school eq enabled. No kunark or anything, even if I #lvl myself to 51 it doesn't let me turn aa on. Thats the only thing I can come up with that may be breaking it.
Reply With Quote
  #2  
Old 09-13-2008, 03:55 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I haven't really messed with default or player.pl files much yet. Maybe try putting the quest directly on a certain NPC and try it that way first.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 09-13-2008, 11:27 AM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default

I still can't get it to work. I copy and pasted your quest to one zone and made no mods to it at all. I get the flag when I hail an NPC. Then kill the NPC that I have the kill script set too...I get normal xp...so now I'm totally at a loss. All other quests on the server work...it just seems to hate this one haha :(
Reply With Quote
  #4  
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
  #5  
Old 09-14-2008, 05:17 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Every NPC that uses qglobals in a script HAS to have the qglobal setting in the NPC_Types table set to 1 (default is 0 which ignores globals completely).

You can set these easily for an entire zone by using GeorgeS NPC Loot Editor and changing 1 of the NPCs to have qglobal set to 1 and then use the field tool menu to "propagate the field" or whatever it is called. That will set all NPCs in the zone to the same setting.

That should resolve your issue.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 09-15-2008, 12:31 AM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default

I have never messed with global quests so didn't catch that at all. Many thanks Trev, you're the man. Works perfectly after this change.
Reply With Quote
  #7  
Old 09-15-2008, 12:33 AM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default

One more question, and I'm sorry to keep bugging you, but I really do appreciate you helping out. Is there any way to make mobs only within 7 levels give points? Since this is global, it would be way too easy to lvl on my server at like 40 killing in qeynos hills haha.
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 12:56 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