/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Gm Command Base /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void GM() { if (Character.Information.GM == 1) { PacketReader Reader = new PacketReader(PacketInformation.buffer); short gType = Reader.Int16(); //Console.WriteLine("GM Command {0} used by:{1} ",gType, Character.Information.Name); switch (gType) { case 0: // Command /playercount break; case 1: // Command /finduser break; case 2: // Command / MsgClear break; case 3: GM_TOTOWN(Reader.Text()); break; case 4: // Command /Getpos break; case 5: // Command /stat break; case 6: GM_LOADMONSTER(Reader.Int32(), Reader.Byte(), Reader.Byte()); break; case 7: GM_MAKEITEM(Reader.Int32(), Reader.Byte()); break; case 8: GM_GOUSER(Reader.Text()); break; case 12: // Command /zoe GM_ZOE(Reader.Int32(), Reader.Byte()); break; case 13: GM_BAN(Reader.Text()); break; case 14: GM_INVISIBLE(); break; case 15: GM_INVINCIBLE(); break; case 16: if (PacketInformation.buffer.Length > 4) GM_WP(Reader.Byte(), Reader.Byte(), Reader.Single(), Reader.Single(), Reader.Single()); break; case 17: GM_RECALLUSER(Reader.Text()); break; case 19: // Command /instance case 20: GM_MOBKILL(Reader.Int32(), Reader.UInt16()); break; case 23: GM_BLOCKLOGOUT(Reader.Text(), Reader.Byte()); break; case 26: GM_LIENAME(Reader.Text()); break; case 27: //initq GM_SKILL(); break; case 42: GM_SPAWN_UNIQUE(); break; case 49: GM_CLEARINVEN(); break; case 50: // Command /barena break; case 25: // Command /fakename // Used for transforming now GM_TRANSFORM(Reader.Text()); break; case 99: // Command /power %d case 100: // Command /timeoff break; case 101: // Command /timeon break; case 102: // Command /time %d break; case 103: // Command /day break; case 104: // Command /night break; case 105: // Command /rain %d int type = 2; GM_WEATHER(Reader.Int32(),type); break; case 106: // Command /snow %d type = 3; GM_WEATHER(Reader.Int32(),type); break; case 107: // Command /clear type = 1; GM_WEATHER(Reader.Int32(),type); break; case 108: // Command /+ break; case 109: // Command /- break; case 110: // Command /zoom break; case 111: // Command /fast break; case 112: // Command /showme break; case 113: // Command /hideme break; case 114: // Command /camera break; case 115: // Command /uioff break; case 116: // Command /uion break; case 117: // Command /frame break; case 118: // Command /colon break; case 119: // Command /coloff break; case 130: // Command /cwclear break; case 131: // Command /cwpop break; case 132: // Command /cwgo break; case 133: // Command /cwstop break; case 134: // Command /cwsave break; case 135: // Command /ms break; case 136: // Command /cs %d break; case 137: // Command /id break; case 150: // Command /wire break; case 151: // Command /ground break; case 152: // Command /sky break; case 153: // Command /mobj break; case 154: // Command /char break; case 155: // Command /lod break; case 400: // Command /Item %d break; case 500: // Command /setfov %d break; case 600: // Command /setspeed %d break; case 601: // Command /equip %d break; case 602: // Command /makeobj %d break; case 603: // Command /snd %s break; default: Console.WriteLine("Non Coded Gm Command: " + gType); Print.Format(Decode.StringToPack(PacketInformation.buffer)); break; } Reader.Close(); } else { lock (Systems.clients) { foreach (Systems sys in Systems.clients) { try { if (sys.Character.Information.Name == Character.Information.Name) { sys.client.Send(Packet.ChatPacket(7, Character.Information.UniqueID, "from GM:You are banned.", null)); sys.Disconnect("ban"); Console.WriteLine("Autobanned user: "******" Due to hacking"); return; } } catch (Exception ex) { Console.WriteLine("Commands error: " + ex); } } } } }