Advertisement
Guest User

Untitled

a guest
May 25th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.14 KB | None | 0 0
  1. private void AutoAttackCallback(GameState client, int time)
  2. {
  3. if (!Valid(client)) return;
  4. Time32 Now = new Time32(time);
  5. if (client.Player.AttackPacket != null || client.Player.VortexAttackStamp != null)
  6. {
  7. try
  8. {
  9. if (client.Player.ContainsFlag((ulong)MsgUpdate.Flags.ShurikenVortex))
  10. {
  11. if (client.Player.VortexPacket != null && client.Player.VortexPacket.ToArray() != null)
  12. {
  13. if (Now > client.Player.VortexAttackStamp.AddMilliseconds(1400))
  14. {
  15. client.Player.VortexAttackStamp = Now;
  16. new Game.Attacking.Handle(client.Player.VortexPacket, client.Player, null);
  17. }
  18. }
  19. }
  20. else
  21. {
  22. client.Player.VortexPacket = null;
  23. var AttackPacket = client.Player.AttackPacket;
  24. if (AttackPacket != null && AttackPacket.ToArray() != null)
  25. {
  26. uint AttackType = AttackPacket.InteractType;
  27. if (AttackType == Attack.Magic || AttackType == Attack.Melee || AttackType == Attack.Ranged)
  28. {
  29. if (AttackType == Attack.Magic)
  30. {
  31. if (Now > client.Player.AttackStamp.AddSeconds(2))
  32. {
  33. if (AttackPacket.Damage != 12160 &&
  34. AttackPacket.Damage != 12170 &&
  35. AttackPacket.Damage != 12120 &&
  36. AttackPacket.Damage != 12130 &&
  37. AttackPacket.Damage != 12140 &&
  38. AttackPacket.Damage != 12320 &&
  39. AttackPacket.Damage != 12330 &&
  40. AttackPacket.Damage != 12340 &&
  41. AttackPacket.Damage != 12210 &&
  42. AttackPacket.Damage != 12690)
  43. new Game.Attacking.Handle(AttackPacket, client.Player, null);
  44. }
  45. #region Tiempo Skill - PEZZI TOMAS - ANTI MAGICTYPE!
  46. else if (Now > client.Player.AttackStamp.AddSeconds(7))
  47. {
  48. if (AttackPacket.Damage != 11070/*GaleBomb*/)
  49. new Game.Attacking.Handle(AttackPacket, client.Player, null);
  50. }
  51. #endregion
  52. }
  53. else
  54. {
  55. int decrease = -300;
  56. if (client.Player.OnCyclone())
  57. decrease = 700;
  58. if (client.Player.OnSuperman())
  59. decrease = 200;
  60. if (Now > client.Player.AttackStamp.AddMilliseconds((2000 - client.Player.Agility - decrease) * (int)(AttackType == Attack.Ranged ? 1 : 1)))
  61. {
  62. new Game.Attacking.Handle(AttackPacket, client.Player, null);
  63. }
  64. }
  65. }
  66. }
  67. }
  68. }
  69. catch (Exception)
  70. {
  71. client.Player.AttackPacket = null;
  72. client.Player.VortexPacket = null;
  73. }
  74. }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement