public static void Cast(int client, Ninjitsu ninjitsu) { switch (ninjitsu) { case Ninjitsu.Focus_Attack: Event(client, 15, 0xF5); break; case Ninjitsu.Death_Strike: Event(client, 15, 0xF6); break; case Ninjitsu.Animal_Form: Event(client, 15, 0xF7); break; case Ninjitsu.Ki_Attack: Event(client, 15, 0xF8); break; case Ninjitsu.Surprise_Attack: Event(client, 15, 0xF9); break; case Ninjitsu.Backstab: Event(client, 15, 0xFA); break; case Ninjitsu.Shadowjump: Event(client, 15, 0xFB); break; case Ninjitsu.Mirror_Image: Event(client, 15, 0xFC); break; } }
/// <summary> /// Cast Ninjitsu spell with a spellbook. /// </summary> /// <param name="client">Target client.</param> /// <param name="ninjitsu">Spell to cast.</param> public static void Cast(int client, Ninjitsu ninjitsu) { byte[] myBaseSECastPacket = new byte[] { 0xBF, 0x00, 0x09, 0x00, 0x1C, 0x00, 0x02, 0x01, 0x00 }; switch (ninjitsu) { case Ninjitsu.Focus_Attack: myBaseSECastPacket[8] = 0xF5; break; case Ninjitsu.Death_Strike: myBaseSECastPacket[8] = 0xF6; break; case Ninjitsu.Animal_Form: myBaseSECastPacket[8] = 0xF7; break; case Ninjitsu.Ki_Attack: myBaseSECastPacket[8] = 0xF8; break; case Ninjitsu.Surprise_Attack: myBaseSECastPacket[8] = 0xF9; break; case Ninjitsu.Backstab: myBaseSECastPacket[8] = 0xFA; break; case Ninjitsu.Shadowjump: myBaseSECastPacket[8] = 0xFB; break; case Ninjitsu.Mirror_Image: myBaseSECastPacket[8] = 0xFC; break; default: return; } SendPacketToServer(client, myBaseSECastPacket); }