public static void OnHotkey(int hotkeyID) { HotkeyID hotkey = (HotkeyID)hotkeyID; if (hotkey == HotkeyID.teleport_to_town) { CwRam.SetMode(Mode.teleport_to_city, 0); return; } bool spec = players[guid].specialization == 1; bool space = hotkeyID == 1; switch ((EntityClass)players[guid].entityClass) { case EntityClass.Rogue when spec: #region ninja if (hotkey == HotkeyID.ctrlSpace) { #region dash CwRam.SetMode(Mode.spin_run, 0); #endregion break; } #region blink if (players.ContainsKey(lastTarget)) { CwRam.Teleport(players[guid].position); } #endregion break; #endregion case EntityClass.Rogue: #region assassin if (hotkey == HotkeyID.ctrlSpace) { #region confusion var specialMove = new SpecialMove() { Guid = guid, Id = SpecialMoveID.confusion, }; SendUDP(specialMove.data); #endregion } else { #region shadow step var specialMove = new SpecialMove() { Guid = guid, Id = SpecialMoveID.shadowStep, }; SendUDP(specialMove.data); #endregion } break; #endregion case EntityClass.Warrior when spec: #region guardian if (hotkey == HotkeyID.ctrlSpace) { #region taunt var specialMove = new SpecialMove() { Guid = lastTarget, Id = SpecialMoveID.taunt, }; SendUDP(specialMove.data); #endregion } else { #region steel wall CwRam.SetMode(Mode.boss_skill_block, 0); #endregion } break; #endregion case EntityClass.Warrior: #region berserk if (hotkey == HotkeyID.ctrlSpace) { #region boulder toss CwRam.SetMode(Mode.boulder_toss, 0); #endregion } else { #region earth shatter CwRam.SetMode(Mode.earth_shatter, 0); #endregion } break; #endregion case EntityClass.Mage when spec: #region watermage if (hotkey == HotkeyID.ctrlSpace) { #region splash CwRam.SetMode(Mode.splash, 0); #endregion } else { #region ice wave //TODO #endregion } break; #endregion case EntityClass.Mage: #region firemage if (hotkey == HotkeyID.ctrlSpace) { #region lava CwRam.SetMode(Mode.lava, 0); #endregion } else { #region beam CwRam.SetMode(Mode.fireray, 0); #endregion } break; #endregion case EntityClass.Ranger when spec: #region scout if (hotkey == HotkeyID.ctrlSpace) { #region shrapnel //TODO #endregion } else { #region smoke bomb var specialMove = new SpecialMove() { Guid = guid, Id = SpecialMoveID.smokeBomb, }; SendUDP(specialMove.data); var fakeSmoke = new ServerUpdate(); fakeSmoke.particles.Add(new ServerUpdate.Particle() { count = 1000, spread = 5f, type = ParticleType.noGravity, size = 0.3f, velocity = new Resources.Utilities.FloatVector(), color = new Resources.Utilities.FloatVector() { x = 1f, y = 1f, z = 1f }, alpha = 1f, position = players[specialMove.Guid].position }); fakeSmoke.Write(cwriter); #endregion } break; #endregion case EntityClass.Ranger: #region sniper if (hotkey == HotkeyID.ctrlSpace) { #region cursed arrow //TODO #endregion } else { #region arrow rain //TODO #endregion } break; #endregion default: break; } CwRam.memory.WriteInt(CwRam.EntityStart + 0x1164, 3);//mana cubes }
public static void OnHotkey(HotkeyID hotkey) { if (CwRam.AnyInterfaceOpen) { return; } if (hotkey == HotkeyID.TeleportToTown) { CwRam.SetMode(Mode.Teleport_To_City, 0); return; } var notification = new ChatMessage() { sender = 0, }; bool spec = dynamicEntities[guid].specialization == 1; switch (dynamicEntities[guid].entityClass) { case EntityClass.Rogue when spec: #region ninja if (hotkey == HotkeyID.CtrlSpace) { #region dash notification.message = "using [dash]"; CwRam.SetMode(Mode.Spin_Run, 0); #endregion } else { #region blink notification.message = "using [blink]"; if (dynamicEntities.ContainsKey(lastTarget)) { CwRam.Teleport(dynamicEntities[lastTarget].position); } #endregion } break; #endregion case EntityClass.Rogue: #region assassin if (hotkey == HotkeyID.CtrlSpace) { #region confusion notification.message = "TODO: [confusion]"; var specialMove = new SpecialMove() { Guid = guid, Id = SpecialMoveID.Confusion, }; SendUDP(specialMove.data); #endregion } else { #region shadow step notification.message = "TOD: [shadow step]"; var specialMove = new SpecialMove() { Guid = guid, Id = SpecialMoveID.ShadowStep, }; SendUDP(specialMove.data); #endregion } break; #endregion case EntityClass.Warrior when spec: #region guardian if (hotkey == HotkeyID.CtrlSpace) { #region taunt notification.message = "using [taunt]"; var specialMove = new SpecialMove() { Guid = lastTarget, Id = SpecialMoveID.Taunt, }; SendUDP(specialMove.data); #endregion } else { #region steel wall notification.message = "using [steel wall]"; CwRam.SetMode(Mode.Boss_Skill_Block, 0); #endregion } break; #endregion case EntityClass.Warrior: #region berserk if (hotkey == HotkeyID.CtrlSpace) { #region boulder toss notification.message = "using [boulder toss]"; CwRam.SetMode(Mode.Boulder_Toss, 0); #endregion } else { #region earth shatter notification.message = "using [earth shatter]"; CwRam.SetMode(Mode.Earth_Shatter, 0); #endregion } break; #endregion case EntityClass.Mage when spec: #region watermage if (hotkey == HotkeyID.CtrlSpace) { #region splash notification.message = "using [splash]"; CwRam.SetMode(Mode.Splash, 0); #endregion } else { #region ice wave notification.message = "using [ice wave]"; var specialMove = new SpecialMove() { Guid = guid, Id = SpecialMoveID.IceWave, }; SendUDP(specialMove.data); #endregion } break; #endregion case EntityClass.Mage: #region firemage if (hotkey == HotkeyID.CtrlSpace) { #region lava notification.message = "using [lava]"; CwRam.SetMode(Mode.Lava, 0); #endregion } else { #region beam notification.message = "using [fire ray]"; CwRam.SetMode(Mode.FireRay, 0); #endregion } break; #endregion case EntityClass.Ranger when spec: #region scout if (hotkey == HotkeyID.CtrlSpace) { #region shrapnel notification.message = "using [shrapnel] bleeding test"; var specialMove = new SpecialMove() { Guid = guid, Id = SpecialMoveID.Shrapnel, }; SendUDP(specialMove.data); #endregion } else { #region smoke bomb notification.message = "using [smoke bomb]"; var specialMove = new SpecialMove() { Guid = guid, Id = SpecialMoveID.SmokeBomb, }; SendUDP(specialMove.data); var fakeSmoke = new ServerUpdate(); fakeSmoke.particles.Add(new ServerUpdate.Particle() { count = 1000, spread = 5f, type = ParticleType.NoGravity, size = 0.3f, velocity = new Resources.Utilities.FloatVector(), color = new Resources.Utilities.FloatVector() { x = 1f, y = 1f, z = 1f }, alpha = 1f, position = dynamicEntities[specialMove.Guid].position }); SendToClient(fakeSmoke); #endregion } break; #endregion case EntityClass.Ranger: #region sniper if (hotkey == HotkeyID.CtrlSpace) { #region cursed arrow //TODO notification.message = "TODO: [cursed arrow]"; #endregion } else { #region arrow rain //TODO notification.message = "TODO: [arrow rain]"; //const int rainSize = 7; //for (int x = 0; x < rainSize; x++) { // for (int y = 0; y < rainSize; y++) { // var projectile = new Projectile() { // Scale = 1f, // Type = ProjectileType.Arrow, // Source = guid, // Velocity = new FloatVector() { x = 0, y = 0, z = -1f }, // Position = new LongVector() { // x = 0x8020800000,//dynamicEntities[guid].position.x + (long)((dynamicEntities[guid].rayHit.x + x - rainSize / 2) * 0x10000), // y = 0x8020800000,//dynamicEntities[guid].position.y + (long)((dynamicEntities[guid].rayHit.y + y - rainSize / 2) * 0x10000), // z = 0x01000000,//dynamicEntities[guid].position.z + (long)((dynamicEntities[guid].rayHit.z + 10) * 0x10000), // } // }; // SendUDP(projectile.data); // ProcessDatagram(projectile.data); // } //} #endregion } break; #endregion } CwRam.memory.WriteInt(CwRam.EntityStart + 0x1164, 3);//mana cubes SendToClient(notification); }