View Single Post
  #2  
Old 10-13-2011, 08:45 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

Remember that Perl and such are used outside of Eqemu, so the more you know how to program the more you can do. What you are thinking of are variables and what you might be interested in are arrays.

Code:
sub EVENT_ITEM
{
	my @factions = (69,70,87,88,117,137,155,177,256,260,268,322,331);
	my @items = (1804,1805,1806,1807);
	my $base_value = 5;
	my $base_exp = 2000;
	my $exp_multi = 2;
	foreach $item(@items) {
		my $item_count = $itemcount{$item};
		if($item_count) {
			foreach $faction(@factions) { quest::faction($faction,($base_value*$item_count)); }
			quest::exp($base_exp*$exp_multi);
			quest::ding;
			quest::say("I see you have been skulking about for Noble Villifar. You are wise to aid us and your effort shall not go unnoticed, $name.");	
			quest::givecash("0","0","8","0");	
		}
		$base_value += 5;
		$exp_multi++;
	}
}
Reply With Quote