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 02-04-2008, 10:39 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Perl Question with "my $item" using an OR statement

Ok, here is the basic script I am wanting to do. This isn't exactly what I have it as, it is only an example. The only line I am concerned about is the one with "$item2" in it.

Code:
sub_EVENT_ITEM {
my $item1 = 1200;
my $item2 = 1201 || 1202 || 1203;

  if (plugin::check_handin(\%itemcount, $item1 => 1, $item2 => 1)){
  quest::summonitem(1300);
}
}
What I am trying to do is make an armor quest that multiple classes can use to upgrade their current armor to another set. They will need 1 item drop (1200), but the other item for the turn in is their existing armor piece (1201, 1202, 1203, etc) like bracer, robe, whatever. This script example is trimmed down a lot from what I am actually doing, but I am only concerned with 1 part. I have it set to give different rewards for each class in the actual script, but that is not an issue. If I can't get OR to work for "my $item", this quest script is going to be very long lol. I will have to do a section for each individual armor piece for every single class (7 X 16).

This is what I have tried so far and the comments are what happens when I tried them:

my $item2 = 1201 || 1202 || 1203; #Turning in 1200 and 1201 result in a reward, but 1200 and 1202 or 1203 do not.
my $item2 = (1201 || 1202 || 1203); #Same
my $item2 = 1201,1202,1203; #Turning in 1200 and 1203 result in a reward, but 1200 and 1201 or 1202 do not.
my $item2 = (1201,1202,1203); #same
my $item2 = 1201 Or 1202 Or 1203; #Eats all items turned in
my $item2 = (1201 Or 1202 Or 1203); #Same

Also tried:
my $item1 == 1200;
my $item2 == 1201 || 1202 || 1203;
And for that one, ANY 2 items I turn in result in the reward, but it is any 2 items in the game, as in a short sword and tattered note, or a ration and water. That doesn't work at all!

I think what I want should be doable and I imagine it is just a minor change to format or something. Any help would be greatly appreciated. I will probably mess with it more tonight, but if I don't get an answer I may just have to do it the long way :(

Thanks in advance.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 04:20 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