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

مشاهدة النسخة كاملة : أسكلة الوارث أوف أمبرور كاملة 100%


محمد ياسر
2019-05-12, 07:45 PM
الموضوع ده لسورسات ال 2D
وعنده مشكله في اسكلة الامبروا بتاعت ابيك المونك
الاضافه كامله
في كلاس الهاندل
بدل اسكلة الامبروا بده
#region Wrath Of Emperor[Reparado 100%]
case 12570:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
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;
suse.SpellEffect = 1;
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 2)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
suse.Effect1 = attack.Effect1;
attack.Effect1 = Attack.AttackEffects1.None;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
}
}
}
else if (_obj.MapObjType == MapObjectType.SobNpc)
{
attackedsob = _obj as SobNpcSpawn;
if (Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= 2)
{
if (CanAttack(attacker, attackedsob, spell))
{
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
suse.Effect1 = attack.Effect1;
attack.Effect1 = Attack.AttackEffects1.None;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob, damage, attack);
}
}
}
}
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion

و بعدين هتبحث علي ده
#region Melee

اقفله من السالب و بدله كله بده
#region Melee
else if (attack.AttackType == Attack.Melee)
{
if (attacker.Assassin() || attacker.IsBowEquipped)
{
attack.AttackType = Attack.Ranged;
new Game.Attacking.Handle(attack, attacker, attacked);
return;
}

if (attacker.MapID == DeathMatch.MAPID)
{
attacker.Owner.Send(new Message("You have to use manual linear skills(FastBlade/ScentSword)", System.Drawing.Color.Red, Message.Talk));
return;
}
if (attacker.MapID == DeathMatch2.MAPID)
{
attacker.Owner.Send(new Message("You have to use manual linear skills(FastBlade/ScentSword)", System.Drawing.Color.Red, Message.Talk));
return;
}
if (attacker.Owner.Screen.TryGetValue(attack.Attacked , out attacked))
{



CheckForExtraWeaponPowers(attacker.Owner, attacked);
if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) return;
pass = false;
if (attacker.OnFatalStrike())
{
if (attacked.EntityFlag == EntityFlag.Monster)
{
pass = true;
}
}
ushort range = attacker.AttackRange;
if (attacker.Transformed)
range = (ushort)attacker.TransformationAttackRange;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= range || pass)
{
#region EpicMonk
if (Kernel.Rate(50))
{
if (attack.SpellID == 12580 || attack.SpellID == 12590 || attack.SpellID == 12600)
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = 0;
suse.SpellLevel = 0;
suse.X = attacker.X;
suse.Y = attacker.Y;
Fan fan = new Fan(attacker.X, attacker.Y, attacked.X, attacked.Y, 7, 240);
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj == null) continue;
if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
{
attacked = _obj as Entity;
if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 7)
{
if (CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee))
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damages = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
attack.Attacked = attacked.UID;
attack.Damage = damages;
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, ref damages, null);
}
}
}
}

attacker.AttackPacket = null;
attack = null;
return;
}
}
#endregion
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
attack.Damage = damage;
if (attacker.OnFatalStrike())
{
if (attacked.EntityFlag == EntityFlag.Monster)
{
var weaps = attacker.Owner.Weapons;
bool can = false;
if (weaps.Item1 != null)
if (weaps.Item1 != null) if (weaps.Item1.ID / 1000 == 601 || weaps.Item1.ID / 1000 == 616) can = true; if (weaps.Item2 != null) if (weaps.Item2.ID / 1000 == 601 || weaps.Item2.ID / 1000 == 616) can = true;
can = true;
if (weaps.Item2 != null)
if (weaps.Item1 != null) if (weaps.Item1.ID / 1000 == 601 || weaps.Item1.ID / 1000 == 616) can = true; if (weaps.Item2 != null) if (weaps.Item2.ID / 1000 == 601 || weaps.Item2.ID / 1000 == 616) can = true;
can = true;
if (!can)
return;
ushort x = attacked.X;
ushort y = attacked.Y;
Map.UpdateCoordonatesForAngle(ref x, ref y, Kernel.GetAngle(attacked.X, attacked.Y, attacker.X, attacker.Y));
attacker.Shift(x, y);
attack.X = x;
attack.Y = y;
//double dmg = (double)damage * 3.5;
//damage = (uint)dmg;
damage = damage / 8;
attack.Damage = damage;

attack.AttackType = Attack.FatalStrike;
}
}
//over:

var weapons = attacker.Owner.Weapons;
if (weapons.Item1 != null)
{
ConquerItem rightweapon = weapons.Item1;
ushort wep1subyte = (ushort)(rightweapon.ID / 1000), wep2subyte = 0;
bool wep1bs = false, wep2bs = false;
if (wep1subyte == 421)
{
wep1bs = true;
wep1subyte--;
}
ushort wep1spellid = 0, wep2spellid = 0;
Database.SpellInformation wep1spell = null, wep2spell = null;

if (Database.SpellTable.WeaponSpells.ContainsKey(wep1 subyte))
{
var weaponskill = Database.SpellTable.WeaponSpells[wep1subyte];
for (int i = 0; i < weaponskill.Count; i++)
{
if (!doWep1Spell)
{
wep1spellid = weaponskill[i];
if (wep1subyte == 622)
{
if (attacker.WrathoftheEmperor == true)
{
if (attacker.WrathoftheEmperorStamp <= DateTime.Now.AddMilliseconds(1500))
{
wep1spellid = 12570;
}
attacker.WrathoftheEmperor = false;
}
}
if (attacker.Owner.Spells.ContainsKey(wep1spellid) && Database.SpellTable.SpellInformations.ContainsKey( wep1spellid))
{
wep1spell = Database.SpellTable.SpellInformations[wep1spellid][attacker.Owner.Spells[wep1spellid].Level];
doWep1Spell = Kernel.Rate(wep1spell.Percent);
if (attacked.EntityFlag == EntityFlag.Player && wep1spellid == 10490)
doWep1Spell = Kernel.Rate(15);
}
}
}
}
if (!doWep1Spell)
{
if (weapons.Item2 != null)
{
ConquerItem leftweapon = weapons.Item2;
wep2subyte = (ushort)(leftweapon.ID / 1000);
if (wep2subyte == 421)
{
wep2bs = true;
wep2subyte--;
}

if (Database.SpellTable.WeaponSpells.ContainsKey(wep2 subyte))
{
var weaponskill2 = Database.SpellTable.WeaponSpells[wep2subyte];
for (int i = 0; i < weaponskill2.Count; i++)
{
if (!doWep2Spell)
{
wep2spellid = weaponskill2[i];
if (wep2subyte == 622)
{
if (attacker.WrathoftheEmperor == true)
{
if (attacker.WrathoftheEmperorStamp <= DateTime.Now.AddMilliseconds(1500))
{
wep2spellid = 12570;
}
attacker.WrathoftheEmperor = false;
}
}
if (attacker.Owner.Spells.ContainsKey(wep2spellid) && Database.SpellTable.SpellInformations.ContainsKey( wep2spellid))
{
wep2spell = Database.SpellTable.SpellInformations[wep2spellid][attacker.Owner.Spells[wep2spellid].Level];
doWep2Spell = Kernel.Rate(wep2spell.Percent);
if (attacked.EntityFlag == EntityFlag.Player && wep2spellid == 10490)
doWep2Spell = Kernel.Rate(15);
}
}
}
}
}
}

if (!attacker.Transformed)
{
if (doWep1Spell)
{
attack.AttackType = Attack.Magic;
attack.Decoded = true;
attack.weaponspell = true;
attack.X = attacked.X;
attack.Y = attacked.Y;
attack.Attacked = attacked.UID;
attack.Damage = wep1spell.ID;
goto restart;
}
if (doWep2Spell)
{
attack.AttackType = Attack.Magic;
attack.Decoded = true;
attack.weaponspell = true;
attack.X = attacked.X;
attack.Y = attacked.Y;
attack.Attacked = attacked.UID;
attack.Damage = wep2spell.ID;
goto restart;
}
if (wep1bs)
wep1subyte++;
if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player)
if (damage > attacked.Hitpoints)
{
attacker.Owner.IncreaseProficiencyExperience(Math. Min(damage, attacked.Hitpoints), wep1subyte);
if (wep2subyte != 0)
{
if (wep2bs)
wep2subyte++;
attacker.Owner.IncreaseProficiencyExperience(Math. Min(damage, attacked.Hitpoints), wep2subyte);
}
}
else
{
attacker.Owner.IncreaseProficiencyExperience(damag e, wep1subyte);
if (wep2subyte != 0)
{
if (wep2bs)
wep2subyte++;
attacker.Owner.IncreaseProficiencyExperience(damag e, wep2subyte);
}
}
}
}
else
{
if (!attacker.Transformed)
{
if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player)
if (damage > attacked.Hitpoints)
{
attacker.Owner.IncreaseProficiencyExperience(Math. Min(damage, attacked.Hitpoints), 0);
}
else
{
attacker.Owner.IncreaseProficiencyExperience(damag e, 0);
}
}
}
ReceiveAttack(attacker, attacked, attack, ref damage, null);
attack.AttackType = Attack.Melee;
}
else
{
attacker.AttackPacket = null;
}
}
else if (attacker.Owner.Screen.TryGetSob(attack.Attacked, out attackedsob))
{
CheckForExtraWeaponPowers(attacker.Owner, null);
if (CanAttack(attacker, attackedsob, null))
{
ushort range = attacker.AttackRange;
if (attacker.Transformed)
range = (ushort)attacker.TransformationAttackRange;
if (Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= range)
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);

var weapons = attacker.Owner.Weapons;
if (weapons.Item1 != null)
{
ConquerItem rightweapon = weapons.Item1;
ushort wep1subyte = (ushort)(rightweapon.ID / 1000), wep2subyte = 0;
bool wep1bs = false, wep2bs = false;
if (wep1subyte == 421)
{
wep1bs = true;
wep1subyte--;
}
ushort wep1spellid = 0, wep2spellid = 0;
Database.SpellInformation wep1spell = null, wep2spell = null;
if (Database.SpellTable.WeaponSpells.ContainsKey(wep1 subyte))
{
var wep1 = Database.SpellTable.WeaponSpells[wep1subyte];
for (int i = 0; i < wep1.Count; i++)
{
if (!doWep1Spell)
{
wep1spellid = wep1[i];
if (attacker.Owner.Spells.ContainsKey(wep1spellid) && Database.SpellTable.SpellInformations.ContainsKey( wep1spellid))
{
wep1spell = Database.SpellTable.SpellInformations[wep1spellid][attacker.Owner.Spells[wep1spellid].Level];
doWep1Spell = Kernel.Rate(10);
}
}
}
}
if (!doWep1Spell)
{
if (weapons.Item2 != null)
{
ConquerItem leftweapon = weapons.Item2;
wep2subyte = (ushort)(leftweapon.ID / 1000);
if (wep2subyte == 421)
{
wep2bs = true;
wep2subyte--;
}
if (Database.SpellTable.WeaponSpells.ContainsKey(wep2 subyte))
{
var wep2 = Database.SpellTable.WeaponSpells[wep2subyte];
for (int i = 0; i < wep2.Count; i++)
{
wep2spellid = wep2[i];
if (attacker.Owner.Spells.ContainsKey(wep2spellid) && Database.SpellTable.SpellInformations.ContainsKey( wep2spellid))
{
wep2spell = Database.SpellTable.SpellInformations[wep2spellid][attacker.Owner.Spells[wep2spellid].Level];
doWep2Spell = Kernel.Rate(10);
}
}
}
}
}

if (!attacker.Transformed)
{
if (doWep1Spell)
{
attack.AttackType = Attack.Magic;
attack.Decoded = true;
attack.weaponspell = true;
attack.X = attackedsob.X;
attack.Y = attackedsob.Y;
attack.Attacked = attackedsob.UID;
attack.Damage = wep1spell.ID;
goto restart;
}
if (doWep2Spell)
{
attack.AttackType = Attack.Magic;
attack.Decoded = true;
attack.weaponspell = true;
attack.X = attackedsob.X;
attack.Y = attackedsob.Y;
attack.Attacked = attackedsob.UID;
attack.Damage = wep2spell.ID;
goto restart;
}
if (attacker.MapID == 1039)
{
if (wep1bs)
wep1subyte++;
if (attacker.EntityFlag == EntityFlag.Player)
if (damage > attackedsob.Hitpoints)
{
attacker.Owner.IncreaseProficiencyExperience(Math. Min(damage, attackedsob.Hitpoints), wep1subyte);
if (wep2subyte != 0)
{
if (wep2bs)
wep2subyte++;
attacker.Owner.IncreaseProficiencyExperience(Math. Min(damage, attackedsob.Hitpoints), wep2subyte);
}
}
else
{
attacker.Owner.IncreaseProficiencyExperience(damag e, wep1subyte);
if (wep2subyte != 0)
{
if (wep2bs)
wep2subyte++;
attacker.Owner.IncreaseProficiencyExperience(damag e, wep2subyte);
}
}
}
}
}
attack.Damage = damage;
ReceiveAttack(attacker, attackedsob, attack, damage, null);
}
else
{
attacker.AttackPacket = null;
}
}
}
else
{
attacker.AttackPacket = null;
}
}
#endregion

