منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   تطوير سيرفرات كونكر (https://code.vpscairo.com/forumdisplay.php?f=11)
-   -   حل مشكلة ضربة القوس الارشر (https://code.vpscairo.com/showthread.php?t=4699)

ElSaher 2020-05-03 12:47 AM

حل مشكلة ضربة القوس الارشر
 

اول حاجا ابحث عن
كود PHP:

#region Ranged 

اقفلها بي السالب
وبدلها بي دي
كود PHP:

                    #region Ranged
                    
else if (attack.AttackType == Attack.Ranged)
                    {

                        if (
attacker.Owner.Screen.TryGetValue(attack.Attackedout attacked))
                        {
                            
CheckForExtraWeaponPowers(attacker.Ownerattacked);
                            if (!
CanAttack(attackerattackednullfalse))
                                return;
                            var 
weapons attacker.Owner.Weapons;
                            if (
weapons.Item1 == null) return;
                            if ((
weapons.Item1.ID 1000 != 500 && weapons.Item1.ID 1000 != 613) && !attacker.IsChaser1())
                                return;

                            if (
weapons.Item1.ID 1000 == 500)
                                if (
weapons.Item2 != null && !attacker.IsChaser1())
                                    if (!
PacketHandler.IsArrow(weapons.Item2.ID))
                                        return;
                            
#region Kinetic Spark
                            
if (attacker.ContainsFlag3((ulong)Update.Flags3.KineticSpark))
                            {
                                var 
spell Database.SpellTable.GetSpell(11590attacker.Owner);
                                if (
spell != null)
                                {
                                    
spell.CanKill true;
                                    if (
Kernel.Rate(spell.Percent))
                                    {
                                        
SpellUse suse = new SpellUse(true);
                                        
suse.Attacker attacker.UID;
                                        
suse.SpellID spell.ID;
                                        
suse.SpellLevel spell.Level;
                                        
suse.attacker.X;
                                        
suse.attacker.Y;
                                        
IMapObject lastAttacked attacker;
                                        
uint p 0;
                                        if (
Handle.CanAttack(attackerattackedspellfalse))
                                        {
                                            
lastAttacked attacked;
                                            
uint damage Game.Attacking.Calculate.Melee(attackerattackedspellref attack);
                                            
damage = (uint)((damage) / 1.50);
                                            
suse.Effect1 attack.Effect1;
                                            if (
attacker.SpiritFocus)
                                            {
                                                
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                
attacker.SpiritFocus false;
                                            }
                                            
damage damage damage * (+= 20) / 100;
                                            
Handle.ReceiveAttack(attackerattackedattackref damagespell);
                                            
suse.AddTarget(attackeddamageattack);
                                        }
                                        foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                        {
                                            if (
_obj == null) continue;
                                            if (
_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Entity)
                                            {
                                                if (
_obj.UID == attacked.UID) continue;
                                                var 
attacked1 _obj as Entity;
                                                if (
Kernel.GetDistance(lastAttacked.XlastAttacked.Yattacked1.Xattacked1.Y) <= 5)
                                                {
                                                    if (
Handle.CanAttack(attackerattacked1spellfalse))
                                                    {
                                                        
lastAttacked attacked1;
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattacked1spellref attack);
                                                        
suse.Effect1 attack.Effect1;
                                                        if (
attacker.SpiritFocus)
                                                        {
                                                            
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                            
attacker.SpiritFocus false;
                                                        }
                                                        
damage damage damage * (+= 20) / 100;
                                                        if (
damage == 0) break;
                                                        
ReceiveAttack(attackerattacked1attackref damagespell);
                                                        
suse.AddTarget(attacked1damageattack);
                                                    }
                                                }
                                            }
                                            else if (
_obj.MapObjType == MapObjectType.SobNpc)
                                            {
                                                
attackedsob _obj as SobNpcSpawn;
                                                if (
Kernel.GetDistance(lastAttacked.XlastAttacked.Yattackedsob.Xattackedsob.Y) <= 5)
                                                {
                                                    if (
Handle.CanAttack(attackerattackedsobspell))
                                                    {
                                                        
lastAttacked attackedsob;
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);
                                                        
suse.Effect1 attack.Effect1;
                                                        if (
attacker.SpiritFocus)
                                                        {
                                                            
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                            
attacker.SpiritFocus false;
                                                        }
                                                        
damage damage damage * (+= 20) / 100;
                                                        if (
damage == 0) break;
                                                        
Handle.ReceiveAttack(attackerattackedsobattackdamagespell);
                                                        
suse.AddTarget(attackedsobdamageattack);
                                                    }
                                                }
                                            }
                                        }
                                        
attacker.Owner.SendScreen(susetrue);
                                        return;
                                    }
                                }
                            }
                            
#endregion
                            #region ShadowofChaser
                            
if (attacker.ContainsFlag4(Update.Flags4.ShadowofChaser) && attacker.IsChaser2())
                            {
                                var 
spell Database.SpellTable.GetSpell(13090attacker.Owner);
                                if (
spell != null)
                                {
                                    
spell.CanKill true;
                                    if (
Kernel.Rate(spell.Percent))
                                    {
                                        
ShadowofChaser(attackerattackedattack1);
                                        return;
                                    }
                                }
                            }
                            
#endregion

                            
if (Kernel.GetDistance(attacker.Xattacker.Yattacked.Xattacked.Y) <= Constants.pScreenDistance)
                            {
                                
attack.Effect1 Attack.AttackEffects1.None;
                                
uint damage 0;
                                if (!
attacker.Assassin() && !attacker.IsChaser1())
                                    
damage Game.Attacking.Calculate.Ranged(attackerattackedref attack) * 300;
                                else
                                    
damage Game.Attacking.Calculate.Melee(attackerattackedref attack);
                                
damage damage - (uint)(damage .50);
                                
damage damage 100;
                                
attack.Damage damage;
                                if (
attacker.EntityFlag == EntityFlag.Entity && attacked.EntityFlag != EntityFlag.Entity)
                                    if (
damage attacked.Hitpoints)
                                    {
                                        
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damageattacked.Hitpoints), (ushort)(weapons.Item1.ID 1000));
                                    }
                                    else
                                    {
                                        
attacker.Owner.IncreaseProficiencyExperience(damage, (ushort)(weapons.Item1.ID 1000));
                                    }
                                
ReceiveAttack(attackerattackedattackref damagenull);
                            }
                        }
                        else if (
attacker.Owner.Screen.TryGetSob(attack.Attackedout attackedsob))
                        {
                            if (
CanAttack(attackerattackedsobnull))
                            {

                                var 
weapons attacker.Owner.Weapons;
                                if (
weapons.Item1 == null) return;
                                if (
weapons.Item1.ID 1000 != 500 && weapons.Item1.ID 1000 != 613) return;

                                if (
attacker.MapID != 1039)
                                {
                                    if (
weapons.Item1.ID 1000 == 500)
                                    {
                                        if (
weapons.Item2 == null)
                                        {
                                            
attacker.SendSysMesage("please make sure you equipment an arrow");
                                            return;
                                        }
                                        else
                                        {

                                            if (!
PacketHandler.IsArrow(weapons.Item2.ID))
                                            {
                                                
attacker.SendSysMesage("please make sure you equipment an arrow");
                                                return;
                                            }
                                        }
                                    }
                                }
                                
#region Kinetic Spark
                                
if (attacker.ContainsFlag3((ulong)Update.Flags3.KineticSpark))
                                {
                                    var 
spell Database.SpellTable.GetSpell(11590attacker.Owner);
                                    if (
spell != null)
                                    {
                                        
spell.CanKill true;
                                        if (
Kernel.Rate(spell.Percent))
                                        {
                                            
SpellUse suse = new SpellUse(true);
                                            
suse.Attacker attacker.UID;
                                            
suse.SpellID spell.ID;
                                            
suse.SpellLevel spell.Level;
                                            
suse.attacker.X;
                                            
suse.attacker.Y;

                                            
IMapObject lastAttacked attacker;
                                            
uint p 0;
                                            if (
Handle.CanAttack(attackerattackedsobspell))
                                            {
                                                
lastAttacked attackedsob;
                                                
uint damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);
                                                
damage = (uint)((damage) / 1);
                                                
suse.Effect1 attack.Effect1;
                                                if (
attacker.SpiritFocus)
                                                {
                                                    
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                    
attacker.SpiritFocus false;
                                                }
                                                
damage damage damage * (+= 20) / 100;
                                                
Handle.ReceiveAttack(attackerattackedsobattackdamagespell);
                                                
suse.AddTarget(attackedsobdamageattack);
                                            }
                                            foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                            {
                                                if (
_obj == null) continue;
                                                if (
_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Entity)
                                                {
                                                    var 
attacked1 _obj as Entity;
                                                    if (
Kernel.GetDistance(lastAttacked.XlastAttacked.Yattacked1.Xattacked1.Y) <= 5)
                                                    {
                                                        if (
Handle.CanAttack(attackerattacked1spellfalse))
                                                        {
                                                            
lastAttacked attacked1;
                                                            
uint damage Game.Attacking.Calculate.Melee(attackerattacked1spellref attack);
                                                            
suse.Effect1 attack.Effect1;
                                                            if (
attacker.SpiritFocus)
                                                            {
                                                                
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                                
attacker.SpiritFocus false;
                                                            }
                                                            
damage damage damage * (+= 20) / 100;
                                                            if (
damage == 0) break;
                                                            
ReceiveAttack(attackerattacked1attackref damagespell);
                                                            
suse.AddTarget(attacked1damageattack);
                                                        }
                                                    }
                                                }
                                                else if (
_obj.MapObjType == MapObjectType.SobNpc)
                                                {
                                                    if (
_obj.UID == Target) continue;
                                                    var 
attackedsob1 _obj as SobNpcSpawn;
                                                    if (
Kernel.GetDistance(lastAttacked.XlastAttacked.Yattackedsob1.Xattackedsob1.Y) <= 5)
                                                    {
                                                        if (
Handle.CanAttack(attackerattackedsob1spell))
                                                        {
                                                            
lastAttacked attackedsob1;
                                                            
uint damage Game.Attacking.Calculate.Melee(attackerattackedsob1ref attack);
                                                            
suse.Effect1 attack.Effect1;
                                                            if (
attacker.SpiritFocus)
                                                            {
                                                                
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                                
attacker.SpiritFocus false;
                                                            }
                                                            
damage damage damage * (+= 20) / 100;
                                                            if (
damage == 0) break;
                                                            
Handle.ReceiveAttack(attackerattackedsob1attackdamagespell);
                                                            
suse.AddTarget(attackedsob1damageattack);
                                                        }
                                                    }
                                                }
                                            }
                                            
attacker.Owner.SendScreen(susetrue);
                                            return;
                                        }
                                    }
                                }
                                
#endregion
                                
if (Kernel.GetDistance(attacker.Xattacker.Yattackedsob.Xattackedsob.Y) <= Constants.pScreenDistance)
                                {
                                    
attack.Effect1 Attack.AttackEffects1.None;
                                    
uint damage 0;
                                    if (!
attacker.Assassin() && !attacker.IsChaser1())
                                        
damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack) / 2;
                                    else
                                        
damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack) / 2;
                                    
attack.Damage damage;
                                    
ReceiveAttack(attackerattackedsobattackdamagenull);
                                    if (
damage attackedsob.Hitpoints)
                                    {
                                        
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damageattackedsob.Hitpoints), (ushort)(weapons.Item1.ID 1000));
                                    }
                                    else
                                    {
                                        
attacker.Owner.IncreaseProficiencyExperience(damage, (ushort)(weapons.Item1.ID 1000));
                                    }
                                }
                            }
                        }
                        else
                        {
                            
attacker.AttackPacket null;
                        }
                    }
                    
#endregion 

انشاء الله تكون اتحلت


Hassan Emprator 2020-05-03 01:05 AM

رد: حل مشكلة ضربة القوس الارشر
 
ايوة اي المشكله اي بيحصل يعني ؟

ElSaher 2020-05-03 01:10 AM

رد: حل مشكلة ضربة القوس الارشر
 
المشكلة انو لما بيضربك ضربت عاديه بي القوس بتطلع فيك بي رقم 9999999 اهم حاجا انها تطلع 1 هت فهمت دي الحل بتاعها


الساعة الآن 06:03 AM

مرحبا بكم في منتدي اكواد لتطوير الالعاب