منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   مشكلات السيرفيرات كونكر الشخصيه (https://code.vpscairo.com/forumdisplay.php?f=12)
-   -   مشاكل اسكلات سورس KhaledMohamed (https://code.vpscairo.com/showthread.php?t=1405)

MRonlineGvrix 2019-08-06 02:47 PM

مشاكل اسكلات سورس KhaledMohamed
 
ياريت مش اى حد يجيب اى حل ملوش لزمة يتحط برا تمت الاجابة
المشكلة الاولى اسكلة النينجا ToxicFog
https://3.top4top.net/p_1313ij5xl1.png
مشكلة غريبة خالص شغالة تمام بس لما تضرب فيها فى اى لاعب مش بتنقص دمو نهائى با العكس بتزودو لو ناقص
كود PHP:

                                case 6001:
                                    {
                                        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;
                                            
//suse.SpellLevelHu = client_Spell.LevelHu2;
                                            
if (Kernel.GetDistance(attacker.Xattacker.YXY) <= spell.Distance)
                                            {
                                                foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                                {
                                                    if (
_obj.MapObjType == MapObjectType.Entity || _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 Time32.Now;
                                                                    
attacked.ToxicFogLeft 20;
                                                                    
attacked.ToxicFogPercent spell.PowerPercent;
                                                                    
attacked.AddFlag(Update.Flags.Poisoned);
                                                                    
suse.AddTarget(attacked1null);
                                                                }
                                                                else
                                                                {
                                                                    
suse.AddTarget(attacked0null);
                                                                    
suse.Targets[attacked.UID].Hit false;
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                            else
                                            {
                                                
attacker.AttackPacket null;
                                            }
                                            
attacker.Owner.SendScreen(susetrue);
                                        }
                                        break;
                                    } 

المشكلة الثانيا اسكلة الواريور ManiacDance
بتضرب جامد اوى اوى بتقتل اى حد يلمسها
https://4.top4top.net/p_13131af6y1.png
كود PHP:

#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 

المشكلة الثالثة اسكلة ال windwalker بتضرب اى حد 1 هت برضو
https://4.top4top.net/p_1313bdtdv1.png
كود PHP:

#region ThunderCloud[Chaser]
                                
case 12840:
                                    {
                                        if (
CanUseSpell(spellattacker.Owner))
                                        {
                                            
attacker.GreenEffect 10;
                                            
PrepareSpell(spellattacker.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.Ownerattack.Xattack.Y);
                                            
suse.AddTarget(cl.UID0null);
                                            
attacker.Owner.SendScreen(susetrue);
                                        }
                                        break;
                                    }
                                
#endregion 

المشكلة الاخيرة اسكلة القرصااان ScurvyBomb بتضرب اى حد 1 هت
https://4.top4top.net/p_1313yos4w1.png
كود PHP:

#region ScurvyBomb
                                
case 11040:
                                    if (
CanUseSpell(spellattacker.Owner))
                                    {

                                        
PrepareSpell(spellattacker.Owner);
                                        
Map map;
                                        
SpellUse suse = new SpellUse(true);
                                        
suse.Attacker attacker.UID;
                                        
suse.SpellID spell.ID;
                                        
suse.SpellLevel spell.Level;
                                        
suse.X;
                                        
suse.Y;
                                        
//suse.SpellLevelHu = client_Spell.LevelHu2;
                                        
KhaledMohamed.Network.GamePackets.SpellUse.DamageClass tar = new SpellUse.DamageClass();
                                        
int num 0;

                                        switch (
spell.Level)
                                        {
                                            case 
0:
                                            case 
1:
                                                
num 3;
                                                break;
                                            case 
2:
                                            case 
3:
                                                
num 4;
                                                break;
                                            default:
                                                
num 5;
                                                break;
                                        }
                                        
int i 0;
                                        
Kernel.Maps.TryGetValue(attacker.Owner.Map.BaseIDout map);
                                        foreach (var 
t in attacker.Owner.Screen.Objects)
                                        {
                                            if (
== null)
                                                continue;
                                            if (
t.MapObjType == MapObjectType.Entity || t.MapObjType == MapObjectType.Monster)
                                            {
                                                var 
target as Entity;
                                                if (
Kernel.GetDistance(XYtarget.Xtarget.Y) <= spell.Range)
                                                {
                                                    if (
CanAttack(attackertargetspellfalse))
                                                    {
                                                        
tar.Damage Calculate.Ranged(attackertargetref attack);
                                                        
tar.Hit true;
                                                        
tar.newX target.X;
                                                        
tar.newY target.Y;
                                                        
Map.Pushback(ref tar.newXref tar.newYattacker.Facing5);

                                                        if (
map != null)
                                                        {
                                                            if (
map.Floor[tar.newXtar.newYMapObjectType.Entityattacker])
                                                            {
                                                                
target.tar.newX;
                                                                
target.tar.newY;
                                                            }
                                                            else
                                                            {
                                                                
tar.newX target.X;
                                                                
tar.newY target.Y;
                                                            }
                                                        }
                                                        else
                                                        {
                                                            if (
attacker.Owner.Map.Floor[tar.newXtar.newYMapObjectType.Entityattacker])
                                                            {
                                                                
target.tar.newX;
                                                                
target.tar.newY;
                                                            }
                                                            else
                                                            {
                                                                
target.tar.newX;
                                                                
target.tar.newY;
                                                            }
                                                        }

                                                        
suse.AddTarget(targettarattack);
                                                        
ReceiveAttack(attackertargetattackref tar.Damagespell);

                                                        
i++;
                                                        if (
num) break;
                                                    }
                                                }
                                            }
                                        }

                                        if (
attacker.EntityFlag == EntityFlag.Entity)
                                            
attacker.Owner.SendScreen(susetrue);
                                    }
                                    break;
                                
#endregion 

ياريت حد يتابع معاايا

Hassan Emprator 2019-08-06 03:28 PM

رد: مشاكل اسكلات سورس KhaledMohamed
 
سلام عليكم ورحمت الله وبركاته هنبدا بي اول سكله هتبدلها بي الاسكله الي عندك دي
كود PHP:

         }
                                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;
                                    } 

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

  case Enums.ItemEffect.Poison

هتبدله بي دا
كود PHP:

   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 من القاعده فا هتعدلها من دا
لو عندك #نكمل
كود PHP:

#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

جرب وقولنا
بالتوفييق

Tefa 2019-08-06 03:59 PM

رد: مشاكل اسكلات سورس KhaledMohamed
 
متابع بس مش هرد علي حل اي مشكله في البوست ده لانه خالف القوانين بذكر اكتر من مشكله

MRonlineGvrix 2019-08-06 04:24 PM

رد: مشاكل اسكلات سورس KhaledMohamed
 
اقتباس:

المشاركة الأصلية كتبت بواسطة rider (المشاركة 10229)
متابع بس مش هرد علي حل اي مشكله في البوست ده لانه خالف القوانين بذكر اكتر من مشكله

بص حضرتك فهمنى برضو اعمل كل مشكلة لوحديها يعنى

MRonlineGvrix 2019-08-06 04:26 PM

رد: مشاكل اسكلات سورس KhaledMohamed
 
بص يباشا المشكلة الى اتحلت هيا اسكلة Scurvybomb

الباقى زى مهو
اسكلة الواريور و الويند مش موجودين عنى فى القاعدة spell
وشكرا على حل المشكلة تستحق اكتر من كدا والله

Hassan Emprator 2019-08-06 05:04 PM

رد: مشاكل اسكلات سورس KhaledMohamed
 
اقتباس:

المشاركة الأصلية كتبت بواسطة MRonlineGvrix (المشاركة 10237)
بص يباشا المشكلة الى اتحلت هيا اسكلة Scurvybomb

الباقى زى مهو
اسكلة الواريور و الويند مش موجودين عنى فى القاعدة spell
وشكرا على حل المشكلة تستحق اكتر من كدا والله

يحبي ابحث في spells بي id بتاعها مش اسم الاسكله

Tefa 2019-08-06 05:13 PM

رد: مشاكل اسكلات سورس KhaledMohamed
 
اسكلة الورير ف قاعده او في ورلد سيرش علي
كود PHP:

private void AutoAttackCallback

انزل تحت لحد
كود PHP:

attack.Damage damage

و تحتها حط
كود PHP:

 damage damage 100

بتتحكم عن طريقه تغيير رقم 100

Tefa 2019-08-06 05:16 PM

رد: مشاكل اسكلات سورس KhaledMohamed
 
اسكل ويند ولكر
هتبحث عن
كود PHP:

internal static void SendRevengeTail(Game.Entity attackerGame.Entity attackedref int damage

انزل تحت لحد
كود PHP:

 attack.Damage = (uint)damage

تحتها ضيف
كود PHP:

 damage damage 100

بتتحكم في الاتاك من خلال التعديل علي رقم 100

اسكل تخدير النينجا تم الحل في موضوع اخر

MRonlineGvrix 2019-08-06 05:31 PM

رد: مشاكل اسكلات سورس KhaledMohamed
 
تمت الحلول الحمد الله بفضل الله
ثم بفضلك انتا كلمة شكرا لا تكفى لوصف مجهودك
تخدير النينجا فى الموضوع الاخر متحلتش للاسف

Tefa 2019-08-06 06:34 PM

رد: مشاكل اسكلات سورس KhaledMohamed
 
تم بحمد الله و الفضل و الشكر لله وحده <3


الساعة الآن 01:45 AM

مرحبا بكم في منتدي اكواد لتطوير الالعاب