Decompiled source of Admin menukz v2.6.1
Admin_menukz.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using Photon.Voice.Unity; using TMPro; using Unity.Mathematics; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Admin_menukz { [BepInPlugin("com.kz.Admin_menukz", "Admin_menukz", "2.6.1")] public class AdminMenuPlugin : BaseUnityPlugin { public enum ThirdPersonCameraMode { Standard, FreeLook } internal static ManualLogSource Log; private Harmony _harmony; private bool _showMenu; private Rect _menuRect = new Rect(50f, 50f, 490f, 660f); private Vector2 _scrollPos = Vector2.zero; private Vector2 _playersAndTpScrollPos = Vector2.zero; private Vector2 _itemsScrollPos = Vector2.zero; private string _selectedItemName = "Dynamite"; public static readonly string[] ItemCatalog = new string[16] { "Dynamite", "Medkit", "RopeSpool", "Parasol", "Lantern", "Flashlight", "Compass", "ChocolateBar", "JuiceBox", "Flare", "ClimbingSpike", "Binoculars", "BugfixOnYou", "TurtleShell", "ParachuteItem", "MagicBean" }; private string _statusMessage = ""; private float _statusClearTime; private int _currentTab; private readonly string[] _tabTitles = new string[4] { "\ud83d\udc65 Jugadores & TP", "\ud83d\udee0 Utilidades", "⚡ Cheats", "\ud83e\udd16 Bots" }; private int _tpOriginIndex; private int _tpDestIndex; public static ConfigEntry<KeyCode> MenuKeyConfig; public static ConfigEntry<KeyCode> ThirdPersonKeyConfig; public static ConfigEntry<float> ThirdPersonDistanceConfig; public static ConfigEntry<float> ThirdPersonHeightConfig; public static ConfigEntry<float> ThirdPersonSmoothConfig; public static ConfigEntry<bool> PingTeleportConfig; private float _securityCheckTimer; internal static readonly List<SpawnedBot> SpawnedBots = new List<SpawnedBot>(); internal static readonly Dictionary<Character, Vector3> CharacterLastDeathPositions = new Dictionary<Character, Vector3>(); internal static readonly Dictionary<Character, Vector3> CharacterLastKnownAlivePositions = new Dictionary<Character, Vector3>(); private int _botCounter; private const int MAX_BOTS = 5; private GUIStyle _headerStyle; private GUIStyle _boxStyle; private GUIStyle _buttonStyle; private GUIStyle _smallButtonStyle; private GUIStyle _labelStyle; private GUIStyle _statusStyle; private GUIStyle _toggleStyle; private GUIStyle _tabButtonStyle; private bool _stylesInitialized; private Texture2D _bgTex; private Texture2D _btnTex; private Texture2D _btnHoverTex; private Texture2D _redBtnTex; private Texture2D _redBtnHoverTex; private Texture2D _toggleOnTex; private Texture2D _toggleOffTex; private Texture2D _tabActiveTex; private Texture2D _tabInactiveTex; private static string _savedNickName = null; public static bool IsMenuOpen { get; private set; } = false; public static bool IsSpawningBot { get; private set; } = false; public static string NextBotName { get; set; } = "Bot1"; public static bool ThirdPersonEnabled { get; set; } = false; public static ThirdPersonCameraMode CameraMode { get; set; } = ThirdPersonCameraMode.Standard; public static float ThirdPersonDistance { get; set; } = 6f; public static float ThirdPersonHeight { get; set; } = 0.25f; public static float ThirdPersonSide { get; set; } = 0f; public static float ThirdPersonSmoothSpeed { get; set; } = 35f; public static KeyCode ThirdPersonToggleKey { get; set; } = (KeyCode)112; public static float OrbitYaw { get; set; } = 0f; public static float OrbitPitch { get; set; } = 15f; public static bool PingTeleportEnabled { get; set; } = false; public static bool CheatFly { get; set; } = false; public static bool CheatSuperJump { get; set; } = false; public static bool CheatNoFallDamage { get; set; } = false; public static bool CheatInfiniteStamina { get; set; } = false; public static bool CheatInvisibility { get; set; } = false; public static bool SecurityAntiFly { get; set; } = false; public static bool SecurityAntiGhost { get; set; } = false; public static bool SecurityAntiItems { get; set; } = false; public static BotMode DefaultBotMode { get; set; } = BotMode.Idle; private void Awake() { //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; MenuKeyConfig = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("1. Controles / Controls", "MenuKey", (KeyCode)286, "Tecla para abrir/cerrar el Menú de Administración / Key to toggle Admin Menu"); ThirdPersonKeyConfig = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("1. Controles / Controls", "ThirdPersonKey", (KeyCode)112, "Tecla para activar/desactivar la Cámara en 3ra Persona / Key to toggle Third Person Camera"); ThirdPersonDistanceConfig = ((BaseUnityPlugin)this).Config.Bind<float>("2. Cámara / Camera", "CameraDistance", 6f, "Distancia de la cámara en 3ra persona / Distance of third person camera"); ThirdPersonHeightConfig = ((BaseUnityPlugin)this).Config.Bind<float>("2. Cámara / Camera", "CameraHeight", 0.25f, "Altura de la cámara en 3ra persona / Height of third person camera"); ThirdPersonSmoothConfig = ((BaseUnityPlugin)this).Config.Bind<float>("2. Cámara / Camera", "CameraSmoothSpeed", 35f, "Suavidad de la cámara / Smooth speed of camera"); PingTeleportConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("3. Utilidades / Utilities", "PingTeleport", false, "Teletransporte al marcar con Ping / Teleport to Ping marker"); ThirdPersonToggleKey = ThirdPersonKeyConfig.Value; ThirdPersonDistance = ThirdPersonDistanceConfig.Value; ThirdPersonHeight = ThirdPersonHeightConfig.Value; ThirdPersonSmoothSpeed = ThirdPersonSmoothConfig.Value; PingTeleportEnabled = PingTeleportConfig.Value; _harmony = new Harmony("com.kz.Admin_menukz"); SafePatch(typeof(CharacterNamePatch)); SafePatch(typeof(AdminMenuInputPatches)); SafePatch(typeof(AdminCheatPatches)); SafePatch(typeof(NativeNameSystemPatches)); SafePatch(typeof(PlayerDetectionPatches)); SafePatch(typeof(ThirdPersonCameraPatches)); SafePatch(typeof(CampfireBotCompatibilityPatches)); SafePatch(typeof(PingTeleportPatches)); SafePatch(typeof(DeathTrackingPatches)); SafePatch(typeof(ItemMoveZonePatches)); SafePatch(typeof(BotCarryingInteractiblePatches)); SafePatch(typeof(InvisibilityPatches)); Log.LogInfo((object)$"[Admin_menukz] Plugin loaded! Press {MenuKeyConfig.Value} for Admin Menu, {ThirdPersonKeyConfig.Value} for 3rd Person Camera."); } private void SafePatch(Type patchType) { try { _harmony.PatchAll(patchType); Log.LogInfo((object)("[Admin_menukz] Successfully registered patch: " + patchType.Name)); } catch (Exception arg) { Log.LogError((object)$"[Admin_menukz] Warning registering patch {patchType.Name}: {arg}"); } } private void Update() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) KeyCode val = ((ThirdPersonKeyConfig != null) ? ThirdPersonKeyConfig.Value : ThirdPersonToggleKey); int num = ((MenuKeyConfig == null) ? 286 : ((int)MenuKeyConfig.Value)); if (Input.GetKeyDown(val)) { ThirdPersonEnabled = !ThirdPersonEnabled; SetStatus(ThirdPersonEnabled ? $"<color=#88FF88>Cámara 3ra Persona: ACTIVADA ({val})</color>" : "<color=#FF8888>Cámara 3ra Persona: DESACTIVADA</color>"); } if (Input.GetKeyDown((KeyCode)num)) { _showMenu = !_showMenu; IsMenuOpen = _showMenu; if (_showMenu) { Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; } } if (_statusClearTime > 0f && Time.time >= _statusClearTime) { _statusMessage = ""; _statusClearTime = 0f; } if (Character.AllCharacters != null) { foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter != (Object)null && (Object)(object)((Component)allCharacter).gameObject != (Object)null && (Object)(object)allCharacter.data != (Object)null && !allCharacter.data.dead && allCharacter.Center.y < 4000f) { Vector3 center = allCharacter.Center; if (((Vector3)(ref center)).sqrMagnitude > 1f) { CharacterLastKnownAlivePositions[allCharacter] = allCharacter.Center; } } } } SpawnedBots.RemoveAll((SpawnedBot b) => (Object)(object)b.BotObject == (Object)null); HandleInfiniteStaminaCheat(); HandleNoFallDamageCheat(); HandleFlyCheat(); if (!SecurityAntiFly && !SecurityAntiGhost && !SecurityAntiItems) { return; } _securityCheckTimer += Time.deltaTime; if (_securityCheckTimer >= 2f) { _securityCheckTimer = 0f; try { ExecuteSecuritySweep(); } catch { } } } private void LateUpdate() { if (_showMenu) { Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; } } private void OnDestroy() { RemoveAllBots(); try { Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } } catch { } if ((Object)(object)_bgTex != (Object)null) { Object.Destroy((Object)(object)_bgTex); } if ((Object)(object)_btnTex != (Object)null) { Object.Destroy((Object)(object)_btnTex); } if ((Object)(object)_btnHoverTex != (Object)null) { Object.Destroy((Object)(object)_btnHoverTex); } if ((Object)(object)_redBtnTex != (Object)null) { Object.Destroy((Object)(object)_redBtnTex); } if ((Object)(object)_redBtnHoverTex != (Object)null) { Object.Destroy((Object)(object)_redBtnHoverTex); } if ((Object)(object)_toggleOnTex != (Object)null) { Object.Destroy((Object)(object)_toggleOnTex); } if ((Object)(object)_toggleOffTex != (Object)null) { Object.Destroy((Object)(object)_toggleOffTex); } if ((Object)(object)_tabActiveTex != (Object)null) { Object.Destroy((Object)(object)_tabActiveTex); } if ((Object)(object)_tabInactiveTex != (Object)null) { Object.Destroy((Object)(object)_tabInactiveTex); } } private void HandleInfiniteStaminaCheat() { if (CheatInfiniteStamina) { Character realLocalPlayer = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer != (Object)null && (Object)(object)realLocalPlayer.data != (Object)null) { realLocalPlayer.infiniteStam = true; realLocalPlayer.data.currentStamina = 1f; realLocalPlayer.data.extraStamina = 1f; } } } private void HandleNoFallDamageCheat() { if (!CheatNoFallDamage) { return; } Character realLocalPlayer = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer != (Object)null) { realLocalPlayer.data.fallSeconds = 0f; if (realLocalPlayer.refs != null && (Object)(object)realLocalPlayer.refs.afflictions != (Object)null) { realLocalPlayer.refs.afflictions.SetStatus((STATUSTYPE)0, 0f, false); } } } private void HandleFlyCheat() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) if (!CheatFly) { return; } Character realLocalPlayer = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer == (Object)null || realLocalPlayer.refs == null || (Object)(object)realLocalPlayer.refs.ragdoll == (Object)null) { return; } realLocalPlayer.data.fallSeconds = 0f; realLocalPlayer.data.sinceGrounded = 0f; Transform obj = (((Object)(object)MainCamera.instance != (Object)null) ? ((Component)MainCamera.instance).transform : (((Object)(object)Camera.main != (Object)null) ? ((Component)Camera.main).transform : ((Component)realLocalPlayer).transform)); Vector3 forward = obj.forward; Vector3 right = obj.right; Vector3 val = Vector3.zero; if (!IsMenuOpen) { if (Input.GetKey((KeyCode)119)) { val += forward; } if (Input.GetKey((KeyCode)115)) { val -= forward; } if (Input.GetKey((KeyCode)100)) { val += right; } if (Input.GetKey((KeyCode)97)) { val -= right; } if (Input.GetKey((KeyCode)32)) { val += Vector3.up; } if (Input.GetKey((KeyCode)306) || Input.GetKey((KeyCode)99)) { val -= Vector3.up; } } float num = (Input.GetKey((KeyCode)304) ? 28f : 12f); Vector3 val2 = ((Vector3)(ref val)).normalized * (num * Time.deltaTime); realLocalPlayer.refs.ragdoll.MoveAllRigsInDirection(val2); realLocalPlayer.refs.ragdoll.HaltBodyVelocity(false); } private void OnGUI() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) if (_showMenu) { InitStyles(); _menuRect = GUI.Window(556677, _menuRect, new WindowFunction(DrawMenuWindow), "", _boxStyle); } } private void InitStyles() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Expected O, but got Unknown //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Expected O, but got Unknown //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Expected O, but got Unknown //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Expected O, but got Unknown //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Expected O, but got Unknown //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Expected O, but got Unknown //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Expected O, but got Unknown //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Expected O, but got Unknown //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) if (!_stylesInitialized) { _stylesInitialized = true; _bgTex = MakeTex(2, 2, new Color(0.08f, 0.08f, 0.12f, 0.96f)); _btnTex = MakeTex(2, 2, new Color(0.18f, 0.45f, 0.85f, 1f)); _btnHoverTex = MakeTex(2, 2, new Color(0.25f, 0.55f, 0.95f, 1f)); _redBtnTex = MakeTex(2, 2, new Color(0.75f, 0.15f, 0.15f, 1f)); _redBtnHoverTex = MakeTex(2, 2, new Color(0.9f, 0.2f, 0.2f, 1f)); _toggleOnTex = MakeTex(2, 2, new Color(0.2f, 0.7f, 0.3f, 1f)); _toggleOffTex = MakeTex(2, 2, new Color(0.25f, 0.25f, 0.35f, 1f)); _tabActiveTex = MakeTex(2, 2, new Color(0.2f, 0.5f, 0.9f, 1f)); _tabInactiveTex = MakeTex(2, 2, new Color(0.15f, 0.15f, 0.22f, 1f)); _boxStyle = new GUIStyle(GUI.skin.window); _boxStyle.normal.background = _bgTex; _boxStyle.onNormal.background = _bgTex; _boxStyle.padding = new RectOffset(12, 12, 12, 12); _headerStyle = new GUIStyle(GUI.skin.label); _headerStyle.fontSize = 18; _headerStyle.fontStyle = (FontStyle)1; _headerStyle.normal.textColor = new Color(0.4f, 0.8f, 1f); _headerStyle.alignment = (TextAnchor)4; _buttonStyle = new GUIStyle(GUI.skin.button); _buttonStyle.fontSize = 14; _buttonStyle.fontStyle = (FontStyle)1; _buttonStyle.normal.background = _btnTex; _buttonStyle.normal.textColor = Color.white; _buttonStyle.hover.background = _btnHoverTex; _buttonStyle.hover.textColor = Color.white; _buttonStyle.active.background = _btnHoverTex; _buttonStyle.active.textColor = Color.yellow; _buttonStyle.border = new RectOffset(4, 4, 4, 4); _smallButtonStyle = new GUIStyle(_buttonStyle); _smallButtonStyle.fontSize = 11; _smallButtonStyle.normal.background = _redBtnTex; _smallButtonStyle.hover.background = _redBtnHoverTex; _labelStyle = new GUIStyle(GUI.skin.label); _labelStyle.fontSize = 13; _labelStyle.normal.textColor = new Color(0.85f, 0.85f, 0.9f); _labelStyle.richText = true; _statusStyle = new GUIStyle(GUI.skin.label); _statusStyle.fontSize = 12; _statusStyle.normal.textColor = new Color(0.3f, 1f, 0.4f); _statusStyle.alignment = (TextAnchor)4; _statusStyle.richText = true; _toggleStyle = new GUIStyle(GUI.skin.toggle); _toggleStyle.fontSize = 14; _toggleStyle.fontStyle = (FontStyle)1; _toggleStyle.normal.textColor = new Color(0.9f, 0.9f, 0.9f); _toggleStyle.onNormal.textColor = new Color(0.4f, 1f, 0.5f); _toggleStyle.margin = new RectOffset(4, 4, 6, 6); _tabButtonStyle = new GUIStyle(GUI.skin.button); _tabButtonStyle.fontSize = 12; _tabButtonStyle.fontStyle = (FontStyle)1; _tabButtonStyle.normal.background = _tabInactiveTex; _tabButtonStyle.normal.textColor = new Color(0.7f, 0.7f, 0.8f); _tabButtonStyle.onNormal.background = _tabActiveTex; _tabButtonStyle.onNormal.textColor = Color.white; } } private void DrawMenuWindow(int windowID) { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) GUILayout.Space(5f); GUILayout.Label("⚙ ADMIN MENU KZ ⚙", _headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int i = 0; i < _tabTitles.Length; i++) { GUI.backgroundColor = ((_currentTab == i) ? new Color(0.3f, 0.65f, 1f) : new Color(0.2f, 0.2f, 0.3f)); if (GUILayout.Button(_tabTitles[i], _tabButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { _currentTab = i; } } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); GUILayout.Space(6f); DrawSeparator(); if (!string.IsNullOrEmpty(_statusMessage)) { GUILayout.Label(_statusMessage, _statusStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(3f); } _scrollPos = GUILayout.BeginScrollView(_scrollPos, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandHeight(true) }); switch (_currentTab) { case 0: DrawPlayersAndTeleportTab(); break; case 1: DrawUtilitiesTab(); break; case 2: DrawCheatsTab(); break; case 3: DrawBotsTab(); break; } GUILayout.EndScrollView(); GUILayout.Space(10f); DrawSeparator(); GUILayout.Label("<color=#666677><size=10>Presiona F5 para cerrar | Admin_menukz v2.6.1</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); GUI.DragWindow(); } public static List<Character> GetAvailableTeleportTargets() { List<Character> list = new List<Character>(); Character realLocalPlayer = GetRealLocalPlayer(); if (Character.AllCharacters != null) { foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter != (Object)null && (Object)(object)((Component)allCharacter).gameObject != (Object)null && (Object)(object)allCharacter != (Object)(object)realLocalPlayer && !list.Contains(allCharacter)) { list.Add(allCharacter); } } } return list; } private void DrawPlayersAndTeleportTab() { //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_061b: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Unknown result type (might be due to invalid IL or missing references) GUILayout.Label("<b>\ud83d\udc65 GESTIÓN DE JUGADORES & TELETRANSPORTE:</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(4f); if (!PhotonNetwork.InRoom) { GUILayout.Label("<color=#FF6666><b>⚠ Debes estar en una partida para gestionar jugadores.</b></color>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(10f); return; } Character realLocalPlayer = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer == (Object)null) { GUILayout.Label("<color=#FFBB66>Esperando a que cargue tu personaje...</color>", _labelStyle, Array.Empty<GUILayoutOption>()); return; } List<Character> list = new List<Character>(); if (Character.AllCharacters != null) { foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter != (Object)null && (Object)(object)((Component)allCharacter).gameObject != (Object)null && !list.Contains(allCharacter)) { list.Add(allCharacter); } } } GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUI.backgroundColor = new Color(0.95f, 0.78f, 0.15f); if (GUILayout.Button("\ud83d\udc96 Revivir TODOS", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(32f) })) { ReviveAllPlayers(list); } GUI.backgroundColor = new Color(0.85f, 0.25f, 0.25f); if (GUILayout.Button("\ud83d\udc80 Matar TODOS", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(32f) })) { KillAllPlayers(list); } GUI.backgroundColor = new Color(0.3f, 0.65f, 1f); List<Character> availableTeleportTargets = GetAvailableTeleportTargets(); GUI.enabled = availableTeleportTargets.Count > 0; if (GUILayout.Button("\ud83c\udf00 Traer TODOS a mí", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(32f) })) { TeleportAllToMe(realLocalPlayer, availableTeleportTargets); } GUI.enabled = true; GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); GUILayout.Space(6f); if (list.Count > 1) { GUILayout.BeginVertical(_boxStyle, Array.Empty<GUILayoutOption>()); GUILayout.Label("<b>\ud83d\udd00 Teletransportar Jugador A ➔ Jugador B:</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(2f); if (_tpOriginIndex >= list.Count) { _tpOriginIndex = 0; } if (_tpDestIndex >= list.Count) { _tpDestIndex = ((list.Count > 1) ? 1 : 0); } GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("<b>Mover:</b>", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(48f) }); if (GUILayout.Button("◀", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(24f), GUILayout.Height(22f) })) { _tpOriginIndex = (_tpOriginIndex - 1 + list.Count) % list.Count; } string text = (((Object)(object)list[_tpOriginIndex] == (Object)(object)realLocalPlayer) ? "⭐ Tú" : list[_tpOriginIndex].characterName); GUILayout.Label("<color=#FFFF88><b>" + text + "</b></color>", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (GUILayout.Button("▶", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(24f), GUILayout.Height(22f) })) { _tpOriginIndex = (_tpOriginIndex + 1) % list.Count; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("<b>Hacia:</b>", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(48f) }); if (GUILayout.Button("◀", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(24f), GUILayout.Height(22f) })) { _tpDestIndex = (_tpDestIndex - 1 + list.Count) % list.Count; } string text2 = (((Object)(object)list[_tpDestIndex] == (Object)(object)realLocalPlayer) ? "⭐ Tú" : list[_tpDestIndex].characterName); GUILayout.Label("<color=#88FF88><b>" + text2 + "</b></color>", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (GUILayout.Button("▶", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(24f), GUILayout.Height(22f) })) { _tpDestIndex = (_tpDestIndex + 1) % list.Count; } GUILayout.EndHorizontal(); GUILayout.Space(3f); GUI.enabled = _tpOriginIndex != _tpDestIndex; if (GUILayout.Button("\ud83d\ude80 Enviar " + text + " ➔ " + text2, _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) })) { TeleportPlayerToPlayer(list[_tpOriginIndex], list[_tpDestIndex]); } GUI.enabled = true; GUILayout.EndVertical(); GUILayout.Space(6f); } DrawSeparator(); GUILayout.Space(4f); List<Character> list2 = new List<Character>(); List<Character> list3 = new List<Character>(); foreach (Character item in list) { if ((Object)(object)item != (Object)null && (Object)(object)((Component)item).gameObject != (Object)null) { if (item.isBot || (Object)(object)((Component)item).GetComponent<AdminBotMarker>() != (Object)null) { list3.Add(item); } else { list2.Add(item); } } } if (list.Count == 0) { GUILayout.Space(15f); GUILayout.Label("<color=#888899><size=12>No se detectaron personajes en la partida.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(8f); if (GUILayout.Button("\ud83e\udd16 Ir a la pestaña de Bots para spawnear", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) })) { _currentTab = 3; } return; } _playersAndTpScrollPos = GUILayout.BeginScrollView(_playersAndTpScrollPos, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(280f) }); if (list2.Count > 0) { GUILayout.Label($"<b>\ud83d\udc65 Jugadores Reales ({list2.Count}):</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(2f); foreach (Character item2 in list2) { DrawCombinedPlayerRow(realLocalPlayer, item2, isBot: false); } GUILayout.Space(6f); } if (list3.Count > 0) { GUILayout.Label($"<b>\ud83e\udd16 Bots ({list3.Count}):</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(2f); foreach (Character item3 in list3) { DrawCombinedPlayerRow(realLocalPlayer, item3, isBot: true); } } GUILayout.EndScrollView(); } private void DrawCombinedPlayerRow(Character localPlayer, Character target, bool isBot) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) bool flag = (Object)(object)target == (Object)(object)localPlayer; string characterName = target.characterName; string text = (flag ? "⭐" : (isBot ? "\ud83e\udd16" : "\ud83d\udc64")); string text2 = (flag ? "Tú" : (isBot ? "Bot" : "Jugador")); string text3 = (((Object)(object)target.data != (Object)null && (target.data.dead || target.data.passedOut || target.data.fullyPassedOut)) ? "<color=#FF5555>● Muerto</color>" : "<color=#55FF55>● Vivo</color>"); float num = Vector3.Distance(localPlayer.Center, target.Center); GUILayout.BeginVertical(_boxStyle, Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(text + " <b>" + characterName + "</b> <color=#888899>(" + text2 + ")</color>", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.Label(text3, _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(72f) }); if (!flag) { GUILayout.Label($"<color=#99BBFF>{num:F0} m</color>", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(45f) }); } GUILayout.EndHorizontal(); GUILayout.Space(2f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUI.backgroundColor = new Color(0.95f, 0.78f, 0.15f); if (GUILayout.Button("\ud83d\udc96 Revivir", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(24f) })) { RevivePlayer(target); } GUI.backgroundColor = new Color(0.85f, 0.25f, 0.25f); if (GUILayout.Button("\ud83d\udc80 Matar", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(24f) })) { KillPlayer(target); } if (!flag) { GUI.backgroundColor = new Color(0.3f, 0.7f, 1f); if (GUILayout.Button("\ud83d\ude80 TP", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(42f), GUILayout.Height(24f) })) { TeleportMeTo(localPlayer, target); } GUI.backgroundColor = new Color(0.2f, 0.6f, 0.85f); if (GUILayout.Button("\ud83e\uddf2 Traer", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(48f), GUILayout.Height(24f) })) { TeleportTargetToMe(localPlayer, target); } } GUI.backgroundColor = new Color(0.9f, 0.4f, 0.7f); if (GUILayout.Button("\ud83c\udf88", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(28f), GUILayout.Height(24f) })) { GiveBalloonsToCharacter(target); } GUI.backgroundColor = new Color(0.3f, 0.85f, 0.45f); if (GUILayout.Button("\ud83c\udf81 " + _selectedItemName, _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(24f) })) { GiveItemToCharacter(target, _selectedItemName); } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.Space(3f); } private void TeleportPlayerToPlayer(Character fromPlayer, Character toPlayer) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) try { if (!((Object)(object)fromPlayer == (Object)null) && !((Object)(object)toPlayer == (Object)null)) { Vector3 val = toPlayer.Center + Vector3.up * 0.8f + ((Component)toPlayer).transform.forward * 1f; if ((Object)(object)((MonoBehaviourPun)fromPlayer).photonView != (Object)null) { ((MonoBehaviourPun)fromPlayer).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { val, true }); } else { fromPlayer.WarpPlayerRPC(val, true); } SetStatus("<color=#88FF88>✓ " + fromPlayer.characterName + " teletransportado hacia " + toPlayer.characterName + "</color>"); Log.LogInfo((object)$"[Admin_menukz] Teleported {fromPlayer.characterName} to {toPlayer.characterName} at {val}"); } } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error teleporting player to player: {ex}"); SetStatus("<color=#FF6666>Error al teletransportar: " + ex.Message + "</color>"); } } private void TeleportMeTo(Character localPlayer, Character target) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) try { if (!((Object)(object)localPlayer == (Object)null) && !((Object)(object)target == (Object)null)) { Vector3 val = target.Center + Vector3.up * 0.8f + ((Component)target).transform.forward * -0.6f; ((MonoBehaviourPun)localPlayer).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { val, true }); SetStatus("<color=#88FF88>✓ Teletransportado hacia " + target.characterName + "</color>"); Log.LogInfo((object)$"[Admin_menukz] Teleported local player to {target.characterName} at {val}"); } } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error teleporting to target: {ex}"); SetStatus("<color=#FF6666>Error al teletransportar: " + ex.Message + "</color>"); } } private void TeleportTargetToMe(Character localPlayer, Character target) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) try { if (!((Object)(object)localPlayer == (Object)null) && !((Object)(object)target == (Object)null)) { Vector3 val = localPlayer.Center + ((Component)localPlayer).transform.forward * 1.5f + Vector3.up * 0.8f; ((MonoBehaviourPun)target).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { val, true }); SetStatus("<color=#88FF88>✓ " + target.characterName + " traído hacia ti</color>"); Log.LogInfo((object)$"[Admin_menukz] Teleported {target.characterName} to local player at {val}"); } } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error teleporting target to me: {ex}"); SetStatus("<color=#FF6666>Error al traer jugador: " + ex.Message + "</color>"); } } private void TeleportAllToMe(Character localPlayer, List<Character> targets) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)localPlayer == (Object)null || targets == null || targets.Count == 0) { return; } int count = targets.Count; for (int i = 0; i < count; i++) { Character val = targets[i]; if (!((Object)(object)val == (Object)null) && !((Object)(object)((Component)val).gameObject == (Object)null)) { float num = (float)i * (360f / (float)Mathf.Max(1, count)) * ((float)Math.PI / 180f); Vector3 val2 = new Vector3(Mathf.Cos(num), 0f, Mathf.Sin(num)) * 2f + Vector3.up * 0.8f; Vector3 val3 = localPlayer.Center + val2; ((MonoBehaviourPun)val).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { val3, true }); } } SetStatus($"<color=#88FF88>✓ {count} jugadores y bots traídos hacia ti</color>"); Log.LogInfo((object)$"[Admin_menukz] Teleported all {count} targets to local player."); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error teleporting all targets to me: {ex}"); SetStatus("<color=#FF6666>Error al traer a todos: " + ex.Message + "</color>"); } } private void DrawUtilitiesTab() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_07de: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0898: Unknown result type (might be due to invalid IL or missing references) //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_0929: Unknown result type (might be due to invalid IL or missing references) //IL_0969: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) //IL_0a76: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_0aab: Unknown result type (might be due to invalid IL or missing references) GUILayout.Label("<b>UTILIDADES Y JUGABILIDAD:</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(6f); KeyCode val = ((ThirdPersonKeyConfig != null) ? ThirdPersonKeyConfig.Value : ThirdPersonToggleKey); bool thirdPersonEnabled = ThirdPersonEnabled; ThirdPersonEnabled = GUILayout.Toggle(ThirdPersonEnabled, $" \ud83c\udfa5 Cámara en 3ra Persona ({val})", _toggleStyle, Array.Empty<GUILayoutOption>()); if (thirdPersonEnabled != ThirdPersonEnabled) { SetStatus(ThirdPersonEnabled ? $"<color=#88FF88>3ra Persona activada ({val})</color>" : "<color=#FF8888>3ra Persona desactivada</color>"); if (ThirdPersonEnabled) { Character realLocalPlayer = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer != (Object)null) { OrbitYaw = realLocalPlayer.data.lookValues.x; OrbitPitch = 0f - realLocalPlayer.data.lookValues.y; } } } if (ThirdPersonEnabled) { GUILayout.Space(4f); GUILayout.BeginVertical(_boxStyle, Array.Empty<GUILayoutOption>()); GUILayout.Label("<b>Tipo de Cámara:</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); bool num = CameraMode == ThirdPersonCameraMode.Standard; bool flag = CameraMode == ThirdPersonCameraMode.FreeLook; GUI.backgroundColor = (num ? new Color(0.25f, 0.65f, 1f) : new Color(0.2f, 0.2f, 0.25f)); if (GUILayout.Button(num ? "● \ud83c\udfaf Estándar (Fija)" : " \ud83c\udfaf Estándar (Fija)", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) })) { CameraMode = ThirdPersonCameraMode.Standard; Character realLocalPlayer2 = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer2 != (Object)null && (Object)(object)realLocalPlayer2.data != (Object)null) { realLocalPlayer2.data.lookValues.x = OrbitYaw; realLocalPlayer2.data.lookValues.y = 0f - OrbitPitch; ThirdPersonCameraPatches.RecalculateLook(realLocalPlayer2); } } GUI.backgroundColor = (flag ? new Color(0.25f, 0.65f, 1f) : new Color(0.2f, 0.2f, 0.25f)); if (GUILayout.Button(flag ? "● \ud83c\udf10 Orbital Libre" : " \ud83c\udf10 Orbital Libre", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) })) { CameraMode = ThirdPersonCameraMode.FreeLook; Character realLocalPlayer3 = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer3 != (Object)null && (Object)(object)realLocalPlayer3.data != (Object)null) { OrbitYaw = realLocalPlayer3.data.lookValues.x; OrbitPitch = 0f - realLocalPlayer3.data.lookValues.y; } } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); if (CameraMode == ThirdPersonCameraMode.FreeLook) { GUILayout.Label("<color=#99FFBB><size=11>\ud83c\udf10 Modo Orbital Libre: Gira 360° libremente alrededor del personaje. WASD se mueve relativo a la cámara.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } else { GUILayout.Label("<color=#99BBFF><size=11>\ud83c\udfaf Modo Estándar: La cámara sigue directamente la dirección de apuntado y mirada del personaje.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(6f); DrawSeparator(); GUILayout.Space(4f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"<b>Distancia:</b> {ThirdPersonDistance:F1} m", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) }); ThirdPersonDistance = GUILayout.HorizontalSlider(ThirdPersonDistance, 1f, 15f, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"<b>Altura:</b> {ThirdPersonHeight:F2} m", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) }); ThirdPersonHeight = GUILayout.HorizontalSlider(ThirdPersonHeight, -1.5f, 3f, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); string arg = ((ThirdPersonSide > 0.1f) ? "Derecha" : ((ThirdPersonSide < -0.1f) ? "Izquierda" : "Centro")); GUILayout.Label($"<b>Hombro ({arg}):</b> {ThirdPersonSide:F2} m", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) }); ThirdPersonSide = GUILayout.HorizontalSlider(ThirdPersonSide, -2f, 2f, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("⯇ Izquierda", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(24f) })) { ThirdPersonSide = -0.5f; } if (GUILayout.Button("⏺ Centro", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(24f) })) { ThirdPersonSide = 0f; } if (GUILayout.Button("⯈ Derecha", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(24f) })) { ThirdPersonSide = 0.5f; } GUILayout.EndHorizontal(); GUILayout.Space(4f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"<b>Suavidad:</b> {ThirdPersonSmoothSpeed:F0}", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) }); ThirdPersonSmoothSpeed = GUILayout.HorizontalSlider(ThirdPersonSmoothSpeed, 5f, 60f, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); GUILayout.Space(6f); if (GUILayout.Button("↺ Restablecer Valores por Defecto", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) })) { ThirdPersonDistance = 6f; ThirdPersonHeight = 0.25f; ThirdPersonSide = 0f; ThirdPersonSmoothSpeed = 35f; CameraMode = ThirdPersonCameraMode.Standard; SetStatus("<color=#88FF88>Valores por defecto restablecidos (Distancia 6m, Altura 0.25m, Centro, Suavidad 35).</color>"); } GUILayout.EndVertical(); GUILayout.Space(4f); GUILayout.Label("<color=#99BBFF><size=11>✓ Escalada, recolección, combate y construcción optimizados para 3ra persona sin atravesar paredes ni texturas.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } else { GUILayout.Space(4f); GUILayout.Label("<color=#888899><size=11>Activa la casilla o presiona [F4] en cualquier momento para alternar entre 1ra y 3ra persona cómodamente.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(6f); DrawSeparator(); GUILayout.Space(4f); PingTeleportEnabled = GUILayout.Toggle(PingTeleportEnabled, " \ud83d\udccc Teletransporte con Marcador (Ping)", _toggleStyle, Array.Empty<GUILayoutOption>()); if (PingTeleportEnabled) { GUILayout.Label(" <color=#99FFBB><size=11>Al señalar/marcar un lugar con el dedo (Ping), te teletransportarás de inmediato allí.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } else { GUILayout.Label(" <color=#888899><size=11>Marca un punto en el terreno para teletransportarte directamente.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(6f); DrawSeparator(); GUILayout.Space(4f); GUILayout.Label("<b>\ud83c\udf88 SISTEMA DE GLOBOS (RAMILLETES):</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(3f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUI.backgroundColor = new Color(0.95f, 0.45f, 0.75f); if (GUILayout.Button("\ud83c\udf88 Globos para TODOS (2 Pares)", _buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) })) { GiveBalloonsToAll(); } GUI.backgroundColor = new Color(0.4f, 0.8f, 0.95f); if (GUILayout.Button("\ud83c\udf88 Ponerse a mí", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) })) { GiveBalloonsToCharacter(GetRealLocalPlayer()); } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); GUILayout.Label(" <color=#99FFBB><size=11>Coloca 2 ramilletes (6 globos) atados al cuerpo directamente sin inventario.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(6f); DrawSeparator(); GUILayout.Space(4f); GUILayout.Label("<b>\ud83c\udf81 CATÁLOGO DE ITEMS (ELEGIR Y ENTREGAR EN MANOS):</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(2f); GUILayout.Label("Item seleccionado: <color=#99FFBB><b>" + _selectedItemName + "</b></color>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(2f); _itemsScrollPos = GUILayout.BeginScrollView(_itemsScrollPos, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(70f) }); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); int num2 = 0; for (int i = 0; i < ItemCatalog.Length; i++) { string text = ItemCatalog[i]; if (text == _selectedItemName) { GUI.backgroundColor = new Color(0.3f, 0.9f, 0.5f); } else { GUI.backgroundColor = new Color(0.2f, 0.25f, 0.35f); } if (GUILayout.Button(text, _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Height(24f), GUILayout.Width(100f) })) { _selectedItemName = text; } num2++; } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); GUILayout.EndScrollView(); GUILayout.Space(3f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUI.backgroundColor = new Color(0.3f, 0.85f, 0.45f); if (GUILayout.Button("\ud83c\udf81 Dar " + _selectedItemName + " a TODOS", _buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) })) { GiveItemToAll(_selectedItemName); } GUI.backgroundColor = new Color(0.4f, 0.75f, 0.95f); if (GUILayout.Button("\ud83c\udf81 Dar a mí", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) })) { GiveItemToCharacter(GetRealLocalPlayer(), _selectedItemName); } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); GUILayout.Label(" <color=#FFBB88><size=11>Coloca el objeto seleccionado directamente en las manos de los personajes.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(6f); DrawSeparator(); GUILayout.Space(4f); GUILayout.Label("<b>\ud83d\udc80 MATAR CRIATURAS CERCANAS:</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(3f); GUI.backgroundColor = new Color(0.85f, 0.25f, 0.25f); if (GUILayout.Button("\ud83d\udc80 Matar Criaturas en Área Grande (200m)", _buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) })) { KillNearbyCreatures(); } GUI.backgroundColor = Color.white; GUILayout.Label(" <color=#FF9999><size=11>Elimina zombies de hongos, jabalíes y arañas en un radio de 200 metros.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(6f); DrawSeparator(); GUILayout.Space(4f); GUILayout.Label("<b>\ud83c\udf2a INVOCAR TORNADO:</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(3f); GUI.backgroundColor = new Color(0.3f, 0.7f, 0.95f); if (GUILayout.Button("\ud83c\udf2a Spawnear Tornado en mi posición", _buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) })) { SpawnTornadoAtPlayer(); } GUI.backgroundColor = Color.white; GUILayout.Label(" <color=#99DDFF><size=11>Invoca un tornado que atrapa y lanza por los aires a jugadores y objetos cercanos.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } private void GiveBalloonsToAll(int bunches = 2) { try { if (Character.AllCharacters == null || Character.AllCharacters.Count == 0) { return; } int num = 0; foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter != (Object)null && (Object)(object)((Component)allCharacter).gameObject != (Object)null && allCharacter.refs != null && (Object)(object)allCharacter.refs.balloons != (Object)null) { GiveBalloonsToCharacter(allCharacter, bunches); num++; } } SetStatus($"<color=#88FF88>✓ Se colocaron {bunches * 3} globos a {num} personajes.</color>"); Log.LogInfo((object)$"[Admin_menukz] Gave {bunches * 3} balloons to {num} characters."); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error giving balloons to all: {ex}"); SetStatus("<color=#FF6666>Error al colocar globos: " + ex.Message + "</color>"); } } private void GiveBalloonsToCharacter(Character c, int bunches = 2) { try { if (!((Object)(object)c == (Object)null) && c.refs != null && !((Object)(object)c.refs.balloons == (Object)null)) { for (int i = 0; i < bunches; i++) { c.refs.balloons.TieNewBalloon(0); c.refs.balloons.TieNewBalloon(2); c.refs.balloons.TieNewBalloon(4); } SetStatus("<color=#88FF88>✓ Globos colocados a " + c.characterName + ".</color>"); } } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error giving balloons: {ex}"); SetStatus("<color=#FF6666>Error al colocar globos: " + ex.Message + "</color>"); } } private void GiveItemToAll(string itemName) { try { if (Character.AllCharacters == null || Character.AllCharacters.Count == 0) { return; } int num = 0; foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter != (Object)null && (Object)(object)((Component)allCharacter).gameObject != (Object)null) { GiveItemToCharacter(allCharacter, itemName); num++; } } SetStatus($"<color=#88FF88>✓ '{itemName}' entregado a {num} personajes.</color>"); Log.LogInfo((object)$"[Admin_menukz] Gave {itemName} to {num} characters."); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error giving item to all: {ex}"); SetStatus("<color=#FF6666>Error al entregar items: " + ex.Message + "</color>"); } } private void GiveItemToCharacter(Character c, string itemName) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) try { if (!((Object)(object)c == (Object)null) && c.refs != null && !((Object)(object)c.refs.items == (Object)null)) { if ((Object)(object)((MonoBehaviourPun)c.refs.items).photonView != (Object)null) { ((MonoBehaviourPun)c.refs.items).photonView.RPC("RPC_SpawnItemInHandMaster", (RpcTarget)2, new object[1] { itemName }); } else if (PhotonNetwork.IsMasterClient) { Vector3 val = c.Center + ((Component)c).transform.forward * 0.5f; PhotonNetwork.Instantiate("0_Items/" + itemName, val, Quaternion.identity, (byte)0, (object[])null).GetComponent<Item>().Interact(c); } SetStatus("<color=#88FF88>✓ '" + itemName + "' entregado a " + c.characterName + ".</color>"); } } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error giving item: {ex}"); SetStatus("<color=#FF6666>Error al entregar item: " + ex.Message + "</color>"); } } private void KillNearbyCreatures(float radius = 200f) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) try { Character realLocalPlayer = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer == (Object)null) { SetStatus("<color=#FF6666>No se encontró tu personaje.</color>"); return; } Vector3 center = realLocalPlayer.Center; int num = 0; MushroomZombie[] array = Object.FindObjectsOfType<MushroomZombie>(); if (array != null) { MushroomZombie[] array2 = array; foreach (MushroomZombie val in array2) { if (!((Object)(object)val != (Object)null) || !((Object)(object)((Component)val).gameObject != (Object)null) || !(Vector3.Distance(center, ((Component)val).transform.position) <= radius)) { continue; } try { if ((Object)(object)((MonoBehaviourPun)val).photonView != (Object)null && ((MonoBehaviourPun)val).photonView.IsMine) { val.DestroyZombie(); } else { Object.Destroy((Object)(object)((Component)val).gameObject); } num++; } catch { Object.Destroy((Object)(object)((Component)val).gameObject); num++; } } } BotBoar[] array3 = Object.FindObjectsOfType<BotBoar>(); if (array3 != null) { BotBoar[] array4 = array3; foreach (BotBoar val2 in array4) { if (!((Object)(object)val2 != (Object)null) || !((Object)(object)((Component)val2).gameObject != (Object)null) || !(Vector3.Distance(center, ((Component)val2).transform.position) <= radius)) { continue; } try { PhotonView component = ((Component)val2).GetComponent<PhotonView>(); if ((Object)(object)component != (Object)null && component.IsMine) { PhotonNetwork.Destroy(((Component)val2).gameObject); } else { Object.Destroy((Object)(object)((Component)val2).gameObject); } num++; } catch { Object.Destroy((Object)(object)((Component)val2).gameObject); num++; } } } Spider[] array5 = Object.FindObjectsOfType<Spider>(); if (array5 != null) { Spider[] array6 = array5; foreach (Spider val3 in array6) { if ((Object)(object)val3 != (Object)null && (Object)(object)((Component)val3).gameObject != (Object)null && Vector3.Distance(center, ((Component)val3).transform.position) <= radius) { try { Object.Destroy((Object)(object)((Component)val3).gameObject); num++; } catch { } } } } SetStatus($"<color=#88FF88>✓ {num} criaturas eliminadas en un radio de {radius:F0}m.</color>"); Log.LogInfo((object)$"[Admin_menukz] Killed {num} creatures within {radius}m radius."); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error killing nearby creatures: {ex}"); SetStatus("<color=#FF6666>Error al matar criaturas: " + ex.Message + "</color>"); } } private void SpawnTornadoAtPlayer() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) try { if (!PhotonNetwork.InRoom) { SetStatus("<color=#FF6666>Debes estar en una partida para invocar un tornado.</color>"); return; } Character realLocalPlayer = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer == (Object)null) { SetStatus("<color=#FF6666>No se encontró tu personaje.</color>"); return; } Vector3 val = realLocalPlayer.Center + ((Component)realLocalPlayer).transform.forward * 15f; PhotonNetwork.Instantiate("Tornado", val, Quaternion.identity, (byte)0, (object[])null); SetStatus("<color=#88FF88>✓ ¡Tornado invocado frente a ti!</color>"); Log.LogInfo((object)$"[Admin_menukz] Spawned Tornado at {val}"); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error spawning tornado: {ex}"); SetStatus("<color=#FF6666>Error al invocar tornado: " + ex.Message + "</color>"); } } private void ExecuteSecuritySweep() { //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) try { Character realLocalPlayer = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer == (Object)null) { return; } int num = 0; if (Character.AllCharacters == null) { return; } RaycastHit val2 = default(RaycastHit); foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter == (Object)null || (Object)(object)((Component)allCharacter).gameObject == (Object)null || (Object)(object)allCharacter == (Object)(object)realLocalPlayer || allCharacter.isBot || (Object)(object)((Component)allCharacter).GetComponent<AdminBotMarker>() != (Object)null) { continue; } if (SecurityAntiFly) { try { bool num2 = (Object)(object)allCharacter.data != (Object)null && allCharacter.data.isClimbing; bool flag = allCharacter.refs != null && (Object)(object)allCharacter.refs.balloons != (Object)null && allCharacter.refs.balloons.currentBalloonCount > 0; float num3 = (((Object)(object)allCharacter.data != (Object)null) ? allCharacter.data.sinceGrounded : 0f); if (!num2 && !flag && num3 > 3f) { Vector3 val = allCharacter.Center; if (Physics.Raycast(allCharacter.Center, Vector3.down, ref val2, 500f)) { val = ((RaycastHit)(ref val2)).point + Vector3.up * 1f; } if ((Object)(object)((MonoBehaviourPun)allCharacter).photonView != (Object)null) { ((MonoBehaviourPun)allCharacter).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { val, true }); } num++; } } catch { } } if (SecurityAntiGhost) { try { if ((Object)(object)allCharacter.Ghost != (Object)null) { PhotonView component = ((Component)allCharacter.Ghost).GetComponent<PhotonView>(); if ((Object)(object)component != (Object)null && component.IsMine) { PhotonNetwork.Destroy(((Component)allCharacter.Ghost).gameObject); } else { Object.Destroy((Object)(object)((Component)allCharacter.Ghost).gameObject); } num++; } } catch { } } if (!SecurityAntiItems) { continue; } try { if (allCharacter.refs == null || !((Object)(object)allCharacter.refs.items != (Object)null)) { continue; } Item[] componentsInChildren = ((Component)allCharacter.refs.items).GetComponentsInChildren<Item>(); if (componentsInChildren == null) { continue; } Item[] array = componentsInChildren; foreach (Item val3 in array) { if ((Object)(object)val3 != (Object)null && (Object)(object)((Component)val3).gameObject != (Object)null) { PhotonView component2 = ((Component)val3).GetComponent<PhotonView>(); if ((Object)(object)component2 != (Object)null && component2.IsMine) { PhotonNetwork.Destroy(((Component)val3).gameObject); } else { Object.Destroy((Object)(object)((Component)val3).gameObject); } num++; } } } catch { } } string message = ((num > 0) ? $"<color=#88FF88>✓ Limpieza de seguridad: {num} acciones ejecutadas.</color>" : "<color=#FFBB66>No se detectaron amenazas activas.</color>"); SetStatus(message); Log.LogInfo((object)$"[Admin_menukz] Security sweep: {num} actions taken."); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error in security sweep: {ex}"); SetStatus("<color=#FF6666>Error en limpieza: " + ex.Message + "</color>"); } } private void RevivePlayer(Character target) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)target == (Object)null) { return; } Vector3 val = Vector3.zero; Vector3 value2; if (CharacterLastDeathPositions.TryGetValue(target, out var value) && value.y < 4000f && ((Vector3)(ref value)).sqrMagnitude > 1f) { val = value; } else if (CharacterLastKnownAlivePositions.TryGetValue(target, out value2) && value2.y < 4000f && ((Vector3)(ref value2)).sqrMagnitude > 1f) { val = value2; } else { if (target.Center.y < 4000f) { Vector3 center = target.Center; if (((Vector3)(ref center)).sqrMagnitude > 1f) { val = target.Center; goto IL_00b8; } } if ((Object)(object)Character.localCharacter != (Object)null) { val = Character.localCharacter.Center; } } goto IL_00b8; IL_00b8: val += Vector3.up * 0.4f; if ((Object)(object)((MonoBehaviourPun)target).photonView != (Object)null) { ((MonoBehaviourPun)target).photonView.RPC("RPCA_ReviveAtPosition", (RpcTarget)0, new object[3] { val, false, -1 }); ((MonoBehaviourPun)target).photonView.RPC("RPCA_UnPassOut", (RpcTarget)0, Array.Empty<object>()); } try { Traverse.Create((object)target).Method("ReviveCharacter", new object[1] { false }).GetValue(); } catch { } if (target.refs != null && (Object)(object)target.refs.afflictions != (Object)null) { target.refs.afflictions.ClearAllAfflictions(); target.refs.afflictions.ClearAllStatus(true, true); } if ((Object)(object)target.data != (Object)null) { target.data.dead = false; target.data.passedOut = false; target.data.fullyPassedOut = false; target.data.deathTimer = 0f; target.data.passOutValue = 0f; } SetStatus("<color=#FFDD44>✓ " + target.characterName + " revivido en su posición de muerte.</color>"); Log.LogInfo((object)$"[Admin_menukz] Revived {target.characterName} at exact death position {val}"); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error reviving player: {ex}"); SetStatus("<color=#FF6666>Error al revivir: " + ex.Message + "</color>"); } } private void KillPlayer(Character target) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)target == (Object)null) { return; } if (target.Center.y < 4000f) { Vector3 center = target.Center; if (((Vector3)(ref center)).sqrMagnitude > 1f) { CharacterLastDeathPositions[target] = target.Center; } } if ((Object)(object)((MonoBehaviourPun)target).photonView != (Object)null) { ((MonoBehaviourPun)target).photonView.RPC("RPCA_Die", (RpcTarget)0, Array.Empty<object>()); } else { target.RPCA_Die(); } SetStatus("<color=#FF8888>✓ " + target.characterName + " eliminado.</color>"); Log.LogInfo((object)("[Admin_menukz] Killed " + target.characterName)); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error killing player: {ex}"); SetStatus("<color=#FF6666>Error al matar: " + ex.Message + "</color>"); } } private void ReviveAllPlayers(List<Character> allCharacters) { try { if (allCharacters == null || allCharacters.Count == 0) { return; } int num = 0; foreach (Character allCharacter in allCharacters) { if (!((Object)(object)allCharacter == (Object)null) && !((Object)(object)((Component)allCharacter).gameObject == (Object)null)) { RevivePlayer(allCharacter); num++; } } SetStatus($"<color=#88FF88>✓ {num} personajes revividos y curados.</color>"); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error reviving all players: {ex}"); SetStatus("<color=#FF6666>Error al revivir a todos: " + ex.Message + "</color>"); } } private void KillAllPlayers(List<Character> allCharacters) { try { if (allCharacters == null || allCharacters.Count == 0) { return; } int num = 0; foreach (Character allCharacter in allCharacters) { if (!((Object)(object)allCharacter == (Object)null) && !((Object)(object)((Component)allCharacter).gameObject == (Object)null)) { KillPlayer(allCharacter); num++; } } SetStatus($"<color=#FF8888>✓ {num} personajes eliminados.</color>"); } catch (Exception ex) { Log.LogError((object)$"[Admin_menukz] Error killing all players: {ex}"); SetStatus("<color=#FF6666>Error al matar a todos: " + ex.Message + "</color>"); } } private void DrawCheatsTab() { //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) GUILayout.Label("<b>PODERES DEL JUGADOR:</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(6f); CheatFly = GUILayout.Toggle(CheatFly, " \ud83e\udd85 Volar (Fly / Noclip)", _toggleStyle, Array.Empty<GUILayoutOption>()); if (CheatFly) { GUILayout.Label(" <color=#99BBFF><size=11>WASD: Mover | Espacio: Subir | Ctrl: Bajar | Shift: Sprint</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(4f); CheatSuperJump = GUILayout.Toggle(CheatSuperJump, " \ud83e\udd98 Súper Salto (Super Jump)", _toggleStyle, Array.Empty<GUILayoutOption>()); if (CheatSuperJump) { GUILayout.Label(" <color=#99BBFF><size=11>Impulso y gravedad reducida al saltar</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(4f); CheatNoFallDamage = GUILayout.Toggle(CheatNoFallDamage, " \ud83d\udee1 Sin Daño por Caída (No Fall Damage)", _toggleStyle, Array.Empty<GUILayoutOption>()); if (CheatNoFallDamage) { GUILayout.Label(" <color=#99BBFF><size=11>Inmune a daño, lesiones y desmayos por caídas</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(4f); CheatInfiniteStamina = GUILayout.Toggle(CheatInfiniteStamina, " ⚡ Estamina Infinita (Infinite Stamina)", _toggleStyle, Array.Empty<GUILayoutOption>()); if (CheatInfiniteStamina) { GUILayout.Label(" <color=#99BBFF><size=11>Escala y corre sin agotar tu energía</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(4f); DrawSeparator(); GUILayout.Space(4f); bool cheatInvisibility = CheatInvisibility; CheatInvisibility = GUILayout.Toggle(CheatInvisibility, " \ud83d\udc7b Invisibilidad (Invisible para otros jugadores)", _toggleStyle, Array.Empty<GUILayoutOption>()); if (CheatInvisibility != cheatInvisibility) { ApplyInvisibility(CheatInvisibility); } if (CheatInvisibility) { GUILayout.Label(" <color=#99BBFF><size=11>Oculta tu modelo y nombre ante todos los jugadores de la partida.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } else { GUILayout.Label(" <color=#888899><size=11>Hazte completamente invisible ante otros jugadores.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(10f); if (GUILayout.Button("Desactivar Todos los Cheats", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) })) { CheatFly = false; CheatSuperJump = false; CheatNoFallDamage = false; CheatInfiniteStamina = false; if (CheatInvisibility) { CheatInvisibility = false; ApplyInvisibility(invisible: false); } Character realLocalPlayer = GetRealLocalPlayer(); if ((Object)(object)realLocalPlayer != (Object)null) { realLocalPlayer.infiniteStam = false; } SetStatus("<color=#FF8888>Cheats desactivados.</color>"); } GUILayout.Space(10f); DrawSeparator(); GUILayout.Space(4f); GUILayout.Label("<b>\ud83d\udd12 SEGURIDAD (Anti-Cheats para Otros):</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Label("<color=#FF9999><size=11>Estas funciones solo afectan a otros jugadores, tú conservas todos tus poderes.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(4f); SecurityAntiFly = GUILayout.Toggle(SecurityAntiFly, " ⛔ Anti-Vuelo (Bajar jugadores volando)", _toggleStyle, Array.Empty<GUILayoutOption>()); if (SecurityAntiFly) { GUILayout.Label(" <color=#FF9999><size=11>Fuerza al suelo a otros jugadores que estén volando/flotando con mods.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(3f); SecurityAntiGhost = GUILayout.Toggle(SecurityAntiGhost, " \ud83d\udeab Anti-Fantasma (Eliminar fantasmas)", _toggleStyle, Array.Empty<GUILayoutOption>()); if (SecurityAntiGhost) { GUILayout.Label(" <color=#FF9999><size=11>Destruye los fantasmas (PlayerGhost) de otros jugadores.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(3f); SecurityAntiItems = GUILayout.Toggle(SecurityAntiItems, " \ud83d\udce6 Anti-Items (Quitar objetos spawneados)", _toggleStyle, Array.Empty<GUILayoutOption>()); if (SecurityAntiItems) { GUILayout.Label(" <color=#FF9999><size=11>Elimina del inventario los items spawneados por otros jugadores con mods.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(6f); GUI.backgroundColor = new Color(0.85f, 0.25f, 0.25f); if (GUILayout.Button("\ud83d\udd12 Ejecutar Limpieza de Seguridad AHORA", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { ExecuteSecuritySweep(); } GUI.backgroundColor = Color.white; } private void DrawBotsTab() { //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) int count = SpawnedBots.Count; GUILayout.Label($"<b>Bots activos:</b> {count} / {5}", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); bool inRoom = PhotonNetwork.InRoom; if (!inRoom) { GUILayout.Label("<color=#FF6666><b>⚠ Debes estar en una partida para spawnear bots.</b></color>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(10f); } GUILayout.Label("<b>Modo de IA para nuevos bots:</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); bool num = DefaultBotMode == BotMode.Idle; bool flag = DefaultBotMode == BotMode.Mimic; bool flag2 = DefaultBotMode == BotMode.Follow; GUI.backgroundColor = (num ? new Color(0.3f, 0.7f, 1f) : new Color(0.2f, 0.2f, 0.25f)); if (GUILayout.Button(num ? "● \ud83d\uded1 Quieto" : " \ud83d\uded1 Quieto", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) })) { DefaultBotMode = BotMode.Idle; } GUI.backgroundColor = (flag ? new Color(0.3f, 0.7f, 1f) : new Color(0.2f, 0.2f, 0.25f)); if (GUILayout.Button(flag ? "● \ud83c\udfad Imitar" : " \ud83c\udfad Imitar", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) })) { DefaultBotMode = BotMode.Mimic; } GUI.backgroundColor = (flag2 ? new Color(0.3f, 0.7f, 1f) : new Color(0.2f, 0.2f, 0.25f)); if (GUILayout.Button(flag2 ? "● \ud83d\udeb6 Seguir" : " \ud83d\udeb6 Seguir", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) })) { DefaultBotMode = BotMode.Follow; } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); GUILayout.Space(3f); if (DefaultBotMode == BotMode.Idle) { GUILayout.Label(" <color=#888899><size=11>El bot permanecerá completamente quieto en su lugar.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } else if (DefaultBotMode == BotMode.Mimic) { GUILayout.Label(" <color=#99FFBB><size=11>El bot imitará tus movimientos, saltos y dirección en tiempo real.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } else if (DefaultBotMode == BotMode.Follow) { GUILayout.Label(" <color=#99FFBB><size=11>El bot te seguirá de forma inteligente corriendo y escalando montañas/paredes.</size></color>", _labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(5f); GUI.enabled = inRoom && count < 5; if (GUILayout.Button("➕ Spawnear Bot", _buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(38f) })) { SpawnBot(); } GUI.enabled = true; GUILayout.Space(5f); GUI.enabled = count > 0; if (GUILayout.Button("\ud83d\uddd1 Eliminar Todos los Bots", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { RemoveAllBots(); SetStatus("<color=#FF8888>Todos los bots eliminados.</color>"); } GUI.enabled = true; GUILayout.Space(8f); if (count <= 0) { return; } DrawSeparator(); GUILayout.Label("<b>Lista de Bots:</b>", _labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(3f); _scrollPos = GUILayout.BeginScrollView(_scrollPos, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(170f) }); for (int num2 = SpawnedBots.Count - 1; num2 >= 0; num2--) { SpawnedBot spawnedBot = SpawnedBots[num2]; if (!((Object)(object)spawnedBot.BotObject == (Object)null)) { BotAIController component = spawnedBot.BotObject.GetComponent<BotAIController>(); string text = "\ud83d\uded1 Quieto"; if ((Object)(object)component != (Object)null) { if (component.CurrentMode == BotMode.Idle) { text = "\ud83d\uded1 Quieto"; } else if (component.CurrentMode == BotMode.Mimic) { text = "\ud83c\udfad Imitar"; } else if (component.CurrentMode == BotMode.Follow) { text = "\ud83d\udeb6 Seguir"; } } GUILayout.BeginVertical(_boxStyle, Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(" \ud83e\udd16 <b>" + spawnedBot.BotName + "</b>", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUI.backgroundColor = new Color(0.25f, 0.6f, 0.9f); if (GUILayout.Button(text, _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(110f), GUILayout.Height(24f) }) && (Object)(object)component != (Object)null) { component.CurrentMode = (BotMode)((int)(component.CurrentMode + 1) % 3); SetStatus($"<color=#88FF88>{spawnedBot.BotName} cambiado a {component.CurrentMode}</color>"); } GUI.backgroundColor = new Color(0.85f, 0.25f, 0.25f); if (GUILayout.Button("✕", _smallButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(28f), GUILayout.Height(24f) })) { RemoveBot(num2); } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.Space(2f); } } GUILayout.EndScrollView(); } private void ApplyInvisibility(bool invisible) { try { Character realLocalPlayer = GetRealLocalPlayer(); if (invisible) { if (_savedNickName == null && PhotonNetwork.LocalPlayer != null && !string.IsNullOrEmpty(PhotonNetwork.LocalPlayer.NickName) && PhotonNetwork.LocalPlayer.NickName.Trim().Length > 0) { _savedNickName = PhotonNetwork.LocalPlayer.NickName; } if (PhotonNetwork.LocalPlayer != null) { PhotonNetwork.LocalPlayer.NickName = " "; } if ((Object)(object)realLocalPlayer != (Object)null) { if ((Object)(object)realLocalPlayer.refs?.customization != (Object)null) { realLocalPlayer.refs.customization.HideAllRenderers(); } Renderer[] componentsInChildren = ((Component)realLocalPlayer).GetComponentsInChildren<Renderer>(true); foreach (Renderer val in componentsInChildren) { if ((Object)(object)val != (Object)null) { val.enabled = false; } } } SetStatus("<color=#88FF88>\ud83d\udc7b Invisibilidad: ACTIVADA (Oculto para todos)</color>"); return; } if (_savedNickName != null && PhotonNetwork.LocalPlayer != null) { PhotonNetwork.LocalPlayer.NickName = _savedNickName; _savedNickName = null; } if ((Object)(object)realLocalPlayer != (Object)null) { if ((Object)(object)realLocalPlayer.refs?.customization != (Object)null) { realLocalPlayer.refs.customization.ShowAllRenderers(); } Renderer[] componentsInChildren = ((Component)realLocalPlayer).GetComponentsInChildren<Renderer>(true); foreach (Renderer val2 in componentsInChildren) { if ((Object)(object)val2 != (Object)null) { val2.enabled = true; } } } SetStatus("<color=#FF8888>\ud83d\udc7b Invisibilidad: DESACTIVADA</color>"); } catch (Exception arg) { Log.LogError((object)$"[Admin_menukz] Error applying invisibility: {arg}"); } } private void DrawSeparator() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) GUILayout.Space(2f); GUI.DrawTexture(GUILayoutUtility.GetRect(1f, 1f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }), (Texture)(object)MakeTex(1, 1, new Color(0.3f, 0.5f, 0.8f, 0.5f))); GUILayout.Space(2f); } private void SetStatus(string message, float duration = 4f) { _statusMessage = message; _statusClearTime = Time.time + duration; } public static Character GetRealLocalPlayer() { if (Character.AllCharacters != null) { foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter != (Object)null && allCharacter.IsLocal && (Object)(object)((Component)allCharacter).GetComponent<AdminBotMarker>() == (Object)null) { return allCharacter; } } } if ((Object)(object)Character.localCharacter != (Object)null) { _ = (Object)(object)((Component)Character.localCharacter).GetComponent<AdminBotMarker>() == (Object)null; return Character.localCharacter; } return Character.localCharacter; } private void SpawnBot() { //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) try { if (!PhotonNetwork.InRoom) { SetStatus("<color=#FF6666>No estás en una partida.</color>"); return; } if (SpawnedBots.Count >= 5) { SetStatus("<color=#FF6666>Límite de bots alcanzado (5).</color>"); return; } Character realLocalPlayer = GetRealLocalPlayer(); Recorder val = (((Object)(object)realLocalPlayer != (Object)null) ? ((Component)realLocalPlayer).GetComponentInChildren<Recorder>() : null); Vector3 val2; Quaternion val3; if ((Object)(object)realLocalPlayer != (Object)null) { val2 = realLocalPlayer.Center + Vector3.up * 2.5f + new Vector3(Random.Range(-0.1f, 0.1f), 0f, Random.Range(-0.1f, 0.1f)); val3 = ((Component)realLocalPlayer).transform.rotation; } else { val2 = Vector3.zero + Vector3.up * 5f; val3 = Quaternion.identity; } _botCounter++; string text = (NextBotName = "Bot" + _botCounter); IsSpawningBot = true; GameObject val4 = null; try { object[] array = new object[2] { "AdminBot", text }; val4 = ((!PhotonNetwork.IsMasterClient) ? PhotonNetwork.Instantiate("MushroomZombie_Player", val2, val3, (byte)0, array) : PhotonNetwork.InstantiateRoomObject("MushroomZombie_Player", val2, val3, (byte)0, array)); } catch (Exception ex) { Log.LogWarning((object)("[Admin_menukz] MushroomZombie_Player instantiate fallback: " + ex.Message)); try { object[] array2 = new object[2] { "AdminBot", text }; val4 = PhotonNetwork.Instantiate("MushroomZombie", val2, val3, (byte)0, array2); } catch { object[] array3 = new object[2] { "AdminBot", text }; val4 = PhotonNetwork.Instantiate("Character", val2, val3, (byte)0, array3); } } finally { IsSpawningBot = false; } if ((Object)(object)val4 == (Object)null) { Log.LogError((object)"[Admin_menukz] PhotonNetwork.Instantiate('Character') returned null!"); SetStatus("<color=#FF6666>Error al spawnear bot.</color>"); return; } Recorder componentInChildren = val4.GetComponentInChildren<Recorder>(); if ((Object)(object)componentInChildren != (Object)null) { Object.Destroy((Object)(object)componentInChildren); } CharacterVoiceHandler componentInChildren2 = val4.GetComponentInChildren<CharacterVoiceHandler>(); if ((Object)(object)componentInChildren2 != (Object)null) { ((Behaviour)componentInChildren2).enabled = false; } MushroomZombieBiteCollider[] componentsInChildren = val4.GetComponentsInChildren<MushroomZombieBiteCollider>(true); foreach (MushroomZombieBiteCollider val5 in componentsInChildren) { if ((Object)(object)val5 != (Object)null) { Object.Destroy((Object)(object)val5); } } MushroomZombie component = val4.GetComponent<MushroomZombie>(); if ((Object)(object)component != (Object)null) { component.isNPCZombie = false; component.currentState = (State)2; component.currentTarget = null; if ((Object)(object)component.biteColliderObject != (Object)null) { component.biteColliderObject.SetActive(false); Object.Destroy((Object)(object)component.biteColliderObject); } ((Behaviour)component).enabled = false; } if ((Object)(object)realLocalPlayer != (Object)null) { ((Component)realLocalPlayer).gameObject.SetActive(true); Character.localCharacter = realLocalPlayer; if ((Object)(object)val != (Object)null) { VoiceClientHandler.LocalPlayerAssigned(val); } if (Character.AllCharacters != null && !Character.AllCharacters.Contains(realLocalPlayer)) { Character.AllCharacters.Add(realLocalPlayer); } } Character component2 = val4.GetComponent<Character>(); if ((Object)(object)component2 != (Object)null) { component2.isBot = true; AdminBotMarker adminBotMarker = val4.GetComponent<AdminBotMarker>(); if ((Object)(object)adminBotMarker == (Object)null) { adminBotMarker = val4.AddComponent<AdminBotMarker>(); } adminBotMarker.BotName = text; if (Character.AllBotCharacters != null && !Character.AllBotCharacters.Contains(component2)) { Character.AllBotCharacters.Add(component2); } if (Character.AllCharacters != null && !Character.AllCharacters.Contains(component2)) { Character.AllCharacters.Add(component2); } if ((Object)(object)component2.input != (Object)null) { ((Behaviour)component2.input).enabled = false; } CharacterInput component3 = val4.GetComponent<CharacterInput>(); if ((Object)(object)component3 != (Object)null) { ((Behaviour)component3).enabled = false; } component2.infiniteStam = true; if ((Object)(object)component2.data != (Object)null) { component2.data.currentStamina = 1f; component2.data.extraStamina = 1f; } BotAIController botAIController = val4.GetComponent<BotAIController>(); if ((Object)(object)botAIController == (Object)null) { botAIController = val4.AddComponent<BotAIController>(); } botAIController.CurrentMode = DefaultBotMode; val4.SetActive(true); Char