So the npc this is attached to keeps returning everything. Not sure what ive done wrong here, though it is my first time messing around with chooserandom. Any help would be greatly appreciated.
	Code:
	sub EVENT_ITEM { 
	if(plugin::check_handin(\%itemcount, 147503 == 1)) { # Stone/Stat
		my $stat = quest::ChooseRandom(147518..147525);
		quest::summonitem($stat);
		plugin::Whisper("Wow this one is an  " . quest::varlink("$stat", 1) . " !");
		
	        quest::Whisper("Here you go!");
	} elsif (plugin::check_handin(\%itemcount, 147505 == 1)) { # Orb/Resists/HP/Mana
		my $orb = quest::ChooseRandom(147507..147510);
		quest::summonitem($orb);
	 plugin::Whisper("Wow this one is an  " . quest::varlink("$orb", 1) . " !");
	} elsif (plugin::check_handin(\%itemcount, 147504 == 1)) { # Weapon
		my $weapon = quest::ChooseRandom(147511..147515);
		quest::summonitem($weapon);
	 plugin::Whisper("Wow this one is an  " . quest::varlink("$weapon", 1) . " !");
	} elsif (plugin::check_handin(\%itemcount, 147506 == 1)) { # Bows
		my $bow = quest::ChooseRandom(147516..147517);
		quest::summonitem($bow);
	 plugin::Whisper("Wow this one is an  " . quest::varlink("$bow", 1) . " !");
		}
		plugin::return_items(\%itemcount);
}