View Single Post
  #3  
Old 06-13-2013, 01:19 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

A simple version of a turn in quest would be to use multiple if statements, and you can grow to the level of Trevius later on.
1 Being the template, 2, 3, and 4 being items that're required, thus giving you a specific out come for each class.
Code:
sub EVENT_ITEM
{
	if(plugin::check_handin(\%itemcount, 1 => 1, 2 => 1, 3 => 1, 4 => 1))
	{
		my $link = quest::varlink($rewards{$class});
		
		my %rewards = 
		(
			"Warrior" => 6, 
			"Cleric" => 7, 
			"Paladin" => 8, 
			"Ranger" => 9, 
			"Shadowknight" => 10, 
			"Druid" => 11, 
			"Monk" => 12, 
			"Bard" => 13, 
			"Rogue" => 14, 
			"Shaman" => 15, 
			"Necromancer" => 16, 
			"Wizard" => 17, 
			"Magician" => 18, 
			"Enchanter" => 19, 
			"Beastlord" => 20, 
			"Berserker" => 21
		);

		if(defined($rewards{$class})) 
		{
			my $link = quest::varlink($rewards{$class});
			quest::summonitem($rewards{$class});
			quest::shout2("Congratulations to $name on their $link!"); ##This is similar to EZ's turn in for Epics.
		}
	}
	else
	{
		plugin::Whisper("I do not need this.");
		quest::givecash($copper,$silver,$gold,$platinum);
		plugin::return_items(\%itemcount);
	}
}
Reply With Quote