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
  #2  
Old 10-01-2018, 12:07 AM
Almusious
Fire Beetle
 
Join Date: Sep 2012
Posts: 25
Default

Code:
sub EVENT_SAY {
	if ($text=~/armorset/i) {
		# head armor ids   147587 = leather, 147580 = plate, 147573 = chain, 147566 = cloth
		# chest armor ids  147588 = leather, 147581 = plate, 147574 = chain, 147567 = cloth
		# leg  armor ids   147591 = leather, 147584 = plate, 147577 = chain, 147570 = cloth
		my $headid = $client->GetItemIDAt(2);
		my $chestid = $client->GetItemIDAt(17);
		my $legid = $client->GetItemIDAt(18);
		if ($headid ~~ [147587,147580,147573,147566] and $chestid ~~ [147588,147581,147574,147567 and $legid ~~ [147591,147584,147577,147570])
		{
			$client->Message(15,"3 pieces of armor equipped, $headid, $chestid, $legid.");
		}
		elsif ($headid ~~ [147587,147580,147573,147566] and $legid ~~ [147591,147584,147577,147570])
		{
			$client->Message(15,"2 pieces of armor equipped, $headid, $legid.");
		}
	}
}
Use smart matching against an array, much easier to do and look at. Would also consider a hash if you go with any more items fwiw.
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 07:03 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3