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 02-04-2008, 06:08 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Thanks for the response! And, I am using "plugin::return_items(\%itemcount);" at the end of my sub EVENT_ITEM to return all handed in items if they don't match any of the quest turn ins. Will that still work with the hash? I don't know a ton about perl (obviously), so I have to experiment a lot to get things working properly.

I am not sure if I am reading your script correctly, but here is how I think my script would apply if I used what you supplied:

Code:
sub_EVENT_ITEM {

my $drop = 1200;
%helms = (
	1201 => 1,
	1202 => 1,
	1203 => 1
	);

if (
 $class eq 'Warrior' ||
 $class eq 'Rogue' ||
 $class eq 'Monk' ||
 $class eq 'Berserker' ||
 $class eq 'Shadowkight' ||
 $class eq 'Paladin' ||
 $class eq 'Ranger' ||
 $class eq 'Bard' ||
 $class eq 'Beastlord' ||
 $class eq 'Cleric' ||
 $class eq 'Druid' ||
 $class eq 'Shaman' ||
 $class eq 'Wizard' ||
 $class eq 'Mage' ||
 $class eq 'Enchanter' ||
 $class eq 'Necromancer'
	) {

  if (plugin::check_handin(\%itemcount, $drop => 1)) {

	for my $helms (sort keys %helms) {

my %rewards = (
 "Warrior" => 4917,
 "Rogue" => 4907,
 "Monk" => 1206,
 "Berserker" => 55607,
 "Shadowknight" => 9829,
 "Paladin" => 9829,
 "Ranger" => 9829,
 "Bard" => 9829,
 "Beastlord" => 9829,
 "Cleric" => 9829,
 "Druid" => 9829,
 "Shaman" => 9829,
 "Wizard" => 9829,
 "Mage" => 9829,
 "Enchanter" => 9829,
 "Necromancer" => 9829
    );

    if(defined($rewards{$class})) {
    quest::summonitem($rewards{$class});
}
}
}
}
else 
plugin::return_items(\%itemcount);
}
I realize that it is pretty sloppy, but that is as close as I can figure given the example you gave me. I am probably not reading your script properly, but I don't think this would work at all. This script has pretty much everything I want to do. So it will award each class with a specific item.

Writing that did give me an idea of how to get it working like I want. I will try it when I get home and post here if I get it working or not. Thanks again.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 02-05-2008 at 02:11 AM..
Reply With Quote
  #2  
Old 02-04-2008, 10:47 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Here is the current armor quest I use for 1 single slot. I am wanting to make a similar one that lets them turn in their class armor and 1 item for an upgraded armor piece. I am putting this here as a reference, and this does work fine:

Code:
sub EVENT_ITEM {
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowkight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Mage' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1319 => 1)) {
    my %rewards = (
"Warrior" => 4917, "Rogue" => 4907, "Monk" => 1206, "Berserker" => 55607, "Shadowknight" => 9829, "Paladin" => 9829, "Ranger" => 9829, "Bard" => 9829, "Beastlord" => 9829, "Cleric" => 9829, "Druid" => 9829, "Shaman" => 9829, "Wizard" => 9829, "Mage" => 9829, "Enchanter" => 9829, "Necromancer" => 9829
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
      quest::emote("Works to make a piece of armor from the instructions you provided to him." );
      quest::say ("Here you go $name.");
    }
}
 	else {
 	    plugin::return_items(\%itemcount);
    	quest::say("I have no use for this item, $name.  Take it back.");
	}  
}
}

I tried using Theeper's script, but it just eats my items. The items in this are 1577 (main drop), 1579, 1581, and 1582 (which I want any to work for turn in along with main drop), and 1658 which is supposed to be the reward. Of course, if I could get this working, the reward would be different for each possible turn in combo. So, if a paladin turns in a bracer and the 1577 drop, he would get an upgraded bracer. Here is exactly what I used as a test:
Code:
sub EVENT_ITEM {

   my $item_1 = 1577;
   %items = (
      1579 => 1658,
      1581 => 1658,
      1582 => 1658,
   );
  
   if (plugin::check_handin(\%itemcount, $item_1 => 1)) {

      For my $items (sort keys %items) {

         if (plugin::check_handin(\%itemcount, $items => 1)) {
            quest::summonitem($items{$items}); 
         }
      }
   }
}
If anyone knows of a way that will work, or anything I am missing, I would greatly appreciate the help lol. I have already spent hours on this, but I just don't want to do it the long way. Much more room for error and much harder to read through if I do each turn in individually with it's own reward, even though it would be an easy script to write.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 02-05-2008, 01:29 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Woot, I finally figured it out by trying something I was already using in some of my previous armor quests! It was a little tricky, but it is flawless now as far as I can tell!

I posted the entire quest in the quest submissions forum here. As it is written now, it is fully complete with itemids for armor upgrades from Elemental Armor Class Sets to GoD Armor Class Sets. There are 4 custom quest items I have in my quest, but that could easily be replaced by 1 item, or as many as you like.

I hope someone finds this thread useful if they ever want to do something similar to this
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 02-05-2008, 01:31 AM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

Uncapitalize the F in "For". It must be all lower case. Otherwise, that script works fine for me.
Reply With Quote
  #5  
Old 02-05-2008, 08:53 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by Theeper View Post
Uncapitalize the F in "For". It must be all lower case. Otherwise, that script works fine for me.
I use GeorgeS Quest tool for all scripts I write, and his tool automatically makes all "for"s and "or"s into "For"s and "Or"s. Same thing happens if you use all caps. Maybe someone who knows 100% for sure how it currently works in perl should post in the tool section in Georges thread for his Quest tool. I would post about it there, but I don't know perl well enough to tell him how to fix his tool :P
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 07:29 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