public static void SkillAdd(Packet packet) { byte result = packet.ReadUInt8(); if (result == 0x01) { byte type = packet.ReadUInt8(); if (type == 0x00) { //Buff Add! } else if (type == 0x02) { if (packet.ReadUInt8() == 0x30) { uint skill_id = packet.ReadUInt32(); uint attacker_id = packet.ReadUInt32(); if (attacker_id == Character.UniqueID) { //Skill casted ! packet.ReadUInt32(); packet.ReadUInt32(); Checker(skill_id); if (Data.bot) { if (Training.monster_selected) { Movement.stuck_count = 0; } } } else { packet.ReadUInt32(); uint obj_id = packet.ReadUInt32(); if ((obj_id == Character.UniqueID) || (obj_id == Data.char_attackpetid && Globals.MainWindow.Checked(Globals.MainWindow.protectpet) == true)) { if (Data.bot && !Data.loop) { if (Training.monster_selected == false && Buffas.buff_waiting == false) { foreach (Monster monster in Monster.SpawnMob) { if (monster.UniqueID == attacker_id) { if (Walking.running == true) { Walking.running = false; } Packet NewPacket = new Packet((ushort)WorldServerOpcodes.CLIENT_OPCODES.CLIENT_OBJECTSELECT); NewPacket.WriteUInt32(attacker_id); Proxy.ag_remote_security.Send(NewPacket); Training.monster_id = attacker_id; Training.monster_selected = true; Training.monster_type = monster.MobType; Training.monster_type_string = monster.MobTypename; Training.monster_name = monster.AdvanceName; Training.distance = monster.Distance; break; } } } else { if (attacker_id != Training.monster_id) { foreach (Monster monster in Monster.SpawnMob) { if ((monster.UniqueID == attacker_id) && (monster.Priority < 9)) { monster.Status = 0; monster.Priority = 9; break; } } } } } } } } } } else if (result == 0x02) { byte type = packet.ReadUInt8(); switch (type) { case 16: if (Training.monster_selected && Training.monster_id != 0) { Stuck.AddMob(Training.monster_id, 10); Training.monster_selected = false; Training.monster_id = 0; LogicControl.Manager(); } break; case 5: //LogicControl.Manager(); //Skill errors break; case 6: //LogicControl.Manager(); //Skill errors break; } } }