|
المشاركات 539 |
+التقييم 0.27 |
تاريخ التسجيل May 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 188 |
#region SuperTwofoldBlade
case 12080:
{
if (CanUseSpell(spell, attacker.Owner))
{
//var dis = spell.Distance;
//if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= dis)
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance)
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.UseSpell;
Game.Attacking.InLineAlgorithm ila = new KhaledMohamed.Game.Attacking.InLineAlgorithm(attacker.X,
X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
bool aaAttack = false;
var Array = attacker.Owner.Screen.Objects;
foreach (Interfaces.IMapObject _obj in Array)
{
if (_obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 7)
{
if (attacked.UID == Target)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
aaAttack = true;
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 1.4);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
else if (ila.InLine(attacked.X, attacked.Y))
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
aaAttack = true;
var damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 0.1);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
else if (_obj.MapObjType == MapObjectType.Entity)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 7)
{
if (attacked.UID == Target)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
aaAttack = true;
var damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 80 / 100);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (attackedsob.UID == Target)
{
if (CanAttack(attacker, attackedsob, spell))
{
aaAttack = true;
// if (!moveIn.InRange(attackedsob.X, attackedsob.Y, 4, ranger))
// continue;
var damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 2.4);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
if (aaAttack)
attacker.Owner.SendScreen(suse, true);
//attacker.RadiantStamp = DateTime.Now;
}
}
break;
}
#endregion
#region SuperTwofoldBlade
case 12080:
{
if (Time32.Now >= attacker.SpellStamp.AddMilliseconds(500))
{
if (CanUseSpell(spell, attacker.Owner))
{
ushort Xx, Yx;
if (attacked != null)
{
Xx = attacked.X;
Yx = attacked.Y;
}
else
{
Xx = attackedsob.X;
Yx = attackedsob.Y;
}
if (Kernel.GetDistance(attacker.X, attacker.Y, Xx, Yx) <= spell.Distance)
{
if (attackedsob == null)
if (attacked.ContainsFlag(Update.Flags.Fly))
return;
if (attacker.ContainsFlag(Update.Flags.Fly))
return;
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
bool send = false;
if (attackedsob == null)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
if (attacker.NobilityRank == HemaProject.Game.ConquerStructures.NobilityRank.King)
{
damage = (uint)(damage * 0.9);
}
if (attacker.NobilityRank == HemaProject.Game.ConquerStructures.NobilityRank.Prince)
{
damage = (uint)(damage * 0.8);
}
if (attacker.NobilityRank == HemaProject.Game.ConquerStructures.NobilityRank.Duke)
{
damage = (uint)(damage * 0.7);
}
if (attacker.NobilityRank == HemaProject.Game.ConquerStructures.NobilityRank.Earl)
{
damage = (uint)(damage * 0.6);
}
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
send = true;
if (attacker.Owner.Spells.ContainsKey(0) && !attacked.Dead)
{
var s = attacker.Owner.Spells[0];
var spellz = Database.SpellTable.SpellInformations[s.ID][s.Level];
if (spellz != null)
{
if (Kernel.Rate(spellz.Percent))
{
SpellUse ssuse = new SpellUse(true);
ssuse.Attacker = attacker.UID;
ssuse.SpellID = spellz.ID;
ssuse.SpellLevel = spellz.Level;
damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
ssuse.AddTarget(attacked, new SpellUse.DamageClass().Damage = damage, attack);
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
attacker.Owner.SendScreen(ssuse, true);
}
}
}
}
}
else
{
if (CanAttack(attacker, attackedsob, spell))
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 180 / 100);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.Effect1 = attack.Effect1;
suse.AddTarget(attackedsob, damage, attack);
send = true;
}
}
if (send)
attacker.Owner.SendScreen(suse, true);
attacker.SpellStamp = Time32.Now;
}
else
{
attacker.AttackPacket = null;
}
}
}
break;
}
#endregion
if (Time32.Now >= attacker.SpellStamp.AddMilliseconds(500))
{
attacker.SpellStamp = Time32.Now;
#region supertwofoldblade
case 12080:
{
if (canusespell(spell, attacker.owner))
{
//var dis = spell.distance;
//if (kernel.getdistance(attacker.x, attacker.y, x, y) <= dis)
if (kernel.getdistance(attacker.x, attacker.y, x, y) <= spell.distance)
{
preparespell(spell, attacker.owner);
spelluse suse = new spelluse(true);
suse.attacker = attacker.uid;
suse.spellid = spell.id;
suse.spelllevel = spell.level;
suse.x = x;
suse.y = y;
//suse.spelllevelhu = client_spell.usespell;
game.attacking.inlinealgorithm ila = new khaledmohamed.game.attacking.inlinealgorithm(attacker.x,
x, attacker.y, y, (byte)spell.range, inlinealgorithm.algorithm.dda);
bool aaattack = false;
var array = attacker.owner.screen.objects;
foreach (interfaces.imapobject _obj in array)
{
if (_obj.mapobjtype == mapobjecttype.monster)
{
attacked = _obj as entity;
if (kernel.getdistance(attacker.x, attacker.y, attacked.x, attacked.y) <= 7)
{
if (attacked.uid == target)
{
if (canattack(attacker, attacked, spell, attack.attacktype == attack.melee))
{
aaattack = true;
var damage = game.attacking.calculate.melee(attacker, attacked, ref attack, client_spell.levelhu2);
damage = (uint)(damage * 1.4);
receiveattack(attacker, attacked, attack, ref damage, spell);
suse.addtarget(attacked, damage, attack);
}
}
else if (ila.inline(attacked.x, attacked.y))
{
if (canattack(attacker, attacked, spell, attack.attacktype == attack.melee))
{
aaattack = true;
var damage = game.attacking.calculate.melee(attacker, attacked, spell, ref attack, client_spell.levelhu2);
damage = (uint)(damage * 0.1);
receiveattack(attacker, attacked, attack, ref damage, spell);
suse.addtarget(attacked, damage, attack);
}
}
}
}
else if (_obj.mapobjtype == mapobjecttype.entity)
{
attacked = _obj as entity;
if (kernel.getdistance(attacker.x, attacker.y, attacked.x, attacked.y) <= 7)
{
if (attacked.uid == target)
{
if (canattack(attacker, attacked, spell, attack.attacktype == attack.melee))
{
aaattack = true;
var damage = game.attacking.calculate.ranged(attacker, attacked, ref attack, client_spell.levelhu2);
damage = (uint)(damage * 80 / 100);
receiveattack(attacker, attacked, attack, ref damage, spell);
suse.addtarget(attacked, damage, attack);
}
}
}
}
else if (_obj.mapobjtype == mapobjecttype.sobnpc)
{
attackedsob = _obj as sobnpcspawn;
if (attackedsob.uid == target)
{
if (canattack(attacker, attackedsob, spell))
{
aaattack = true;
// if (!movein.inrange(attackedsob.x, attackedsob.y, 4, ranger))
// continue;
var damage = game.attacking.calculate.melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 2.4);
receiveattack(attacker, attackedsob, attack, damage, spell);
suse.addtarget(attackedsob, damage, attack);
}
}
}
}
if (aaattack)
attacker.owner.sendscreen(suse, true);
//attacker.radiantstamp = datetime.now;
}
}
break;
}
#endregion
#region supertwofoldblade
case 12080:
{
if (time32.now >= attacker.spellstamp.addmilliseconds(500))
{
if (canusespell(spell, attacker.owner))
{
ushort xx, yx;
if (attacked != null)
{
xx = attacked.x;
yx = attacked.y;
}
else
{
xx = attackedsob.x;
yx = attackedsob.y;
}
if (kernel.getdistance(attacker.x, attacker.y, xx, yx) <= spell.distance)
{
if (attackedsob == null)
if (attacked.containsflag(update.flags.fly))
return;
if (attacker.containsflag(update.flags.fly))
return;
preparespell(spell, attacker.owner);
spelluse suse = new spelluse(true);
suse.attacker = attacker.uid;
suse.spellid = spell.id;
suse.spelllevel = spell.level;
suse.x = x;
suse.y = y;
bool send = false;
if (attackedsob == null)
{
if (canattack(attacker, attacked, spell, attack.attacktype == attack.melee))
{
attack.effect1 = attack.attackeffects1.none;
uint damage = game.attacking.calculate.melee(attacker, attacked, ref attack);
if (attacker.nobilityrank == hemaproject.game.conquerstructures.nobilityrank.king)
{
damage = (uint)(damage * 0.9);
}
if (attacker.nobilityrank == hemaproject.game.conquerstructures.nobilityrank.prince)
{
damage = (uint)(damage * 0.8);
}
if (attacker.nobilityrank == hemaproject.game.conquerstructures.nobilityrank.duke)
{
damage = (uint)(damage * 0.7);
}
if (attacker.nobilityrank == hemaproject.game.conquerstructures.nobilityrank.earl)
{
damage = (uint)(damage * 0.6);
}
suse.effect1 = attack.effect1;
receiveattack(attacker, attacked, attack, ref damage, spell);
suse.addtarget(attacked, damage, attack);
send = true;
if (attacker.owner.spells.containskey(0) && !attacked.dead)
{
var s = attacker.owner.spells[0];
var spellz = database.spelltable.spellinformations[s.id][s.level];
if (spellz != null)
{
if (kernel.rate(spellz.percent))
{
spelluse ssuse = new spelluse(true);
ssuse.attacker = attacker.uid;
ssuse.spellid = spellz.id;
ssuse.spelllevel = spellz.level;
damage = game.attacking.calculate.melee(attacker, attacked, ref attack);
ssuse.addtarget(attacked, new spelluse.damageclass().damage = damage, attack);
receiveattack(attacker, attacked, attack, ref damage, spell);
attacker.owner.sendscreen(ssuse, true);
}
}
}
}
}
else
{
if (canattack(attacker, attackedsob, spell))
{
attack.effect1 = attack.attackeffects1.none;
uint damage = game.attacking.calculate.melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 180 / 100);
receiveattack(attacker, attackedsob, attack, damage, spell);
suse.effect1 = attack.effect1;
suse.addtarget(attackedsob, damage, attack);
send = true;
}
}
if (send)
attacker.owner.sendscreen(suse, true);
attacker.spellstamp = time32.now;
}
else
{
attacker.attackpacket = null;
}
}
}
break;
}
#endregion
if (time32.now >= attacker.spellstamp.addmilliseconds(500))
{
attacker.spellstamp = time32.now;
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
مطلوب حل مشكلة الهاك في السيرفر | ahmedfathy | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2019-10-06 01:03 AM |
حمايه صغيوره من برامج الهاك | Tefa | تطوير سيرفرات كونكر | 13 | 2019-10-03 06:47 PM |
طلب انا واقف دلؤتي علي حماية من الهاك ومفيش حد نزل حل | ahmedfathy | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2019-08-06 02:30 PM |
مطلوب حماية السورس من الهكر ولا اضافة من فسم التطوير شغاله | ahmedfathy | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-07-27 08:56 PM |