Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 07-19-2009, 04:34 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default Adding qglobal point

I am just trying to make something where if a monster dies and that person's qglobals are in the right range, it will increase it by 1. I check to make sure the monster has qglobals set to 1. This quest doesn't seem to do anything as the value just stays the same

Code:
sub EVENT_KILLED_MERIT{
   if ($qglobals{mmed} >=3 && $qglobals{mmed}) <=6){
  quest::setglobal("mmed", $qglobals{mmed}+1, 5, "F");
  }
 }
Reply With Quote
  #2  
Old 07-19-2009, 06:35 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Make sure the NPC being killed has qglobals enabled in the database.

Oh, and get rid of the extra close parenthesis.
Reply With Quote
  #3  
Old 07-19-2009, 09:51 PM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default

It might be having problems recalculating the new value when setting the global itself. I tested the script below in sub EVENT_SAY and it works fine. If it doesn't work in sub EVENT_KILLED_MERIT then there is something not working with that event. And as joligario said, make sure you have qglobals set to 1 on this NPC in the database.

Code:
sub EVENT_KILLED_MERIT {

   if (($qglobals{mmed}>=3) && ($qglobals{mmed}<=6)){
      $new = $qglobals{mmed}+1;
      quest::setglobal("mmed", $new, 5, "F");
   }

}
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 05:32 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