انت فاكر كده خلصت لا طبعا لسه فيها اضافة تانية خش علي ملف World.cs و ابحث علي ده
private void CharactersCallback(GameState client, int time)

لو لقيت الاكواد دية عندك
if (!Valid(client)) return;
Time32 Now32 = new Time32(time);
DateTime Now64 = DateTime.Now;
if (client.Spells != null)

حط دول مكانها
if (!Valid(client)) return;
Time32 Now32 = new Time32(time);
DateTime Now64 = DateTime.Now;
if (client.Spells != null)
{
if (client.Spells.ContainsKey(12550) ||
client.Spells.ContainsKey(12560) ||
client.Spells.ContainsKey(12570))
{
if (!DataHolder.IsMonk(client.Entity.Class))
{

client.RemoveSpell(client.Spells[12550]);
client.RemoveSpell(client.Spells[12560]);
client.RemoveSpell(client.Spells[12570]);
}
}
}

هتبحث علي الكود ده في ملف Entity
public bool EpicMonk()

بدله بده
public bool EpicMonk()
{
if (EntityFlag == Game.EntityFlag.Player)
{
var weapons = Owner.Weapons;
if (weapons.Item1 != null)
if (weapons.Item1.ID / 1000 == 622)
return true;
if (weapons.Item2 != null)
if (weapons.Item2.ID / 1000 == 622)
return true;
}
return false;
}

public bool WrathoftheEmperor { get; set; }

public DateTime WrathoftheEmperorStamp { get; set; }


كده الاسكلة 100 % شغالة و صورة للتأكيد
عفواً لايمكن عرض الروابط في الإرشيف
عفواً لايمكن عرض الروابط في الإرشيف

uncelsam
2019-11-02, 11:13 PM
الله ينور يحازم

مايكل جا
2019-11-03, 09:01 AM
الله عليا بجد
لسه موضوعي بيتنشر لحد النهاردة

abdocoder
2020-03-21, 03:29 AM
شكرا

MRonlineGvrix
2023-05-28, 12:32 PM
عاش