Jump to content
  • 0

How to make monster respawn once a month after kill?


Question

Posted

@topic

 

for example i spawn a poring at 5@tower.

 

how can i make it respawn 1 month after it got killed and the timer not be affected by the server going down? (countdown still working even the server is not online. is that possible?) 

 

tnx in advance.

9 answers to this question

Recommended Posts

Posted

but there will be no possibility that a mob will respawn 1 month after it's killed. let's say, the poring was killed july 06. since the script activates on july 07, it will respawn 1 day after it gets killed right?

Posted


prontera,1,1,0 script MobController -1,{

OnMobDeath:

initnpctimer;

end;

OnTimer2592000000:

stopnpctimer;

OnInit:

monster "prontera",150,150,"Special Poring",1002,1,"MobController::OnMobDeath";

end;

}

Posted

but there will be no possibility that a mob will respawn 1 month after it's killed. let's say, the poring was killed july 06. since the script activates on july 07, it will respawn 1 day after it gets killed right?

 

OnDay0707: // This triggered only when the server dates reach July 7, there will be no monster respawn after that day unless you add another dates on the script.

Posted
prontera,1,1,0	script	MobController	-1,{
OnMobDeath:
	initnpctimer;
	end;
	
OnTimer2592000000:
	stopnpctimer;
OnInit:
	monster "prontera",150,150,"Special Poring",1002,1,"MobController::OnMobDeath";
	end;
}

will this timer still work even though the server is offline when for lets say 3 days?

Posted

will this timer still work even though the server is offline when for lets say 3 days?

no ofc

I rewrote npc, but this npc consumes space for two global variables

prontera,1,1,0	script	MobController	-1,{
OnMobDeath:
	$d = gettime(8) + 30;				//day of the year + 1 month
	if ($d > 365) $d -= 365;
	$w = 1;								// $w = wait for spawn, 1 or 0
	end;

OnClock0000:							//everyday at midnight
	if (!$w || (gettime(8) != $d)) end;	//ignore if we are not waiting for spawn or if it's a wrong day
	$w = 0;								//go to spawning
OnInit:
	if (!$w) monster "prontera",150,150,"Special Poring",1002,1,"MobController::OnMobDeath";
	end;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...