Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void AutoAttackCallback(GameState client, int time)
- {
- if (!Valid(client)) return;
- Time32 Now = new Time32(time);
- if (client.Player.AttackPacket != null || client.Player.VortexAttackStamp != null)
- {
- try
- {
- if (client.Player.ContainsFlag((ulong)MsgUpdate.Flags.ShurikenVortex))
- {
- if (client.Player.VortexPacket != null && client.Player.VortexPacket.ToArray() != null)
- {
- if (Now > client.Player.VortexAttackStamp.AddMilliseconds(1400))
- {
- client.Player.VortexAttackStamp = Now;
- new Game.Attacking.Handle(client.Player.VortexPacket, client.Player, null);
- }
- }
- }
- else
- {
- client.Player.VortexPacket = null;
- var AttackPacket = client.Player.AttackPacket;
- if (AttackPacket != null && AttackPacket.ToArray() != null)
- {
- uint AttackType = AttackPacket.InteractType;
- if (AttackType == Attack.Magic || AttackType == Attack.Melee || AttackType == Attack.Ranged)
- {
- if (AttackType == Attack.Magic)
- {
- if (Now > client.Player.AttackStamp.AddSeconds(2))
- {
- if (AttackPacket.Damage != 12160 &&
- AttackPacket.Damage != 12170 &&
- AttackPacket.Damage != 12120 &&
- AttackPacket.Damage != 12130 &&
- AttackPacket.Damage != 12140 &&
- AttackPacket.Damage != 12320 &&
- AttackPacket.Damage != 12330 &&
- AttackPacket.Damage != 12340 &&
- AttackPacket.Damage != 12210 &&
- AttackPacket.Damage != 12690)
- new Game.Attacking.Handle(AttackPacket, client.Player, null);
- }
- #region Tiempo Skill - PEZZI TOMAS - ANTI MAGICTYPE!
- else if (Now > client.Player.AttackStamp.AddSeconds(7))
- {
- if (AttackPacket.Damage != 11070/*GaleBomb*/)
- new Game.Attacking.Handle(AttackPacket, client.Player, null);
- }
- #endregion
- }
- else
- {
- int decrease = -300;
- if (client.Player.OnCyclone())
- decrease = 700;
- if (client.Player.OnSuperman())
- decrease = 200;
- if (Now > client.Player.AttackStamp.AddMilliseconds((2000 - client.Player.Agility - decrease) * (int)(AttackType == Attack.Ranged ? 1 : 1)))
- {
- new Game.Attacking.Handle(AttackPacket, client.Player, null);
- }
- }
- }
- }
- }
- }
- catch (Exception)
- {
- client.Player.AttackPacket = null;
- client.Player.VortexPacket = null;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement