public void ExecCom(int CommNum) { //switch case to exectute command UInt32 BondPos = GetPly(); switch (CommNum) { case (0): { DispText("Stripping ammo*"); for (int i = 0; i < 116; i += 4) { vam.WriteInt32((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x1130 + i), 0); } break; } case (1): { DispText("Giving ammo*"); for (int i = 0; i < 116; i += 4) { vam.WriteInt32((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x1130 + i), 5000); } break; } case (2): { DispText("Making the view terrible...*"); vam.WriteInt32((IntPtr)(NearFog - 0x80000000 + EmuOffset), 0xE3); vam.WriteInt32((IntPtr)(FarFog - 0x80000000 + EmuOffset), 0x3E8); break; } case (3): { DispText("Camera locked*"); vam.WriteFloat((IntPtr)(PlyYCam - 0x80000000 + EmuOffset), 0f); break; } case (4): { /*DispText("Launching!*"); * float CurY = vam.ReadFloat((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0xB)); * vam.WriteFloat((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x000D2FD0 - 0x000D2FFC +0x9C), CurY + 500f);*/ //breaks in facility DispText("Making the guards stronger!*"); int AmmGuards = vam.ReadInt32((IntPtr)(0x8002CC68 - 0x80000000 + EmuOffset)); UInt32 GuardOffset = vam.ReadUInt32((IntPtr)(0x8002CC64 - 0x80000000 + EmuOffset)); for (int i = 0; i < AmmGuards; i++) { float OrigHealth = vam.ReadFloat((IntPtr)(GuardOffset - 0x80000000 + EmuOffset + 0x1DC * i)); vam.WriteFloat((IntPtr)(GuardOffset - 0x80000000 + EmuOffset + 0x1DC * i + 0x100), OrigHealth * 2); } break; } case (5): { DispText("Shrinking!*"); vam.WriteFloat((IntPtr)(PlyHeight - 0x80000000 + EmuOffset), 0.02f); break; } case (6): { DispText("Stealing!*"); float OldHealth = vam.ReadFloat((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x000D303C - 0x000D2FFC + 0x9C)); vam.WriteFloat((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x000D303C - 0x000D2FFC + 0x9C), OldHealth / 2); vam.WriteInt32((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x2A00), 00); vam.WriteInt32((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x2A00), 0x3C * 5); break; } case (7): { DispText("Baboom!*"); vam.WriteBoolean((IntPtr)(Explosions - 0x80000000 + EmuOffset), true); break; } case (8): { DispText("Wonkenizing!*"); vam.WriteInt32((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x000D4124 - 0x000D2FFC + 0x9C), 0x800000); break; } case (9): { DispText("Healing!*"); vam.WriteFloat((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x000D303C - 0x000D2FFC + 0x9C), 1); vam.WriteInt32((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x2A00), 00); vam.WriteInt32((IntPtr)(BondPos - 0x80000000 + EmuOffset + 0x2A00), 0x3C * 5); break; } case (10): { DispText("Speeding up!*"); vam.WriteFloat((IntPtr)(PlyYCam - 0x80000000 + EmuOffset), 1f); break; } } }