n0tttt Posted May 23, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Friday at 02:39 AM Share Posted May 23, 2017 View File Rotative PvP Room A PvP room which changes maps. Nothing else is required to the description, I guess. Features: - You can use @pvp command to enter the room. However, you can't use it if you're inside an instance of in middle of a battle. - Anti repeating system. You can avoid the same map being repeated again and again. - Some little effects when you're warped. Submitter n0tttt Submitted 05/16/2017 Category PvP, GvG, WoE, Battleground Video Content Author n0tttt Quote Link to comment Share on other sites More sharing options...
Thinker Posted November 21, 2018 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 20 Reputation: 2 Joined: 08/15/18 Last Seen: May 8, 2021 Share Posted November 21, 2018 (edited) ty Edited November 21, 2018 by Thinker Quote Link to comment Share on other sites More sharing options...
Break Posted March 23, 2019 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 158 Reputation: 14 Joined: 07/07/12 Last Seen: Yesterday at 04:41 PM Share Posted March 23, 2019 If a player enters the arena and leaves it, then Waitingroom with player count not change. Quote Link to comment Share on other sites More sharing options...
n0tttt Posted March 23, 2019 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Friday at 02:39 AM Author Share Posted March 23, 2019 Probably the map you warped to didn't have the mf_loadevent mapflag. You can use this version anyways. I avoided doing it this way since it can cause a bit of lagging. /* Changelog: v1.1 Added option to debuff players when entering the room. Added command to rotate manually. Remove hiding when quitting room. Added lvl checking on command. v1.1a Removed right curly which made dispell function don't work. Sorry. Added color to the npc name in dialog. Added F_InsertPlural use. v1.2 Added waitingroom with player count. v1.3 Use of pcblock command. */ // You can use this function with other scripts as well. function script dispell { while(.@i++ < SC_SPL_MATK) { if( .@i != SC_WEIGHT50 && .@i != SC_WEIGHT90 && .@i != SC_NOCHAT && .@i != SC_BABY && /* .@i != SC_WEDDING && .@i != SC_XMAS && .@i != SC_SUMMER && .@i != SC_HANBOK && .@i != SC_OKTOBERFEST && */ .@i != SC_JAILED && .@i != SC_EXPBOOST && .@i != SC_ITEMBOOST ) sc_end .@i; } .@i = SC_FEAR; while(.@i++ < SC_AKAITSUKI) sc_end .@i; } prontera,147,172,6 script PvP#0 4_M_SAKRAYROYAL,{ .@n$ = "^3227cd[PvP Room]^000000"; mes .@n$; if(BaseLevel >= .min_lv) { mes "There are ^d40f00"+F_InsertPlural(getmapusers(.map$),"player")+"^000000 inside right now."; mes "Do you want to enter to the room?"; if(.debuff) mes "^8b0d1fBe careful, because every buff you have will be lost upon entering the room.^000000"; next; if(select("Yes.","No, thanks.") == 1) { specialeffect2 F_Rand(EF_STORMKICK1,EF_STORMKICK2,EF_STORMKICK3,EF_STORMKICK6,EF_STORMKICK7); sleep2 600; specialeffect2 F_Rand(EF_SPINMOVE,EF_CASTSPIN2); sleep2 550; if(.debuff) dispell(); warp .map$,0,0; mapannounce .map$,strcharinfo(0)+" has entered the room.",bc_map,0xb50505; if(!.waiting_room) donpcevent "PvP#0::OnWaitingRoom"; } } else { mes "You must be at least level "+.min_lv+" to be able to enter the room."; close; } end; OnInit: // This command can be used to enter the PvP Room. bindatcmd "pvp","PvP#0::OnCommand"; // Command to rotate the room maually. bindatcmd "rotatepvp","PvP#0::OnMinute00",60; // Min LvL to enter the room. .min_lv = 50; // Will players be dispelled upon entering the room? .debuff = false; OnMinute00: OnMinute30: // PvP maps go here. Change them as you wish. setarray .@maps$[0], "guild_vs2","guild_vs3","guild_vs5","pvp_y_1-1","guild_vs4","guild_vs1","arena_room"; // Max amount of times a map can be repeated. 0 = unlimited. .@row = 3; .@size = getarraysize(.@maps$); if(.map$ == "") { // You can edit the room mapflags here. setarray .@mapfl[0], mf_nosave, mf_nodrop, mf_novending, mf_noteleport, mf_noreturn, mf_nowarp, mf_nowarpto, mf_nomemo, mf_nopenalty, mf_nobranch, mf_hidemobhpbar, mf_pvp, mf_pvp_noguild, mf_pvp_noparty, mf_pvp_nocalcrank, mf_loadevent; .@i = getarraysize(.@mapfl); while(.@i--) { .@j = .@size; while(.@j--) setmapflag .@maps$[.@j],.@mapfl[.@i]; } } .@map$ = .map$; .@r = rand(.@size); .map$ = .@maps$[.@r]; if(.@row && .map$ == .@map$) { if(++.row >= .@row) { deletearray .@maps$[.@r],1; .map$ = .@maps$[rand(.@size - 1)]; .row = 0; } } else if(.row) { .row = 0; } if(.map$ != .@map$ && .@map$ != "") { mapwarp .@map$,.map$,0,0; sleep 2500; mapannounce .map$,"The PvP Room has changed!",bc_npc,0xe53a12; } end; OnCommand: .@ins_id = instance_id(); .@m$ = strcharinfo(3); if((!.@ins_id || instance_mapname(.@m$,.@ins_id) == "") && BaseLevel >= .min_lv) { if(.@m$ != .map$) { message strcharinfo(0),"Preparing to enter!"; } else { message strcharinfo(0),"Quitting the room..."; unitstopwalk getcharid(3); //pcblock PCBLOCK_MOVE|PCBLOCK_ATTACK|PCBLOCK_SKILL,true; pcblockmove getcharid(3),true; pcblockskill getcharid(3),true; setoption OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK,false; } .@hp = HP; sleep2 1400; while(.@i++ < 5) { message strcharinfo(0),(6 - .@i)+"..."; sleep2 990; if(HP < .@hp) { message strcharinfo(0),"You can't do this in the middle of a battle."; //pcblock PCBLOCK_MOVE|PCBLOCK_ATTACK|PCBLOCK_SKILL,false; pcblockmove getcharid(3),false; pcblockskill getcharid(3),false; end; } } specialeffect2 F_Rand(EF_STORMKICK1,EF_STORMKICK2,EF_STORMKICK3,EF_STORMKICK6,EF_STORMKICK7); sleep2 600; specialeffect2 F_Rand(EF_SPINMOVE,EF_CASTSPIN2); sleep2 550; if(.@m$ != .map$) { if(.debuff) dispell(); warp .map$,0,0; mapannounce .map$,strcharinfo(0)+" has entered the room.",bc_map,0xb50505; if(!.waiting_room) donpcevent "PvP#0::OnWaitingRoom"; } else { warp "SavePoint",0,0; //pcblock PCBLOCK_MOVE|PCBLOCK_ATTACK|PCBLOCK_SKILL,false; pcblockmove getcharid(3),false; pcblockskill getcharid(3),false; } } else if(BaseLevel < .min_lv) { message strcharinfo(0),"You must be at least level "+.min_lv+" to be able to enter the room."; } else { message strcharinfo(0),"You can't enter the room in the middle of an instance."; } end; OnWaitingRoom: .waiting_room = true; while(true) { .@count = getmapusers(.map$); if(.@count != .@old_count) { .@old_count = .@count; delwaitingroom; waitingroom F_InsertPlural(.@count,"player")+".",0; } sleep 2500; } end; } 1 Quote Link to comment Share on other sites More sharing options...
fenrirdev Posted June 12, 2019 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 4 Reputation: 0 Joined: 06/10/19 Last Seen: August 14, 2019 Share Posted June 12, 2019 how to remove the @pvp command? Quote Link to comment Share on other sites More sharing options...
n0tttt Posted June 19, 2019 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Friday at 02:39 AM Author Share Posted June 19, 2019 On 6/12/2019 at 12:58 PM, fenrirdev said: how to remove the @pvp command? You could delete the bindatcmd line, but better use this one since I deleted it altogether: /* Changelog: v1.1 Added option to debuff players when entering the room. Added command to rotate manually. Remove hiding when quitting room. Added lvl checking on command. v1.1a Removed right curly which made dispell function don't work. Sorry. Added color to the npc name in dialog. Added F_InsertPlural use. v1.2 Added waitingroom with player count. */ // You can use this function with other scripts as well. function script dispell { while(.@i++ < SC_SPL_MATK) { if( .@i != SC_WEIGHT50 && .@i != SC_WEIGHT90 && .@i != SC_NOCHAT && .@i != SC_BABY && /* .@i != SC_WEDDING && .@i != SC_XMAS && .@i != SC_SUMMER && .@i != SC_HANBOK && .@i != SC_OKTOBERFEST && */ .@i != SC_JAILED && .@i != SC_EXPBOOST && .@i != SC_ITEMBOOST ) sc_end .@i; } .@i = SC_FEAR; while(.@i++ < SC_AKAITSUKI) sc_end .@i; } prontera,147,172,6 script PvP#0 4_M_SAKRAYROYAL,{ .@n$ = "^3227cd[PvP Room]^000000"; mes .@n$; if(BaseLevel >= .min_lv) { mes "There are ^d40f00"+F_InsertPlural(getmapusers(.map$),"player")+"^000000 inside right now."; mes "Do you want to enter to the room?"; if(.debuff) mes "^8b0d1fBe careful, because every buff you have will be lost upon entering the room.^000000"; next; if(select("Yes.","No, thanks.") == 1) { specialeffect2 F_Rand(EF_STORMKICK1,EF_STORMKICK2,EF_STORMKICK3,EF_STORMKICK6,EF_STORMKICK7); sleep2 600; specialeffect2 F_Rand(EF_SPINMOVE,EF_CASTSPIN2); sleep2 550; if(.debuff) dispell(); warp .map$,0,0; mapannounce .map$,strcharinfo(0)+" has entered the room.",bc_map,0xb50505; if(!.waiting_room) donpcevent "PvP#0::OnWaitingRoom"; } } else { mes "You must be at least level "+.min_lv+" to be able to enter the room."; close; } end; OnInit: // Command to rotate the room maually. bindatcmd "rotatepvp","PvP#0::OnMinute00",60; // Min LvL to enter the room. .min_lv = 50; // Will players be dispelled upon entering the room? .debuff = false; OnMinute00: OnMinute30: // PvP maps go here. Change them as you wish. setarray .@maps$[0], "guild_vs2","guild_vs3","guild_vs5","pvp_y_1-1","guild_vs4","guild_vs1","arena_room"; // Max amount of times a map can be repeated. 0 = unlimited. .@row = 3; .@size = getarraysize(.@maps$); if(.map$ == "") { // You can edit the room mapflags here. setarray .@mapfl[0], mf_nosave, mf_nodrop, mf_novending, mf_noteleport, mf_noreturn, mf_nowarp, mf_nowarpto, mf_nomemo, mf_nopenalty, mf_nobranch, mf_hidemobhpbar, mf_pvp, mf_pvp_noguild, mf_pvp_noparty, mf_pvp_nocalcrank, mf_loadevent; .@i = getarraysize(.@mapfl); while(.@i--) { .@j = .@size; while(.@j--) setmapflag .@maps$[.@j],.@mapfl[.@i]; } } .@map$ = .map$; .@r = rand(.@size); .map$ = .@maps$[.@r]; if(.@row && .map$ == .@map$) { if(++.row >= .@row) { deletearray .@maps$[.@r],1; .map$ = .@maps$[rand(.@size - 1)]; .row = 0; } } else if(.row) { .row = 0; } if(.map$ != .@map$ && .@map$ != "") { mapwarp .@map$,.map$,0,0; sleep 2500; mapannounce .map$,"The PvP Room has changed!",bc_npc,0xe53a12; } end; OnWaitingRoom: .waiting_room = true; while(true) { .@count = getmapusers(.map$); if(.@count != .@old_count) { .@old_count = .@count; delwaitingroom; waitingroom F_InsertPlural(.@count,"player")+".",0; } sleep 2500; } end; } Quote Link to comment Share on other sites More sharing options...
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.