K i n G Posted August 29, 2023 Group: Members Topic Count: 6 Topics Per Day: 0.01 Content Count: 17 Reputation: 1 Joined: 11/05/22 Last Seen: August 23, 2024 Share Posted August 29, 2023 Looking for MVP Script. If the MVP is alive PVP is on. If the MVP is die it will announce the killer of the Boss. Plus PVP is disabled. Also, may I request an MVP Board? Thanks a lot! Quote Link to comment Share on other sites More sharing options...
0 Winterfox Posted August 29, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 245 Reputation: 93 Joined: 06/30/18 Last Seen: November 27, 2024 Share Posted August 29, 2023 (edited) This script will enable pvp when there is atleast one living mvp on a map. If the last mvp gets killed, it will announce the kill and end pvp until a mvp is spawned again. Optionally, you can disable the dynamic mobs option in monster.conf. This will result in pvp already being enabled on a living mvps map, when a player loads it. Otherwise, it might take a second to refresh, since the script has to check the newly loaded mobs first. The downside is of course that disabling dynamic mobs will take more ram. - script MVP_PVP_MODE FAKE_NPC,{ function mapHasAliveMVP; function mobHasMvpMode; OnInit: setarray(.mvp_maps$, "moc_pryd06","ra_fild03","ra_fild04","ve_fild01","ve_fild02", "lou_dun03","prt_maze03","abbey03", "gl_chyard","abyss_03","gef_dun02","gef_dun01","treasure02", "pay_fild10","gon_dun03","abbey02","xmas_fild01","ra_san05", "prt_sewb4","mosk_dun03","thor_v03","ama_dun03", "kh_dun02","ayo_dun02","niflheim","anthell02", "mjolnir_04","pay_dun04","gef_fild03","gef_fild10", "moc_pryd04","in_sphinx5","moc_fild17","ein_dun02","xmas_dun02", "beach_dun","thana_boss","tur_dun04","odin_tem03", "jupe_core","lhz_dun02"); freeloop(1); while(true) { for(.@i = 0; .@i < getarraysize(.mvp_maps$); .@i++) if(mapHasAliveMVP(.mvp_maps$[.@i])) pvpon(.mvp_maps$[.@i]); sleep(1000); } freeloop(0); end; OnNPCKillEvent: getunitdata(killedgid, .@data); .@map$ = mapid2name(.@data[UMOB_MAPID]); if(!mobHasMvpMode(.@data[UMOB_MODE]) || mapHasAliveMVP(.@map$)) end; announce(strcharinfo(0) + " killed " + strmobinfo(1, killedrid) + "!", bc_all); pvpoff(.@map$); end; function mapHasAliveMVP { .@map$ = getarg(0); getmapunits(BL_MOB, .@map$, .@mobs); for(.@i = 0; .@i < getarraysize(.@mobs); .@i++) { getunitdata(.@mobs[.@i], .@data); if(.@data[UMOB_HP] == 0 || !mobHasMvpMode(.@data[UMOB_MODE])) continue; return 1; } return 0; } function mobHasMvpMode { return getarg(0) & MD_MVP; } } Edited August 29, 2023 by Winterfox Quote Link to comment Share on other sites More sharing options...
0 Gidz Cross Posted August 30, 2023 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 686 Reputation: 89 Joined: 04/07/14 Last Seen: 2 hours ago Share Posted August 30, 2023 16 hours ago, K i n G said: Looking for MVP Script. If the MVP is alive PVP is on. If the MVP is die it will announce the killer of the Boss. Plus PVP is disabled. Also, may I request an MVP Board? Thanks a lot! I use this mod when mvp is alive Quote Link to comment Share on other sites More sharing options...
0 K i n G Posted August 31, 2023 Group: Members Topic Count: 6 Topics Per Day: 0.01 Content Count: 17 Reputation: 1 Joined: 11/05/22 Last Seen: August 23, 2024 Author Share Posted August 31, 2023 On 8/30/2023 at 4:45 AM, Winterfox said: This script will enable pvp when there is atleast one living mvp on a map. If the last mvp gets killed, it will announce the kill and end pvp until a mvp is spawned again. Optionally, you can disable the dynamic mobs option in monster.conf. This will result in pvp already being enabled on a living mvps map, when a player loads it. Otherwise, it might take a second to refresh, since the script has to check the newly loaded mobs first. The downside is of course that disabling dynamic mobs will take more ram. - script MVP_PVP_MODE FAKE_NPC,{ function mapHasAliveMVP; function mobHasMvpMode; OnInit: setarray(.mvp_maps$, "moc_pryd06","ra_fild03","ra_fild04","ve_fild01","ve_fild02", "lou_dun03","prt_maze03","abbey03", "gl_chyard","abyss_03","gef_dun02","gef_dun01","treasure02", "pay_fild10","gon_dun03","abbey02","xmas_fild01","ra_san05", "prt_sewb4","mosk_dun03","thor_v03","ama_dun03", "kh_dun02","ayo_dun02","niflheim","anthell02", "mjolnir_04","pay_dun04","gef_fild03","gef_fild10", "moc_pryd04","in_sphinx5","moc_fild17","ein_dun02","xmas_dun02", "beach_dun","thana_boss","tur_dun04","odin_tem03", "jupe_core","lhz_dun02"); freeloop(1); while(true) { for(.@i = 0; .@i < getarraysize(.mvp_maps$); .@i++) if(mapHasAliveMVP(.mvp_maps$[.@i])) pvpon(.mvp_maps$[.@i]); sleep(1000); } freeloop(0); end; OnNPCKillEvent: getunitdata(killedgid, .@data); .@map$ = mapid2name(.@data[UMOB_MAPID]); if(!mobHasMvpMode(.@data[UMOB_MODE]) || mapHasAliveMVP(.@map$)) end; announce(strcharinfo(0) + " killed " + strmobinfo(1, killedrid) + "!", bc_all); pvpoff(.@map$); end; function mapHasAliveMVP { .@map$ = getarg(0); getmapunits(BL_MOB, .@map$, .@mobs); for(.@i = 0; .@i < getarraysize(.@mobs); .@i++) { getunitdata(.@mobs[.@i], .@data); if(.@data[UMOB_HP] == 0 || !mobHasMvpMode(.@data[UMOB_MODE])) continue; return 1; } return 0; } function mobHasMvpMode { return getarg(0) & MD_MVP; } } Thank you! I will try this one. Quote Link to comment Share on other sites More sharing options...
0 K i n G Posted August 31, 2023 Group: Members Topic Count: 6 Topics Per Day: 0.01 Content Count: 17 Reputation: 1 Joined: 11/05/22 Last Seen: August 23, 2024 Author Share Posted August 31, 2023 On 8/30/2023 at 4:45 AM, Winterfox said: This script will enable pvp when there is atleast one living mvp on a map. If the last mvp gets killed, it will announce the kill and end pvp until a mvp is spawned again. Optionally, you can disable the dynamic mobs option in monster.conf. This will result in pvp already being enabled on a living mvps map, when a player loads it. Otherwise, it might take a second to refresh, since the script has to check the newly loaded mobs first. The downside is of course that disabling dynamic mobs will take more ram. - script MVP_PVP_MODE FAKE_NPC,{ function mapHasAliveMVP; function mobHasMvpMode; OnInit: setarray(.mvp_maps$, "moc_pryd06","ra_fild03","ra_fild04","ve_fild01","ve_fild02", "lou_dun03","prt_maze03","abbey03", "gl_chyard","abyss_03","gef_dun02","gef_dun01","treasure02", "pay_fild10","gon_dun03","abbey02","xmas_fild01","ra_san05", "prt_sewb4","mosk_dun03","thor_v03","ama_dun03", "kh_dun02","ayo_dun02","niflheim","anthell02", "mjolnir_04","pay_dun04","gef_fild03","gef_fild10", "moc_pryd04","in_sphinx5","moc_fild17","ein_dun02","xmas_dun02", "beach_dun","thana_boss","tur_dun04","odin_tem03", "jupe_core","lhz_dun02"); freeloop(1); while(true) { for(.@i = 0; .@i < getarraysize(.mvp_maps$); .@i++) if(mapHasAliveMVP(.mvp_maps$[.@i])) pvpon(.mvp_maps$[.@i]); sleep(1000); } freeloop(0); end; OnNPCKillEvent: getunitdata(killedgid, .@data); .@map$ = mapid2name(.@data[UMOB_MAPID]); if(!mobHasMvpMode(.@data[UMOB_MODE]) || mapHasAliveMVP(.@map$)) end; announce(strcharinfo(0) + " killed " + strmobinfo(1, killedrid) + "!", bc_all); pvpoff(.@map$); end; function mapHasAliveMVP { .@map$ = getarg(0); getmapunits(BL_MOB, .@map$, .@mobs); for(.@i = 0; .@i < getarraysize(.@mobs); .@i++) { getunitdata(.@mobs[.@i], .@data); if(.@data[UMOB_HP] == 0 || !mobHasMvpMode(.@data[UMOB_MODE])) continue; return 1; } return 0; } function mobHasMvpMode { return getarg(0) & MD_MVP; } } The tomb and announcement are working. But when the MVP is up the PVP is off. Quote Link to comment Share on other sites More sharing options...
0 K i n G Posted September 7, 2023 Group: Members Topic Count: 6 Topics Per Day: 0.01 Content Count: 17 Reputation: 1 Joined: 11/05/22 Last Seen: August 23, 2024 Author Share Posted September 7, 2023 bump Quote Link to comment Share on other sites More sharing options...
Question
K i n G
Looking for MVP Script.
If the MVP is alive PVP is on.
If the MVP is die it will announce the killer of the Boss. Plus PVP is disabled.
Also, may I request an MVP Board?
Thanks a lot!
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.