المشاركة الأصلية كتبت بواسطة rider
(المشاركة 5863)
حبيبي العفو
في حل مش فعال بس اهو يقضي الغرض
بسم الله و الصلاة و السلام علي رسول الله
هتيجي عند الاسكله الي عايز تشيل منها الاوتو كلكر
ف الشرح هنشتغل ع اسكلة النينجا
كود PHP:
#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
و دي بعد الاضافه
كود PHP:
#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
طب احنا ضفنا ايه
بعد فتحة القوس الي بعد الاسكله
case xxxx
{
هتضيف
كود PHP:
if (time32.now >= attacker.spellstamp.addmilliseconds(500))
{
بعد كده تنزل تحت لحد
if (aaattack)
attacker.owner.sendscreen(suse, true);
هتلافيها تحت خالص في اخر كود الاسكله
اول كلمه مش لازم تلاقيها نفس الشكل تاني كلمه لازم تلاقيها نفس الشكل المهم تحتها حط
كود PHP:
attacker.spellstamp = time32.now;
تحت خالص بقا في اخر الاسكله هتلاقي
break;
}
فوق كلمة بريك حط قفلة قوس
}
بس كده
مبروك عليك الاسكله مش هتضرب غير بعد المده دي و ده هيقلل الكلكر
|