المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : حل مشكلة ضربة القوس الارشر


ElSaher
2020-05-03, 12:47 AM
اول حاجا ابحث عن

#region Ranged

اقفلها بي السالب
وبدلها بي دي

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

if (attacker.Owner.Screen.TryGetValue(attack.Attacked , out attacked))
{
CheckForExtraWeaponPowers(attacker.Owner, attacked);
if (!CanAttack(attacker, attacked, null, false))
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.Kinet icSpark))
{
var spell = Database.SpellTable.GetSpell(11590, attacker.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.X = attacker.X;
suse.Y = attacker.Y;
IMapObject lastAttacked = attacker;
uint p = 0;
if (Handle.CanAttack(attacker, attacked, spell, false))
{
lastAttacked = attacked;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack);
damage = (uint)((damage) / 1.50);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
Handle.ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
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.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attacked1, spell, false))
{
lastAttacked = attacked1;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked1, spell, ref attack);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
if (damage == 0) break;
ReceiveAttack(attacker, attacked1, attack, ref damage, spell);
suse.AddTarget(attacked1, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attackedsob.X, attackedsob.Y) <= 5)
{
if (Handle.CanAttack(attacker, attackedsob, spell))
{
lastAttacked = attackedsob;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
}
}
#endregion
#region ShadowofChaser
if (attacker.ContainsFlag4(Update.Flags4.ShadowofChas er) && attacker.IsChaser2())
{
var spell = Database.SpellTable.GetSpell(13090, attacker.Owner);
if (spell != null)
{
spell.CanKill = true;
if (Kernel.Rate(spell.Percent))
{
ShadowofChaser(attacker, attacked, attack, 1);
return;
}
}
}
#endregion

if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= Constants.pScreenDistance)
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = 0;
if (!attacker.Assassin() && !attacker.IsChaser1())
damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack) * 300;
else
damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
damage = damage - (uint)(damage * .50);
damage = damage * 7 / 100;
attack.Damage = damage;
if (attacker.EntityFlag == EntityFlag.Entity && attacked.EntityFlag != EntityFlag.Entity)
if (damage > attacked.Hitpoints)
{
attacker.Owner.IncreaseProficiencyExperience(Math. Min(damage, attacked.Hitpoints), (ushort)(weapons.Item1.ID / 1000));
}
else
{
attacker.Owner.IncreaseProficiencyExperience(damag e, (ushort)(weapons.Item1.ID / 1000));
}
ReceiveAttack(attacker, attacked, attack, ref damage, null);
}
}
else if (attacker.Owner.Screen.TryGetSob(attack.Attacked, out attackedsob))
{
if (CanAttack(attacker, attackedsob, null))
{

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.Kinet icSpark))
{
var spell = Database.SpellTable.GetSpell(11590, attacker.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.X = attacker.X;
suse.Y = attacker.Y;

IMapObject lastAttacked = attacker;
uint p = 0;
if (Handle.CanAttack(attacker, attackedsob, spell))
{
lastAttacked = attackedsob;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)((damage) / 1);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
Handle.ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
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.X, lastAttacked.Y, attacked1.X, attacked1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attacked1, spell, false))
{
lastAttacked = attacked1;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked1, spell, ref attack);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
if (damage == 0) break;
ReceiveAttack(attacker, attacked1, attack, ref damage, spell);
suse.AddTarget(attacked1, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
if (_obj.UID == Target) continue;
var attackedsob1 = _obj as SobNpcSpawn;
if (Kernel.GetDistance(lastAttacked.X, lastAttacked.Y, attackedsob1.X, attackedsob1.Y) <= 5)
{
if (Handle.CanAttack(attacker, attackedsob1, spell))
{
lastAttacked = attackedsob1;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob1, ref attack);
suse.Effect1 = attack.Effect1;
if (attacker.SpiritFocus)
{
damage = (uint)(damage * attacker.SpiritFocusPercent);
attacker.SpiritFocus = false;
}
damage = damage - damage * (p += 20) / 100;
if (damage == 0) break;
Handle.ReceiveAttack(attacker, attackedsob1, attack, damage, spell);
suse.AddTarget(attackedsob1, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
return;
}
}
}
#endregion
if (Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= Constants.pScreenDistance)
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = 0;
if (!attacker.Assassin() && !attacker.IsChaser1())
damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack) / 2;
else
damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack) / 2;
attack.Damage = damage;
ReceiveAttack(attacker, attackedsob, attack, damage, null);
if (damage > attackedsob.Hitpoints)
{
attacker.Owner.IncreaseProficiencyExperience(Math. Min(damage, attackedsob.Hitpoints), (ushort)(weapons.Item1.ID / 1000));
}
else
{
attacker.Owner.IncreaseProficiencyExperience(damag e, (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 هت فهمت دي الحل بتاعها