- script atcmd_example -1,{
OnInit:
bindatcmd "item",strnpcinfo(3)+"::OnAtCommand";
setarray .item_restrict,
607,
7227;
.item_restrict_size = getarraysize( .item_restrict );
end;
OnAtCommand:
.@gmlevel = getgmlevel();
if( .@gmlevel && .@atcmd_numparameters ){
.@itemid = atoi( .@atcmd_parameters$[0] );
.@quantity = atoi( .@atcmd_parameters$[1] );
if( .@gmlevel < 99 ){
for( .@i = 0; .@i < .item_restrict_size; .@i++ )
if( .@itemid == .item_restrict[.@i] ){
message strcharinfo(0),"Cant create this items.";
end;
}
}
if( getitemname( .@itemid ) != "" && .@quantity ){
getitem .@itemid,.@quantity;
}
}
end;
}