منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   تطوير سيرفرات كونكر (https://code.vpscairo.com/forumdisplay.php?f=11)
-   -   تــعــديـل ع حـل مشـكـلة الاسـكـلةة للاخ ابـو مـرووان (https://code.vpscairo.com/showthread.php?t=1816)

Commander 2019-08-23 09:09 PM

تــعــديـل ع حـل مشـكـلة الاسـكـلةة للاخ ابـو مـرووان
 
بسم الله الرحمن الرحيم
الناس الي متعرفش الموضوع القديم اهو
عفواً لايمكن عرض الروابط إلا بعد الرد على الموضوع
هنعدل بس علي الاكواد بتاعت كلاس handle وباقي الموضوع تمام

ابحث عن
كود PHP:

 #region Monster -> Entity \ Monster 

[CENTER]هتلاقي جواه
#region ThunderCloud
#region ThunderCloudSight
اقفلهم وبدلهم الاتنين بدول
كود PHP:

   #region ThunderCloud
                    
if (attacker.Name == "Thundercloud")
                    {
                        
                        if (
Kernel.GamePool.ContainsKey(attacker.OwnerUID))
                        {
                          
                            var 
owner Kernel.GamePool[attacker.OwnerUID];
                            var 
spell Database.SpellTable.GetSpell(12840owner);
                            var 
spell2 Database.SpellTable.GetSpell(12970owner);
                            
byte percent 0;
                            if (
spell2 != null)
                            {
                                if (
spell2.Level == 0percent 130;
                                if (
spell2.Level == 1percent 140;
                                if (
spell2.Level == 2percent 150;
                                if (
spell2.Level == 3percent 160;
                                if (
spell2.Level == 4percent 170;
                                if (
spell2.Level == 5percent 180;
                                if (
spell2.Level == 6percent 200;
                            }
                            
attack = new Attack(true);
                            
attack.Attacker attacker.UID;
                            
attack.Attacked attacked.UID;
                            
attack.AttackType Network.GamePackets.Attack.Kill;
                            
attack.attacked.X;
                            
attack.attacked.Y;
                            
attack.Damage 1;
                            
uint damage2 = (uint)(Calculate.Melee(owner.Playerattackedref attack) * spell.FirstDamage 100);
                            if (
attacker.SpawnPacket[50] == 128)//ThunderBolt
                                
damage2 = (uint)(damage2 percent 100);
                            
SpellUse suse2 = new SpellUse(true);
                            
suse2.Attacker attacker.UID;
                            
suse2.Attacker1 attacked.UID;
                            
suse2.SpellID 13190;
                            
suse2.attacked.X;
                            
suse2.attacked.Y;
                            
suse2.AddTarget(attackeddamage2attack);
                            
attacker.MonsterInfo.SendScreen(suse2);
                            if (
attacked.Hitpoints <= damage2)
                            {
                                
attacked.Die(attacker);
                                
attack.ResponseDamage damage2;
                                
attacker.MonsterInfo.SendScreen(attack);
                            }
                            else
                            {
                                
attacked.Hitpoints -= damage2;
                            }
                            return;
                        }
                        else
                            return;
                    }
                    
#endregion
                    #region ThunderCloudSight
                    
if (attacker != null && Kernel.Maps[attacker.MapID] != null)
                    {
                        foreach (var 
th in Kernel.Maps[attacker.MapID].Entities.Values.Where(=> i.Name == "Thundercloud"))
                        {
                            if (
th.OwnerUID == attacked.UID)
                            {
                                if (
attacker == null || Kernel.GetDistance(attacker.Xattacker.Yth.Xth.Y) > th.MonsterInfo.AttackRange || attacker.Dead) break;
                                
th.MonsterInfo.InSight attacker.UID;
                                break;
                            }
                        }
                    }
                    
#endregion 

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

#region ThunderCloud(Passive)
                                
case 12840:
                                    {
                                        if (
CanUseSpell(spellattacker.Owner))
                                        {
                                            
PrepareSpell(spellattacker.Owner);
                                            
SpellUse suse = new SpellUse(true);
                                            
suse.Attacker attacker.UID;
                                            
suse.X;
                                            
suse.Y;
                                            
suse.SpellID spell.ID;
                                            
attacker.Owner.SendScreen(susetrue);
                                            
//////////////////////////////////////////////////
                                            ///////////////////////////////////////////////////
                                            
uint UID Kernel.Maps[attacker.MapID].EntityUIDCounter.Next;
                                            
uint Mesh 980;
                                            
//////////////////////////////////////////////////////
                                            
MsgPetInfo pet = new MsgPetInfo();
                                            
pet.UID UID;
                                            
pet.PetID 4264;
                                            
pet.PetType 3;
                                            
pet.Mesh Mesh;
                                            
pet.AttackRange 14;
                                            
pet.X;
                                            
pet.Y;
                                            
pet.Name "Thundercloud";
                                            
//////////////////////////////////////////////////
                                            ///////////////////////////////////////////////////
                                            //////////////////////////////////////////////////////
                                            
Entity ThunderCloud = new Entity(Game.EntityFlag.Monstertrue);
                                            
ThunderCloud.Name "Thundercloud";
                                            
ThunderCloud.Mesh Mesh;
                                            
ThunderCloud.UID UID;
                                            
ThunderCloud.GuildID attacker.GuildID;
                                            
ThunderCloud.MaxHitpoints attacker.MaxHitpoints;
                                            
ThunderCloud.Level 140;
                                            
ThunderCloud.X;
                                            
ThunderCloud.Y;
                                            
ThunderCloud.Facing attacker.Facing;
                                            
ThunderCloud.Boss 1;
                                            
ThunderCloud.MapID attacker.MapID;
                                            
Writer.Write(3308ThunderCloud.SpawnPacket);
                                            
Writer.Write(15272ThunderCloud.SpawnPacket);
                                            
Writer.Write(3271ThunderCloud.SpawnPacket);//AttackUser
                                            
Writer.Write(attacker.Owner.UnionID278ThunderCloud.SpawnPacket);//UnionID
                                            
ThunderCloud.OwnerUID attacker.UID;
                                            
ThunderCloud.Owner = new Client.GameState(null);
                                            
ThunderCloud.Owner.Player ThunderCloud;
                                            
ThunderCloud.MonsterInfo = new MonsterInformation();
                                            
ThunderCloud.MonsterInfo.AttackType 24;
                                            
ThunderCloud.MonsterInfo.AttackSpeed 1000;
                                            
ThunderCloud.MonsterInfo.AttackRange 14;
                                            
ThunderCloud.MonsterInfo.Boss true;
                                            
ThunderCloud.MonsterInfo.BoundX X;
                                            
ThunderCloud.Companion true;
                                            
ThunderCloud.MonsterInfo.Guard false;
                                            
ThunderCloud.MonsterInfo.BoundY Y;
                                            
ThunderCloud.MonsterInfo.Defence attacker.Defence;
                                            
ThunderCloud.MonsterInfo.Hitpoints 10000;
                                            
ThunderCloud.MonsterInfo.Mesh 980;
                                            
ThunderCloud.MonsterInfo.MoveSpeed int.MaxValue;
                                            
ThunderCloud.MonsterInfo.Name "Thundercloud";
                                            
ThunderCloud.MonsterInfo.Owner attacker;
                                            
ThunderCloud.MonsterInfo.ViewRange 14;
                                            
ThunderCloud.MonsterInfo.RespawnTime 0;
                                            
ThunderCloud.MonsterInfo.RunSpeed int.MaxValue;
                                            
ThunderCloud.MonsterInfo.SpellID 13190;
                                            
ThunderCloud.Hitpoints 10000;
                                            
Kernel.Maps[ThunderCloud.MapID].AddEntity(ThunderCloud);
                                            
//////////////////////////////////////////////////////////////
                                            //////////////////////////////////////////////////////////
                                            //////////////////////////////////////////////////////////
                                            /////////////////////////////////////////////
                                            
Network.GamePackets.Data d = new Data(true);
                                            
d.UID UID;
                                            
d.ID Data.AddEntity;
                                            
d.Facing attacker.Facing;
                                            
d.X2 ThunderCloud.X;
                                            
d.Y2 ThunderCloud.Y;
                                            
///////////////////////////////////////////////
                                            ////////////////////////////////////////////
                                            /////////////////////////////////////////
                                            
attacker.Owner.SendScreen(pet.ToArray(), true);
                                            
attacker.Owner.SendScreen(ThunderCloud.SpawnPackettrue);
                                            
attacker.Owner.SendScreenSpawn(ThunderCloudtrue);
                                            
attacker.Owner.SendScreen(dtrue);
                                            
ThunderCloud.ThunderCloudStamp Time32.Now;
                                            
Program.World.Register(ThunderCloud);
                                            
attacker.AttackPacket null;
                                        }
                                        break;

                                    }
                                
#endregion 

بعد كدا روح فويد
كود PHP:

void ReceiveAttack(Game.Entity attackerGame.Entity attackedAttack attackref uint damageDatabase.SpellInformation spell

هتلاقي
كود PHP:

region thundercloud 

بدلو بده
كود PHP:

#region ThunderCloud
            
if (attacked.Name == "Thundercloud")
            {
                if (
spell != null && spell.ID != 0damage 0;
                else 
damage 1;
            }
            foreach (var 
th in Kernel.Maps[attacker.MapID].Entities.Values.Where(=> i.Name == "Thundercloud"))
            {
                if (
th.OwnerUID == attacked.UID)
                {
                    if (
attacker == null || Kernel.GetDistance(attacker.Xattacker.Yth.Xth.Y) > th.MonsterInfo.AttackRange || attacker.Dead) break;
                    
th.MonsterInfo.InSight attacker.UID;
                    break;
                }
            }
            
#endregion 

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

 static bool CanAttack(Game.Entity attackerGame.Entity attackedDatabase.SpellInformation spellbool melee

هتلاقي region thundercloud بدله بده
كود PHP:

#region ThunderCloud
            
if (attacked.Name == "Thundercloud")
            {
                if (
attacked.OwnerUID == attacker.UID) return false;
                if (!
Constants.PKForbiddenMaps.Contains(attacker.MapID))
                {
                    if (
attacker.PKMode != Fighter.Game.Enums.PKMode.PK &&
                     
attacker.PKMode != Fighter.Game.Enums.PKMode.Team)
                        return 
false;
                    else if (
Constants.PKFreeMaps.Contains(attacker.MapID))
                    {
                        return 
true;
                    }
                    else
                    {
                        
attacker.FlashingNameStamp Time32.Now;
                        
attacker.FlashingNameTime 20;
                        
attacker.AddFlag(Network.GamePackets.Update.Flags.FlashingName);
                        return 
true;
                    }
                }
                else if (
Constants.PKForbiddenMaps.Contains(attacker.Owner.Map.ID))
                {
                    if (
attacker.PKMode == Fighter.Game.Enums.PKMode.PK ||
                        
attacker.PKMode == Fighter.Game.Enums.PKMode.Team || (spell != null && spell.CanKill))
                    {
                        
attacker.Owner.Send(Constants.PKForbidden);
                        
attacker.AttackPacket null;
                    }
                    return 
false;
                }
            }
            
#endregion 

بعد كدا ابحث عن
كود PHP:

 if (attacker.MonsterInfo.SpellID == 0

[/CENTER
انزل لحد
كود PHP:

 uint damage Calculate.MonsterDamage(attackerattackedattacker.MonsterInfo.SpellID); 

ضيف فوقيه ده
كود PHP:

#region ThunderCloud
                        
if (attacker.Name == "Thundercloud")
                        {
                            if (
Kernel.GamePool.ContainsKey(attacker.OwnerUID))
                            {
                                var 
owner Kernel.GamePool[attacker.OwnerUID];
                                var 
spell Database.SpellTable.GetSpell(12840owner);
                                var 
spell2 Database.SpellTable.GetSpell(12970owner);
                                
attack = new Attack(true);
                                
attack.Attacker attacker.UID;
                                
attack.Attacked attacked.UID;
                                
attack.AttackType Network.GamePackets.Attack.Magic;
                                
uint damage2 = (uint)(Calculate.Melee(owner.Playerattackedspell2ref attack) * (spell.Level spell.FirstDamage 50) / 100);
                                if (
attacker.ContainsFlag4(Network.GamePackets.Update.Flags4.ThunderBolt))
                                    
damage2 = (uint)(damage2 spell2.FirstDamage);
                                
SpellUse suse2 = new SpellUse(true);
                                
suse2.Attacker attacker.UID;
                                
suse2.Attacker1 attacked.UID;
                                
suse2.SpellID 13190;
                                
suse2.attacked.X;
                                
suse2.attacked.Y;
                                
suse2.AddTarget(attackeddamage2attack);
                                
attacker.MonsterInfo.SendScreen(suse2);
                                if (
attacked.Hitpoints <= damage2)
                                {
                                    
attacked.Die(attacker);
                                    
attack = new Attack(true);
                                    
attack.Attacker attacker.UID;
                                    
attack.Attacked attacked.UID;
                                    
attack.AttackType Network.GamePackets.Attack.Kill;
                                    
attack.attacked.X;
                                    
attack.attacked.Y;
                                    
attack.Damage 1;
                                    
attack.ResponseDamage damage2;
                                    
attacker.MonsterInfo.SendScreen(attack);
                                }
                                else
                                {
                                    
attacked.Hitpoints -= damage2;
                                }
                                return;
                            }
                            else
                                return;
                        }
                        
#endregion 


ابو مروان 2019-08-23 09:14 PM

رد: تعديل علي حل مشكلة thundercloud
 
جميل جميل جميل والله ما حد غيرك كان يمكن يعمل الموضوع دا عشان خاطر ان هو مطول كدا تقييم 100 نجمه وجارى التجربه ولو فيه جديد هقلك xd

ابو مروان 2019-08-23 09:19 PM

رد: تعديل علي حل مشكلة thundercloud
 
ايرور فى كود
كود PHP:

if (attacker.ContainsFlag4(Network.GamePackets.Update.Flags4.ThunderBolt)) 

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

ThunderBolt 


ابو مروان 2019-08-23 09:26 PM

رد: تعديل علي حل مشكلة thundercloud
 
فيه مشكله بسيطه خالص اللسكله بعد ما بتخلص الوقت بتاعها بتختفى عادى بس برده بتفضل تضرب والضربه بتظهر عند الشخصيه الى بتضرب وعند الشخصيه الى ضاربه اللسكله مبتظهرش
صورة للتوضيح دا مكان الى انا ضرب فيه اللسكله
عفواً لايمكن عرض الروابط إلا بعد الرد على الموضوع
وهنا لم بعدت عن المكان الضرب اختفا
عفواً لايمكن عرض الروابط إلا بعد الرد على الموضوع
وهنا عند الشخصيه الى ضرب اللسكله الضرب فى الشخصيه التانيه مش ظاهر ان هى بتضرب
عفواً لايمكن عرض الروابط إلا بعد الرد على الموضوع

Commander 2019-08-23 09:44 PM

رد: تعديل علي حل مشكلة thundercloud
 
روح كلاس flags4 وضيف ده
كود PHP:

 ThunderBolt 1UL << 199


Commander 2019-08-23 09:44 PM

رد: تعديل علي حل مشكلة thundercloud
 
وباالنسبه ان الاسكلة مش شغاله راجع اضافتك ياما تبعتلي رساله باي دي الاني دسك وهخش احلهالك

MohamedModyAdel 2019-08-23 10:19 PM

رد: تعديل علي حل مشكلة thundercloud
 
عاش

ابو مروان 2019-08-23 10:50 PM

رد: تعديل علي حل مشكلة thundercloud
 
اقتباس:

المشاركة الأصلية كتبت بواسطة commander (المشاركة 13209)
وباالنسبه ان الاسكلة مش شغاله راجع اضافتك ياما تبعتلي رساله باي دي الاني دسك وهخش احلهالك

ابعتلى رابط الفيس بتاعك يا صحبي او ضيفني انت الى يريحك
عفواً لايمكن عرض الروابط إلا بعد الرد على الموضوع

AliNasser 2019-08-24 11:54 AM

رد: تــعــديـل ع حـل مشـكـلة الاسـكـلةة للاخ ابـو مـرووان
 
شكرا جدا

AliNasser 2019-08-24 12:01 PM

رد: تــعــديـل ع حـل مشـكـلة الاسـكـلةة للاخ ابـو مـرووان
 
تسلم علي المجهود


الساعة الآن 12:51 PM

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