Jump to content
  • 0

How to make monster respawn once a month after kill?


Yomigaeru

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   5
  • Joined:  12/25/11
  • Last Seen:  

@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.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


OnDay0607: // this triggered on june 7th.

OnDay0707: // july 7th.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   5
  • Joined:  12/25/11
  • Last Seen:  

hmmm, you mean like this for example?

 

OnDay0607:

OnDay0707

monster "5@tower",0,0,"Poring",1002,1,0; ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  

hmmm, you mean like this for example?

 

OnDay0607:

OnDay0707

monster "5@tower",0,0,"Poring",1002,1,0; ?

Yes.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   5
  • Joined:  12/25/11
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  143
  • Reputation:   30
  • Joined:  12/23/11
  • Last Seen:  


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

OnMobDeath:

initnpctimer;

end;

OnTimer2592000000:

stopnpctimer;

OnInit:

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

end;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   5
  • Joined:  12/25/11
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  143
  • Reputation:   30
  • Joined:  12/23/11
  • Last Seen:  

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;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   5
  • Joined:  12/25/11
  • Last Seen:  

though it's hard to test it since there is a month of gap, thanks as of now. I'll try it later.

Link to comment
Share on other sites

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.

×
×
  • Create New...