Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- حصريا حل مشكلة تانى ايرور فى سورس المايسترو لما يزيد عدد اونلاين يظهر ايرور فى القونصول
- هتعمل بحث فى ملف الورلدوتبدله بى كود ده
- private void AutoAttackCallback(GameClient client, int time)
- {
- if (!Valid(client)) return;
- Time64 Now = new Time64(time);
- if (client.Entity.AttackPacket != null || client.Entity.VortexPacket != null)
- {
- try
- {
- if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.ShurikenVortex))
- {
- if (client.Entity.VortexPacket != null && client.Entity.VortexPacket.ToArray() != null)
- {
- if (Now > client.Entity.VortexAttackStamp.AddMilliseconds(1400))
- {
- client.Entity.VortexAttackStamp = Now;
- client.Entity.VortexPacket.AttackType = Attack.Magic;
- new Game.Attacking.Handle(client.Entity.VortexPacket, client.Entity, null);
- }
- }
- }
- else
- {
- var AttackPacket = client.Entity.AttackPacket;
- if (AttackPacket != null && AttackPacket.ToArray() != null)
- {
- uint AttackType = AttackPacket.AttackType;
- if (AttackType == Network.GamePackets.Attack.Magic || AttackType == Network.GamePackets.Attack.Melee || AttackType == Network.GamePackets.Attack.Ranged)
- {
- if (AttackType == Network.GamePackets.Attack.Magic)
- {
- if (Now > client.Entity.AttackStamp.AddSeconds(1))
- {
- 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 != 12570 &&
- AttackPacket.Damage != 12210)
- {
- new Game.Attacking.Handle(AttackPacket, client.Entity, null);
- }
- }
- }
- else
- {
- int decrease = -300;
- if (client.Entity.OnCyclone())
- decrease = 700;
- if (client.Entity.OnSuperman())
- decrease = 200;
- if (Now > client.Entity.AttackStamp.AddMilliseconds((1000 - client.Entity.Agility - decrease) * (int)(AttackType == Network.GamePackets.Attack.Ranged ? 1 : 1)))
- {
- new Game.Attacking.Handle(AttackPacket, client.Entity, null);
- }
- }
- }
- }
- }
- }
- catch (Exception e)
- {
- Program.SaveException(e);
- client.Entity.AttackPacket = null;
- client.Entity.VortexPacket = null;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement