bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};
atcommand level
- script atcmd_noitem -1,{
OnInit:
bindatcmd("item",strnpcinfo(3)+"::OnAtcommand",0,99);
setarray .item_restrict,607,501;
end;
OnAtcommand:
.@itemid = atoi(.@atcmd_parameters$[0]);
if(!getgmlevel()){
if(inarray(.item_restrict,.@itemid) != -1){
message strcharinfo(0),"You cannot create this item.";
end;
}
}
if(getitemname(.@itemid) != "null"){
.@quantity = atoi( .@atcmd_parameters$[1] );
if ( .@quantity < 1 ) .@quantity = 1;
getitem .@itemid,.@quantity;
}
end;
}