Something simple yet effective here, seems like you wanted a percent chance for it to spawn, this would do the trick. In this version its just a basic percent chance a mob splits into two.
Code:
sub GET_RANDOM_NUMBER
{
$minimum = 1;
$maximum = 101;
$rnd_number = $minimum + int(rand($maximum - $minimum));
return $rnd_number;
}
sub EVENT_DEATH_COMPLETE
{
my $randomized = GET_RANDOM_NUMBER();
if($randomized <= 90)#90 out of 100
{
quest::spawn2(2990,0,0,$x,$y,$z,$y);
quest::spawn2(2990,0,0,$x,$y,$z,$y);
}
quest::stoptimer("silence");
}