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 11-26-2012, 10:07 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

Heya Gaflack,

I don't know much about the check_hasitem method however I thought I would suggest a slightly different approach to what you are trying to achieve. Note that I wrote this quickly and as I am no perl expert there are probably some errors!

Code:
%ITEM_RESPONSE = (
	132535, "Aviak Charm",
	132538, "Shadow Boot from the Evil Tower",
	132539, "Growler Canine",
	132540, "Knights Eye from Sebilis",
	132541, "Spiders Eye from the Velks Icy World",
	132542, "Gem of the Void from 4 Arms",
	132543, "Bugs Eye from Soldiers in the Grove",
	132544, "Western Waste Wyrm Eye",
	132545, "Undead Eye from the Umbral Skeletons",
	132546, "Valor Eye form those Cave Mobs in Valor"
);

sub EVENT_SAY {
	if ( $text=~/hail/i ) {
		foreach $i (keys (%ITEM_RESPONSE)) {
			if ( plugin::check_hasitem( $client, $i ) ) {
			$t = $ITEM_RESPONSE{$i};
			quest::say("Hail, $name! Bring me your old charm and a $t and I will upgrade your Charm");
			}
		}
	}
}
Reply With Quote
  #2  
Old 11-26-2012, 10:21 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

So I got curious and had a look at the server side methods that are called from check_hasitem. I do not believe there is anything there which could cause the client to lock up so badly.

Also, something I failed to include in my code snippet and should also be included in your original code is a return / break after the check_hasitem has succeeded. Once you have found the item, there is no need to continue searching.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
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 05:58 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