caspa Posted May 19, 2015 Share Posted May 19, 2015 hello fellow rathena users.. i just want to know why this particular script does not work..it doesn't read any user on the maps... OnInIt: set [email protected]_maps,getmapusers("pvp_y_room") + getmapusers("pvp_y_1-2") + getmapusers("pvp_2v2"); while(1){ delwaitingroom; waitingroom "PvP Room ["[email protected]_maps+" User"+(( [email protected]_maps >= 2 ) ? "s" : "" )+"]",0; sleep 1000; } end; } Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted May 19, 2015 Share Posted May 19, 2015 remove set [email protected]_maps,getmapusers("pvp_y_room") + getmapusers("pvp_y_1-2") + getmapusers("pvp_2v2"); waitingroom waitingroom "PvP Room ["+( getmapusers("pvp_y_room") + getmapusers("pvp_y_1-2") )+"]",0; 1 Quote Link to comment Share on other sites More sharing options...
caspa Posted May 19, 2015 Author Share Posted May 19, 2015 if i do that then the waiting room will display something like [PvP Room - [100 Users]]i need it to add all the user on all 3 maps and show it on the waitingroom as 1so if pvp_1 has 3 people and pvp_room has 2 people then pvp_3 has 4 people... i want the waiting room to show [9 Users] help please.... Quote Link to comment Share on other sites More sharing options...
Brian Posted May 20, 2015 Share Posted May 20, 2015 You have the right idea in your 1st post, but this line set [email protected]_maps,getmapusers("pvp_y_room") + getmapusers("pvp_y_1-2") + getmapusers("pvp_2v2");needs to be inside the while loop so it recalculates the 'getmapusers' every loop.When it's before the loop, it only runs once OnInit and the count is never recalculated. OnInit: while (1) { delwaitingroom; set [email protected], getmapusers("pvp_y_room") + getmapusers("pvp_y_1-2") + getmapusers("pvp_2v2"); waitingroom "PvP Room ["+ [email protected] + (([email protected]==1) ? " User" : " Users") +"]",0; sleep 1000; } } Quote Link to comment Share on other sites More sharing options...
hello fellow rathena users.. i just want to know why this particular script does not work..
it doesn't read any user on the maps...
Link to comment
Share on other sites