Loading...   


sub EVENT_SPAWN {
	quest::settimer("portalspawns", quest::ChooseRandom(5..30));
}
	
sub EVENT_TIMER {

	my $portal_loc = quest::ChooseRandom(1..3);
	my %portal_hash = (
		1 => [1000626,0,0,-905,-1038,94,190],
		2 => [1000626,0,0,-770,-1071,94,120],
		3 => [1000626,0,0,-720,-1187,94,115]
	);
	
	

	if (($timer eq "portalspawns") && (plugin::RandomRange(1, 100) < 50)) {
		quest::stoptimer("portalspawns");
		quest::depopall(1000626);
		
		my $p_data = $portal_hash{$portal_loc};
		quest::spawn2($p_data[0], $p_data[1], $p_data[2], $p_data[3], $p_data[4], $p_data[5], $p_data[6]);
		
		quest::ze(15, "an interdimensional rift opens in the forest!");
		quest::settimer("portalspawns", quest::ChooseRandom(5..30));
	}
	else {
		quest::stoptimer("portalspawns");
		quest::say("No luck this time");
		quest::settimer("portalspawns", quest::ChooseRandom(5..30));
	}
	
}

Raw Paste Data