عرض مشاركة واحدة
قديم 2019-08-06, 03:28 PM
المشاركة 2
Hassan Emprator
.:: عضو خبير ::.
  • غير متواجد
Smiley2s رد: مشاكل اسكلات سورس KhaledMohamed
سلام عليكم ورحمت الله وبركاته هنبدا بي اول سكله هتبدلها بي الاسكله الي عندك دي
كود:
         }
                                case 
6001://toxicfog
                                    
{
                                        if (
CanUseSpell(spellattacker.Owner))
                                        {
                                            
PrepareSpell(spellattacker.Owner);

                                            
SpellUse suse = new SpellUse(true);
                                            
suse.Attacker attacker.UID;
                                            
suse.SpellID spell.ID;
                                            
suse.SpellLevel spell.Level;

                                            
suse.X;
                                            
suse.Y;
                                            if (
Kernel.GetDistance(attacker.Xattacker.YXY) <= spell.Distance)
                                            {
                                                foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                                {
                                                    if (
_obj.MapObjType == MapObjectType.Player || _obj.MapObjType == MapObjectType.Monster)
                                                    {
                                                        
attacked _obj as Entity;
                                                        if (
attacked.MapObjType == MapObjectType.Monster)
                                                            if (
attacked.MonsterInfo.Boss)
                                                                continue;
                                                        if (
Kernel.GetDistance(XYattacked.Xattacked.Y) <= spell.Range)
                                                        {
                                                            if (
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee))
                                                            {
                                                                
int potDifference attacker.BattlePower attacked.BattlePower;

                                                                
int rate spell.Percent potDifference 20;

                                                                if (
Kernel.Rate(rate))
                                                                {
                                                                    
attacked.ToxicFogStamp Time64.Now;
                                                                    
attacked.ToxicFogLeft 7;
                                                                    
attacked.ToxicFogPercent spell.PowerPercent;
                                                                    
attacked.AddFlag(Update.Flags.Poisoned);
                                                                    
suse.AddTarget(attacked.UID1null);
                                                                }
                                                                else
                                                                {
                                                                    
suse.AddTarget(attacked.UID0null);
                                                                    
suse.Targets[attacked.UID].Hit false;
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                            else
                                            {
                                                
attacker.AttackPacket null;
                                            }
                                            
attacker.Owner.SendScreen(susetrue);
                                        }
                                        break;
                                    } 

وهبتحث عن الكود دا

كود:
  case Enums.ItemEffect.Poison

هتبدله بي دا

كود:
   case Enums.ItemEffect.Poison:
                                    {
                                        if (
attacked != null)
                                        {
                                            if (
Constants.PKForbiddenMaps.Contains(client.Entity.MapID))
                                                return;
                                            if (
client.Map.BaseID == 700)
                                                return;
                                            if (
attacked.UID == client.Entity.UID)
                                                return;
                                            if (
attacked.ToxicFogLeft 0)
                                                return;
                                            
SpellUse spellUse = new SpellUse(true);
                                            
spellUse.SpellID 5040;
                                            
spellUse.Attacker attacked.UID;
                                            
spellUse.SpellLevel 9;
                                            
spellUse.attacked.X;
                                            
spellUse.attacked.Y;
                                            
spellUse.AddTarget(attacked0null);
                                            
spellUse.Targets[attacked.UID].Hit true;
                                            
attacked.ToxicFogStamp Time32.Now;
                                            
attacked.ToxicFogLeft 10;
                                            
attacked.ToxicFogPercent 0.05F;
                                            
client.SendScreen(spellUsetrue);
                                        }
                                        break;
                                    }
                            }
                        }
                    }
                }
            } 

انتهينا من المشكله الاوله نيجيي لاسكله التانيه

هتبدل دا بي الي عيندك هيا اولا ملهاش تعديل في السورس تقريبا تعديلها عندك من ملف spells من القاعده فا هتعدلها من دا
لو عندك #نكمل

كود:
#region ManiacDance
                                    
