Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,162,179,0 script GM Status 56,{
- if (getgmlevel() >= 99) {
- if (select("View GM Status:Reload GM list") == 2) {
- mes "Close this window to reload the GM list.";
- close2;
- goto OnInit;
- }
- }
- mes "[GM Checker]";
- if (getarraysize(.char_id) == 1) {
- mes "There is 1 GM.";
- } else {
- mes "There are " + getarraysize(.char_id) + " GMs.";
- }
- // build menu of GM names
- for (set .@i,0; .@i < getarraysize(.char_id); set .@i,.@i+1) {
- if (isloggedin(.account_id[.@i], .char_id[.@i])) {
- getmapxy .@map$,.@x,.@y,0, .name$[.@i];
- set .@menu$, .@menu$ + "^008000"+.name$[.@i]+"^000000 ("+.@map$+"):";
- } else {
- set .@menu$, .@menu$ + "^FF0000"+.name$[.@i]+"^000000:";
- }
- }
- if (.@menu$ != "") {
- mes "Select a GM to view more info.";
- set .@num, select(.@menu$) -1;
- mes "[GM Checker]";
- mes "GM NAME: " + .name$[.@num];
- mes "STATUS: " + (isloggedin(.account_id[.@num], .char_id[.@num]) ? "^008000Online" : "^FF0000Offline") + "^000000";
- if (checkvending(.name$[.@num]) == 1) mes "(vending)";
- else if (checkvending(.name$[.@num]) == 2) mes "(vending with @autotrade)";
- mes "Position: " + callsub(S_GMgroup2name,.group_id[.@num]);
- getmapxy .@map$,.@x,.@y,0, .name$[.@num];
- mes "Map: " + .@map$;
- }
- close;
- OnInit:
- query_sql "SELECT `char`.account_id, `char`.char_id, `char`.`name`, login.group_id " +
- "FROM login RIGHT JOIN `char` ON login.account_id=`char`.account_id " +
- "WHERE `group_id` >= 1", .account_id, .char_id, .name$, .group_id;
- end;
- S_GMgroup2name:
- set .@group_id, getarg(0,0);
- if (.@group_id == 0) set .@title$, "";
- else if (.@group_id <= 40) set .@title$, "Police GM";
- else if (.@group_id <= 60) set .@title$, "Event GM";
- else if (.@group_id <= 90) set .@title$, "Co-owner";
- else if (.@group_id <= 99) set .@title$, "Admin";
- return .@title$;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement