Loading...   


sub EVENT_ITEM{
	@Tokens = (132058, 132059, 132060, 132061, 132062, 132063);
	%TokenVal = (
		132058 => [1],
		132059 => [5],
		132060 => [10],
		132061 => [25],
		132062 => [50],
		132063 => [100],
	);
	$credit_total = 0; ### This is the Credit Amount
	foreach my $val (@Tokens){
		$res = 0; $charges = 0; 
		if ($item1 == $val){ $charges = $item1_charges; $credit_total += ($TokenVal{$val}[0] * $charges); quest::say("Ohh, looks like you have a " . quest::varlink($val) . " for me? Looks like you have " . $charges . " of them. Let me give you something for that..."); }
		if ($item2 == $val){ $charges = $item2_charges; $credit_total += ($TokenVal{$val}[0] * $charges); quest::say("Ohh, looks like you have a " . quest::varlink($val) . " for me? Looks like you have " . $charges . " of them. Let me give you something for that..."); }
		if ($item3 == $val){ $charges = $item3_charges; $credit_total += ($TokenVal{$val}[0] * $charges); quest::say("Ohh, looks like you have a " . quest::varlink($val) . " for me? Looks like you have " . $charges . " of them. Let me give you something for that..."); }
		if ($item4 == $val){ $charges = $item4_charges; $credit_total += ($TokenVal{$val}[0] * $charges); quest::say("Ohh, looks like you have a " . quest::varlink($val) . " for me? Looks like you have " . $charges . " of them. Let me give you something for that..."); }
	}
	quest::say("Looks like this would have given you " . $credit_total . " credits");
}

Raw Paste Data