قديم 2020-05-03, 01:02 AM
المشاركة 2
ElSaher
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: بخصوص الحماية
بوص يا صحبي هتروح علي اسكلت المونك الي هيا التيجر
هتمسح الاسكلت ولو مش لقيتها ابحث عن
10381
وهتضيف دي

كود:
 case 10381:
                                    {
                                        if (
CanUseSpell(spellattacker.Owner) && Time32.Now attacker.SpellStamp.AddMilliseconds(500))
                                        {
                                            
attacker.SpellStamp Time32.Now;
                                            
ushort XxYx;
                                            if (
attacked != null)
                                            {
                                                
Xx attacked.X;
                                                
Yx attacked.Y;
                                            }
                                            else
                                            {
                                                
Xx attackedsob.X;
                                                
Yx attackedsob.Y;
                                            }
                                            if (
Kernel.GetDistance(attacker.Xattacker.YXxYx) <= spell.Range)
                                            {
                                                if (
attackedsob == null)
                                                    if (
attacked.ContainsFlag(Update.Flags.Fly))
                                                        return;
                                                if (
attacker.ContainsFlag(Update.Flags.Fly))
                                                    return;
                                                
PrepareSpell(spellattacker.Owner);
                                                
SpellUse suse = new SpellUse(true);
                                                
suse.Attacker attacker.UID;
                                                
suse.SpellID spell.ID;
                                                
suse.SpellLevel spell.Level;
                                                
suse.X;
                                                
suse.Y;

                                                
bool send false;
                                                if (
attackedsob == null)
                                                {
                                                    if (
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee))
                                                    {
                                                        
attack.Effect1 Attack.AttackEffects1.None;
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedref attackclient_Spell.LevelHu2);

                                                        
suse.Effect1 attack.Effect1;

                                                        
ReceiveAttack(attackerattackedattackref damagespell);
                                                        
suse.AddTarget(attackeddamageattack);
                                                        
send true;
                                                    }
                                                }
                                                else
                                                {
                                                    if (
CanAttack(attackerattackedsobspell))
                                                    {
                                                        
attack.Effect1 Attack.AttackEffects1.None;
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);

                                                        
ReceiveAttack(attackerattackedsobattackdamagespell);
                                                        
suse.Effect1 attack.Effect1;
                                                        
suse.AddTarget(attackedsobdamageattack);
                                                        
send true;
                                                    }
                                                }
                                                if (
send)
                                                    
attacker.Owner.SendScreen(susetrue);
                                            }
                                            else
                                            {
                                                
attacker.AttackPacket null;
                                            }
                                        }
                                        break;
                                    } 

بعدها هتبحث عن

كود:
#region Melee 

تقفلها بي الثالب وتمسحو وتحوط دول

كود:
                    #region Melee
                    
