Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

Who's Online without the GM Name


caspa

Question


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

 Hello i would like to know how to ignore the GM Name from this script.. i mean that, if your gm level is above 40 you will not be put on the online list.
 
 
Here's the script :

 
query_sql "SELECT `account_id` FROM `char` WHERE `online` = 1 ORDER BY `name` DESC LIMIT 128", .@account_id;
    set .@self,getcharid(3);
    //mes "x. Name ( Base/Job ) - Class [Map]";
    for( set .@i,0; .@i < getarraysize( .@account_id ); set .@i,.@i+1 )
        if( attachrid( .@account_id[ .@i ]  ) ) {
            set .@name$,rid2name( .@account_id[ .@i ] );
            set .@base,BaseLevel;
            set .@jobl,JobLevel;
            set .@jname$,jobname( Class ); 
            set .@map$,strcharinfo(3);
            attachrid( .@self );
            mes ""+( .@i+1 ) +". ^777777"+.@name$ +" ^FF0000("+ .@base +"/"+ .@jobl +")^000000 - ^777777"+ .@jname$ +" ^0000ff["+ 
 
.@map$ +"]^000000";
        }
    close;


BUMP?



BUMP!

Edited by caspa
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  143
  • Reputation:   30
  • Joined:  12/23/11
  • Last Seen:  

replace

if( attachrid( .@account_id[ .@i ]  ) ) {
with
if( attachrid( .@account_id[ .@i ]  ) && getgmlevel()<40 ) {
Link to comment
Share on other sites


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

i think you can try this too ..

query_sql "SELECT `account_id` FROM `char` WHERE `online` = 1 AND `account_id` NOT IN ( SELECT `account_id` FROM `login` WHERE `group_id` > 0 ) ORDER BY `name` DESC LIMIT 128", .@account_id;

 

hope it work ~

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