Emistry icon

[RO] GM @Request AtCommand

Emistry | PRO | 09/11/18 05:00:15 AM UTC | 0 ⭐ | 761 👁️ | Never ⏰ | []
text |

880 B

|

None

|

0 👍

/

0 👎

// 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;
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