caspa Posted May 7, 2019 Posted May 7, 2019 does anybody know where can i find that pvp warper where it has a rotating waitingroom? like waitingroom = [ PvP Map 1 [ 12 user ] ] then after that delwaitingroom then [ PvP Map 2 [ 1 User ] ] then it show another map again... Quote
0 Emistry Posted May 8, 2019 Posted May 8, 2019 (edited) prontera,155,181,5 script PVP Room 4_F_KAFRA1,{ for (.@i = 0; .@i < .size; .@i++) .@menu$ += .name$[.@i] + "[ "+getmapusers(.map$[.@i])+" ]" + ":"; .@i = select(.@menu$) - 1; warp .map$[.@i], 0, 0; end; OnInit: setarray .name$, "Title 1", "Title 2", "Title 3", "Title 4", "Title 5", "Title 6"; setarray .map$, "pvp_map_1", "pvp_map_2", "pvp_map_3", "pvp_map_4", "pvp_map_5", "pvp_map_6"; .size = getarraysize(.map$); initnpctimer; OnTimer5000: .index = (.index % .size); delwaitingroom; waitingroom .name$[.index] + "[ "+getmapusers(.map$[.index])+" ]", 0; .index++; initnpctimer; end; } try Edited May 8, 2019 by Emistry update Quote
0 anacondaq Posted May 7, 2019 Posted May 7, 2019 Something like that, but not tested. OnTimer3000: .@map$ = .pvp_maps$[$@current_pvp_map_index]; // just to make it more readable. .chat_text$ = "[ PvP Map "+ $@current_pvp_map_index +"[ "+getmapusers(.@map$)+" user ] ]"; delwaitingroom; waitingroom .chat_text$ if($@current_pvp_map_index > getarraysize(.pvp_maps$)) { $@current_pvp_map_index = 0; } else { $@current_pvp_map_index++; } initnpctimer; end; OnInit: setarray .pvp_maps$[0], "map1", "map2", "map3"; $@current_pvp_map_index = 0; initnpctimer; end; Quote
0 caspa Posted May 7, 2019 Author Posted May 7, 2019 9 hours ago, anacondaq said: Something like that, but not tested. OnTimer3000: .@map$ = .pvp_maps$[$@current_pvp_map_index]; // just to make it more readable. .chat_text$ = "[ PvP Map "+ $@current_pvp_map_index +"[ "+getmapusers(.@map$)+" user ] ]"; delwaitingroom; waitingroom .chat_text$ if($@current_pvp_map_index > getarraysize(.pvp_maps$)) { $@current_pvp_map_index = 0; } else { $@current_pvp_map_index++; } initnpctimer; end; OnInit: setarray .pvp_maps$[0], "map1", "map2", "map3"; $@current_pvp_map_index = 0; initnpctimer; end; this is the right one however i have problems during rotation... there is only 3 maps identifies but its rotating +2 maps beyond that PvP Room 0 [ 1 user ] pvp room 1 [ 1 user ] pvp room 2 [ 3 user ] pvp room 3 [-1 user ] pvp room 5 [-1user] then if you put 4 maps.. it then becoms up to 6 rotation.. LOL the room no. also starts with 0... how do u make it starts with Room 1, 2, 3 and so forth... Quote
0 Hijirikawa Posted May 7, 2019 Posted May 7, 2019 .chat_text$ = "[ PvP Map "+ $@current_pvp_map_index + 1 +"[ "+getmapusers(.@map$)+" user ] ]"; Quote
0 caspa Posted May 8, 2019 Author Posted May 8, 2019 (edited) it doesnt rotate 7 hours ago, Emistry said: prontera,155,181,5 script PVP Room 4_F_KAFRA1,{ for (.@i = 0; .@i < .size; .@i++) .@menu$ += .name$[.@i] + "[ "+getmapusers(.map$[.@i])+" ]" + ":"; .@i = select(.@menu$) - 1; warp .map$[.@i], 0, 0; end; OnInit: setarray .name$, "Title 1", "Title 2", "Title 3", "Title 4", "Title 5", "Title 6"; setarray .map$, "pvp_map_1", "pvp_map_2", "pvp_map_3", "pvp_map_4", "pvp_map_5", "pvp_map_6"; .size = getarraysize(.map$); initnpctimer; OnTimer5000: .index = (.index % .size); delwaitingroom; waitingroom .name$[.index] + "[ "+getmapusers(.map$[.index])+" ]", 0; .index++; end; } try the waitingroom dont rotate.. you need to click the npc first before the waitingroom change... this is the script converted prontera,155,181,5 script PVP Room 100,{ for ( set .@i,0; .@i < .size; set .@i,.@i+1) set .@menu$, .@menu$ + .name$[.@i] + "[ "+getmapusers(.map$[.@i])+" ]" + ":"; set .@i,select(.@menu$) - 1; warp .map$[.@i], 0, 0; end; OnInit: setarray .name$, "Title 1", "Title 2", "Title 3", "Title 4", "Title 5", "Title 6"; setarray .map$, "prontera", "izlude", "pvp_n_room", "pvp_y_1-2", "invek", "mellina"; set .size,getarraysize(.map$); initnpctimer; OnTimer5000: set .index,(.index % .size); delwaitingroom; waitingroom .name$[.index] + "[ "+getmapusers(.map$[.index])+" ]", 0; set .index,.index+1; end; } Edited May 8, 2019 by caspa Quote
0 hendra814 Posted May 8, 2019 Posted May 8, 2019 (edited) 45 minutes ago, caspa said: it doesnt rotate the waitingroom dont rotate.. you need to click the npc first before the waitingroom change... quiz_02,287,265,4 script Ultimate PvP Warper 417,{ if (.pvp_square$=="") donpcevent "Ultimate PVP warper::OnClock0000"; mes "[PvP Warper]"; mes "Which arena do you want to join?"; switch(select("All Job ["+getmapusers(.pvp_square$)+"/128]:Max lvl 99 ["+getmapusers("pvp_y_2-2")+"/128]:3rd Baby Class ["+getmapusers("pvp_y_1-2")+"/128]")) { case 1: // PVP Square if (getmapusers(.pvp_square$) > 127) callsub S_full; warp .pvp_square$,0,0; announce "Player "+strcharinfo(0)+" join arena PVP All Job !!",bc_all; end; case 2: // PVP Low Level if (getmapusers("pvp_y_2-2") > 127) callsub S_full; if (BaseLevel > 99) { // Edit 150 to any maximum Lvl of a player can enter this room mes "Only for level 1 - 99"; close; } warp "pvp_y_2-2",0,0; announce "Player "+strcharinfo(0)+" join arena PVP Max lvl 99 !!",bc_all; end; Case 3: // Baby Class if (getmapusers("pvp_y_1-2") > 127) callsub S_full; if (class < 4096 || class > 4112) goto L_NotBaby; warp "pvp_y_1-2",0,0; announce "Player "+strcharinfo(0)+" join arena PVP 3rd Baby Class !!",bc_all; end; L_NotBaby: mes "This room only for 3rd baby class"; close; } S_full: mes "Sorry, The arena already full. Please wait..."; close; OnInit: OnTimer5000: delwaitingroom; switch(rand(1,3)) { Case 1: waitingroom getmapusers(.pvp_square$)+" player"+( getmapusers(.pvp_square$) > 1 ? "s":"") +" in arena All Job", 0; goto Timer; end; break; Case 2: waitingroom getmapusers("pvp_y_2-2")+" player"+( getmapusers("pvp_y_2-2") > 1 ? "s":"") +" in arena Max lvl 99", 0; goto Timer; end; break; Case 3: waitingroom getmapusers("pvp_y_1-2")+" player"+( getmapusers("pvp_y_1-2") > 1 ? "s":"") +" in arena 3rd Baby Class", 0; goto Timer; end; break; Timer: initnpctimer; } OnClock0000: // set the "PVP Square" map, based on day of the weeek switch(gettime(4)) { case 0: // Sunday case 1: // Monday set .pvp_square$, "pvp_y_7-2"; break; case 2: // Tuesday case 3: // Wednesday set .pvp_square$, "guild_vs3"; break; case 4: // Thursday case 5: // Friday set .pvp_square$, "pvp_y_7-2"; break; case 6: // Saturday set .pvp_square$, "guild_vs3"; break; } } Edited May 8, 2019 by hendra814 Quote
0 caspa Posted May 8, 2019 Author Posted May 8, 2019 31 minutes ago, hendra814 said: quiz_02,287,265,4 script Ultimate PvP Warper 417,{ if (.pvp_square$=="") donpcevent "Ultimate PVP warper::OnClock0000"; mes "[PvP Warper]"; mes "Which arena do you want to join?"; switch(select("All Job ["+getmapusers(.pvp_square$)+"/128]:Max lvl 99 ["+getmapusers("pvp_y_2-2")+"/128]:3rd Baby Class ["+getmapusers("pvp_y_1-2")+"/128]")) { case 1: // PVP Square if (getmapusers(.pvp_square$) > 127) callsub S_full; warp .pvp_square$,0,0; announce "Player "+strcharinfo(0)+" join arena PVP All Job !!",bc_all; end; case 2: // PVP Low Level if (getmapusers("pvp_y_2-2") > 127) callsub S_full; if (BaseLevel > 99) { // Edit 150 to any maximum Lvl of a player can enter this room mes "Only for level 1 - 99"; close; } warp "pvp_y_2-2",0,0; announce "Player "+strcharinfo(0)+" join arena PVP Max lvl 99 !!",bc_all; end; Case 3: // Baby Class if (getmapusers("pvp_y_1-2") > 127) callsub S_full; if (class < 4096 || class > 4112) goto L_NotBaby; warp "pvp_y_1-2",0,0; announce "Player "+strcharinfo(0)+" join arena PVP 3rd Baby Class !!",bc_all; end; L_NotBaby: mes "This room only for 3rd baby class"; close; } S_full: mes "Sorry, The arena already full. Please wait..."; close; OnInit: OnTimer5000: delwaitingroom; switch(rand(1,3)) { Case 1: waitingroom getmapusers(.pvp_square$)+" player"+( getmapusers(.pvp_square$) > 1 ? "s":"") +" in arena All Job", 0; goto Timer; end; break; Case 2: waitingroom getmapusers("pvp_y_2-2")+" player"+( getmapusers("pvp_y_2-2") > 1 ? "s":"") +" in arena Max lvl 99", 0; goto Timer; end; break; Case 3: waitingroom getmapusers("pvp_y_1-2")+" player"+( getmapusers("pvp_y_1-2") > 1 ? "s":"") +" in arena 3rd Baby Class", 0; goto Timer; end; break; Timer: initnpctimer; } OnClock0000: // set the "PVP Square" map, based on day of the weeek switch(gettime(4)) { case 0: // Sunday case 1: // Monday set .pvp_square$, "pvp_y_7-2"; break; case 2: // Tuesday case 3: // Wednesday set .pvp_square$, "guild_vs3"; break; case 4: // Thursday case 5: // Friday set .pvp_square$, "pvp_y_7-2"; break; case 6: // Saturday set .pvp_square$, "guild_vs3"; break; } } is there anyway to make this sequence? like case 1 first then case 2 then case 3? Quote
0 hendra814 Posted May 8, 2019 Posted May 8, 2019 17 minutes ago, caspa said: is there anyway to make this sequence? like case 1 first then case 2 then case 3? Sequence for getmapuser in pub room? i think it's already sequence Quote
0 caspa Posted May 8, 2019 Author Posted May 8, 2019 8 minutes ago, hendra814 said: Sequence for getmapuser in pub room? i think it's already sequence i think the switch(rand1,3) is making it random.... when you put Room 1 instead of the maps mentioned above.. it would look like this room 1 room 3 room 4 room 1 room 2 room 4 instead of room 1 room 2 room 3 room 4 and then 1 again room 2 Quote
0 hendra814 Posted May 8, 2019 Posted May 8, 2019 (edited) 1 hour ago, caspa said: is there anyway to make this sequence? like case 1 first then case 2 then case 3? not sure, but try with switch(1,3) Edited May 8, 2019 by hendra814 Quote
0 caspa Posted May 8, 2019 Author Posted May 8, 2019 1 hour ago, hendra814 said: not sure, but try with switch(1,3) it doesn't work OnInit: setarray .map$,"pvp_y_1-2","pvpmapall1","classmap3","pvpmapall2"; set .map_size,getarraysize ( .map$ ); for( set .@i,0; .@i < .map_size; set .@i,.@i+1 ){ OnTimer5000: delwaitingroom; switch(.@i+1) { Case 1: waitingroom "Room 1 [ "+ getmapusers("pvp_y_1-2")+" ]", 0; goto Timer; end; break; Case 2: waitingroom "Room 2 [ "+ getmapusers("pvpmapall1")+" ]", 0; goto Timer; end; break; Case 3: waitingroom "Room 3 [ "+ getmapusers("classmap3")+" ]", 0; goto Timer; end; break; Case 4: waitingroom "Room 4 [ "+ getmapusers("pvpmapall2")+" ]", 0; goto Timer; end; break; Timer: initnpctimer; tried doing this and it doesnt work... JEsaaasss i swear to god if this script thing is as easy as medical terms.. LOL! Quote
0 Emistry Posted May 8, 2019 Posted May 8, 2019 4 hours ago, caspa said: the waitingroom dont rotate.. refer the updated script again Quote
0 caspa Posted May 8, 2019 Author Posted May 8, 2019 15 minutes ago, Emistry said: refer the updated script again thank you [solved] Quote
Question
caspa
does anybody know where can i find that pvp warper where it has a rotating waitingroom?
like
waitingroom = [ PvP Map 1 [ 12 user ] ] then after that delwaitingroom then [ PvP Map 2 [ 1 User ] ] then it show another map again...
13 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.