public void Run() { try { Logging.Write("[PartyChatCommand] Run " + ToString()); switch (Type) { case CommandType.Lua: Lua.LuaDoString(CommandAction); break; case CommandType.LuaMacro: Lua.RunMacroText(CommandAction); break; case CommandType.UseItem: var n = Others.ParseUInt(CommandAction); if (n > 0) { ItemsManager.UseItem(n); } else { ItemsManager.UseItem(CommandAction); } break; case CommandType.CastSpell: var s = new Spell(CommandAction); s.Launch(); break; case CommandType.CSharp: RunCodeExtension.RunCsharpScript(CommandAction); break; case CommandType.LuaBot: RunCodeExtension.RunLuaBotScript(CommandAction); break; case CommandType.VB: RunCodeExtension.RunVBScript(CommandAction); break; } } catch { } }