منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   تطوير سيرفرات كونكر (https://code.vpscairo.com/forumdisplay.php?f=11)
-   -   كوستة Golden Secret (https://code.vpscairo.com/showthread.php?t=173)

محمد ياسر 2019-04-24 09:43 AM

كوستة Golden Secret
 

مرحبا اعضاء منتدي اكواد
معانا اليوم شرح كوسته المفاتيح الذهبيه هي كوسته قديمه لكن حلوه
والشرح بسيرفير قديم لانه من زمان
يلا نبداء
[الصور + الشرح]


اولا بتكلم الراجل ده و تقوله Give me KeyBag

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

هيدلك الايتم دى


زى ما فى الصوره هنا

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

و لمة تيجى تفتحها هقولك لازم تروح تقتل الاول ChestDemon

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

هتروح المكان زى الى فى الصوره ,, هتلاقى الصناديق دى ,, اقتل واحد فيهم

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

هيجيلك مفاتح من الثلاثة دول
IronKey

CopperKey

SilverKey

و احسن واحد فيهم SilverKey

شوف الصوره كدا , مع افكت صغير كدا :)


و لمة تفتح المفتاح ,, هقولك لازم تكسر صندوق كمان.

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

طبعا هتكسر واحد كمان و تفتح المفتاح بس و انت بتفتحه ,, انت و حظك ,, يا يجبلك GoldKey يامة يختفى و يجبلك كدا

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


في النهايه خالص
عفواً لايمكن عرض الروابط إلا بعد الرد على الموضوع

التركيب
[شرح التركيب]

اولا ,, نفتح Game/Entity.cs
ندور على الكود ده :
كود PHP:

public class Entity WriterInterfaces.IBaseEntityInterfaces.IMapObject
    


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

public int ChestDemonkill 0// Golden Secret GH 

و بعد كدا نفتح Database/EntityTable.cs
و ندور على الكود ده:

كود PHP:

if (InvalidCharacters(eC.Name))
            {
                
message "Invalid characters inside the name.";
                return 
false;
            } 

و نضيف فوقيه الكود ده :
كود PHP:

if (eC.Name == "ChestDemon"// Golden Secret
            
{
                
message "Invalid characters inside the name.";
                return 
false;
            } 

و بعد كدا نفتح Database/MonsterTable.cs
كود PHP:

public void Drop(Game.Entity killer)
        { 

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

if (Name.Contains("ChestDemon")) // Golden Secret
            
{
                
killer.ChestDemonkill += 1;
                
killer.Owner.Send(new Message("You have killed ChestDemon!"System.Drawing.Color.AzureMessage.Center));
            } 

و بعد كدا نفتح Network/PacketHandler.cs
ندور على الكود ده او اي حاجه فيه
كود PHP:

 #region NPC Dialog (2031 + 2032)
                        
case 2031:
                        case 
2032:
                            {
                                if (
client.Action != 2)
                                    return;
                                
NpcRequest req = new NpcRequest();
                                
req.Deserialize(packet); 

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

// Golden Secret GH
                                #region TreasureChest
                                
if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 47 && client.Map.BaseID != 700)//CaptureFlag
                                
{
                                    if (
client.Inventory.Contains(30006281))
                                    {
                                        
client.Inventory.Remove(30006281);
                                        
client.Inventory.Add(300059301);
                                    }
                                    else
                                    {
                                        
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"Sorry, but you don't have GoldenKey");
                                        
client.Send(npc.ToArray());
                                    }
                                }
                                
#endregion 

و فى نفس الملف ندور على الكود ده :
او اي حاجه من الاكوده ده برضوا انا بنزل الكود كله علشان ممكن الكود الي انزله يكون عندك باسم مختلف
كود PHP:

static void UseItem(Interfaces.IConquerItem itemClient.GameState client)
        {
            
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(item.ID0);
            if (
client.Booth != null)
                return;
            
client.Entity.UseItem true;
            
client.SpiltStack true;
            switch (
item.ID)
            { 

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

 //Golden Secret GH
                #region Golden Secret quest items 
                #region KeyBag
                
case 3000624:
                    {
                        if (
client.Entity.ChestDemonkill >= 1)
                        {
                            if (
ServerBase.Kernel.PercentSuccess(10))
                            {
                                
client.Inventory.Add(300062701);
                                
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You gained a SilverKey from opening KeyBag.");
                                
client.Send(npc.ToArray());
                                
_String str = new _String(true);
                                
str.UID client.Entity.UID;
                                
str.Type _String.Effect;
                                
str.Texts.Add("lounder1");
                                
str.TextsCount 1;
                                
client.Entity.SendScreen(str);
                            }
                            else if (
ServerBase.Kernel.PercentSuccess(40))
                            {
                                
client.Inventory.Add(300062601);
                                
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You gained a CopperKey from opening KeyBag.");
                                
client.Send(npc.ToArray());
                                
_String str = new _String(true);
                                
str.UID client.Entity.UID;
                                
str.Type _String.Effect;
                                
str.Texts.Add("lounder1");
                                
str.TextsCount 1;
                                
client.Entity.SendScreen(str);
                            }
                            else if (
ServerBase.Kernel.PercentSuccess(80))
                            {
                                
client.Inventory.Add(300062501);
                                
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You gained a IronKey from opening KeyBag.");
                                
client.Send(npc.ToArray());
                                
_String str = new _String(true);
                                
str.UID client.Entity.UID;
                                
str.Type _String.Effect;
                                
str.Texts.Add("lounder1");
                                
str.TextsCount 1;
                                
client.Entity.SendScreen(str);
                            }
                            
client.Entity.ChestDemonkill 0;
                        }
                        else
                        {
                            
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You need to kill a ChestDemon to open KeyBag.");
                            
client.Send(npc.ToArray());
                        }
                        break;
                    }
                
#endregion
                #region IronKey
                
case 3000625:
                    {
                        if (
client.Entity.ChestDemonkill >= 1)
                        {
                            if (
ServerBase.Kernel.PercentSuccess(5))
                            {
                                
client.Inventory.Remove(itemGame.Enums.ItemUse.Remove);
                                
client.Inventory.Remove(30006241);
                                
client.Inventory.Add(300062801);
                                
_String str = new _String(true);
                                
str.UID client.Entity.UID;
                                
str.Type _String.Effect;
                                
str.Texts.Add("break_start");
                                
str.TextsCount 1;
                                
client.Entity.SendScreen(str);
                                
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You received a Gold Key! Hurry and use it to open the Treasure Chest!");
                                
client.Send(npc.ToArray());
                            }
                            else
                            {
                                
client.Inventory.Remove(itemGame.Enums.ItemUse.Remove);
                                
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"The Chest Demon suddenly bit you and fied away. What a pity...");
                                
client.Send(npc.ToArray());
                            }
                        }
                        else
                        {
                            
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You have to kill ChestDemon again.");
                            
client.Send(npc.ToArray());
                        }
                        break;
                    }
                
#endregion
                #region CopperKey
                
case 3000626:
                    {
                        if (
client.Entity.ChestDemonkill >= 1)
                        {
                            if (
ServerBase.Kernel.PercentSuccess(20))
                            {
                                
client.Inventory.Remove(itemGame.Enums.ItemUse.Remove);
                                
client.Inventory.Remove(30006241);
                                
client.Inventory.Add(300062801);
                                
_String str = new _String(true);
                                
str.UID client.Entity.UID;
                                
str.Type _String.Effect;
                                
str.Texts.Add("break_start");
                                
str.TextsCount 1;
                                
client.Entity.SendScreen(str);
                                
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You received a Gold Key! Hurry and use it to open the Treasure Chest!");
                                
client.Send(npc.ToArray());
                            }
                            else
                            {
                                
client.Inventory.Remove(itemGame.Enums.ItemUse.Remove);
                                
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"The Chest Demon suddenly bit you and fied away. What a pity...");
                                
client.Send(npc.ToArray());
                            }
                        }
                        else
                        {
                            
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You have to kill ChestDemon again.");
                            
client.Send(npc.ToArray());
                        }
                        break;
                    }
                
#endregion
                #region SilverKey
                
case 3000627:
                    {
                        if (
client.Entity.ChestDemonkill >= 1)
                        {
                            if (
ServerBase.Kernel.PercentSuccess(60))
                            {
                                
client.Inventory.Remove(itemGame.Enums.ItemUse.Remove);
                                
client.Inventory.Remove(30006241);
                                
client.Inventory.Add(300062801);
                                
_String str = new _String(true);
                                
str.UID client.Entity.UID;
                                
str.Type _String.Effect;
                                
str.Texts.Add("break_start");
                                
str.TextsCount 1;
                                
client.Entity.SendScreen(str);
                                
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You received a Gold Key! Hurry and use it to open the Treasure Chest!");
                                
client.Send(npc.ToArray());
                            }
                            else
                            {
                                
client.Inventory.Remove(itemGame.Enums.ItemUse.Remove);
                                
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"The Chest Demon suddenly bit you and fied away. What a pity...");
                                
client.Send(npc.ToArray());
                            }
                        }
                        else
                        {
                            
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You have to kill ChestDemon again.");
                            
client.Send(npc.ToArray());
                        }
                        break;
                    }
                
#endregion
                #region AnniversaryJoyPack
                
case 3000593:
                    {
                        
client.Inventory.Remove(itemGame.Enums.ItemUse.Remove);
                        
uint Uid 0;
                        
byte type = (byte)ServerBase.Kernel.Random.Next(150);
                        switch (
type)
                        {
                            case 
1:
                                
Uid 800320;
                                break;

                            case 
2:
                                
Uid 822054;
                                break;

                            case 
3:
                                
Uid 800110;
                                break;

                            case 
4:
                                
Uid 820056;
                                break;

                            case 
5:
                                
Uid 822056;
                                break;

                            case 
6:
                                
Uid 822057;
                                break;

                            case 
7:
                                
Uid 822053;
                                break;

                            case 
8:
                                
Uid 800019;
                                break;

                            case 
9:
                                
Uid 800050;
                                break;

                            case 
10:
                                
Uid 800015;
                                break;

                            case 
11:
                                
Uid 800090;
                                break;

                            case 
12:
                                
Uid 800513;
                                break;

                            case 
13:
                                
Uid 800017;
                                break;

                            case 
14:
                                
Uid 800071;
                                break;

                            case 
15:
                                
Uid 800016;
                                break;

                            case 
16:
                                
Uid 823051;
                                break;

                            case 
17:
                                
Uid 800130;
                                break;

                            case 
18:
                                
Uid 800140;
                                break;

                            case 
19:
                                
Uid 800141;
                                break;

                            case 
20:
                                
Uid 800200;
                                break;

                            case 
21:
                                
Uid 800310;
                                break;

                            case 
22:
                                
Uid 800014;
                                break;

                            case 
23:
                                
Uid 800214;
                                break;

                            case 
24:
                                
Uid 800230;
                                break;

                            case 
25:
                                
Uid 800414;
                                break;

                            case 
26:
                                
Uid 822052;
                                break;

                            case 
27:
                                
Uid 800420;
                                break;

                            case 
28:
                                
Uid 800401;
                                break;

                            case 
29:
                                
Uid 800512;
                                break;

                            case 
30:
                                
Uid 823043;
                                break;

                            case 
31:
                                
Uid 800514;
                                break;

                            case 
32:
                                
Uid 800520;
                                break;

                            case 
33:
                                
Uid 800521;
                                break;

                            case 
34:
                                
Uid 800613;
                                break;

                            case 
35:
                                
Uid 800614;
                                break;

                            case 
36:
                                
Uid 800615;
                                break;

                            case 
37:
                                
Uid 824001;
                                break;

                            case 
38:
                                
Uid 800617;
                                break;

                            case 
39:
                                
Uid 800720;
                                break;

                            case 
40:
                                
Uid 800721;
                                break;

                            case 
41:
                                
Uid 800070;
                                break;

                            case 
42:
                                
Uid 800723;
                                break;

                            case 
43:
                                
Uid 800724;
                                break;

                            case 
44:
                                
Uid 800018;
                                break;

                            case 
45:
                                
Uid 820001;
                                break;

                            case 
46:
                                
Uid 820052;
                                break;

                            case 
47:
                                
Uid 820053;
                                break;

                            case 
48:
                                
Uid 820054;
                                break;

                            case 
49:
                                
Uid 820055;
                                break;

                            case 
50:
                                
Uid 800722;
                                break;
                        }
                        
client.Inventory.Add(Uid01);
                        
_String str = new _String(true);
                        
str.UID client.Entity.UID;
                        
str.Type _String.Effect;
                        
str.Texts.Add("cortege");
                        
str.TextsCount 1;
                        
client.Entity.SendScreen(str);
                        break;
                    }
                
#endregion
                #endregion 

و بعد كدا نفتح NPCS.cs
ندور على الكود ده :
كود PHP:

switch (client.ActiveNpc)
            { 

كود PHP:

#region Golden Secret 
                #region Agent ****
                
case 54877:// Golden Secret
                    
{
                        switch (
npcRequest.OptionID)
                        {
                            case 
0:
                                {
                                    
dialog.Text("Hey, did you see the TreasureChest beside me? We've locked"
                                        
"something precious in the chest. As long as you have reached Level 80 and"
                                        
"found the Gold Key, you can open the chest and take the precious inside! If"
                                        
"you would like to have a try, I'll give you a Key Bag.");
                                    
dialog.Option("Give Me Key Bag."1);
                                    
dialog.Option("How can i get Gold Key?"2);
                                    
dialog.Option("I'll think it over."255);
                                    
dialog.Avatar(51);
                                    
dialog.Send();
                                    break;
                                }
                            case 
1:
                                {
                                    if (
client.Inventory.Contains(30006241))
                                    {
                                        
dialog.Text("You also have KeyBag in your inventory, Check it.");
                                        
dialog.Option("Oh yes, I see."255);
                                        
dialog.Avatar(51);
                                        
dialog.Send();
                                    }
                                    else
                                    {
                                    
client.Inventory.Add(300062401);
                                    
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"You have recived KeyBag.");
                                    
client.Send(npc.ToArray());
                                    }
                                    break;
                                }
                            case 
2:
                                {
                                    
dialog.Text("You have to go and find Chest Demons, kill one of them and open the KeyBag.");
                                    
dialog.Option("Oh It's Ok Thanks."255);
                                    
dialog.Avatar(51);
                                    
dialog.Send();
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion
                #region TreasureChest
                
case 15458:
                    {
                        switch (
npcRequest.OptionID)
                        {
                            case 
0:
                                {
                                    
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6"Do you have the Gold Key?");
                                    
npc.OptionID 47;
                                    
client.Send(npc.ToArray());
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion
                #endregion 

و بعد كدا نفتح Game/Attacking/Calculate.cs
بص ركز هنا ,, هتدور على الكود ده اكتر من مره ,,
كود PHP:

return (uint)Damage

كل مره تدور فيها هتلاقيه ,, حط الكود ده فوقيه على طول
كود PHP:

if (attacked.Name == "ChestDemon")//Golden Secret
            
{
                
Damage 1;
            } 

و فى نفس الملف دور على الكود ده : ( لو ملقتش الكود ده خلاص مش لازم تضيف الى تحتيه)
كود PHP:

return (UInt32)Damage

و حط ده فوقيه على طول :
كود PHP:

if (Attacked.MonsterInfo != null//Golden Secret
                        
{
                            if (
Attacked.Name == "ChestDemon")
                            {
                                
Damage 1;
                            }
                        } 

كدا ان شاء الله التعديلات ال #C خلصت :)
نيجى بقا للنفى كات.


[Navicat Codes]

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

INSERT INTO `monsterspawnsVALUES ('5454454''1002''0757''0485''0040''0040''0015''0010''0008''4214''0000''0000''0000''0000');
INSERT INTO `npcsVALUES ('15458''0''0''GoldenTreasure''0002''22680''-1''1002''0452''0340''0000''0000''0000''0000''0000''0000''0000''0000''0''0''0''0''''0000''00''00''0000''00'null);
INSERT INTO `npcsVALUES ('54877''0''0''Agent ****''0002''22670''-1''1002''0446''0340''0000''0000''0000''0000''0000''0000''0000''0000''0''0''0''0''''0000''00''00''0000''00'null);
INSERT INTO `monsterinfosVALUES ('4214''ChestDemon''0001''4141''05''00''1''0001''0001''0000''0000''0000''0000''0000''0000''0000''0000''0000''0000''0000''0001''0''0000''0000''0000''0000''0000''000''000''000''000''000''000''000''0000''0000''0000''0000''0100''0000''10000''00''0''0''0''0''0''0'); 

كدا تمام ,, نيجى بقا لحتة رخمة شوية :)
بص هتخش فى فولدر السورس فى Bin/Debug/Database/Items.txt
او هيكون اسم الملف Itemtype.txt فى نفس الفلودر Bin/Debug/Database
المهم هتفتح ايا ان كان ده او ده و لو عندك الاتنين هتعمل فيهم الاتنين الى هقولك عليه
هتبحث فيهم على الارقام دى:
كود PHP:

3000624
3000625
3000626 

لو ملقتش ولا واحد فيهم ,, يبقا هتنزل للاخر خالص , و تضيف دول :
كود PHP:

3000624@@KeyBag@@0@@0@@0@@0@@0@@0@@0@@0@@11@@0@@0@@98119030@@0@@0@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@0@@0@@0@@0@@0@@1@@800@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@Anniversary@@This~bag~is~filled~with~keys.~You~can~use~a~key~to~open~the~treasure~chest.~Right~click~to~use.@@0@@0@@0@@0@@0@@0@@
3000625@@IronKey@@0@@0@@0@@0@@0@@0@@0@@0@@11@@0@@0@@98119080@@0@@0@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@0@@0@@0@@0@@0@@1@@800@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@Anniversary@@This~key~looks~plain.~Use~it~to~open~the~treasure~chest,~and~you~have~a~chance~to~get~the~Gold~Key.@@0@@0@@0@@0@@0@@0@@
3000626@@CopperKey@@0@@0@@0@@0@@0@@0@@0@@0@@11@@0@@0@@98119120@@0@@0@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@0@@0@@0@@0@@0@@1@@800@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@Anniversary@@A~normal~key.~Use~it~to~open~the~treasure~chest,~and~you~have~a~chance~to~get~the~Gold~Key.@@0@@0@@0@@0@@0@@0@@
3000627@@SilverKey@@0@@0@@0@@0@@0@@0@@0@@0@@11@@0@@0@@98119150@@0@@0@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@0@@0@@0@@0@@0@@1@@800@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@Anniversary@@A~delicate~key.~Use~it~to~open~the~treasure~chest,~and~you~have~a~chance~to~get~the~Gold~Key.@@0@@0@@0@@0@@0@@0@@
3000628@@GoldKey@@0@@0@@0@@0@@0@@0@@0@@0@@11@@0@@0@@98119200@@0@@0@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@0@@0@@0@@0@@0@@1@@800@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@Anniversary@@The~key~is~made~of~the~finest~gold.~Use~it~to~open~the~Golden~Treasure~Chest.@@0@@0@@0@@0@@0@@0@@
3000593@@AnniversaryJoyPack@@0@@0@@0@@0@@0@@0@@0@@0@@11@@0@@0@@98116410@@0@@0@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@0@@0@@0@@0@@0@@1@@800@@0@@0@@1@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@Anniversary@@A~gift~pack~given~during~the~anniversary.~It~contains~many~precious~gifts.~Right~click~to~open.@@0@@0@@0@@0@@0@@0@@ 

كدا تمام ,, و فى الكلنت نفس النظام ,, هتروح فولدر ini/itemtype.txt
و تدور برضو على الى قولت عليهم فوق ,, و لو ملقتهمش ,, ضيف برضو الى ضفتهم فوق ,, و متنساش تشفر الملف تانى يبقا .dat

بس و فاضل اخر حاجة ,, البتش الصغير ,, الى ان شاء الله مش هيغيرلك حاجة بعون الله :)
ملحوظة: الايكونات بتاعت الايتمات الجديده ,, اكيد هتختفى لمة تنزل البتش ,, ( معلش مش هعرف اظلت الكلنت عشان انا مش بتاع كلنت ) :(17):



[Patch]

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

الكوسته قديمه شويه فخلي بالك من الباتش لان ملفات قديمه خد منه المطلوب

bebo100 2019-08-12 03:40 AM

رد: كوستة Golden Secret
 
كويسته جميله

Commander 2019-08-12 03:57 AM

رد: كوستة Golden Secret
 
عااش

Rage 2022-04-25 08:49 AM

رد: كوستة Golden Secret
 
nice

mohammedshafik 2023-05-25 12:11 PM

رد: كوستة Golden Secret
 
thxx


الساعة الآن 04:13 AM

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