case 12700:
                                        {

                                            if (
attacker.ContainsFlag(Update.Flags.XPList))
                                            {
                                                
attacker.RemoveFlag(Update.Flags.XPList);
                                                
SpellUse suse = new SpellUse(true);
                                                
suse.Attacker attacker.UID;
                                                
suse.SpellID spell.ID;
                                                
suse.SpellLevel spell.Level;
                                                
suse.X;
                                                
suse.Y;

                                                
attacker.ManiacDanceStamp Time32.Now;
                                                
attacker.AddFlag3(Update.Flags3.WaniacDance);
                                                
attacker.Owner.SendScreen(susetrue);
                                            }
                                            break;
                                        }
                                    
#endregion 

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

كود بلغة HTML:
#region ThunderCloud[Chaser]
                                    case 12840:
                                        {
                                            if (CanUseSpell(spell, attacker.Owner))
                                            {
                                                attacker.GreenEffect = 10;
                                                PrepareSpell(spell, attacker.Owner);
                                                SpellUse suse = new SpellUse(true);
                                                suse.Attacker = attacker.UID;
                                                suse.Attacker1 = attacker.UID;
                                                suse.SpellID = spell.ID;
                                                suse.SpellLevel = spell.Level;
                                                var cl = new WindWalker.ThunderCloud(attacker.Owner, attack.X, attack.Y);
                                                suse.AddTarget(cl.UID, 0, null);
                                                attacker.Owner.SendScreen(suse, true);
                                            }
                                            break;
                                        }
                                    #endregion
واخر اسكله هتبدل دي بي الي عندك وانشاء الله اتحلو كلهم انشاء الله

كود بلغة HTML:
#region ScurvyBomb
                                case 11040:
                                    {
                                        if (Time32.Now < attacker.SpellStamp.AddMilliseconds(200))//1000
                                        {
                                            attacker.AttackPacket = null; return;
                                        }
                                        else if (CanUseSpell(spell, attacker.Owner))
                                        {

                                            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;

                                            KhaledMohamed.Network.GamePackets.SpellUse.DamageClass tar = new SpellUse.DamageClass();
                                            foreach (var t in attacker.Owner.Screen.Objects)
                                            {
                                                if (t == null)
                                                    continue;
                                                if (t.MapObjType == MapObjectType.Entity || t.MapObjType == MapObjectType.Monster)
                                                {
                                                    var target = t as Entity;
                                                    int rate = 20;
                                                    if (attacker.BattlePower == target.BattlePower)
                                                        rate = 50;
                                                    if (attacker.BattlePower > target.BattlePower)
                                                        rate = 80;
                                                    else
                                                        rate = 100 - ((target.BattlePower - attacker.BattlePower) * 2);
                                                    rate = Math.Max(20, rate);
                                                    if (Kernel.GetDistance(X, Y, target.X, target.Y) <= spell.Range && MyMath.Success((double)rate))
                                                    {
                                                        if (CanAttack(attacker, target, spell, false))
                                                        {
                                                            tar.Damage = Calculate.Ranged(attacker, target, spell, ref attack);
                                                            if (t.MapObjType == MapObjectType.Monster)
                                                                tar.Damage = tar.Damage * 10;
                                                            if (t.MapObjType == MapObjectType.Entity)
                                                                tar.Damage = tar.Damage / 100;
                                                            ReceiveAttack(attacker, target, attack, ref tar.Damage, spell);
                                                            target.AddFlag2(KhaledMohamed.Network.GamePackets.Update.Flags2.DefensiveStance);
                                                            attacker.SpellStamp = Time32.Now;
                                                            target.FatigueStamp = Time32.Now;
                                                            target.FatigueSecs = spell.Time;
                                                            suse.AddTarget(target, tar, attack);
                                                        }
                                                    }
                                                }
                                            }

                                            if (attacker.EntityFlag == EntityFlag.Entity)
                                                attacker.Owner.SendScreen(suse, true);
                                        }
                                        break;
                                    }
                                #endregion
جرب وقولنا
بالتوفييق