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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 01-16-2010, 08:39 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Yeah, sorry, but that is a pretty old quest I submitted. I have since learned how to use qglobals and such properly, and that way is not the proper way to do it. It should actually work most of the time, but can cause some nasty bugs that you don't want to have to deal with :P Your script would actually seem to work fine most of the time, accept you have some parenthesis in the wrong places in your EVENT_ITEM that is breaking that section of the script.

Anyway, the proper way to check a qglobal value is to write it like this:
Code:
if ($itemcount {1387} == 1 && $qglobals{Epic1.5} == 1) {
(also note that I removed the extra parenthesis that you had in the wrong places too)

Instead of the way you have it like this:
Code:
if (($itemcount {1387} == 1)) && ($Epic1.5 == 1) {
Also, you should use plugins for your item turn ins, so you can use the return item plugin to return a player's items if they turn in the wrong item or don't meet other requirements you might have set. Here is the same example as above, accept with the plugin:

Code:
if (plugin::check_handin(\%itemcount, 1387 => 1) && $qglobals{Epic1.5} == 1) {
You can find quite a bit on qglobals here from the wiki at the bottom of the page:
http://www.eqemulator.net/wiki/wikka...=QuestTutorial

There are 2 more things I think are worth mentioning in regards to qglobals:

1. Always make sure you enable the NPC to see qglobals by setting the qglobal field in the npc_types table to 1.

2. Check the wiki page above to understand the options field for qglobals. By setting it to 0 like you are, it means that only that particular NPC in that particular zone will see that qglobal for that particular player. If you wanted another NPC to check it, they would not see it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 01-16-2010 at 08:45 AM..
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 10:33 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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3