Jump to content
  • 0

GM Staff online status


Jesky

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

Hi everyone, this is my 2nd thread on rathena.

I already search and found many of this script (GM Online Status), the one i like is sir Emistry script.

But can someone modifiy a little to keep the list of GM and show the status if he/she online, offline, or afk?

 

For example, when the npc clicked, it will show the dialogue like this:

 

============================================

Example-RO GM List: 2 (amount of GM in the server)

- Admin [Admin character name]

Status: Online/Offline/AFK

Last Login: (Example: 10.00am 22/12/2013)

- Game Master [GM character name]

Status: Online/Offline/AFK

Last Login: (Example: 10.00am 22/12/2013)

 

(Show the clock & date here)

ex: 11:08am 22 December, 2013

============================================

 

Hope someone can help me. Credit to sir Emistry :D

Edited by Jesky
Link to comment
Share on other sites

4 answers 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:  

emistry is having his holiday

so I do

 

prontera,155,171,5	script	GM Online Lists	436,{
	mes "Example RO GM list : "+( .admincount + .gmcount );
	mes "-----------------------------";
	for ( .@i = 0; .@i < .admincount; .@i++ ) {
		mes "Admin : "+ .admin$[.@i];
		mes "Status : "+( ( isloggedin( getcharid( 3, .admin$[.@i] ) ) )? ( ( checkidle( .admin$[.@i] ) > .idletime )? "Idle" : "Online" ) : "Offline" );
		query_sql "select date_format( lastlogin , '%l.%i%p %e/%c/%Y' ) from login right join `char` on `char`.account_id = login.account_id where `char`.name = '"+ escape_sql( .admin$[.@i] ) +"'", .@time$;
		mes "Last Login: "+ .@time$;
		mes "-----------------------------";
	}
	for ( .@i = 0; .@i < .gmcount; .@i++ ) {
		mes "GM : "+ .gm$[.@i];
		mes "Status : "+( ( isloggedin( getcharid( 3, .gm$[.@i] ) ) )? ( ( checkidle( .gm$[.@i] ) > .idletime )? "Idle" : "Online" ) : "Offline" );
		query_sql "select date_format( lastlogin , '%l.%i%p %e/%c/%Y' ) from login right join `char` on `char`.account_id = login.account_id where `char`.name = '"+ escape_sql( .gm$[.@i] ) +"'", .@time$;
		mes "Last Login: "+ .@time$;
		mes "-----------------------------";
	}
	mes gettimestr("%I:%M%p ",10) + gettime(5) + gettimestr(" %B ",15) + gettime(7);
	close;

OnInit:
	.idletime = 60; // idle for 60 seconds = idle status
	setarray .admin$, "AnnieRuru";
	setarray .gm$, "EnnyRuru", "KinoRuru";

	.admincount = getarraysize( .admin$ );
	.gmcount = getarraysize( .gm$ );
	end;
}
the script itself isn't hard, but for some reason, I took lots of time to figure which %? to use in date_format <.<
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

Miss  AnnieRuru

 

Im actually i dont know how to resolve this...

 

 

rq0w112lsf.jpg

 

Did i need to restart a server?..?

I just reloading a script and it show like that..?

How was that?..?

 

**Btw thx for the nice script **

 

Link to comment
Share on other sites


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

you have to make sure your GM name match the one having in your SQL table

try run this query

select login.account_id, `char`.name, `char`.char_num from login right join `char` on `char`.account_id = login.account_id where login.group_id > 0;
also your map-server.exe should've display an error message

try show that error too

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

I'm so happy, this script works very well and it's like what i want! Thank you so much miss Annie, you're the best!  /no1

*again, sorry for my bad english

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