viewing paste @info player | Athena

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
-   script  @info   -1,{
OnInit:
    bindatcmd "info",strnpcinfo(3)+"::OnAtcommand",0,99;
    end;
OnAtcommand:
if (.@atcmd_numparameters <= 0 ) {
        message(strcharinfo(PC_NAME), sprintf(_$("Usage: %s <Name>"), .@atcmd_command$));
        message(strcharinfo(PC_NAME), sprintf(_$("%s failed."), .@atcmd_command$));
        end;
}
 
 
.@input$ = .@atcmd_parameters$;
.@input1$[1] = .@atcmd_parameters$[1];
.@users = getusers(1);
.@users1 = getusers(0);
 
        .@qs = query_sql("SELECT `account_id`, `name`, `char_id`, `sex`, `online`, `base_level` FROM `char` WHERE `name` = '"+escape_sql(.@input$+" "+.@input1$[1])+"' LIMIT 2", .@aids, .@name$, .@cids, .@sex$, .@online, .@baselv);
if(.@qs == 1){
        for(set .@i,0; .@i<1 ; set .@i,.@i+1){
        dispbottom "         [ Info Player ]";
        dispbottom "================";
        dispbottom "Online Server: "+.@users+" Player(s)";
        dispbottom "Name: "+.@name$[.@i]+" || Base Level: "+.@baselv;
        if ( .@online[.@i] == 1 ){ //If online display..
        dispbottom "Status: Online";
        getmapxy(.@map$, .@x, .@y, 0, .@name$[.@i]);
        dispbottom "Map: "+.@map$+","+.@x+","+.@y+"";
        dispbottom "IP address: "+getcharip(.@name$[.@i]);
        }
        else {
        dispbottom "Status: Offline";
        }
        dispbottom "Aid: "+.@aids[.@i];
        dispbottom "Cid: "+.@cids[.@i];
        dispbottom "Sex: "+.@sex$[.@i];
        
        dispbottom "================";
        if ( .@online[.@i] == 1 ){
        message(.@aids[.@i], "Someone is spying on you..");
        }
        }   
}
else {
message(strcharinfo(PC_NAME), sprintf(_$("Usage: %s <Name>"), .@atcmd_command$));
message(strcharinfo(PC_NAME), sprintf(_$("Player not found."), .@atcmd_command$));
 
end;
}
}
Viewed 565 times, submitted by heroji.