Jump to content
  • 0

adding multiple maps in waitingroom


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

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 .@pvp_maps,getmapusers("pvp_y_room") + getmapusers("pvp_y_1-2") + getmapusers("pvp_2v2");
while(1){
delwaitingroom;
waitingroom "PvP Room ["+.@pvp_maps+" User"+(( .@pvp_maps >= 2 ) ? "s" : "" )+"]",0;
sleep 1000;
}
   end;
}
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

remove set .@pvp_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;
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

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....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

You have the right idea in your 1st post, but this line

set .@pvp_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 .@count, getmapusers("pvp_y_room") + getmapusers("pvp_y_1-2") + getmapusers("pvp_2v2");
		waitingroom "PvP Room ["+ .@count + ((.@count==1) ? " User" : " Users") +"]",0;
		sleep 1000;
	}
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...