Decompiled source of CrowdControl Atlyss v1.1.2
BepInEx/plugins/CrowdControl/CrowdControl.dll
Decompiled a day 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.Globalization; using System.Linq; using System.Net; using System.Net.Sockets; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using System.Threading; using ATLYSSCrowdControlMod; using BepInEx; using BepInEx.Logging; using BepinControl; using HarmonyLib; using Mirror; using Newtonsoft.Json; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("LethalCompanyTestMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LethalCompanyTestMod")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("d4f6b961-e8ae-4e4b-950c-37644e42d4ca")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace ATLYSSCrowdControlMod { [BepInPlugin("WarpWorld.CrowdControl", "Crowd Control", "1.1.0.0")] public class TestMod : BaseUnityPlugin { private const string modGUID = "WarpWorld.CrowdControl"; private const string modName = "Crowd Control"; private const string modVersion = "1.1.0.0"; private readonly Harmony harmony = new Harmony("WarpWorld.CrowdControl"); public static ManualLogSource mls; internal static TestMod Instance = null; private ControlClient client = null; public static Random rnd = new Random(); public static Queue<Action> ActionQueue = new Queue<Action>(); public static Scene scene; public static CreepSpawner spawner; public static List<Creep> creeps = new List<Creep>(); private void Awake() { Instance = this; mls = Logger.CreateLogSource("Crowd Control"); mls.LogInfo((object)"Loaded WarpWorld.CrowdControl. Patching."); harmony.PatchAll(typeof(TestMod)); mls.LogInfo((object)"Initializing Crowd Control"); try { client = new ControlClient(); new Thread(client.NetworkLoop).Start(); new Thread(client.RequestLoop).Start(); } catch (Exception ex) { mls.LogInfo((object)("CC Init Error: " + ex.ToString())); } mls.LogInfo((object)"Crowd Control Initialized"); mls = ((BaseUnityPlugin)this).Logger; } [HarmonyPatch(typeof(InGameUI), "Update")] [HarmonyPrefix] private static void RunEffects() { if (ActionQueue.Count > 0) { Action action = ActionQueue.Dequeue(); action(); } lock (TimedThread.threads) { foreach (TimedThread thread in TimedThread.threads) { if (!thread.paused) { thread.effect.tick(); } } } } [HarmonyPatch(typeof(Creep), "Update")] [HarmonyPrefix] private static void getScene(Creep __instance) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) scene = ((Component)__instance).gameObject.scene; if ((Object)(object)__instance._parentCreepSpawner != (Object)null) { spawner = __instance._parentCreepSpawner; } } [HarmonyPatch(typeof(Creep), "Reset_Creep")] [HarmonyPrefix] private static bool Reset(Creep __instance) { if (creeps.Contains(__instance)) { return false; } return true; } } } namespace BepinControl { public enum TimedType { INVUL, OHKO, INFMANA, NOMANA, INFSTAM, NOSTAM, BUFF, DEBUFF, FREESKILL, NOCOOL, DISJUMP, LOWJUMP, HIGHJUMP, ULTRAJUMP, AUTOJUMP, MULTIJUMP, FREEZE, SLOW, FAST, ULTRA, GIANT, TINY, WIDE, NARROW, TALL, SHORT, NODASH, SHORTDASH, LONGDASH, UNDASH, WIDECAM, NARROWCAM, HIGHCAM, LOWCAM } public class Timed { public TimedType type; private float oldspeed; private int oldhealth; private int oldmana; private float oldstep; private float olddash; private float oldfov; private static int frames; public Timed(TimedType t) { type = t; } public void addEffect() { //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Expected O, but got Unknown //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Expected O, but got Unknown //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: 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_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) switch (type) { case TimedType.WIDECAM: case TimedType.NARROWCAM: oldfov = CameraFunction._current._mainCamera.fieldOfView; break; case TimedType.NODASH: case TimedType.SHORTDASH: case TimedType.LONGDASH: { Player mainPlayer7 = Player._mainPlayer; if ((Object)(object)mainPlayer7 == (Object)null) { throw new Exception(); } olddash = mainPlayer7._pMove.dashSpeed; break; } case TimedType.GIANT: case TimedType.TINY: case TimedType.WIDE: case TimedType.NARROW: case TimedType.TALL: case TimedType.SHORT: { Player mainPlayer2 = Player._mainPlayer; if ((Object)(object)mainPlayer2 == (Object)null) { throw new Exception(); } oldstep = mainPlayer2._pMove._playerController.stepOffset; break; } case TimedType.FREESKILL: { Player mainPlayer5 = Player._mainPlayer; if ((Object)(object)mainPlayer5 == (Object)null) { throw new Exception(); } mainPlayer5._pCasting._ignoreCost = true; break; } case TimedType.BUFF: { Player mainPlayer3 = Player._mainPlayer; if ((Object)(object)mainPlayer3 == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer3._pStats._syncAttributes.Count; i++) { AttributeStruct val2 = new AttributeStruct { _attributeName = mainPlayer3._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer3._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer3._pStats._syncAttributes[i]._attributeValue + 5 }; mainPlayer3._pStats._syncAttributes[i] = val2; } mainPlayer3._pStats.Apply_StatCalculations(); break; } case TimedType.DEBUFF: { Player mainPlayer4 = Player._mainPlayer; if ((Object)(object)mainPlayer4 == (Object)null) { throw new Exception(); } for (int j = 0; j < mainPlayer4._pStats._syncAttributes.Count; j++) { AttributeStruct val3 = new AttributeStruct { _attributeName = mainPlayer4._pStats._syncAttributes[j]._attributeName, _attributeID = mainPlayer4._pStats._syncAttributes[j]._attributeID, _attributeValue = mainPlayer4._pStats._syncAttributes[j]._attributeValue - 5 }; mainPlayer4._pStats._syncAttributes[j] = val3; } mainPlayer4._pStats.Apply_StatCalculations(); break; } case TimedType.INVUL: case TimedType.OHKO: { Player mainPlayer6 = Player._mainPlayer; if ((Object)(object)mainPlayer6 == (Object)null) { throw new Exception(); } StatusEntity val4 = (StatusEntity)CrowdDelegates.getProperty(mainPlayer6._pStats, "_playerStatus"); if ((Object)(object)val4 == (Object)null) { throw new Exception(); } oldhealth = val4.Network_currentHealth; break; } case TimedType.INFMANA: case TimedType.NOMANA: { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } StatusEntity val = (StatusEntity)CrowdDelegates.getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } oldmana = val.Network_currentMana; break; } case TimedType.INFSTAM: case TimedType.NOSTAM: case TimedType.NOCOOL: case TimedType.DISJUMP: case TimedType.LOWJUMP: case TimedType.HIGHJUMP: case TimedType.ULTRAJUMP: case TimedType.AUTOJUMP: case TimedType.MULTIJUMP: case TimedType.FREEZE: case TimedType.SLOW: case TimedType.FAST: case TimedType.ULTRA: case TimedType.UNDASH: break; } } public void removeEffect() { //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Expected O, but got Unknown //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Expected O, but got Unknown //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) switch (type) { case TimedType.WIDECAM: case TimedType.NARROWCAM: CameraFunction._current._mainCamera.fieldOfView = oldfov; break; case TimedType.NODASH: case TimedType.SHORTDASH: case TimedType.LONGDASH: { Player mainPlayer2 = Player._mainPlayer; if ((Object)(object)mainPlayer2 == (Object)null) { throw new Exception(); } mainPlayer2._pMove.dashSpeed = olddash; break; } case TimedType.FREESKILL: { Player mainPlayer9 = Player._mainPlayer; if ((Object)(object)mainPlayer9 == (Object)null) { throw new Exception(); } mainPlayer9._pCasting._ignoreCost = false; break; } case TimedType.BUFF: { Player mainPlayer7 = Player._mainPlayer; if ((Object)(object)mainPlayer7 == (Object)null) { throw new Exception(); } for (int j = 0; j < mainPlayer7._pStats._syncAttributes.Count; j++) { AttributeStruct val3 = new AttributeStruct { _attributeName = mainPlayer7._pStats._syncAttributes[j]._attributeName, _attributeID = mainPlayer7._pStats._syncAttributes[j]._attributeID, _attributeValue = mainPlayer7._pStats._syncAttributes[j]._attributeValue - 5 }; mainPlayer7._pStats._syncAttributes[j] = val3; } mainPlayer7._pStats.Apply_StatCalculations(); break; } case TimedType.DEBUFF: { Player mainPlayer3 = Player._mainPlayer; if ((Object)(object)mainPlayer3 == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer3._pStats._syncAttributes.Count; i++) { AttributeStruct val = new AttributeStruct { _attributeName = mainPlayer3._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer3._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer3._pStats._syncAttributes[i]._attributeValue + 5 }; mainPlayer3._pStats._syncAttributes[i] = val; } mainPlayer3._pStats.Apply_StatCalculations(); break; } case TimedType.INVUL: case TimedType.OHKO: { Player mainPlayer5 = Player._mainPlayer; if ((Object)(object)mainPlayer5 == (Object)null) { throw new Exception(); } StatusEntity val2 = (StatusEntity)CrowdDelegates.getProperty(mainPlayer5._pStats, "_playerStatus"); if ((Object)(object)val2 == (Object)null) { throw new Exception(); } val2.Network_currentHealth = oldhealth; break; } case TimedType.INFMANA: case TimedType.NOMANA: { Player mainPlayer8 = Player._mainPlayer; if ((Object)(object)mainPlayer8 == (Object)null) { throw new Exception(); } StatusEntity val4 = (StatusEntity)CrowdDelegates.getProperty(mainPlayer8._pStats, "_playerStatus"); if ((Object)(object)val4 == (Object)null) { throw new Exception(); } val4.Network_currentMana = oldmana; break; } case TimedType.FREEZE: case TimedType.SLOW: case TimedType.FAST: case TimedType.ULTRA: { Player mainPlayer6 = Player._mainPlayer; if (!((Object)(object)mainPlayer6 == (Object)null)) { mainPlayer6._pMove.Network_movSpeed = GameManager._current._statLogics._baseMoveSpeed; mainPlayer6._pMove._movSpeed = GameManager._current._statLogics._baseMoveSpeed; } break; } case TimedType.GIANT: case TimedType.TINY: case TimedType.WIDE: case TimedType.NARROW: case TimedType.TALL: case TimedType.SHORT: { Player mainPlayer4 = Player._mainPlayer; if (!((Object)(object)mainPlayer4 == (Object)null)) { ((Component)mainPlayer4._pMove._playerController).transform.localScale = new Vector3(1f, 1f, 1f); mainPlayer4._pMove._jumpForce = mainPlayer4._pMove._standardJumpForce; mainPlayer4._pMove._playerController.stepOffset = oldstep; } break; } case TimedType.UNDASH: { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } CrowdDelegates.setProperty(mainPlayer._pMove, "dashCoolDown", 0.65f); break; } case TimedType.HIGHCAM: case TimedType.LOWCAM: CameraFunction._current.positionAdjust.y = 0f; break; case TimedType.INFSTAM: case TimedType.NOSTAM: case TimedType.NOCOOL: case TimedType.DISJUMP: case TimedType.LOWJUMP: case TimedType.HIGHJUMP: case TimedType.ULTRAJUMP: case TimedType.AUTOJUMP: case TimedType.MULTIJUMP: break; } } public void tick() { //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_080a: Expected O, but got Unknown //IL_09e3: Unknown result type (might be due to invalid IL or missing references) //IL_09ea: Expected O, but got Unknown //IL_08a3: Unknown result type (might be due to invalid IL or missing references) //IL_08aa: Expected O, but got Unknown //IL_0a63: Unknown result type (might be due to invalid IL or missing references) //IL_0a6a: Expected O, but got Unknown //IL_0943: Unknown result type (might be due to invalid IL or missing references) //IL_094a: Expected O, but got Unknown //IL_0ae3: Unknown result type (might be due to invalid IL or missing references) //IL_0aea: Expected O, but got Unknown //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0825: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0a05: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_0a85: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_0983: Unknown result type (might be due to invalid IL or missing references) //IL_0b05: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Invalid comparison between Unknown and I4 //IL_085f: Unknown result type (might be due to invalid IL or missing references) //IL_08ff: Unknown result type (might be due to invalid IL or missing references) //IL_099f: Unknown result type (might be due to invalid IL or missing references) frames++; switch (type) { case TimedType.HIGHCAM: CameraFunction._current.positionAdjust.y = 5f; break; case TimedType.LOWCAM: CameraFunction._current.positionAdjust.y = -5f; break; case TimedType.WIDECAM: CameraFunction._current._mainCamera.fieldOfView = oldfov * 1.3f; break; case TimedType.NARROWCAM: CameraFunction._current._mainCamera.fieldOfView = oldfov * 0.65f; break; case TimedType.LONGDASH: { Player mainPlayer18 = Player._mainPlayer; if ((Object)(object)mainPlayer18 == (Object)null) { throw new Exception(); } mainPlayer18._pMove.dashSpeed = olddash * 2f; break; } case TimedType.SHORTDASH: { Player mainPlayer5 = Player._mainPlayer; if ((Object)(object)mainPlayer5 == (Object)null) { throw new Exception(); } mainPlayer5._pMove.dashSpeed = olddash * 0.5f; break; } case TimedType.NODASH: { Player mainPlayer22 = Player._mainPlayer; if ((Object)(object)mainPlayer22 == (Object)null) { throw new Exception(); } mainPlayer22._pMove.dashSpeed = olddash * 0f; break; } case TimedType.UNDASH: { Player mainPlayer12 = Player._mainPlayer; if ((Object)(object)mainPlayer12 == (Object)null) { throw new Exception(); } CrowdDelegates.setProperty(mainPlayer12._pMove, "dashCoolDown", 0.05f); break; } case TimedType.GIANT: { Player mainPlayer7 = Player._mainPlayer; if (!((Object)(object)mainPlayer7 == (Object)null)) { ((Component)mainPlayer7._pMove._playerController).transform.localScale = new Vector3(3f, 3f, 3f); mainPlayer7._pMove._playerController.stepOffset = oldstep * 3f; } break; } case TimedType.TINY: { Player mainPlayer2 = Player._mainPlayer; if (!((Object)(object)mainPlayer2 == (Object)null)) { ((Component)mainPlayer2._pMove._playerController).transform.localScale = new Vector3(0.4f, 0.4f, 0.4f); mainPlayer2._pMove._playerController.stepOffset = oldstep * 0.4f; } break; } case TimedType.TALL: { Player mainPlayer27 = Player._mainPlayer; if (!((Object)(object)mainPlayer27 == (Object)null)) { ((Component)mainPlayer27._pMove._playerController).transform.localScale = new Vector3(1f, 3f, 1f); mainPlayer27._pMove._playerController.stepOffset = oldstep * 3f; } break; } case TimedType.SHORT: { Player mainPlayer24 = Player._mainPlayer; if (!((Object)(object)mainPlayer24 == (Object)null)) { ((Component)mainPlayer24._pMove._playerController).transform.localScale = new Vector3(1f, 0.4f, 1f); mainPlayer24._pMove._playerController.stepOffset = oldstep * 0.4f; } break; } case TimedType.WIDE: { Player mainPlayer21 = Player._mainPlayer; if (!((Object)(object)mainPlayer21 == (Object)null)) { ((Component)mainPlayer21._pMove._playerController).transform.localScale = new Vector3(3f, 1f, 1f); mainPlayer21._pMove._playerController.stepOffset = oldstep * 1.5f; } break; } case TimedType.NARROW: { Player mainPlayer17 = Player._mainPlayer; if (!((Object)(object)mainPlayer17 == (Object)null)) { ((Component)mainPlayer17._pMove._playerController).transform.localScale = new Vector3(0.4f, 1f, 1f); mainPlayer17._pMove._playerController.stepOffset = oldstep * 0.75f; } break; } case TimedType.FREEZE: { Player mainPlayer15 = Player._mainPlayer; if (!((Object)(object)mainPlayer15 == (Object)null)) { mainPlayer15._pMove.Network_movSpeed = GameManager._current._statLogics._baseMoveSpeed * 0f; mainPlayer15._pMove._movSpeed = GameManager._current._statLogics._baseMoveSpeed * 0f; } break; } case TimedType.SLOW: { Player mainPlayer11 = Player._mainPlayer; if (!((Object)(object)mainPlayer11 == (Object)null)) { mainPlayer11._pMove.Network_movSpeed = GameManager._current._statLogics._baseMoveSpeed / 2f; mainPlayer11._pMove._movSpeed = GameManager._current._statLogics._baseMoveSpeed / 2f; } break; } case TimedType.FAST: { Player mainPlayer8 = Player._mainPlayer; if (!((Object)(object)mainPlayer8 == (Object)null)) { mainPlayer8._pMove.Network_movSpeed = GameManager._current._statLogics._baseMoveSpeed * 2f; mainPlayer8._pMove._movSpeed = GameManager._current._statLogics._baseMoveSpeed * 2f; } break; } case TimedType.ULTRA: { Player mainPlayer6 = Player._mainPlayer; if (!((Object)(object)mainPlayer6 == (Object)null)) { mainPlayer6._pMove.Network_movSpeed = GameManager._current._statLogics._baseMoveSpeed * 4f; mainPlayer6._pMove._movSpeed = GameManager._current._statLogics._baseMoveSpeed * 4f; } break; } case TimedType.AUTOJUMP: { Player mainPlayer26 = Player._mainPlayer; if (!((Object)(object)mainPlayer26 == (Object)null) && ((int)mainPlayer26._pMove._currentMovementAction == 0 || (int)mainPlayer26._pMove._currentMovementAction == 1) && !(mainPlayer26._pMove._airTime > 0.01f)) { mainPlayer26._pMove.Init_Jump(mainPlayer26._pMove._standardJumpForce, 0f, 0f, 0f, true); } break; } case TimedType.LOWJUMP: { Player mainPlayer23 = Player._mainPlayer; if ((Object)(object)mainPlayer23 == (Object)null) { throw new Exception(); } mainPlayer23._pMove._jumpForce = mainPlayer23._pMove._standardJumpForce * 0.65f; break; } case TimedType.HIGHJUMP: { Player mainPlayer20 = Player._mainPlayer; if ((Object)(object)mainPlayer20 == (Object)null) { throw new Exception(); } mainPlayer20._pMove._jumpForce = mainPlayer20._pMove._standardJumpForce * 2f; break; } case TimedType.ULTRAJUMP: { Player mainPlayer16 = Player._mainPlayer; if ((Object)(object)mainPlayer16 == (Object)null) { throw new Exception(); } mainPlayer16._pMove._jumpForce = mainPlayer16._pMove._standardJumpForce * 4f; break; } case TimedType.DISJUMP: { Player mainPlayer13 = Player._mainPlayer; if ((Object)(object)mainPlayer13 == (Object)null) { throw new Exception(); } mainPlayer13._pMove._currentJumps = 100; mainPlayer13._pMove._jumpForce = 0f; break; } case TimedType.MULTIJUMP: { Player mainPlayer10 = Player._mainPlayer; if ((Object)(object)mainPlayer10 == (Object)null) { throw new Exception(); } mainPlayer10._pMove._currentJumps = 0; break; } case TimedType.INVUL: { Player mainPlayer4 = Player._mainPlayer; if ((Object)(object)mainPlayer4 == (Object)null) { throw new Exception(); } StatusEntity val2 = (StatusEntity)CrowdDelegates.getProperty(mainPlayer4._pStats, "_playerStatus"); if ((Object)(object)val2 == (Object)null) { throw new Exception(); } int maxHealth = mainPlayer4._pStats.Network_statStruct._maxHealth; int network_currentHealth = val2.Network_currentHealth; if (network_currentHealth < mainPlayer4._pStats.Network_statStruct._maxHealth) { val2.Network_currentHealth = mainPlayer4._pStats.Network_statStruct._maxHealth; } break; } case TimedType.INFMANA: { Player mainPlayer25 = Player._mainPlayer; if ((Object)(object)mainPlayer25 == (Object)null) { throw new Exception(); } StatusEntity val6 = (StatusEntity)CrowdDelegates.getProperty(mainPlayer25._pStats, "_playerStatus"); if ((Object)(object)val6 == (Object)null) { throw new Exception(); } int maxMana2 = mainPlayer25._pStats.Network_statStruct._maxMana; int network_currentMana2 = val6.Network_currentMana; if (network_currentMana2 < mainPlayer25._pStats.Network_statStruct._maxMana) { val6.Network_currentMana = mainPlayer25._pStats.Network_statStruct._maxMana; } break; } case TimedType.INFSTAM: { Player mainPlayer19 = Player._mainPlayer; if ((Object)(object)mainPlayer19 == (Object)null) { throw new Exception(); } StatusEntity val5 = (StatusEntity)CrowdDelegates.getProperty(mainPlayer19._pStats, "_playerStatus"); if ((Object)(object)val5 == (Object)null) { throw new Exception(); } int maxStamina2 = mainPlayer19._pStats.Network_statStruct._maxStamina; int network_currentStamina2 = val5.Network_currentStamina; if (network_currentStamina2 < mainPlayer19._pStats.Network_statStruct._maxStamina) { val5.Network_currentStamina = mainPlayer19._pStats.Network_statStruct._maxStamina; } break; } case TimedType.OHKO: { Player mainPlayer14 = Player._mainPlayer; if ((Object)(object)mainPlayer14 == (Object)null) { throw new Exception(); } StatusEntity val4 = (StatusEntity)CrowdDelegates.getProperty(mainPlayer14._pStats, "_playerStatus"); if ((Object)(object)val4 == (Object)null) { throw new Exception(); } int maxHealth2 = mainPlayer14._pStats.Network_statStruct._maxHealth; int network_currentHealth2 = val4.Network_currentHealth; if (network_currentHealth2 > 1) { val4.Network_currentHealth = 1; } break; } case TimedType.NOMANA: { Player mainPlayer9 = Player._mainPlayer; if ((Object)(object)mainPlayer9 == (Object)null) { throw new Exception(); } StatusEntity val3 = (StatusEntity)CrowdDelegates.getProperty(mainPlayer9._pStats, "_playerStatus"); if ((Object)(object)val3 == (Object)null) { throw new Exception(); } int maxMana = mainPlayer9._pStats.Network_statStruct._maxMana; int network_currentMana = val3.Network_currentMana; if (network_currentMana > 0) { val3.Network_currentMana = 0; } break; } case TimedType.NOSTAM: { Player mainPlayer3 = Player._mainPlayer; if ((Object)(object)mainPlayer3 == (Object)null) { throw new Exception(); } StatusEntity val = (StatusEntity)CrowdDelegates.getProperty(mainPlayer3._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } int maxStamina = mainPlayer3._pStats.Network_statStruct._maxStamina; int network_currentStamina = val.Network_currentStamina; if (network_currentStamina > 0) { val.Network_currentStamina = 0; } break; } case TimedType.NOCOOL: { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } { foreach (SkillCooldownSlot skillCoolDownSlot in mainPlayer._pCasting._skillCoolDownSlots) { skillCoolDownSlot._currentCooldown = 0f; } break; } } case TimedType.BUFF: case TimedType.DEBUFF: case TimedType.FREESKILL: break; } } } public class TimedThread { public static List<TimedThread> threads = new List<TimedThread>(); public readonly Timed effect; public int duration; public int remain; public int id; public bool paused; public static bool isRunning(TimedType t) { foreach (TimedThread thread in threads) { if (thread.effect.type == t) { return true; } } return false; } public static void tick() { foreach (TimedThread thread in threads) { if (!thread.paused) { thread.effect.tick(); } } } public static void addTime(int duration) { try { lock (threads) { foreach (TimedThread thread in threads) { Interlocked.Add(ref thread.duration, duration + 5); if (!thread.paused) { int dur = Volatile.Read(in thread.remain); new TimedResponse(thread.id, dur, CrowdResponse.Status.STATUS_PAUSE).Send(ControlClient.Socket); thread.paused = true; } } } } catch (Exception ex) { TestMod.mls.LogInfo((object)ex.ToString()); } } public static void tickTime(int duration) { try { lock (threads) { foreach (TimedThread thread in threads) { int num = Volatile.Read(in thread.remain); num -= duration; if (num < 0) { num = 0; } Volatile.Write(ref thread.remain, num); } } } catch (Exception ex) { TestMod.mls.LogInfo((object)ex.ToString()); } } public static void unPause() { try { lock (threads) { foreach (TimedThread thread in threads) { if (thread.paused) { int dur = Volatile.Read(in thread.remain); new TimedResponse(thread.id, dur, CrowdResponse.Status.STATUS_RESUME).Send(ControlClient.Socket); thread.paused = false; } } } } catch (Exception ex) { TestMod.mls.LogInfo((object)ex.ToString()); } } public TimedThread(int id, TimedType type, int duration) { effect = new Timed(type); this.duration = duration; remain = duration; this.id = id; paused = false; try { lock (threads) { threads.Add(this); } } catch (Exception ex) { TestMod.mls.LogInfo((object)ex.ToString()); } } public void Run() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; effect.addEffect(); try { for (int num = Volatile.Read(in duration); num > 0; num = Volatile.Read(in duration)) { Interlocked.Add(ref duration, -num); Thread.Sleep(num); } effect.removeEffect(); lock (threads) { threads.Remove(this); } new TimedResponse(id, 0, CrowdResponse.Status.STATUS_STOP).Send(ControlClient.Socket); } catch (Exception ex) { TestMod.mls.LogInfo((object)ex.ToString()); } } } public class ControlClient { public static readonly string CV_HOST = "127.0.0.1"; public static readonly int CV_PORT = 58430; private bool paused = false; public bool inGame = true; private Dictionary<string, CrowdDelegate> Delegate { get; set; } private IPEndPoint Endpoint { get; set; } private Queue<CrowdRequest> Requests { get; set; } private bool Running { get; set; } public static Socket Socket { get; set; } public ControlClient() { Endpoint = new IPEndPoint(IPAddress.Parse(CV_HOST), CV_PORT); Requests = new Queue<CrowdRequest>(); Running = true; Socket = null; Delegate = new Dictionary<string, CrowdDelegate> { { "example", CrowdDelegates.Example }, { "heal25", CrowdDelegates.Heal25 }, { "heal100", CrowdDelegates.Heal100 }, { "damage25", CrowdDelegates.Damage25 }, { "onehp", CrowdDelegates.OneHP }, { "kill", CrowdDelegates.Kill }, { "revive", CrowdDelegates.Revive }, { "invul", CrowdDelegates.Invul }, { "OHKO", CrowdDelegates.OHKO }, { "mana25", CrowdDelegates.Mana25 }, { "mana100", CrowdDelegates.Mana100 }, { "drain25", CrowdDelegates.Drain25 }, { "drain100", CrowdDelegates.Drain100 }, { "infmana", CrowdDelegates.InfMana }, { "zeromana", CrowdDelegates.NoMana }, { "infstam", CrowdDelegates.InfStam }, { "zerostam", CrowdDelegates.NoStam }, { "money100", CrowdDelegates.Money100 }, { "money1000", CrowdDelegates.Money1000 }, { "tmoney100", CrowdDelegates.TMoney100 }, { "tmoney1000", CrowdDelegates.TMoney1000 }, { "strup", CrowdDelegates.StrUp }, { "mindup", CrowdDelegates.MindUp }, { "vitup", CrowdDelegates.VitUp }, { "dexup", CrowdDelegates.DexUp }, { "strdown", CrowdDelegates.StrDown }, { "minddown", CrowdDelegates.MindDown }, { "vitdown", CrowdDelegates.VitDown }, { "dexdown", CrowdDelegates.DexDown }, { "buff", CrowdDelegates.Buff }, { "debuff", CrowdDelegates.Debuff }, { "morning", CrowdDelegates.Morning }, { "noon", CrowdDelegates.Noon }, { "evening", CrowdDelegates.Evening }, { "midnight", CrowdDelegates.Midnight }, { "zerocool", CrowdDelegates.ResetCooldowns }, { "morecool", CrowdDelegates.IncreaseCooldowns }, { "freeskill", CrowdDelegates.FreeSkills }, { "nocool", CrowdDelegates.NoCooldown }, { "unhelm", CrowdDelegates.UnequipHelm }, { "unchest", CrowdDelegates.UnequipChest }, { "unlegs", CrowdDelegates.UnequipLegs }, { "unweap", CrowdDelegates.UnequipWeapon }, { "givebag", CrowdDelegates.GiveBunbag }, { "givepot", CrowdDelegates.GiveBunpot }, { "givejar", CrowdDelegates.GiveBunjar }, { "takebag", CrowdDelegates.TakeBunbag }, { "takepot", CrowdDelegates.TakeBunpot }, { "takejar", CrowdDelegates.TakeBunjar }, { "givepotion", CrowdDelegates.GivePotion }, { "takepotion", CrowdDelegates.TakePotion }, { "givehelm", CrowdDelegates.GiveHelm }, { "givecloak", CrowdDelegates.GiveCloak }, { "givetop", CrowdDelegates.GiveChest }, { "givebottoms", CrowdDelegates.GiveLegs }, { "giveshield", CrowdDelegates.GiveShield }, { "givering", CrowdDelegates.GiveRing }, { "giveweap", CrowdDelegates.GiveWeapon }, { "givescroll", CrowdDelegates.GiveScroll }, { "takeequip", CrowdDelegates.TakeEquip }, { "disjump", CrowdDelegates.DisableJump }, { "lowjump", CrowdDelegates.LowJump }, { "highjump", CrowdDelegates.HighJump }, { "ultrajump", CrowdDelegates.UltraJump }, { "autojump", CrowdDelegates.AutoJump }, { "multijump", CrowdDelegates.MultiJump }, { "freeze", CrowdDelegates.Freeze }, { "fast", CrowdDelegates.Fast }, { "slow", CrowdDelegates.Slow }, { "ultra", CrowdDelegates.Ultra }, { "giant", CrowdDelegates.Giant }, { "tiny", CrowdDelegates.Tiny }, { "tall", CrowdDelegates.Tall }, { "short", CrowdDelegates.Short }, { "wide", CrowdDelegates.Wide }, { "narrow", CrowdDelegates.Narrow }, { "disdash", CrowdDelegates.DisDash }, { "shortdash", CrowdDelegates.ShortDash }, { "longdash", CrowdDelegates.LongDash }, { "freedash", CrowdDelegates.FreeDash }, { "camwide", CrowdDelegates.WideCam }, { "camnarrow", CrowdDelegates.NarrowCam }, { "camhigh", CrowdDelegates.HighCam }, { "camlow", CrowdDelegates.LowCam }, { "spawn_Slime", CrowdDelegates.Spawn }, { "spawn_Greater-Wisp", CrowdDelegates.Spawn }, { "spawn_Slimek", CrowdDelegates.Spawn }, { "spawn_Mekboar", CrowdDelegates.Spawn }, { "spawn_Mini-Golem", CrowdDelegates.Spawn }, { "spawn_Mouth", CrowdDelegates.Spawn }, { "spawn_Hellsludge", CrowdDelegates.Spawn }, { "spawn_Wizboar", CrowdDelegates.Spawn }, { "spawn_Blue-Minchroom", CrowdDelegates.Spawn }, { "spawn_Carbuncle", CrowdDelegates.Spawn }, { "spawn_Slime-Diva", CrowdDelegates.Spawn }, { "spawn_Lord-Kaluuz", CrowdDelegates.Spawn } }; } public bool isReady(string code) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Invalid comparison between Unknown and I4 //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Invalid comparison between Unknown and I4 //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Invalid comparison between Unknown and I4 try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { return false; } if (code != "revive") { if ((int)mainPlayer._currentPlayerCondition != 2) { return false; } } else if ((int)mainPlayer._currentPlayerCondition != 3) { return false; } if ((int)mainPlayer._pMove._currentMovementAction == 6 || (int)mainPlayer._pMove._currentMovementAction == 7) { return false; } } catch (Exception ex) { TestMod.mls.LogError((object)ex.ToString()); return false; } return true; } public static void HideEffect(string code) { CrowdResponse crowdResponse = new CrowdResponse(0, CrowdResponse.Status.STATUS_NOTVISIBLE); crowdResponse.type = 1; crowdResponse.code = code; crowdResponse.Send(Socket); } public static void ShowEffect(string code) { CrowdResponse crowdResponse = new CrowdResponse(0, CrowdResponse.Status.STATUS_VISIBLE); crowdResponse.type = 1; crowdResponse.code = code; crowdResponse.Send(Socket); } public static void DisableEffect(string code) { CrowdResponse crowdResponse = new CrowdResponse(0, CrowdResponse.Status.STATUS_NOTSELECTABLE); crowdResponse.type = 1; crowdResponse.code = code; crowdResponse.Send(Socket); } public static void EnableEffect(string code) { CrowdResponse crowdResponse = new CrowdResponse(0, CrowdResponse.Status.STATUS_SELECTABLE); crowdResponse.type = 1; crowdResponse.code = code; crowdResponse.Send(Socket); } private void ClientLoop() { TestMod.mls.LogInfo((object)"Connected to Crowd Control"); Timer timer = new Timer(timeUpdate, null, 0, 200); try { while (Running) { CrowdRequest crowdRequest = CrowdRequest.Recieve(this, Socket); if (crowdRequest != null && !crowdRequest.IsKeepAlive()) { lock (Requests) { Requests.Enqueue(crowdRequest); } } } } catch (Exception) { TestMod.mls.LogInfo((object)"Disconnected from Crowd Control"); Socket.Close(); } } public void timeUpdate(object state) { inGame = true; if (!isReady("")) { inGame = false; } if (!inGame) { TimedThread.addTime(200); paused = true; } else if (paused) { paused = false; TimedThread.unPause(); TimedThread.tickTime(200); } else { TimedThread.tickTime(200); } } public bool IsRunning() { return Running; } public void NetworkLoop() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; while (Running) { TestMod.mls.LogInfo((object)"Attempting to connect to Crowd Control"); try { Socket = new Socket(Endpoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp); Socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, optionValue: true); if (Socket.BeginConnect(Endpoint, null, null).AsyncWaitHandle.WaitOne(10000, exitContext: true) && Socket.Connected) { ClientLoop(); } else { TestMod.mls.LogInfo((object)"Failed to connect to Crowd Control"); } Socket.Close(); } catch (Exception ex) { TestMod.mls.LogInfo((object)ex.GetType().Name); TestMod.mls.LogInfo((object)"Failed to connect to Crowd Control"); } Thread.Sleep(10000); } } public void RequestLoop() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; while (Running) { try { CrowdRequest crowdRequest = null; lock (Requests) { if (Requests.Count == 0) { continue; } crowdRequest = Requests.Dequeue(); goto IL_0060; } IL_0060: string reqCode = crowdRequest.GetReqCode(); try { CrowdResponse crowdResponse = (isReady(reqCode) ? Delegate[reqCode](this, crowdRequest) : new CrowdResponse(crowdRequest.GetReqID(), CrowdResponse.Status.STATUS_RETRY)); if (crowdResponse == null) { new CrowdResponse(crowdRequest.GetReqID(), CrowdResponse.Status.STATUS_FAILURE, "Request error for '" + reqCode + "'").Send(Socket); } crowdResponse.Send(Socket); } catch (KeyNotFoundException) { new CrowdResponse(crowdRequest.GetReqID(), CrowdResponse.Status.STATUS_FAILURE, "Request error for '" + reqCode + "'").Send(Socket); } } catch (Exception) { TestMod.mls.LogInfo((object)"Disconnected from Crowd Control"); Socket.Close(); } } } public void Stop() { Running = false; } } public delegate CrowdResponse CrowdDelegate(ControlClient client, CrowdRequest req); public class CrowdDelegates { public static CrowdResponse Example(ControlClient client, CrowdRequest req) { CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } try { Dictionary<string, ScriptableItem> dictionary = (Dictionary<string, ScriptableItem>)getProperty(GameManager._current, "_cachedScriptableItems"); Dictionary<string, ScriptableCreep> dictionary2 = (Dictionary<string, ScriptableCreep>)getProperty(GameManager._current, "_cachedScriptableCreeps"); foreach (KeyValuePair<string, ScriptableCreep> item in dictionary2) { TestMod.mls.LogError((object)item.Key); } } catch (Exception ex) { status = CrowdResponse.Status.STATUS_RETRY; TestMod.mls.LogInfo((object)("Crowd Control Error: " + ex.ToString())); } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Spawn(ControlClient client, CrowdRequest req) { CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; TestMod.ActionQueue.Enqueue(delegate { //IL_0129: 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_014b: 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_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0179: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } string[] array = req.code.Split(new char[1] { '_' }); string text = array[1]; text = text.Replace('-', ' '); TestMod.mls.LogInfo((object)("spawning: " + text)); ScriptableCreep val = GameManager._current.Locate_Creep(text); TestMod.mls.LogInfo((object)$"scriptcreep: {val}"); GameObject val2 = Object.Instantiate<GameObject>(AtlyssNetworkManager._current._networkObjectLibrary._creepObject); TestMod.mls.LogInfo((object)$"gameobject: {val2}"); RaycastPathFinder component = val2.GetComponent<RaycastPathFinder>(); Creep component2 = val2.GetComponent<Creep>(); TestMod.mls.LogInfo((object)$"creep: {component2}"); component2.Network_currentCreepCondition = (CreepCondition)2; component2._scriptCreep = val; component2.Network_creepNameID = val._creepName; component2._suppressWandererBehavior = false; component2._parentCreepSpawner = TestMod.spawner; component2._setRespawnBuffer = 0f; component.marginCollision = 2.85f; TestMod.mls.LogInfo((object)$"scene: {TestMod.scene}"); SceneManager.MoveGameObjectToScene(val2, TestMod.scene); PhysicsScene physicsScene = PhysicsSceneExtensions.GetPhysicsScene(TestMod.scene); TestMod.mls.LogInfo((object)$"physicsScene: {physicsScene}"); Vector3 val3 = ((Component)mainPlayer).transform.position + ((Component)mainPlayer).transform.forward * 5f; RaycastHit val4 = default(RaycastHit); if (((PhysicsScene)(ref physicsScene)).Raycast(val3 + Vector3.up * 5f, Vector3.down, ref val4, float.PositiveInfinity, LayerMask.GetMask(new string[1] { "Ground" }), (QueryTriggerInteraction)0)) { val2.transform.position = ((RaycastHit)(ref val4)).point + Vector3.up * 5f; val3 = val2.transform.position; } else { val2.transform.position = val3 + Vector3.up * 5f; val3 = val2.transform.position; } NetworkServer.Spawn(val2, (NetworkConnection)null); TestMod.mls.LogInfo((object)"spawn called"); component2.BaseCreep_OnSpawn(); component2._suppressWandererBehavior = false; TestMod.spawner._spawnedCreeps.Remove(component2); ((Component)component2).transform.SetPositionAndRotation(val3, ((Component)component2).transform.rotation); val2.transform.position = val3; TestMod.creeps.Add(component2); } catch (Exception ex) { TestMod.mls.LogInfo((object)("Crowd Control Error: " + ex.ToString())); } }); return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Heal25(ControlClient client, CrowdRequest req) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Invalid comparison between Unknown and I4 //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.INVUL)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } if (TimedThread.isRunning(TimedType.OHKO)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } int maxHealth = mainPlayer._pStats.Network_statStruct._maxHealth; int network_currentHealth = val.Network_currentHealth; if (network_currentHealth >= maxHealth) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_FAILURE, "Player already has full health."); } int val2 = maxHealth * 25 / 100; int num = Math.Min(val2, maxHealth - network_currentHealth); val.Add_Health(num); mainPlayer._pVisual.Flash_PlayerRecieveHealth(); ChatBehaviour val3 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val3.Target_GameLogicMessage(req.GetReqViewer() + " healed you"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Heal100(ControlClient client, CrowdRequest req) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Invalid comparison between Unknown and I4 //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.INVUL)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } if (TimedThread.isRunning(TimedType.OHKO)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } int maxHealth = mainPlayer._pStats.Network_statStruct._maxHealth; int network_currentHealth = val.Network_currentHealth; if (network_currentHealth >= mainPlayer._pStats.Network_statStruct._maxHealth) { throw new Exception(); } val.Add_Health(maxHealth); mainPlayer._pVisual.Flash_PlayerRecieveHealth(); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " healed you"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Damage25(ControlClient client, CrowdRequest req) { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Invalid comparison between Unknown and I4 //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; if (TimedThread.isRunning(TimedType.INVUL)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } if (TimedThread.isRunning(TimedType.OHKO)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } try { if (TimedThread.isRunning(TimedType.INVUL)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } int num = mainPlayer._pStats.Network_statStruct._maxHealth * 25 / 100; int network_currentHealth = val.Network_currentHealth; if (network_currentHealth <= num) { throw new Exception(); } val.Subtract_Health(num); callFunc(mainPlayer._pVisual, "Flash_PlayerLowHealth", null); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " damaged you"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse OneHP(ControlClient client, CrowdRequest req) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Invalid comparison between Unknown and I4 //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.INVUL)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } if (TimedThread.isRunning(TimedType.OHKO)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } int num = val.Network_currentHealth - 1; int network_currentHealth = val.Network_currentHealth; if (network_currentHealth <= 1) { throw new Exception(); } val.Subtract_Health(num); callFunc(mainPlayer._pVisual, "Flash_PlayerLowHealth", null); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " damaged you"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Kill(ControlClient client, CrowdRequest req) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Invalid comparison between Unknown and I4 //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; if (TimedThread.isRunning(TimedType.INVUL)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } val.Network_currentHealth = 0; mainPlayer.Player_OnDeath(); mainPlayer.Network_currentPlayerCondition = (PlayerCondition)3; ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " healed you"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Revive(ControlClient client, CrowdRequest req) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Invalid comparison between Unknown and I4 //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.INVUL)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } if (TimedThread.isRunning(TimedType.OHKO)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } val.Cmd_RevivePlayer(val); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " revived you"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Mana25(ControlClient client, CrowdRequest req) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Invalid comparison between Unknown and I4 //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.INFMANA)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } if (TimedThread.isRunning(TimedType.NOMANA)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } int maxMana = mainPlayer._pStats.Network_statStruct._maxMana; int network_currentMana = val.Network_currentMana; int num = maxMana * 25 / 100; if (network_currentMana >= maxMana) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_FAILURE, "Mana already full."); } val._currentMana = network_currentMana + num; if (val._currentMana > maxMana) { val._currentMana = maxMana; } ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " restored your mana"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Mana100(ControlClient client, CrowdRequest req) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Invalid comparison between Unknown and I4 //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.INFMANA)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } if (TimedThread.isRunning(TimedType.NOMANA)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } int maxMana = mainPlayer._pStats.Network_statStruct._maxMana; int network_currentMana = val.Network_currentMana; if (network_currentMana >= mainPlayer._pStats.Network_statStruct._maxMana) { throw new Exception(); } val._currentMana = maxMana; ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " restored your mana"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Drain25(ControlClient client, CrowdRequest req) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.INFMANA)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } int network_currentMana = val.Network_currentMana; int num = network_currentMana * 25 / 100; if (network_currentMana <= num) { throw new Exception(); } val._currentMana = network_currentMana - num; ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " drained your mana"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Drain100(ControlClient client, CrowdRequest req) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_009d: 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_00ef: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.INFMANA)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } StatusEntity val = (StatusEntity)getProperty(mainPlayer._pStats, "_playerStatus"); if ((Object)(object)val == (Object)null) { throw new Exception(); } int maxMana = mainPlayer._pStats.Network_statStruct._maxMana; int currentMana = val._currentMana; if (currentMana < 1) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_FAILURE, "Player has no Mana."); } val._currentMana = 0; ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " drained your mana"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Money100(ControlClient client, CrowdRequest req) { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } int num = 100; int network_heldCurrency = mainPlayer._pInventory.Network_heldCurrency; if (network_heldCurrency + num < 0) { throw new Exception(); } if (network_heldCurrency + num > GameManager._current._statLogics._maxCurrency) { throw new Exception(); } mainPlayer._pInventory.Cmd_AddCurrency(num); ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " gave you money"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Money1000(ControlClient client, CrowdRequest req) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } int num = 1000; int network_heldCurrency = mainPlayer._pInventory.Network_heldCurrency; if (network_heldCurrency + num < 0) { throw new Exception(); } if (network_heldCurrency + num > GameManager._current._statLogics._maxCurrency) { throw new Exception(); } mainPlayer._pInventory.Cmd_AddCurrency(num); ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " gave you money"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse TMoney100(ControlClient client, CrowdRequest req) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } int num = -100; int network_heldCurrency = mainPlayer._pInventory.Network_heldCurrency; if (network_heldCurrency + num < 0) { throw new Exception(); } if (network_heldCurrency + num > GameManager._current._statLogics._maxCurrency) { throw new Exception(); } mainPlayer._pInventory.Cmd_SubtractCurrency(-num); ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " took your money"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse TMoney1000(ControlClient client, CrowdRequest req) { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } int num = -1000; int network_heldCurrency = mainPlayer._pInventory.Network_heldCurrency; if (network_heldCurrency + num < 0) { throw new Exception(); } if (network_heldCurrency + num > GameManager._current._statLogics._maxCurrency) { throw new Exception(); } mainPlayer._pInventory.Cmd_SubtractCurrency(-num); ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " took your money"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse StrUp(ControlClient client, CrowdRequest req) { //IL_0037: 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_0086: 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_00b9: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer._pStats._syncAttributes.Count; i++) { if (mainPlayer._pStats._syncAttributes[i]._attributeName.ToLower() == "strength") { if (mainPlayer._pStats._syncAttributes[i]._attributeValue >= 99) { throw new Exception(); } AttributeStruct val = new AttributeStruct { _attributeName = mainPlayer._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer._pStats._syncAttributes[i]._attributeValue + 1 }; mainPlayer._pStats._syncAttributes[i] = val; mainPlayer._pStats.Apply_StatCalculations(); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " increased your strength"); } } } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse MindUp(ControlClient client, CrowdRequest req) { //IL_0037: 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_0086: 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_00b9: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer._pStats._syncAttributes.Count; i++) { if (mainPlayer._pStats._syncAttributes[i]._attributeName.ToLower() == "mind") { if (mainPlayer._pStats._syncAttributes[i]._attributeValue >= 99) { throw new Exception(); } AttributeStruct val = new AttributeStruct { _attributeName = mainPlayer._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer._pStats._syncAttributes[i]._attributeValue + 1 }; mainPlayer._pStats._syncAttributes[i] = val; mainPlayer._pStats.Apply_StatCalculations(); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " increased your mind"); } } } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse VitUp(ControlClient client, CrowdRequest req) { //IL_0037: 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_0086: 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_00b9: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer._pStats._syncAttributes.Count; i++) { if (mainPlayer._pStats._syncAttributes[i]._attributeName.ToLower() == "vitality") { if (mainPlayer._pStats._syncAttributes[i]._attributeValue >= 99) { throw new Exception(); } AttributeStruct val = new AttributeStruct { _attributeName = mainPlayer._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer._pStats._syncAttributes[i]._attributeValue + 1 }; mainPlayer._pStats._syncAttributes[i] = val; mainPlayer._pStats.Apply_StatCalculations(); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " increased your vitality"); } } } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse DexUp(ControlClient client, CrowdRequest req) { //IL_0037: 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_0086: 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_00b9: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer._pStats._syncAttributes.Count; i++) { if (mainPlayer._pStats._syncAttributes[i]._attributeName.ToLower() == "dexterity") { if (mainPlayer._pStats._syncAttributes[i]._attributeValue >= 99) { throw new Exception(); } AttributeStruct val = new AttributeStruct { _attributeName = mainPlayer._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer._pStats._syncAttributes[i]._attributeValue + 1 }; mainPlayer._pStats._syncAttributes[i] = val; mainPlayer._pStats.Apply_StatCalculations(); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " increased your dexterity"); } } } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse StrDown(ControlClient client, CrowdRequest req) { //IL_0037: 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_0082: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_0120: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer._pStats._syncAttributes.Count; i++) { if (mainPlayer._pStats._syncAttributes[i]._attributeName.ToLower() == "strength") { if (mainPlayer._pStats._syncAttributes[i]._attributeValue < 1) { throw new Exception(); } AttributeStruct val = new AttributeStruct { _attributeName = mainPlayer._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer._pStats._syncAttributes[i]._attributeValue - 1 }; mainPlayer._pStats._syncAttributes[i] = val; mainPlayer._pStats.Apply_StatCalculations(); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " decreased your strength"); } } } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse MindDown(ControlClient client, CrowdRequest req) { //IL_0037: 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_0082: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_0120: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer._pStats._syncAttributes.Count; i++) { if (mainPlayer._pStats._syncAttributes[i]._attributeName.ToLower() == "mind") { if (mainPlayer._pStats._syncAttributes[i]._attributeValue < 1) { throw new Exception(); } AttributeStruct val = new AttributeStruct { _attributeName = mainPlayer._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer._pStats._syncAttributes[i]._attributeValue - 1 }; mainPlayer._pStats._syncAttributes[i] = val; mainPlayer._pStats.Apply_StatCalculations(); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " decreased your mind"); } } } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse VitDown(ControlClient client, CrowdRequest req) { //IL_0037: 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_0082: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_0120: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer._pStats._syncAttributes.Count; i++) { if (mainPlayer._pStats._syncAttributes[i]._attributeName.ToLower() == "vitality") { if (mainPlayer._pStats._syncAttributes[i]._attributeValue < 1) { throw new Exception(); } AttributeStruct val = new AttributeStruct { _attributeName = mainPlayer._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer._pStats._syncAttributes[i]._attributeValue - 1 }; mainPlayer._pStats._syncAttributes[i] = val; mainPlayer._pStats.Apply_StatCalculations(); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " decreased your vitality"); } } } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse DexDown(ControlClient client, CrowdRequest req) { //IL_0037: 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_0082: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_0120: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } for (int i = 0; i < mainPlayer._pStats._syncAttributes.Count; i++) { if (mainPlayer._pStats._syncAttributes[i]._attributeName.ToLower() == "dexterity") { if (mainPlayer._pStats._syncAttributes[i]._attributeValue < 1) { throw new Exception(); } AttributeStruct val = new AttributeStruct { _attributeName = mainPlayer._pStats._syncAttributes[i]._attributeName, _attributeID = mainPlayer._pStats._syncAttributes[i]._attributeID, _attributeValue = mainPlayer._pStats._syncAttributes[i]._attributeValue - 1 }; mainPlayer._pStats._syncAttributes[i] = val; mainPlayer._pStats.Apply_StatCalculations(); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " decreased your dexterity"); } } } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Morning(ControlClient client, CrowdRequest req) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if (GameWorldManager._current._timeDisplay == 6 && (int)GameWorldManager._current._clockSetting == 0) { throw new Exception(); } GameWorldManager._current._worldTime = (WorldTime)0; GameWorldManager._current._timeDisplay = 6; GameWorldManager._current._clockSetting = (ClockSetting)0; ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " changed the time"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Noon(ControlClient client, CrowdRequest req) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Invalid comparison between Unknown and I4 //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_0085: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if (GameWorldManager._current._timeDisplay == 12 && (int)GameWorldManager._current._clockSetting == 1) { throw new Exception(); } GameWorldManager._current._worldTime = (WorldTime)0; GameWorldManager._current._timeDisplay = 12; GameWorldManager._current._clockSetting = (ClockSetting)1; ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " changed the time"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Evening(ControlClient client, CrowdRequest req) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if (GameWorldManager._current._timeDisplay == 6 && (int)GameWorldManager._current._clockSetting == 1) { throw new Exception(); } GameWorldManager._current._worldTime = (WorldTime)1; GameWorldManager._current._timeDisplay = 6; GameWorldManager._current._clockSetting = (ClockSetting)1; ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " changed the time"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse Midnight(ControlClient client, CrowdRequest req) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Invalid comparison between Unknown and I4 //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_0085: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if (GameWorldManager._current._timeDisplay == 12 && (int)GameWorldManager._current._clockSetting == 0) { throw new Exception(); } GameWorldManager._current._worldTime = (WorldTime)1; GameWorldManager._current._timeDisplay = 12; GameWorldManager._current._clockSetting = (ClockSetting)0; ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " changed the time"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse ResetCooldowns(ControlClient client, CrowdRequest req) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.NOCOOL)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } bool flag = false; Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } foreach (SkillCooldownSlot skillCoolDownSlot in mainPlayer._pCasting._skillCoolDownSlots) { if (skillCoolDownSlot._currentCooldown > 0f) { flag = true; } skillCoolDownSlot._currentCooldown = 0f; } if (!flag) { throw new Exception(); } ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " reset your cooldowns"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse IncreaseCooldowns(ControlClient client, CrowdRequest req) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Invalid comparison between Unknown and I4 //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { if (TimedThread.isRunning(TimedType.NOCOOL)) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if ((int)mainPlayer._playerZoneType == 0) { return new CrowdResponse(req.GetReqID(), CrowdResponse.Status.STATUS_RETRY); } foreach (SkillCooldownSlot skillCoolDownSlot in mainPlayer._pCasting._skillCoolDownSlots) { skillCoolDownSlot._currentCooldown += 10f; } ChatBehaviour val = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val.Target_GameLogicMessage(req.GetReqViewer() + " increased your cooldowns"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse UnequipHelm(ControlClient client, CrowdRequest req) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if (!mainPlayer._pEquipment._equips.ContainsKey("Helm")) { throw new Exception(); } EquipData val = mainPlayer._pEquipment._equips["Helm"]; if (val == null || val._heldItem == null) { throw new Exception(); } mainPlayer._pEquipment.Init_UnEquipItem(val._heldItem); ChatBehaviour val2 = (ChatBehaviour)getProperty(mainPlayer._pInventory, "_chatBehaviour"); val2.Target_GameLogicMessage(req.GetReqViewer() + " unequipped your helmet"); } catch (Exception) { status = CrowdResponse.Status.STATUS_RETRY; } return new CrowdResponse(req.GetReqID(), status, message); } public static CrowdResponse UnequipChest(ControlClient client, CrowdRequest req) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown CrowdResponse.Status status = CrowdResponse.Status.STATUS_SUCCESS; string message = ""; try { Player mainPlayer = Player._mainPlayer; if ((Object)(object)mainPlayer == (Object)null) { throw new Exception(); } if (!mainPlayer._pEquipment._equips.ContainsKey("Chest")) { throw new Exception(); } EquipData val = mainPlayer._pEquipment._equips["Chest"]; if (val == null || val._heldItem == null) { throw new Exception(); } mainPlayer._pEquipment.Init_UnEquipItem(va