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 05-19-2010, 08:54 PM
everlastnmn
Sarnak
 
Join Date: Apr 2009
Location: minnesota
Posts: 45
Default Can anyone provide a random weapon quest template ?

What I'm kind of thinking would be a specific set of weapons. You complete a quest and receive the quest reward. If you receive a 1hb and rather have a 1hs, you can turn it back in for another random generated weapon until the weapon of your choice has been obtained.

Kinda like the ST key quest - you turn in the ST key and receive either the earring, weapon or whatever else it was and could turn it back in for a different item.

Thanks !
Reply With Quote
  #2  
Old 06-09-2010, 06:58 AM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

I /think/ this should work. See if it works, if so, rip it apart and modify it for your own use.

Code:
# Cycle Reward


sub EVENT_SAY {
	my $item = quest::saylink("item",1);

@rewardlist = (68875, 68876, 68877, 68878, 68879, 68970, 68971, 68875);


	if ($text =~/Hail/i) {
		plugin::Whisper("I can give you an [$item], which you can give back to me, and I will cycle through a list of items I will give back to you.  Isn't cyclic redundancy fun?");
	}
	if ($text =~/item/i) {
		plugin::Whisper("Here you go.");
		quest::summonitem("68879");
	}
}

sub EVENT_ITEM {
my $given = 0;
my $togive = 0;
my $count = 0;
	foreach $positem (@rewardlist) {
		
		if ($given == 0) {
			if (plugin::check_handin(\%itemcount, $positem => 1)) {
				$togive = $count+1;
				$given = 1;
			}
		}
		else {
			quest::summonitem($rewardlist[$togive]);
			plugin::Whisper("If you want something else, please return that to me.  I will go through my list of items and give you the next one on the list.");
			return;
		}
		$count++;
	}

	if ($given == 0) {
		plugin::return_items(\%itemcount);
	}

}
Reply With Quote
Reply


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 11:38 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