Jump to content
  • 0
Sign in to follow this  
xJhay

MVP Respawn on server restart

Question

Asking for help about MVP Respawn on server restart, does anyone knows how to disable all MVP & BOSS monsters respawning on restart?

I'm posting it here cause I don't know if it's source code or script based only or config.

Please help, thank you in advance!

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
Just now, xJhay said:

Asking for help about MVP Respawn on server restart, does anyone knows how to disable all MVP & BOSS monsters respawning on restart?

I'm posting it here cause I don't know if it's source code or script based only or config.

Please help, thank you in advance!

Its possible for script by killing all the mobs in the map something like killallmonsterall "prontera"; but you need to put it all in the MVP Maps.

 

Sample : this will kill all mobs after restart and reloadscript
 

-	script	MVPKILLRESTART	FAKE_NPC,{
	OnInit:
		killmonsterall "prt_maze03"; // Kill Baphomet and all monster in the map
		cleanmap "prt_maze03"; // Clean all drops in the map
	end;
}

 

Share this post


Link to post
Share on other sites
  • 0
On 2/18/2021 at 11:19 AM, Kuya Jeo said:

Its possible for script by killing all the mobs in the map something like killallmonsterall "prontera"; but you need to put it all in the MVP Maps.

 

Sample : this will kill all mobs after restart and reloadscript

Monsters create at start server? Not at map activation?

Better remove normal spawn and do it with script.

 

Also use search - 

 

Edited by botka4aet

Share this post


Link to post
Share on other sites
  • 0
12 minutes ago, botka4aet said:

Monsters create at start server? Not at map activation?

Better remove normal spawn and do it with script.

 

Also use search - 

 

the problem using monster "<mapname>",<X>,<Y>,"<MobName>",<Mob Sprite>,<Mob Amount>,"<NPCNAME>::<OnLabel>"; is when you used convex mirror, you cant find it or convex is not responding on the mob without boss_monster label

Share this post


Link to post
Share on other sites
  • 0

Why do you need search it?

 

If someone killed boss - add respawn time to one NPC

Every 5 min(for ex) this NPC check  - do you need spawn MVP or not.

After reloadscript check: if NPC have MVP timer - don't spawn, else - spawn.

Share this post


Link to post
Share on other sites
  • 0

1. Delete or Comment all MVP and mini boss spawn at npc/pre-re/mobs/dungeons/ or /fields.
2. add all MobID, spawn time and map of mvp to array. 
 

OnInit:
	setarray .mvpid[0],1511,1039; <- osiris and baphomet
	setarray .mvptime[0],60,60;
	setarray .mvpmaps$[0],"moc_pryd06","prt_maze03";

3. Upon script load add global variables to each item in .mvpid and initialize timer.
 

OnInit:
/* Loop to each mvp.
 lets set global variable
getd("$S"+.mvpid[.@i] = 0 <- not set
getd("$S"+.mvpid[.@i] = 1 <- alive
getd("$S"+.mvpid[.@i] = 2 <- dead
*/
for( .@i = 0; .@i < getarraysize(.mvpid); .@i++ ) {
	/*
	if variable is not yet set or getd("$S"+.mvpid[.@i] < 2 (alive or not set) OR time from setarray .mvptime[0] has elapse
    	setd("$S"+.mvpid[.@i],1); (alive)
 		spawn .mvpid[.@i]
	}
    */
}    
initnpctimer();  

4  Check every 1 minutes 

OnTimer60000:
	for( .@i = 0; .@i < getarraysize(.mvpid); .@i++ ) {
	/* same thing just check on each mvp if flag is dead then skip, if alive then spawn.
		if variable is not yet set or getd("$S"+.mvpid[.@i] < 2 (alive or not set) OR time from setarray .mvptime[0] has elapse
			set global mvp status variable to (alive)
			clear global mvp death variable.
 			spawn .mvpid[.@i]
		}
    */
}    
initnpctimer();  

5. Finally, record if mvp is killed and set flag to killed.
 

/* must load that useful function array_find from meko
https://herc.ws/board/files/file/326-array-manipulation-functions/
*/
OnNPCKillEvent:
	if(array_find(.mvpid, killedrid) >= 0 ){ // check if monster killed is part of your mvp array
		// loop to that array until it matches mvpid and map
		for( .@i = 0; .@i < getarraysize(.mvpid); .@i++ ) {
               // if match then set variable to dead and set the global mvptime variable to timestamp.
				break;                                                 
		}                                                 
	}
	end;                                                 


 

Edited by astralprojection

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.