xJhay 8 Posted February 18, 2021 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! Quote Share this post Link to post Share on other sites
0 Kuya Jeo 120 Posted February 18, 2021 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; } 1 xJhay reacted to this Quote Share this post Link to post Share on other sites
0 botka4aet 5 Posted February 19, 2021 (edited) 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 February 19, 2021 by botka4aet Quote Share this post Link to post Share on other sites
0 Kuya Jeo 120 Posted February 19, 2021 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 Quote Share this post Link to post Share on other sites
0 botka4aet 5 Posted February 19, 2021 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. Quote Share this post Link to post Share on other sites
0 astralprojection 35 Posted February 20, 2021 (edited) 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 February 20, 2021 by astralprojection Quote Share this post Link to post Share on other sites
0 astralprojection 35 Posted February 20, 2021 anyway, i will release full script after i finish in a while. Quote Share this post Link to post Share on other sites
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