عرض مشاركة واحدة
قديم 2020-03-30, 02:26 AM
المشاركة 8
Abod ayman
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكلة في اتاك الوحوش ارجوا الحل ضروري
بدل الي عندك ب ده

كود:
 private void autoattackcallback(gamestate clientint time)
        {
            if (!
valid(client)) return;
            
time32 now = new time32(time);
            
#region waniacdance
            
if (client.player.epicwarrior() && client.player.containsflag3(update.flags3.waniacdance))
            {
                var 
spell database.spelltable.getspell(12700client);
                
spelluse suse = new spelluse(true);
                
suse.attacker client.player.uid;
                
suse.spellid 12700;
                
suse.client.player.x;
                
suse.client.player.y;
                foreach (var 
obj in client.screen.objects)
                {
                    if (
obj == null) continue;
                    var 
attacked obj as entity;
                    if (
attacked == null) continue;
                    if (
kernel.getdistance(client.player.xclient.player.yattacked.xattacked.y) < 6)
                    {
                        if (
game.attacking.handle.canattack(client.playerattackednulltrue))
                        {
                            var 
attack = new attack(true);
                            
attack.attacker client.player.uid;
                            
attack.attacked attacked.uid;

                            
uint damage game.attacking.calculate.melee(client.playerattackedspellref attack);
                            
attack.damage damage;
                            
attack.spellid 12700;
                            
suse.effect1 attack.effect1;

                            
game.attacking.handle.receiveattack(client.playerattackedattackref damagespell);

                            
suse.addtarget(attackeddamageattack);
                        }
                    }
                }
                
client.sendscreen(susetrue);
            }
            
#endregion
            
if (client.player.attackpacket != null || client.player.vortexpacket != null)
            {
                try
                {
                    if (
client.player.containsflag(network.gamepackets.update.flags.shurikenvortex))
                    {
                        if (
client.player.vortexpacket != null && client.player.vortexpacket.toarray() != null)
                        {
                            if (
now client.player.vortexattackstamp.addmilliseconds(1))
                            {
                                
client.player.vortexattackstamp now;
                                
client.player.vortexpacket.attacktype attack.magic;
                                new 
game.attacking.handle(client.player.vortexpacketclient.playernull);
                            }
                        }
                    }
                    else
                    {
                        var 
attackpacket client.player.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.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 != 12570 &&
                                            
attackpacket.damage != 12210)
                                        {
                                            new 
game.attacking.handle(attackpacketclient.playernull);
                                        }
                                    }
                                }

                                else
                                {
                                    
int decrease = -300;
                                    if (
client.player.containsflag4(update.flags4.xfreezingpelter)) decrease += 1000;
                                    if (
client.player.oncyclone())
                                        
decrease 700;
                                    if (
client.player.onsuperman())
                                        
decrease 200;
                                    if (
now client.player.attackstamp.addmilliseconds((1000 client.player.agility decrease) * (int)(attacktype == network.gamepackets.attack.ranged 1)))
                                    {
                                        new 
game.attacking.handle(attackpacketclient.playernull);
                                    }
                                }
                            }
                        }
                    }
                }
                catch (
exception e)
                {
                    
program.saveexception(e);
                    
client.player.attackpacket null;
                    
client.player.vortexpacket null;
                }
            }
        } 
والله مجهودك يا رايدر اكترر من راائع وجاري التجربة