Jump to content

Utility: GM Online List


Emistry

Recommended Posts


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  1167
  • Reputation:   159
  • Joined:  06/12/12
  • Last Seen:  

@Annie

That's right a same image.

but i want use Emistry script, and just add status display ( online/offline) 

Link to comment
Share on other sites

  • 6 years later...

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

Hi @Emistry

can you help me with your script?

image.png.a9b793c57d79a215f9bc39dc0681a2a4.png

GameMaster3 must Event GM and not just (GM)

how can i fix it? here is my script


firstcity,207,66,6	script	GM Online List	655,{
	function get_GM_Title;
	function get_GM_State;
	
	cutin "kafra_09",2;
	
	.@size = query_sql( "SELECT `char`.`account_id`,`char`.`char_id`,`char`.`name`,`login`.`lastlogin`,TIMEDIFF( NOW(),`login`.`lastlogin` ),`login`.`group_id` FROM `char` INNER JOIN `login` ON `char`.`account_id` = `login`.`account_id` WHERE `group_id` > "+.min_group_id+" ORDER BY `char`.`online` DESC, `login`.`group_id` DESC LIMIT 10",.@aid,.@cid,.@name$,.@lastlogin$,.@lastlogin_duration$,.@group_id );

	mes "There are total ^FF0000"+.@size+"^000000 GM(s)";
	while ( .@i < .@size ) {
		mes get_GM_Title( .@name$[.@i],.@group_id[.@i] )+" - "+get_GM_State( .@aid[.@i],.@cid[.@i],.@name$[.@i] );
		mes "Last Seen: ^777777"+.@lastlogin_duration$[.@i]+" hours ago^000000";
		mes "Last Login: ^777777"+.@lastlogin$[.@i]+"^000000";
		mes " ";
		.@i++;
	}
	close2;
	cutin "",255;
	end;
	
	OnInit:
		.min_group_id = 1;
		.afk_second = 300;
		end;

	function	get_GM_Title	{
		switch ( getarg( 1,0 ) ) {
			default: .@title$ = "";
			case 1: .@title$ = "(Super Player)";
			case 2: .@title$ = "(Support)";
			case 3: .@title$ = "(Script Manager)";
			case 4: .@title$ = "(Event Manager)";
			case 10: .@title$ = "(Law Enforcement)";
			case 98: .@title$ = "(Developer)";
			case 99: .@title$ = "(GM)";
		}
		
		return .@title$ + " " +  getarg( 0,"NULL" );
	}
	
	function	get_GM_State	{
		.@aid = getarg( 0,0 );
		.@cid = getarg( 1,0 );
		.@name$ = getarg( 2,"NULL" );
		
		if ( isloggedin( .@aid,.@cid ) ) {
		
			.@idle = checkidle( .@name$ );
			
			if ( .@idle >= .afk_second && .afk_second ) {
				.@state$ = "AFK/Away";
			}
			else {
				.@state$ = "Online";
			}
		}
		else {
			.@state$ = "Offline";
		}
		
		return .@state$;
	}

}

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   16
  • Joined:  07/28/12
  • Last Seen:  

Here

Quote

function	get_GM_Title	{
		switch ( getarg( 1,0 ) ) {
			default: .@title$ = "";
			case 1: .@title$ = "(Super Player)";
			case 2: .@title$ = "(Support)";
			case 3: .@title$ = "(Script Manager)";
			case 4: .@title$ = "(Event Manager)";
			case 10: .@title$ = "(Law Enforcement)";
			case 98: .@title$ = "(Developer)";
			case 99: .@title$ = "(GM)";
		}
		
		return .@title$ + " " +  getarg( 0,"NULL" );
	}

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

1 hour ago, Angeluz said:

Here

 

yes i tried but it doesn't change sir 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   16
  • Joined:  07/28/12
  • Last Seen:  

check in /conf/group.conf that you have the same Id for GM

Edited by Angeluz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

9 hours ago, Angeluz said:

check in /conf/group.conf that you have the same Id for GM

Nope, I don't have, I just change the (Admin) into (GM) because of that bug occurs

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   16
  • Joined:  07/28/12
  • Last Seen:  

2 hours ago, Vale said:

Nope, I don't have, I just change the (Admin) into (GM) because of that bug occurs

then u need to change GM level of GameMaster3  to 4. 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

4 minutes ago, Angeluz said:

then u need to change GM level of GameMaster3  to 4. 

GameMaster 3 is already Level 4

 

In that case it should be Event Manager but it doesn't change

Edited by Vale
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   16
  • Joined:  07/28/12
  • Last Seen:  

1 minute ago, Vale said:

GameMaster 3 is already Level 4

 

In that case it should be Event Manager but it doesn't change

Lvl or group_id?

Edited by Angeluz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

Just now, Angeluz said:

Lvl or id?

ID 4

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

On 3/25/2020 at 8:07 PM, Vale said:

Hi @Emistry

can you help me with your script?

image.png.a9b793c57d79a215f9bc39dc0681a2a4.png

GameMaster3 must Event GM and not just (GM)

how can i fix it? here is my

Fixed in new version. A bug that take 5 years before someone noticed it ... ?

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

8 minutes ago, Emistry said:

Fixed in new version. A bug that take 5 years before someone noticed it ... ?

where can i download it? hehe

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
Reply to this topic...

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