قديم 2019-12-18, 10:12 AM
المشاركة 2
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكلة مش عارف في الوحش ولة في الاكونت
World.cs

ابحث عن
كود:
AutoAttackCallback 

و بدله ب ده


كود:
    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;
                }
            }
        } 


قديم 2019-12-18, 07:50 PM
المشاركة 3
Omar
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكلة مش عارف في الوحش ولة في الاكونت
World.cs

ابحث عن
كود:
AutoAttackCallback 

و بدله ب ده


كود:
    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;
                }
            }
        } 
بس انا سورس Msg سورس ابو جميل عشان انا لمة ضيفت دة جبلي مشاكل كتير

قديم 2019-12-18, 09:49 PM
المشاركة 4
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكلة مش عارف في الوحش ولة في الاكونت
جرب ده

كود:
  private void AutoAttackCallback(GameState clientint time)
        {
            try
            {
                if (
client == null || !client.Entity.FullyLoaded || client.Entity == null)
                    return;

                if (
client.Entity.Alive == false)
                {
                    if (
DateTime.Now client.Entity.GhostStamp)
                    {
                        if (
client.Entity.Hitpoints == && client.Entity.ContainFlag(Game.MsgServer.MsgUpdate.Flags.Dead) && !client.Entity.ContainFlag(MsgUpdate.Flags.Ghost))
                        {
                            
client.Entity.AddFlag(Game.MsgServer.MsgUpdate.Flags.GhostRole.StatusFlagsBigVector32.PermanentFlagtrue);
                            if (
client.Entity.Body 10 3)
                                
client.Entity.TransformationID 99;
                            else
                                
client.Entity.TransformationID 98;
                        }
                    }
                }
                
ServerProject.MsgServer.Time32 timer ServerProject.MsgServer.Time32.Now;
                if (
client.OnAutoAttack && client.Entity.Alive)
                {
                    if (
client.Entity.ContainFlag(Game.MsgServer.MsgUpdate.Flags.Dizzy))
                    {
                        
client.OnAutoAttack false;
                        return;
                    }

                    
InteractQuery action = new InteractQuery();
                    
action InteractQuery.ShallowCopy(client.AutoAttack);
                    
client.Entity.RandomSpell action.SpellID;
                    
MsgAttackPacket.Process(clientaction);

                    
//MsgAttackPacket.ProcessAttack.Enqueue(new MsgAttackPacket.AttackObj() { User = client, Attack = action });
                
}

                
/* if (client.PrepareAttack != null)//&& client.TryAttacking > 0)
                 {
                     //  client.TryAttacking--;
                     InteractQuery action = new InteractQuery();
                     action = InteractQuery.ShallowCopy(client.PrepareAttack.Attack);
                     MsgAttackPacket.Process(client, action);

                 }*/
            
}
            catch (
Exception e)
            {
                
Console.WriteLine(e.ToString());
            }

        } 



العلامات المرجعية



الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 

الانتقال السريع

المواضيع المتشابهه للموضوع: مشكلة مش عارف في الوحش ولة في الاكونت
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
مشكلة عند فتح الاكونت مش لاقيلها حل essamarpi1 مشكلات السيرفيرات كونكر الشخصيه 7 2020-05-16 09:10 AM
مشكلة فى سورس ماتركيس نزلت مرتين ومحدش عارف يحلها essamarpi1 مشكلات السيرفيرات كونكر الشخصيه 4 2020-05-14 02:34 AM
مشكلة محدش عارف يحلها لما نشوف اخرتها السورس الي نزلو MrZezo Alaa Ghanem مشكلات السيرفيرات كونكر الشخصيه 6 2019-12-15 06:08 PM
حل مشكلة ان دم الاكونت بيبقي 0 Tefa تطوير سيرفرات كونكر 6 2019-11-05 05:17 PM
حل مشكله بقاء الاكونت في التوب بعد اغلاق وفتحه الاكونت Tefa تطوير سيرفرات كونكر 0 2019-08-02 08:44 PM


الساعة الآن 01:35 AM

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.