مشاهدة النسخة كاملة : تعديل علي ضربه RageofWar
ahmedshetos888
2020-02-04, 02:34 AM
انا عدلتها وخليت المفروض الضربه ضعيفه جدااا بس باردو بعد ما اعمل ريستارت للسرفر بتضرب عالي جداا عايز حل يا جدعاان
amr69940
2020-02-04, 02:45 AM
طيب بص انا عندي مظبوطة فهاش اي مشكلة جرب كدا وقولي
#region RageofWar(Passive)
case 12930:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
Game.Attacking.InLineAlgorithm ila = new Game.Attacking.InLineAlgorithm(attacker.X,
X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = SpellID;
suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
suse.X = X;
suse.Y = Y;
attacker.Owner.SendScreen(suse, true);
bool first = false;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null)
continue;
if (_obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (ila.InLine(attacked.X, attacked.Y))
{
if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
continue;
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 15) continue;
if (!first)
{
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.RageOfWarTrap;
flooritem.X = attacked.X;
flooritem.MapID = map.ID;
flooritem.Y = attacked.Y;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 15;
flooritem.OwnerUID = attacker.UID;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
flooritem.Name2 = "RageofWarTrap";
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
first = true;
}
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
if (attacker.NobilityRank == TOFAN.Game.ConquerStructures.NobilityRank.King)
{
damage = (uint)(damage * 0.738);
}
if (attacker.NobilityRank == TOFAN.Game.ConquerStructures.NobilityRank.Prince)
{
damage = (uint)(damage * 0.838);
}
if (attacker.NobilityRank == TOFAN.Game.ConquerStructures.NobilityRank.Duke)
{
damage = (uint)(damage * 0.900);
}
if (attacker.NobilityRank == TOFAN.Game.ConquerStructures.NobilityRank.Earl)
{
damage = (uint)(damage * 1.000);
}
attack.Damage = damage;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (_obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (ila.InLine(attacked.X, attacked.Y))
{
if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
continue;
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 11) continue;
if (!first)
{
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.RageOfWarTrap;
flooritem.X = attacked.X;
flooritem.MapID = map.ID;
flooritem.Y = attacked.Y;
flooritem.Type = FloorItem.Effect;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.mColor = 15;
flooritem.OwnerUID = attacker.UID;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
flooritem.Name2 = "RageofWarTrap";
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
first = true;
}
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack);
damage = (uint)(damage * 1.0);
attack.Damage = damage;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (attackedsob == null) continue;
if (ila.InLine(attackedsob.X, attackedsob.Y))
{
if (!CanAttack(attacker, attackedsob, spell))
continue;
if (Kernel.GetDistance(attackedsob.X, attackedsob.Y, attacker.X, attacker.Y) > 11) continue;
if (!first)
{
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.ItemID = FloorItem.RageOfWarTrap;
flooritem.X = attackedsob.X;
flooritem.MapID = map.ID;
flooritem.Y = attackedsob.Y;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 15;
flooritem.OwnerUID = attacker.UID;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
flooritem.Name2 = "RageofWarTrap";
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
first = true;
}
uint damage = (uint)(Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack) * (spell.Power - 30000) / 450);
attack.Damage = damage;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
attacker.Owner.SendScreen(suse, true);
attacker.AttackPacket = null;
}
break;
}
#endregion
MRonlineGvrix
2020-02-04, 04:39 AM
#region RageofWar(Passive)
case 12930:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
Game.Attacking.InLineAlgorithm ila = new Game.Attacking.InLineAlgorithm(attacker.X,
X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = SpellID;
suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
suse.X = X;
suse.Y = Y;
attacker.Owner.SendScreen(suse, true);
bool first = false;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null)
continue;
if (_obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (ila.InLine(attacked.X, attacked.Y))
{
if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
continue;
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 15) continue;
if (!first)
{
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.RageOfWarTrap;
flooritem.X = attacked.X;
flooritem.MapID = map.ID;
flooritem.Y = attacked.Y;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 15;
flooritem.OwnerUID = attacker.UID;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
flooritem.Name2 = "RageofWarTrap";
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
first = true;
}
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
if (attacker.NobilityRank == AbdoRedaGxV4.Game.ConquerStructures.NobilityRank.K ing)
{
damage = (uint)(damage * 0.550);
}
if (attacker.NobilityRank == AbdoRedaGxV4.Game.ConquerStructures.NobilityRank.P rince)
{
damage = (uint)(damage * 0.550);
}
if (attacker.NobilityRank == AbdoRedaGxV4.Game.ConquerStructures.NobilityRank.D uke)
{
damage = (uint)(damage * 0.550);
}
if (attacker.NobilityRank == AbdoRedaGxV4.Game.ConquerStructures.NobilityRank.E arl)
{
damage = (uint)(damage * 0.550);
}
if (attacker.NobilityRank == AbdoRedaGxV4.Game.ConquerStructures.NobilityRank.B aron)
{
damage = (uint)(damage * 0.550);
}
if (attacker.NobilityRank == AbdoRedaGxV4.Game.ConquerStructures.NobilityRank.K night)
{
damage = (uint)(damage * 0.550);
}
if (attacker.NobilityRank == AbdoRedaGxV4.Game.ConquerStructures.NobilityRank.S erf)
{
damage = (uint)(damage * 0.300);
}
attack.Damage = damage;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (_obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (ila.InLine(attacked.X, attacked.Y))
{
if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
continue;
if (Kernel.GetDistance(attacked.X, attacked.Y, attacker.X, attacker.Y) > 11) continue;
if (!first)
{
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.ItemID = FloorItem.RageOfWarTrap;
flooritem.X = attacked.X;
flooritem.MapID = map.ID;
flooritem.Y = attacked.Y;
flooritem.Type = FloorItem.Effect;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.mColor = 15;
flooritem.OwnerUID = attacker.UID;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
flooritem.Name2 = "RageofWarTrap";
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
first = true;
}
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack);
damage = (uint)(damage * 1.0);
attack.Damage = damage;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (attackedsob == null) continue;
if (ila.InLine(attackedsob.X, attackedsob.Y))
{
if (!CanAttack(attacker, attackedsob, spell))
continue;
if (Kernel.GetDistance(attackedsob.X, attackedsob.Y, attacker.X, attacker.Y) > 11) continue;
if (!first)
{
var map = Kernel.Maps[attacker.MapID];
Network.GamePackets.FloorItem flooritem = new Network.GamePackets.FloorItem(true);
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (map.Npcs.ContainsKey(flooritem.UID))
flooritem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
flooritem.MapObjType = MapObjectType.FloorSpell;
flooritem.ItemID = FloorItem.RageOfWarTrap;
flooritem.X = attackedsob.X;
flooritem.MapID = map.ID;
flooritem.Y = attackedsob.Y;
flooritem.Type = FloorItem.Effect;
flooritem.mColor = 15;
flooritem.OwnerUID = attacker.UID;
flooritem.OnFloor = Time32.Now;
flooritem.Owner = attacker.Owner;
flooritem.Name2 = "RageofWarTrap";
map.AddFloorItem(flooritem);
attacker.Owner.SendScreenSpawn(flooritem, true);
first = true;
}
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 180 / 100);
attack.Damage = damage;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
attacker.Owner.SendScreen(suse, true);
attacker.AttackPacket = null;
}
break;
}
#endregion
ahmedfathy
2020-02-04, 01:46 PM
الحلول اللي نزله دي كلها غلط هو انا عشان انزل اتاك الاسكله اسمح الروجن بتعها ونزلوا من سورس تاني ويظهر ايرور تاني
في ايه يا رجاله الاسكله عندكم اصلآ بتضرب بي رقم عالي بردوه
الصح بتعها بتعملوا يدوي ومش بيكون عالي كدا
بس يا برنس تحت السطر دا Calculate.Melee(attacker, attacked, ref attack);
هتلاقي كلمة damge الموضوع سهل جدآ هديك مثل عشان تفهم مثلآ 1.8 هتشيل الواحد وتخلي 0 وتخلي رقم 8 دا يكون 3 وبكدا هتكون كدا 0.3 يعني هيضرب بي 10 تلاف
ElSaher
2020-02-04, 04:13 PM
اتفضل يصطي
#region RageOfWar[Stomper]
case 12930:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
InLineAlgorithm ila = new InLineAlgorithm(attacker.X, X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = SpellID;
attacker.Stamina -= spell.UseStamina;
attacker.Stamina -= 15;
suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
suse.X = X;
suse.Y = Y;
ushort Xo1 = 0, Yo1 = 0;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (ila.InLine(attacked.X, attacked.Y))
{
if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack);
if (attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.King)
{
damage = (uint)(damage * 0.826);
}
if (attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.Prince )
{
damage = (uint)(damage * 0.971);
}
if (attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.Duke)
{
damage = (uint)(damage * 1.30);
}
if (attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.Earl)
{
damage = (uint)(damage * 1.020);
}
// damage = (uint)MathHelper.AdjustDataEx((int)damage, (int)spell.Power);
suse.Effect1 = attack.Effect1;
attack.Damage = damage;
Xo1 = attacked.X;
Yo1 = attacked.Y;
suse.AddTarget(attacked.UID, damage, attack);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
}
}
else if (_obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (ila.InLine(attacked.X, attacked.Y))
{
if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * SkillsAttack.RageofWarMonsters);
suse.Effect1 = attack.Effect1;
attack.Damage = damage;
Xo1 = attacked.X;
Yo1 = attacked.Y;
suse.AddTarget(attacked.UID, damage, attack);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (ila.InLine(attackedsob.X, attackedsob.Y))
{
if (!CanAttack(attacker, attackedsob, spell)) continue;
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 3.4);
suse.AddTarget(attackedsob.UID, damage, attack);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
}
}
}
if (Xo1 != 0 && Yo1 != 0)
{
FloorItem item = new FloorItem(true);
item.Owner = attacker.Owner;
item.UID = FloorItem.FloorUID.Next;
// item.MapObjType = MapObjectType.Item;
item.ItemID = 1500;
item.X = (ushort)(Xo1);
item.Y = (ushort)(Yo1);
item.Type = 10;
item.mColor = 14;
item.OwnerUID = attacker.UID;
item.FlowerType = 1;
item.Name = "RageofWarTrap";
attacker.SendScreen(item);
var map = Kernel.Maps[attacker.MapID];
while (map.Npcs.ContainsKey(item.UID))
item.UID = Network.GamePackets.FloorItem.FloorUID.Next;
map.AddFloorItem(item);
}
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
وهتنحل انشاء الله
Hassan Emprator
2020-02-05, 04:24 PM
يغلق لعدم المتابعه من صاحب الموضوع
vBulletin® v3.8.8 Beta 1, Copyright ©2000-2024, TranZ by code