else if (attack.AttackType == Attack.Melee)
                    {
                        if (
attacker.Assassin() || attacker.IsBowEquipped || attacker.IsChaser1())
                        {
                            
attack.AttackType Attack.Ranged;
                            new 
Game.Attacking.Handle(attackattackerattacked);
                            return;
                        }
                        if (
attacker.Owner.Screen.TryGetValue(attack.Attackedout attacked))
                        {
                            if (
attacker.LeeLong())
                            {
                                
attacker.Owner.IncreaseProficiencyExperience(10617);
                            }
                            
//#region EarthSweep
                            //if (attack.SpellID == 12220 || attack.SpellID == 12210)
                            //{
                            //    SpellUse suse = new SpellUse(true);
                            //    suse.Attacker = attacker.UID;
                            //    suse.SpellID = attack.SpellID;
                            //    suse.SpellLevel = 0;
                            //    suse.X = attacker.X;
                            //    suse.Y = attacker.Y;
                            //    Fan fan = new Fan(attacker.X, attacker.Y, attacked.X, attacked.Y, 7, 180);
                            //    foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                            //    {
                            //        if (_obj == null)
                            //            continue;
                            //        if (_obj.MapObjType == MapObjectType.Monster ||
                            //            _obj.MapObjType == MapObjectType.Entity)
                            //        {
                            //            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 damage = Game.Attacking.Calculate.Melee(attacker,
                            //                        attacked, ref attack);
                            //                    attack.Attacked = 0;
                            //                    attack.Damage = damage;
                            //                    suse.Effect1 = attack.Effect1;
                            //                    ReceiveAttack(attacker, attacked, attack, ref damage, null);
                            //                    suse.AddTarget(attacked, damage, attack);
                            //                }
                            //            }
                            //        }
                            //    }
                            //    attacker.Owner.SendScreen(suse, true);
                            //    attacker.AttackPacket = null;
                            //    attack = null;
                            //    return;
                            //}
                            //#endregion
                            //#region EpicMonk
                            //if (attack.SpellID == 12580 || attack.SpellID == 12590 || attack.SpellID == 12600)
                            //{
                            //    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.Entity)
                            //        {
                            //            attacked = _obj as Entity;
                            //            if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 5)
                            //            {
                            //                if (CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee))
                            //                {
                            //                    attack.Effect1 = Attack.AttackEffects1.None;
                            //                    uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
                            //                    damage = (damage * 35) / 100;
                            //                    attack.Attacked = attacker.UID;
                            //                    attack.Attacked = attacked.UID;
                            //                    attack.Damage = damage;
                            //                    ReceiveAttack(attacker, attacked, attack, ref damage, null);
                            //                }
                            //            }
                            //        }
                            //    }
                            //    attacker.AttackPacket = null;
                            //    attack = null;
                            //    return;
                            //}
                            //#endregion
                            #region EpicMonk
                            
if (attack.SpellID == 12580 || attack.SpellID == 12590 || attack.SpellID == 12600)
                            {
                                
Fan fan = new Fan(attacker.Xattacker.Yattacked.Xattacked.Y7240);
                                foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                {
                                    if (
_obj == null) continue;
                                    if (
_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Entity)
                                    {
                                        
attacked _obj as Entity;
                                        if (
Kernel.GetDistance(attacker.Xattacker.Yattacked.Xattacked.Y) <= 5)
                                        {
                                            if (
CanAttack(attackerattackednullattack.AttackType == Attack.Melee))
                                            {
                                                
attack.Effect1 Attack.AttackEffects1.None;
                                                var 
damage Game.Attacking.Calculate.Melee(attackerattackedref attack);
                                                
damage = (uint)(damage 0.2);
                                                
attack.Attacked attacker.UID;
                                                
attack.Attacked attacked.UID;
                                                
attack.Damage damage;
                                                
ReceiveAttack(attackerattackedattackref damagenull);
                                            }
                                        }
                                    }
                                }
                                
attacker.AttackPacket null;
                                
attack null;
                                return;
                            }
                            
#endregion
                            #region Stomper(Melee)
                            #region Anger-Horror-Peace~of~Stomper(Windwalker-Stomper-Passive)
                            
var lastattacked attacked;
                            var 
spell5 Database.SpellTable.GetSpell(12980attacker.Owner);
                            if (
Kernel.Rate(spell5.Percent) && attacker.Owner.Spells.ContainsKey(12980) && attacker.IsStomper2())
                            {
                                
#region AngerofStomper
                                
{
                                    
SpellUse suse = new SpellUse(true);
                                    
suse.Attacker attacker.UID;
                                    
suse.SpellID spell5.ID;
                                    
suse.SpellLevel spell5.Level;
                                    
suse.lastattacked.X;
                                    
suse.lastattacked.Y;
                                    foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                    {
                                        if (
_obj == null)
                                            continue;
                                        
attacked _obj as Entity;
                                        if (
attacked == null) continue;
                                        if (
Kernel.GetDistance(attacked.Xattacked.Yattacker.Xattacker.Y) <= spell5.Range)
                                        {
                                            if (
_obj.MapObjType == MapObjectType.Entity)
                                            {
                                                if (!
CanAttack(attackerattackednullattack.AttackType == Attack.Melee)) continue;
                                                
attack.Effect1 Attack.AttackEffects1.None;
                                                var 
damage Game.Attacking.Calculate.Melee(attackerattackedref attack);
                                                
damage = (uint)(damage 0.750);
                                                
suse.Effect1 attack.Effect1;
                                                
attack.Damage 0;
                                                
ReceiveAttack(attackerattackedattackref damagespell5);
                                                
suse.AddTarget(attackeddamageattack);
                                            }
                                            else if (
_obj.MapObjType == MapObjectType.Monster)
                                            {
                                                if (!
CanAttack(attackerattackednullattack.AttackType == Attack.Melee)) continue;
                                                
uint damage Game.Attacking.Calculate.Melee(attackerattackedref attack);
                                                
damage = (uint)(damage 0.780);
                                                
attack.Damage 0;
                                                
ReceiveAttack(attackerattackedattackref damagespell5);
                                                
suse.AddTarget(attacked.UIDdamageattack);
                                            }
                                            else if (
_obj.MapObjType == MapObjectType.SobNpc)
                                            {
                                                
attackedsob _obj as SobNpcSpawn;
                                                if (
Kernel.GetDistance(attacker.Xattacker.Yattackedsob.Xattackedsob.Y) <= spell5.Range)
                                                {
                                                    if (
CanAttack(attackerattackedsobspell5))
                                                    {
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);
                                                        
damage = (damage 22) / 100;
                                                        
attack.Damage 0;
                                                        
ReceiveAttack(attackerattackedsobattackdamagespell5);
                                                        
suse.AddTarget(attackedsobdamageattack);
                                                    }
                                                }
                                            }
                                        }

                                    }
                                    
attacker.AttackPacket null;
                                    
attacker.Owner.SendScreen(susetrue);

                                }
                                
#endregion
                                #region HorrorofStomper
                                
{
                                    var 
spell2 Database.SpellTable.GetSpell(12990attacker.Owner);
                                    if (!
attacker.Owner.Spells.ContainsKey(12990)) return;
                                    
attack.Damage 0;
                                    
SpellUse suse = new SpellUse(true);
                                    
suse.Attacker attacker.UID;
                                    
suse.SpellID spell2.ID;
                                    
suse.SpellLevel spell2.Level;
                                    
suse.lastattacked.X;
                                    
suse.lastattacked.Y;
                                    
attacker.AttackPacket null;
                                    
attacker.Owner.SendScreen(susetrue);
                                    
#region Flooritem
                                    
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 1530;
                                    
flooritem.lastattacked.X;
                                    
flooritem.lastattacked.Y;
                                    
flooritem.Type FloorItem.Effect;
                                    
flooritem.mColor 14;
                                    
flooritem.OwnerUID attacker.UID;
                                    
flooritem.OwnerGuildUID attacker.GuildID;
                                    
flooritem.FlowerType 3;
                                    
flooritem.Unknown37 1;
                                    
flooritem.X2 attacker.X;
                                    
flooritem.MapObjType MapObjectType.FloorSpell;
                                    
flooritem.Y2 attacker.Y;
                                    
flooritem.Angle attacker.Facing;
                                    
flooritem.MapID map.ID;
                                    
flooritem.Attack attack;
                                    
flooritem.OnFloor Time32.Now;
                                    
flooritem.Owner attacker.Owner;
                                    
map.AddFloorItem(flooritem);
                                    
attacker.Owner.SendScreenSpawn(flooritemtrue);
                                    
#endregion
                                
}
                                
#endregion
                                #region PeaceofStomper
                                
{
                                    var 
spell3 Database.SpellTable.GetSpell(13000attacker.Owner);
                                    if (!
attacker.Owner.Spells.ContainsKey(13000)) return;
                                    
attack.Damage 0;
                                    
SpellUse suse = new SpellUse(true);
                                    
suse.Attacker attacker.UID;
                                    
suse.SpellLevel spell3.Level;
                                    
suse.SpellID spell3.ID;
                                    
suse.lastattacked.X;
                                    
suse.lastattacked.Y;
                                    
attacker.AttackPacket null;
                                    
attacker.Owner.SendScreen(susetrue);
                                    
#region Flooritem
                                    
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 1540;
                                    
flooritem.lastattacked.X;
                                    
flooritem.lastattacked.Y;
                                    
flooritem.X2 attacker.X;
                                    
flooritem.Y2 attacker.Y;
                                    
flooritem.Type FloorItem.Effect;
                                    
flooritem.mColor 14;
                                    
flooritem.OwnerUID attacker.UID;
                                    
flooritem.OwnerGuildUID attacker.GuildID;
                                    
flooritem.FlowerType 3;
                                    
flooritem.Unknown37 1;
                                    
flooritem.MapID map.ID;
                                    
flooritem.MapObjType MapObjectType.FloorSpell;
                                    
flooritem.Attack attack;
                                    
flooritem.OnFloor Time32.Now;
                                    
flooritem.Owner attacker.Owner;
                                    
map.AddFloorItem(flooritem);
                                    
attacker.Owner.SendScreenSpawn(flooritemtrue);
                                    
#endregion
                                
}
                                
#endregion
                                
return;
                            }
                            
#endregion
                            
else if (attacker.IsStomper1())
                            {
                                
#region Sector-Circle-Rectangle(Windwalker-Stomper-Melee)
                                
if (attack.SpellID == 13040 || attack.SpellID == 13050)
                                {
                                    
#region Sector
                                    
if (attack.SpellID == 13040)
                                    {
                                        var 
spell Database.SpellTable.GetSpell(13040attacker.Owner);
                                        
SpellUse suse = new SpellUse(true);
                                        
suse.Attacker attacker.UID;
                                        
suse.SpellID attack.SpellID;
                                        
suse.attacker.X;
                                        
suse.attacker.Y;
                                        var 
angle Kernel.GetAngle(attacker.Xattacker.Yattacked.Xattacked.Y);
                                        
Map.UpdateCoordonatesForAngle(ref Xref Yangle);
                                        
Fan sector = new Fan(attacker.Xattacker.YXYspell.Rangespell.Sector);
                                        if (
Kernel.GetDistance(attacker.Xattacker.YXY) <= 7)
                                        {
                                            foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                            {
                                                if (
_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
                                                {
                                                    if (
_obj == null)
                                                        continue;
                                                    
attacked _obj as Entity;
                                                    if (
attacked == null) continue;
                                                    if (!
CanAttack(attackerattackednullattack.AttackType == Attack.Melee)) continue;
                                                    if (
sector.IsInFan(attacked.Xattacked.Y))
                                                    {
                                                        if (
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee))
                                                        {
                                                            
attack.Effect1 Attack.AttackEffects1.None;
                                                            
uint damage Game.Attacking.Calculate.Melee(attackerattackedspellref attack);
                                                            
attack.Damage 0;
                                                            
suse.Effect1 attack.Effect1;
                                                            
ReceiveAttack(attackerattackedattackref damagespell);
                                                            
suse.AddTarget(attackeddamageattack);
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    
#endregion
                                    #region Circle
                                    
if (attack.SpellID == 13050)
                                    {
                                        var 
spell Database.SpellTable.GetSpell(13050attacker.Owner);
                                        
SpellUse suse = new SpellUse(true);
                                        
suse.Attacker attacker.UID;
                                        
suse.SpellID attack.SpellID;
                                        
suse.attacker.X;
                                        
suse.attacker.Y;
                                        foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                        {
                                            if (
_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
                                            {
                                                if (
_obj == null)
                                                    continue;
                                                
attacked _obj as Entity;
                                                if (
attacked == null) continue;
                                                if (!
CanAttack(attackerattackednullattack.AttackType == Attack.Melee)) continue;
                                                if (
Kernel.GetDistance(attacked.Xattacked.Yattacker.Xattacker.Y) > 5) continue;
                                                
attack.Effect1 Attack.AttackEffects1.None;
                                                
uint damage Game.Attacking.Calculate.Melee(attackerattackedref attack);
                                                
attack.Damage 0;
                                                
ReceiveAttack(attackerattackedattackref damagespell);
                                                
suse.AddTarget(attackeddamageattack);
                                            }
                                        }
                                        
attacker.Owner.SendScreen(susetrue);
                                        return;
                                    }
                                    
#endregion

                                
}
                                
#endregion

                            
}
                            
#endregion

                            
CheckForExtraWeaponPowers(attacker.Ownerattacked);
                            if (!
CanAttack(attackerattackednullattack.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.Xattacker.Yattacked.Xattacked.Y) <= range || pass)
                            {
                                
attack.Effect1 Attack.AttackEffects1.None;
                                
uint damage Game.Attacking.Calculate.Melee(attackerattackedref attack);
                                
damage = (uint)(damage 0.450);
                                
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 == 616can true; if (weaps.Item2 != null) if (weaps.Item2.ID 1000 == 601 || weaps.Item2.ID 1000 == 616can true;
                                        
can true;
                                        if (
weaps.Item2 != null)
                                            if (
weaps.Item1 != null) if (weaps.Item1.ID 1000 == 601 || weaps.Item1.ID 1000 == 616can true; if (weaps.Item2 != null) if (weaps.Item2.ID 1000 == 601 || weaps.Item2.ID 1000 == 616can true;
                                        
can true;
                                        if (!
can)
                                            return;
                                        
ushort x attacked.X;
                                        
ushort y attacked.Y;
                                        
Map.UpdateCoordonatesForAngle(ref xref yKernel.GetAngle(attacked.Xattacked.Yattacker.Xattacker.Y));
                                        
attacker.Shift(xy);
                                        
attack.x;
                                        
attack.y;
                                        
attack.Damage damage;

                                        
attack.AttackType Attack.FatalStrike;
                                    }
                                }
                                var 
weapons attacker.Owner.Weapons;
                                if (
weapons.Item1 != null)
                                {
                                    
ConquerItem rightweapon weapons.Item1;
                                    
ushort wep1subyte = (ushort)(rightweapon.ID 500), wep2subyte 0;
                                    
bool wep1bs falsewep2bs false;
                                    if (
wep1subyte == 421 || wep1subyte == 620)
                                    {
                                        
wep1bs true;
                                        
wep1subyte 420;
                                    }
                                    
ushort wep1spellid 0wep2spellid 0;
                                    
Database.SpellInformation wep1spell nullwep2spell null;
                                    if (
wep1subyte == 622)
                                    {
                                        if (
attacker.WrathoftheEmperor == true)
                                        {
                                            if (
attacker.WrathoftheEmperorStamp <= DateTime.Now.AddMilliseconds(1500))
                                            {
                                                
//wep1spellid = 12570;
                                                
wep1spellid 10490;

                                            }
                                            
attacker.WrathoftheEmperor false;
                                        }
                                    }

                                    if (
Database.SpellTable.WeaponSpells.ContainsKey(wep1subyte))
                                    {
                                        var 
weaponskill Database.SpellTable.WeaponSpells[wep1subyte];
                                        for (
int i 0weaponskill.Counti++)
                                        {
                                            if (!
doWep1Spell)
                                            {
                                                
wep1spellid weaponskill[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(wep1spell.Percent);
                                                    if (
attacked.EntityFlag == EntityFlag.Entity && wep1spellid == 10490)
                                                        
doWep1Spell Kernel.Rate(5);
                                                }
                                            }
                                        }
                                    }
                                    if (!
doWep1Spell)
                                    {
                                        if (
weapons.Item2 != null)
                                        {
                                            
ConquerItem leftweapon weapons.Item2;
                                            
wep2subyte = (ushort)(leftweapon.ID 1000);
                                            if (
wep2subyte == 421 || wep2subyte == 620)
                                            {
                                                
wep2bs true;
                                                
wep2subyte 420;
                                            }
                                            if (
Database.SpellTable.WeaponSpells.ContainsKey(wep2subyte))
                                            {
                                                var 
weaponskill2 Database.SpellTable.WeaponSpells[wep2subyte];
                                                for (
int i 0weaponskill2.Counti++)
                                                {
                                                    if (!
doWep2Spell)
                                                    {
                                                        
wep2spellid weaponskill2[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(wep2spell.Percent);
                                                            if (
attacked.EntityFlag == EntityFlag.Entity && wep2spellid == 10490)
                                                                
doWep2Spell Kernel.Rate(5);
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }

                                    if (!
attacker.Transformed)
                                    {
                                        if (
doWep1Spell)
                                        {
                                            
attack.AttackType Attack.Magic;
                                            
attack.Decoded true;
                                            
attack.weaponspell true;
                                            
attack.attacked.X;
                                            
attack.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.attacked.X;
                                            
attack.attacked.Y;
                                            
attack.Attacked attacked.UID;
                                            
attack.Damage wep2spell.ID;
                                            goto 
restart;
                                        }
                                        if (
wep1bs)
                                            
wep1subyte++;
                                        if (
attacker.EntityFlag == EntityFlag.Entity && attacked.EntityFlag != EntityFlag.Entity)
                                            if (
damage attacked.Hitpoints)
                                            {
                                                
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damageattacked.Hitpoints), wep1subyte);
                                                if (
wep2subyte != 0)
                                                {
                                                    if (
wep2bs)
                                                        
wep2subyte++;
                                                    
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damageattacked.Hitpoints), wep2subyte);
                                                }
                                            }
                                            else
                                            {
                                                
attacker.Owner.IncreaseProficiencyExperience(damagewep1subyte);
                                                if (
wep2subyte != 0)
                                                {
                                                    if (
wep2bs)
                                                        
wep2subyte++;
                                                    
attacker.Owner.IncreaseProficiencyExperience(damagewep2subyte);
                                                }
                                            }
                                    }
                                }
                                else
                                {
                                    if (!
attacker.Transformed)
                                    {
                                        if (
attacker.EntityFlag == EntityFlag.Entity && attacked.EntityFlag != EntityFlag.Entity)
                                            if (
damage attacked.Hitpoints)
                                            {
                                                
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damageattacked.Hitpoints), 0);
                                            }
                                            else
                                            {
                                                
attacker.Owner.IncreaseProficiencyExperience(damage0);
                                            }
                                    }
                                }
                                
ReceiveAttack(attackerattackedattackref damagenull);
                                
attack.AttackType Attack.Melee;
                            }
                            else
                            {
                                
attacker.AttackPacket null;
                            }
                        }
                        else if (
attacker.Owner.Screen.TryGetSob(attack.Attackedout attackedsob))
                        {
                            
CheckForExtraWeaponPowers(attacker.Ownernull);
                            if (
CanAttack(attackerattackedsobnull))
                            {
                                
ushort range attacker.AttackRange;
                                if (
attacker.Transformed)
                                    
range = (ushort)attacker.TransformationAttackRange;
                                if (
Kernel.GetDistance(attacker.Xattacker.Yattackedsob.Xattackedsob.Y) <= range)
                                {
                                    
attack.Effect1 Attack.AttackEffects1.None;
                                    
uint damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);

                                    var 
weapons attacker.Owner.Weapons;
                                    if (
weapons.Item1 != null)
                                    {
                                        
ConquerItem rightweapon weapons.Item1;
                                        
ushort wep1subyte = (ushort)(rightweapon.ID 1000), wep2subyte 0;
                                        
bool wep1bs falsewep2bs false;
                                        if (
wep1subyte == 421 || wep1subyte == 620)
                                        {
                                            
wep1bs true;
                                            
wep1subyte 420;
                                        }

                                        
ushort wep1spellid 0wep2spellid 0;
                                        
Database.SpellInformation wep1spell nullwep2spell null;
                                        if (
Database.SpellTable.WeaponSpells.ContainsKey(wep1subyte))
                                        {
                                            var 
wep1 Database.SpellTable.WeaponSpells[wep1subyte];
                                            for (
int i 0wep1.Counti++)
                                            {
                                                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(wep1spell.Percent);
                                                    }
                                                }
                                            }
                                        }
                                        if (!
doWep1Spell)
                                        {
                                            if (
weapons.Item2 != null)
                                            {
                                                
ConquerItem leftweapon weapons.Item2;
                                                
wep2subyte = (ushort)(leftweapon.ID 1000);
                                                if (
wep2subyte == 421 || wep2subyte == 620)
                                                {
                                                    
wep2bs true;
                                                    
wep2subyte 420;
                                                }
                                                if (
Database.SpellTable.WeaponSpells.ContainsKey(wep2subyte))
                                                {
                                                    var 
wep2 Database.SpellTable.WeaponSpells[wep2subyte];
                                                    for (
int i 0wep2.Counti++)
                                                    {
                                                        
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(wep2spell.Percent);
                                                        }
                                                    }
                                                }
                                            }
                                        }

                                        if (!
attacker.Transformed)
                                        {
                                            if (
doWep1Spell)
                                            {
                                                
attack.AttackType Attack.Magic;
                                                
attack.Decoded true;
                                                
attack.weaponspell true;
                                                
attack.attackedsob.X;
                                                
attack.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.attackedsob.X;
                                                
attack.attackedsob.Y;
                                                
attack.Attacked attackedsob.UID;
                                                
attack.Damage wep2spell.ID;
                                                goto 
restart;
                                            }
                                            if (
attacker.MapID == 1039)
                                            {
                                                if (
wep1bs)
                                                    
wep1subyte++;
                                                if (
attacker.EntityFlag == EntityFlag.Entity)
                                                    if (
damage attackedsob.Hitpoints)
                                                    {
                                                        
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damageattackedsob.Hitpoints), wep1subyte);
                                                        if (
wep2subyte != 0)
                                                        {
                                                            if (
wep2bs)
                                                                
wep2subyte++;
                                                            
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damageattackedsob.Hitpoints), wep2subyte);
                                                        }
                                                    }
                                                    else
                                                    {
                                                        
attacker.Owner.IncreaseProficiencyExperience(damagewep1subyte);
                                                        if (
wep2subyte != 0)
                                                        {
                                                            if (
wep2bs)
                                                                
wep2subyte++;
                                                            
attacker.Owner.IncreaseProficiencyExperience(damagewep2subyte);
                                                        }
                                                    }
                                            }
                                        }
                                    }
                                    
attack.Damage damage;
                                    
ReceiveAttack(attackerattackedsobattackdamagenull);
                                }
                                else
                                {
                                    
attacker.AttackPacket null;
                                }
                            }
                        }
                        else
                        {
                            
attacker.AttackPacket null;
                        }
                    }
                    
#endregion 

طيب افرد لسه مش اتحلت هقولك كمل معايا
ابحث عن

كود:
#region Ranged 

اقفلها بي الثالب وامسحها وبدلها بي دول

كود:
                    #region Ranged
                    
else if (attack.AttackType == Attack.Ranged)
                    {

                        if (
attacker.Owner.Screen.TryGetValue(attack.Attackedout attacked))
                        {
                            
CheckForExtraWeaponPowers(attacker.Ownerattacked);
                            if (!
CanAttack(attackerattackednullfalse))
                                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.KineticSpark))
                            {
                                var 
spell Database.SpellTable.GetSpell(11590attacker.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.attacker.X;
                                        
suse.attacker.Y;
                                        
IMapObject lastAttacked attacker;
                                        
uint p 0;
                                        if (
Handle.CanAttack(attackerattackedspellfalse))
                                        {
                                            
lastAttacked attacked;
                                            
uint damage Game.Attacking.Calculate.Melee(attackerattackedspellref attack);
                                            
damage = (uint)((damage) / 1.50);
                                            
suse.Effect1 attack.Effect1;
                                            if (
attacker.SpiritFocus)
                                            {
                                                
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                
attacker.SpiritFocus false;
                                            }
                                            
damage damage damage * (+= 20) / 100;
                                            
Handle.ReceiveAttack(attackerattackedattackref damagespell);
                                            
suse.AddTarget(attackeddamageattack);
                                        }
                                        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.XlastAttacked.Yattacked1.Xattacked1.Y) <= 5)
                                                {
                                                    if (
Handle.CanAttack(attackerattacked1spellfalse))
                                                    {
                                                        
lastAttacked attacked1;
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattacked1spellref attack);
                                                        
suse.Effect1 attack.Effect1;
                                                        if (
attacker.SpiritFocus)
                                                        {
                                                            
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                            
attacker.SpiritFocus false;
                                                        }
                                                        
damage damage damage * (+= 20) / 100;
                                                        if (
damage == 0) break;
                                                        
ReceiveAttack(attackerattacked1attackref damagespell);
                                                        
suse.AddTarget(attacked1damageattack);
                                                    }
                                                }
                                            }
                                            else if (
_obj.MapObjType == MapObjectType.SobNpc)
                                            {
                                                
attackedsob _obj as SobNpcSpawn;
                                                if (
Kernel.GetDistance(lastAttacked.XlastAttacked.Yattackedsob.Xattackedsob.Y) <= 5)
                                                {
                                                    if (
Handle.CanAttack(attackerattackedsobspell))
                                                    {
                                                        
lastAttacked attackedsob;
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);
                                                        
suse.Effect1 attack.Effect1;
                                                        if (
attacker.SpiritFocus)
                                                        {
                                                            
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                            
attacker.SpiritFocus false;
                                                        }
                                                        
damage damage damage * (+= 20) / 100;
                                                        if (
damage == 0) break;
                                                        
Handle.ReceiveAttack(attackerattackedsobattackdamagespell);
                                                        
suse.AddTarget(attackedsobdamageattack);
                                                    }
                                                }
                                            }
                                        }
                                        
attacker.Owner.SendScreen(susetrue);
                                        return;
                                    }
                                }
                            }
                            
#endregion
                            #region ShadowofChaser
                            
if (attacker.ContainsFlag4(Update.Flags4.ShadowofChaser) && attacker.IsChaser2())
                            {
                                var 
spell Database.SpellTable.GetSpell(13090attacker.Owner);
                                if (
spell != null)
                                {
                                    
spell.CanKill true;
                                    if (
Kernel.Rate(spell.Percent))
                                    {
                                        
ShadowofChaser(attackerattackedattack1);
                                        return;
                                    }
                                }
                            }
                            
#endregion

                            
if (Kernel.GetDistance(attacker.Xattacker.Yattacked.Xattacked.Y) <= Constants.pScreenDistance)
                            {
                                
attack.Effect1 Attack.AttackEffects1.None;
                                
uint damage 0;
                                if (!
attacker.Assassin() && !attacker.IsChaser1())
                                    
damage Game.Attacking.Calculate.Ranged(attackerattackedref attack) * 300;
                                else
                                    
damage Game.Attacking.Calculate.Melee(attackerattackedref attack);
                                
damage damage - (uint)(damage .50);
                                
damage damage 100;
                                
attack.Damage damage;
                                if (
attacker.EntityFlag == EntityFlag.Entity && attacked.EntityFlag != EntityFlag.Entity)
                                    if (
damage attacked.Hitpoints)
                                    {
                                        
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damageattacked.Hitpoints), (ushort)(weapons.Item1.ID 1000));
                                    }
                                    else
                                    {
                                        
attacker.Owner.IncreaseProficiencyExperience(damage, (ushort)(weapons.Item1.ID 1000));
                                    }
                                
ReceiveAttack(attackerattackedattackref damagenull);
                            }
                        }
                        else if (
attacker.Owner.Screen.TryGetSob(attack.Attackedout attackedsob))
                        {
                            if (
CanAttack(attackerattackedsobnull))
                            {

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

                                            
IMapObject lastAttacked attacker;
                                            
uint p 0;
                                            if (
Handle.CanAttack(attackerattackedsobspell))
                                            {
                                                
lastAttacked attackedsob;
                                                
uint damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);
                                                
damage = (uint)((damage) / 1);
                                                
suse.Effect1 attack.Effect1;
                                                if (
attacker.SpiritFocus)
                                                {
                                                    
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                    
attacker.SpiritFocus false;
                                                }
                                                
damage damage damage * (+= 20) / 100;
                                                
Handle.ReceiveAttack(attackerattackedsobattackdamagespell);
                                                
suse.AddTarget(attackedsobdamageattack);
                                            }
                                            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.XlastAttacked.Yattacked1.Xattacked1.Y) <= 5)
                                                    {
                                                        if (
Handle.CanAttack(attackerattacked1spellfalse))
                                                        {
                                                            
lastAttacked attacked1;
                                                            
uint damage Game.Attacking.Calculate.Melee(attackerattacked1spellref attack);
                                                            
suse.Effect1 attack.Effect1;
                                                            if (
attacker.SpiritFocus)
                                                            {
                                                                
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                                
attacker.SpiritFocus false;
                                                            }
                                                            
damage damage damage * (+= 20) / 100;
                                                            if (
damage == 0) break;
                                                            
ReceiveAttack(attackerattacked1attackref damagespell);
                                                            
suse.AddTarget(attacked1damageattack);
                                                        }
                                                    }
                                                }
                                                else if (
_obj.MapObjType == MapObjectType.SobNpc)
                                                {
                                                    if (
_obj.UID == Target) continue;
                                                    var 
attackedsob1 _obj as SobNpcSpawn;
                                                    if (
Kernel.GetDistance(lastAttacked.XlastAttacked.Yattackedsob1.Xattackedsob1.Y) <= 5)
                                                    {
                                                        if (
Handle.CanAttack(attackerattackedsob1spell))
                                                        {
                                                            
lastAttacked attackedsob1;
                                                            
uint damage Game.Attacking.Calculate.Melee(attackerattackedsob1ref attack);
                                                            
suse.Effect1 attack.Effect1;
                                                            if (
attacker.SpiritFocus)
                                                            {
                                                                
damage = (uint)(damage attacker.SpiritFocusPercent);
                                                                
attacker.SpiritFocus false;
                                                            }
                                                            
damage damage damage * (+= 20) / 100;
                                                            if (
damage == 0) break;
                                                            
Handle.ReceiveAttack(attackerattackedsob1attackdamagespell);
                                                            
suse.AddTarget(attackedsob1damageattack);
                                                        }
                                                    }
                                                }
                                            }
                                            
attacker.Owner.SendScreen(susetrue);
                                            return;
                                        }
                                    }
                                }
                                
#endregion
                                
if (Kernel.GetDistance(attacker.Xattacker.Yattackedsob.Xattackedsob.Y) <= Constants.pScreenDistance)
                                {
                                    
attack.Effect1 Attack.AttackEffects1.None;
                                    
uint damage 0;
                                    if (!
attacker.Assassin() && !attacker.IsChaser1())
                                        
damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack) / 2;
                                    else
                                        
damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack) / 2;
                                    
attack.Damage damage;
                                    
ReceiveAttack(attackerattackedsobattackdamagenull);
                                    if (
damage attackedsob.Hitpoints)
                                    {
                                        
attacker.Owner.IncreaseProficiencyExperience(Math.Min(damageattackedsob.Hitpoints), (ushort)(weapons.Item1.ID 1000));
                                    }
                                    else
                                    {
                                        
attacker.Owner.IncreaseProficiencyExperience(damage, (ushort)(weapons.Item1.ID 1000));
                                    }
                                }
                            }
                        }
                        else
                        {
                            
attacker.AttackPacket null;
                        }
                    }
                    
#endregion 

طيب افرد الحل دا منفعشي هتعمل اي
هقولك
تروح تركب لودر احمد الزيرو هيحميك شويا
https://code.vpscairo.com/showthread.php?t=2285
وانشاء الله تتحل

قديم 2020-05-04, 05:16 PM
المشاركة 3
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: بخصوص الحماية
خلي دمج الاسكله 0 او ميضربش الا لو ف مشافه 0


العلامات المرجعية



الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 

الانتقال السريع

المواضيع المتشابهه للموضوع: بخصوص الحماية
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
بخصوص اتشكات الحماية Mostafa Shalby مشكلات السيرفيرات كونكر الشخصيه 2 2020-05-11 10:28 PM
الحماية من هكر كونكر body2020 مشكلات السيرفيرات كونكر الشخصيه 7 2020-05-03 12:51 AM
الحماية من السبييد Mostafa Shalby مشكلات السيرفيرات كونكر الشخصيه 4 2020-01-26 02:45 AM
خلي الجماية التورتس شغالة زي Conquer Online Mero تطوير سيرفرات كونكر 3 2019-10-23 01:01 PM


الساعة الآن 09:07 PM

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.