- script at_cmd -1,{
OnInit:
bindatcmd "test","at_cmd::at_test";
bindatcmd "test2","at_cmd::at_test2";
bindatcmd "hello","at_cmd::at_hello";
end;
at_test: set .@atcmd$, "test"; goto OnUseCmd;
at_test2: set .@atcmd$, "test2"; goto OnUseCmd;
at_hello: set .@atcmd$, "hello"; goto OnUseCmd;
OnUseCmd:
dispbottom "You used: @"+ .@atcmd$+" "+ .@atcmd_parameters$[0] + .@atcmd_parameters$[1];
end;
}
EDIT: on a more serious note, it looks like this is already implemented, but not documented.
r16471/trunk/src/map/npc.c
setd_sub(st, NULL, ".@atcmd_command$", 0, (void *)command, NULL);