Index: conf/commands.conf =================================================================== --- conf/commands.conf (revision 4065) +++ conf/commands.conf (working copy) @@ -82,4 +82,5 @@ commands_ini[61] = { ["name"] = "updateservermessage", ["path"] = "scripts/commands", ["permission"] = "1", ["parameters"] = "" }; commands_ini[62] = { ["name"] = "addeffect", ["path"] = "scripts/commands", ["permission"] = "1", ["parameters"] = "siii" }; commands_ini[63] = { ["name"] = "setpvp", ["path"] = "scripts/commands", ["permission"] = "1", ["parameters"] = "si" }; -commands_ini[64] = { ["name"] = "cs2", ["path"] = "scripts/commands", ["permission"] = "1", ["parameters"] = "sssssiiiiiiii"}; \ No newline at end of file +commands_ini[64] = { ["name"] = "cs2", ["path"] = "scripts/commands", ["permission"] = "1", ["parameters"] = "sssssiiiiiiii"}; +commands_ini[65] = { ["name"] = "getmobaction", ["path"] = "scripts/commands", ["permission"] = "1", ["parameters"] = "i" }; Index: scripts/commands/getmobaction.lua =================================================================== --- scripts/commands/getmobaction.lua (revision 0) +++ scripts/commands/getmobaction.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- [Command name]: getmobaction +-- [Author ]: Demolish +-- [Description ]: Returns mob action. +----------------------------------- +-- Usage: @getmobaction mobId + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player, mob) + + if (mob ~= nil) then + if(mob > 14999999) then -- this is to prevent crashing the server with some silly mobId like -12 or something + local id = GetMobByID(mob):getID(); + local action = GetMobAction(mob) + local name = GetMobByID(mob):getName() + + player:PrintToPlayer(string.format("Mob ID: %i | Mob Name: %s | Action ID: %i \n",id,name,action)); + else + player:PrintToPlayer(string.format("Invalid Mob ID %i ! \n", mob)); + end + else + player:PrintToPlayer(string.format("Mob ID cannot be blank!")); + end +end; \ No newline at end of file