Jump to content
  • 0

Show who's online


caspa

Question


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

hi guys... can anybody help me with this script? can't seem to make it work...

mes "^ff0000Online Users^000000 :";
//----------------------------------------------------------------------------------------------------------------
set .@size, query_sql( "SELECT `name` FROM `char` WHERE `online` = 1 AND `account_id` NOT IN ( SELECT `account_id` FROM `login` WHERE `level` > 0 ) ORDER BY `name` DESC LIMIT 128", .@name$ );
//-----------------------------------------------------------------------------------------------------------------
            for( set .@i,0; .@i < .@size; set .@i,.@i+1 ) {
getmapxy( .@map$, .@x, .@y, 0, .@name$[.@i]  );
set .@base, readparam( 11,.@name$[.@i] );
set .@jobl, readparam( 55,.@name$[.@i] );
set .@jname$,jobname( readparam( 19,.@name$[.@i] ) );
mes ""+( .@i+1 ) +". ^007700"+ .@name$[.@i] +"^000000";
}
 
for (set .@z,0; .@z<getarraysize(.@name$); set .@z,.@z+1)
set .@menu$, .@menu$ + .@name$[.@z]+":";
set .@num, select(.@menu$) -1; 
next;
mes "^ff0000"+.@name$[.@num]+" Info^000000 :";
mes "^777777Class^000000 : ^0055FF"+.@jname$[.@i]+"";
mes "^777777Base Lvl^000000 : ^0055FF"+ .@base[.@i] +"";
mes "^777777Job Lvl^000000 : ^0055FF"+ .@jobl[.@i]+"";
mes "^777777Map^000000 : ^0055FF"+ .@map$ +" "+.@x+", "+.@y+"";
close;
Edited by caspa
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

set .@size, query_sql( "SELECT `name` 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", .@name$ );

there is no column 'level' in the login table, you probably mean 'group_id'.

Didn't try it but it seems ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  163
  • Topics Per Day:  0.04
  • Content Count:  319
  • Reputation:   8
  • Joined:  02/05/12
  • Last Seen:  

Excuse-me, if i can suggest...Why do you not use this?

prontera,x,y,z TAB script TAB name TAB id,{
TAB atcommand "@whoX" //x = Empty, 2 or 3.
}
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...