Jump to content
  • 0

Lists who's inside the Instances?


Wise

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  147
  • Reputation:   26
  • Joined:  11/19/11
  • Last Seen:  

is it possible to do this?

instance map name: 1@test

a script that would show all the list of the player's names who are inside the instances (even in different zones of instances like 0011@test and 0021@test)

i tried getmapusers but didn't work =\

EDIT:

Okay i made it working with this:

L_Loop:
set @addition,@addition+1;
set @startnum$,"00"+@addition;
set @map$,@startnum$+"1@test";
set @maxmap$,"0061@test";
set @totalpeak,getmapusers(@map$);
if(@map$ == @maxmap$) {
mes "Nobody is inside the instance.";
close;
}else{
mes @startnum$+" and "+@totalpeak+" - "+@map$;
goto L_Loop;
end;
}

not sure how to use getusersname for a specified map though because i want it to return the names of the players instead of the count =\

Edited by Mavis
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

show all the list of the player's names who are inside the instances (even in different zones of instances like 0011@test and 0021@test)

I have NEVER make an instanced script that need to return the user name in the map

its not like this is a juggernaught script or Last Man Standing ...

in RO, instanced script is only meant for party uses

( that instance ID is only meant for that party members only )

not sure how to use getusersname for a specified map though because i want it to return the names of the players instead of the count =\

if needed, can always use getpartymember script command ....

seriously, whats the idea behind to makes you do something like this ?

EDIT:

...

hmm... some trick

prontera,156,185,5	script	kjdfksfjh	100,{
freeloop 1;
while ( getusers(1) > .@count ) {
	.@nb = query_sql("select account_id from `char` where online = 1 limit 128 offset "+ .@count, .@aid );
	.@i = 0;
	while ( .@i < .@nb ) {
		if ( attachrid(.@aid[.@i]) )
			if ( compare( strcharinfo(3), "1@test" ) || compare( strcharinfo(3), "2@test" ) ) {
				.@result_name$[ .@result ] = strcharinfo(0);
				.@result++;
			}
		.@i++;
	}
	.@count += 128;
}
freeloop 0;
announce "there are "+ .@result +" players in this instance", 0;
for ( .@i = 0; .@i < .@result; .@i++ )
	announce ( .@i +1 )+". "+ .@result_name$[.@i], 0;
end;
}

but this kind of trick should be avoided ...

Edited by AnnieRuru
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...