- script OnInit -1,{end;OnInit: bindatcmd "monster2", "AtCommands::OnMonster2", <GM Level>, 99;end;}- script AtCommands -1,{end;OnMonster2: if(getarraysize(.@atcmd_parameters$) == 1) { set .@mobid,.@atcmd_parameters$[0]; monster ""+strcharinfo(3)+"",0,0,""+strmobinfo(1, .@mobid)+"",.@mobid,1; } else if(getarraysize(.@atcmd_parameters$) == 2) { set .@mobid,.@atcmd_parameters$[0]; set .@map$,.@atcmd_parameters$[1]; monster ""+.@map$+"",0,0,""+strmobinfo(1, .@mobid)+"",.@mobid,1; } else if(getarraysize(.@atcmd_parameters$) == 3) { set .@mobid,.@atcmd_parameters$[0]; set .@amount,.@atcmd_parameters$[1]; if(!.@amount) set .@amount,1; set .@map$,.@atcmd_parameters$[2]; monster ""+.@map$+"",0,0,""+strmobinfo(1, .@mobid)+"",.@mobid,.@amount; } else { message strcharinfo(0), "Wrong command format. Possible formats:"; message strcharinfo(0), " - @monster2 <Mob ID> <amount> <map>"; message strcharinfo(0), " - @monster2 <Mob ID> <map>"; message strcharinfo(0), " - @monster2 <Mob ID>"; message strcharinfo(0), "@monster2 failed."; }end;}
[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]It could basically work like that, but I'm not good of a coder and I don't know how to check if a monster ID or a map is valid. There will be a console message when someone enters invalid values I assume. Don't forget to change gm level if you use it[/color]