Advertisement
akbare

utility : GM ipinfo

Dec 23rd, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. - script ipinfo -1,{
  2. OnInit:
  3. bindatcmd "ipinfo","ipinfo::OnIPInfo", 2, 2;
  4. end;
  5. OnIPInfo:
  6. if(getgroupid() >= 2) {
  7. input .@chrnm$;
  8. query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid;
  9. query_sql "SELECT `last_ip`,`group_id` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@lstp$, .@grplvl;
  10. query_sql "SELECT `account_id`,`userid`,`logincount`,`lastlogin` FROM `login` WHERE `last_ip` ='" + .@lstp$+ "'", .@acidlip, .@acidlip$, .@lgncnt, .@lstlgn$;
  11. if (.@acid < 2000000 || .@acid > 3000000) { mes "Character Not Found"; close; }
  12. if (.@grplvl > 0) { mes "GM Accounts Not Available"; close; }
  13. mes "Name: ^00CC00"+.@chrnm$+"^000000 ";
  14. mes "IP Address: ^FF0000"+.@lstp$+"^000000 ";
  15. next;
  16. mes "Displaying Users with IP: ^00CC00"+.@lstp$;
  17. next;
  18. for(set .@i, 0; .@i < getarraysize(.@acidlip$); set .@i, .@i + 1){
  19. mes .@i+1+". ^00CC00"+.@acidlip$[.@i]+"^000000 ";
  20. mes "Login Count: "+.@lgncnt[.@i]+" ";
  21. mes "Last Login: "+.@lstlgn$[.@i]+" ";
  22. }
  23. close;
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement