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
  #1  
Old 08-19-2014, 03:15 PM
Leetsauce
Hill Giant
 
Join Date: Apr 2010
Posts: 169
Default Check_hasitem, keys, and powersources

Context: I use keys on my server instead of qglobal "flags", and I generally make it an item or augment that the character can wear.

So I ran into an issue today where check_hasitem was crashing zones (due to checking corpses) and happened to stumble upon an issue with the check_hasitem.pl plugin that did NOT check the powersource slot. Simple fix was to take the powersource off, put it in your inventory, and the check worked successfully. So, it led me here:


#Check main inventory and cursor
for($slot1=0; $slot1<=9999; $slot1++) {
$itemid1=$client->GetItemIDAt($slot1);
for($i=0; $i<5; $i++) {
$augid1=$client->GetAugmentIDAt($slot1, $i);
if($augid1==$itmchk) {
return 1;
}
}

Changing the second variable:$slot1<=30(inventory slots minus the power source slot) to $slot1<=9999(9999 is the slot #peekinv tells you the power source is found) fixed the issue, and forced the routine to check the power source slot. I only had to alter it in this section alone for my intended purpose, but I figured I would share just in case someone runs into the same issue. I suck at perl, so this one took me a minute or two to solve and wish to pass on what I've learned.

Thanks!
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 06: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