mrlongshen Posted January 10, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted January 10, 2013 (edited) based on the topic, i want to request a log on chat box on all gm. all gm will know who online.. can? Edited January 11, 2013 by mrlongshen Quote Link to comment Share on other sites More sharing options...
Brian Posted January 11, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted January 11, 2013 I was confused by the topic title. Do you want it to announce to GMs when another GM logs in/out? or announce to GMs when any player logs in/out? If you have trunk/conf/groups.conf, permissions: { receive_requests: true } then you can use @request to send the message to all online GMs: - script a_gm_is_online -1,{ OnPCLoginEvent: if (getgmlevel() > 0) atcommand "@request "+strcharinfo(0)+" is ONLINE."; end; OnPCLogoutEvent: if (getgmlevel() > 0) atcommand "@request "+strcharinfo(0)+" has logged out."; end; } Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted January 11, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Author Share Posted January 11, 2013 I was confused by the topic title. Do you want it to announce to GMs when another GM logs in/out? or announce to GMs when any player logs in/out? If you have trunk/conf/groups.conf, permissions: { receive_requests: true } then you can use @request to send the message to all online GMs: - script a_gm_is_online -1,{ OnPCLoginEvent: if (getgmlevel() > 0) atcommand "@request "+strcharinfo(0)+" is ONLINE."; end; OnPCLogoutEvent: if (getgmlevel() > 0) atcommand "@request "+strcharinfo(0)+" has logged out."; end; } sir i want both. gm and player online. it will be like a friend online.. A friend Brian is online like that. hehe can ? Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 11, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 11, 2013 @request command spam my PM box <.< I'll do another way - script gm_build_array_online -1,{ OnInit: .gm_level = 60; // set min gm level here if ( getusers(1) ) end; deletearray $gm_online_aid; $gm_online_count = 0; end; OnPCLoginEvent: $gm_online_aid[ $gm_online_count ] = getcharid(3); $gm_online_count++; end; OnPCLogoutEvent: while ( $gm_online_aid[.@i] != getcharid(3) && .@i < $gm_online_count ) .@i++; if ( .@i == $gm_online_count ) end; // prevent @loadnpc/@reloadscript bug becos not in the array deletearray $gm_online_aid[.@i], 1; $gm_online_count--; end; } - script announce_every_player -1,{ OnPCLoginEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has online"; end; OnPCLogoutEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has offline"; end; } Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted January 11, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Author Share Posted January 11, 2013 @request command spam my PM box <.< I'll do another way - script gm_build_array_online -1,{ OnInit: .gm_level = 60; // set min gm level here if ( getusers(1) ) end; deletearray $gm_online_aid; $gm_online_count = 0; end; OnPCLoginEvent: $gm_online_aid[ $gm_online_count ] = getcharid(3); $gm_online_count++; end; OnPCLogoutEvent: while ( $gm_online_aid[.@i] != getcharid(3) && .@i < $gm_online_count ) .@i++; if ( .@i == $gm_online_count ) end; // prevent @loadnpc/@reloadscript bug becos not in the array deletearray $gm_online_aid[.@i], 1; $gm_online_count--; end; } - script announce_every_player -1,{ OnPCLoginEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has online"; end; OnPCLogoutEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has offline"; end; } thanks @annie. i works like charm.. butt............... the logs also appear on player. i dont want like that. i just want all gm only can see the player who online.. I was confused by the topic title. Do you want it to announce to GMs when another GM logs in/out? or announce to GMs when any player logs in/out? If you have trunk/conf/groups.conf, permissions: { receive_requests: true } then you can use @request to send the message to all online GMs: - script a_gm_is_online -1,{ OnPCLoginEvent: if (getgmlevel() > 0) atcommand "@request "+strcharinfo(0)+" is ONLINE."; end; OnPCLogoutEvent: if (getgmlevel() > 0) atcommand "@request "+strcharinfo(0)+" has logged out."; end; } nothing happen bro. why ea ? Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 11, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 11, 2013 ROFL !! - script gm_build_array_online -1,{ OnInit: .gm_level = 60; // set min gm level here if ( getusers(1) ) end; deletearray $gm_online_aid; $gm_online_count = 0; end; OnPCLoginEvent: if ( getgmlevel() < .gm_level ) end; // WAHAHAHAHHA $gm_online_aid[ $gm_online_count ] = getcharid(3); $gm_online_count++; end; OnPCLogoutEvent: if ( getgmlevel() < .gm_level ) end; // totally forgot x.x while ( $gm_online_aid[.@i] != getcharid(3) && .@i < $gm_online_count ) .@i++; if ( .@i == $gm_online_count ) end; // prevent @loadnpc/@reloadscript bug becos not in the array deletearray $gm_online_aid[.@i], 1; $gm_online_count--; end; } - script announce_every_player -1,{ OnPCLoginEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has online"; end; OnPCLogoutEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has offline"; end; } 2 Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted January 11, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Author Share Posted January 11, 2013 hahahahaha! thx annie. its currently doing very well topic close xD Quote Link to comment Share on other sites More sharing options...
Question
mrlongshen
based on the topic, i want to request a log on chat box on all gm.
all gm will know who online..
can?
Edited by mrlongshenLink to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.