Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 03-06-2014, 08:31 AM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default Random Timer in same spawngroup

Hey all,

I use this script to simulate a random spawn time for invisible spawners in the same spawngroup. This way I didn't have to make 5 different NPCs and 5 different scripts all with different timers. Even then each invisible spawner will be a set time causing each spot to always spawn its npcs the same time every respawn.

So I make 1 invisible npc to be the spawner and add multiples to the spawn group and they will all random the spawn times.

Imagine it could be used in many ways.

____.pl

Code:
#Spawn Sequence
#Set timer
#When Timer hits
#Choose random timer
#When random timer hits
#Choose random spawn
#
sub EVENT_SPAWN {
quest::settimer(1, 40);
}

sub EVENT_TIMER {	
my $Rndtime = quest::ChooseRandom(1,2,3);
my $Spawn = quest::ChooseRandom(1,2,3,4,5,6);

if($timer == 1) {
	if($Rndtime == 1){
	quest::settimer(2, 5);
	}
	if($Rndtime == 2){
	quest::settimer(3, 15);
	}
	if($Rndtime == 3){
	quest::settimer(4, 25);
	}
}
	
if($timer == 2) {

	if($Spawn == 1) {
	quest::spawn2(1000300,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 2) {
	quest::spawn2(1000305,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 3) {
	quest::spawn2(1000306,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 4) {
	quest::spawn2(1000306,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 5) {
	quest::spawn2(1000306,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 6) {
	quest::spawn2(1000300,0,0,$x,$y,$z,0);
	#object
	}
quest::stoptimer(2);
}

if($timer == 3) {

	if($Spawn == 1) {
	quest::spawn2(1000300,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 2) {
	quest::spawn2(1000305,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 3) {
	quest::spawn2(1000306,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 4) {
	quest::spawn2(1000306,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 5) {
	quest::spawn2(1000306,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 6) {
	quest::spawn2(1000300,0,0,$x,$y,$z,0);
	#object
	}
quest::stoptimer(3);
}

if($timer == 4) {

	if($Spawn == 1) {
	quest::spawn2(1000300,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 2) {
	quest::spawn2(1000305,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 3) {
	quest::spawn2(1000306,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 4) {
	quest::spawn2(1000306,0,0,$x,$y,$z,0);
	#object
	}

	elsif($Spawn == 5) {
	#object
	}

	elsif($Spawn == 6) {
	quest::spawn2(1000300,0,0,$x,$y,$z,0);
	#object
	}
quest::stoptimer(4);
}


}
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:19 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3