Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // https://rathena.org/board/topic/116861-atcommand-request-modification-for-improvement/
- - script gm_request_main -1,{
- OnInit:
- .min_group_id$ = "99,90,80,70";
- .gm_id_size = query_sql("SELECT `account_id` FROM `login` WHERE `group_id` IN ("+escape_sql(.min_group_id$)+")", .gm_id);
- bindatcmd "request", strnpcinfo(3)+"::OnAtcommand";
- end;
- OnAtcommand:
- if (.@atcmd_numparameters > 0) {
- for (.@i = 0; .@i < .@atcmd_numparameters; .@i++)
- .@message$ = .@message$ + .@atcmd_parameters$[.@i] + " ";
- .@name$ = strcharinfo(0);
- .@origin = getcharid(3);
- for (.@i = 0; .@i < .gm_id_size; .@i++) {
- if (attachrid(.gm_id[.@i])) {
- announce "(Request "+.@name$+"): "+.@message$, bc_self, 0xFFFF00;
- .@count++;
- detachrid;
- }
- }
- attachrid .@origin;
- dispbottom "Request has been received by "+.@count+" GM.";
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement