المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : كوستة Golden Secret


محمد ياسر
2019-04-24, 09:43 AM
مرحبا اعضاء منتدي اكواد
معانا اليوم شرح كوسته المفاتيح الذهبيه هي كوسته قديمه لكن حلوه
والشرح بسيرفير قديم لانه من زمان
يلا نبداء
[الصور + الشرح]


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

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

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


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

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

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

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

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

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

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

CopperKey

SilverKey

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

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


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

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

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

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


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

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

اولا ,, نفتح Game/Entity.cs
ندور على الكود ده :
public class Entity : Writer, Interfaces.IBaseEntity, Interfaces.IMapObject
{

و نضيف تحته الكود ده :
public int ChestDemonkill = 0; // Golden Secret GH


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

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

و نضيف فوقيه الكود ده :
if (eC.Name == "ChestDemon") // Golden Secret
{
message = "Invalid characters inside the name.";
return false;
}

و بعد كدا نفتح Database/MonsterTable.cs
public void Drop(Game.Entity killer)
{

و نضيف ده تحته :
if (Name.Contains("ChestDemon")) // Golden Secret
{
killer.ChestDemonkill += 1;
killer.Owner.Send(new Message("You have killed ChestDemon!", System.Drawing.Color.Azure, Message.Center));
}


و بعد كدا نفتح Network/PacketHandler.cs
ندور على الكود ده او اي حاجه فيه
#region NPC Dialog (2031 + 2032)
case 2031:
case 2032:
{
if (client.Action != 2)
return;
NpcRequest req = new NpcRequest();
req.Deserialize(packet);

و نحط ده تحته :
// 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(3000628, 1))
{
client.Inventory.Remove(3000628, 1);
client.Inventory.Add(3000593, 0, 1);
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Sorry, but you don't have GoldenKey");
client.Send(npc.ToArray());
}
}
#endregion

و فى نفس الملف ندور على الكود ده :
او اي حاجه من الاكوده ده برضوا انا بنزل الكود كله علشان ممكن الكود الي انزله يكون عندك باسم مختلف
static void UseItem(Interfaces.IConquerItem item, Client.GameState client)
{
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(item.ID, 0);
if (client.Booth != null)
return;
client.Entity.UseItem = true;
client.SpiltStack = true;
switch (item.ID)
{

و نضيف ده تحته :
//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(3000627, 0, 1);
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(3000626, 0, 1);
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(3000625, 0, 1);
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(item, Game.Enums.ItemUse.Remove);
client.Inventory.Remove(3000624, 1);
client.Inventory.Add(3000628, 0, 1);
_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(item, Game.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(item, Game.Enums.ItemUse.Remove);
client.Inventory.Remove(3000624, 1);
client.Inventory.Add(3000628, 0, 1);
_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(item, Game.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(item, Game.Enums.ItemUse.Remove);
client.Inventory.Remove(3000624, 1);
client.Inventory.Add(3000628, 0, 1);
_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(item, Game.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(item, Game.Enums.ItemUse.Remove);
uint Uid = 0;
byte type = (byte)ServerBase.Kernel.Random.Next(1, 50);
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(Uid, 0, 1);
_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
ندور على الكود ده :
switch (client.ActiveNpc)
{

#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(3000624, 1))
{
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(3000624, 0, 1);
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
بص ركز هنا ,, هتدور على الكود ده اكتر من مره ,,
return (uint)Damage;

كل مره تدور فيها هتلاقيه ,, حط الكود ده فوقيه على طول
if (attacked.Name == "ChestDemon")//Golden Secret
{
Damage = 1;
}

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

و حط ده فوقيه على طول :
if (Attacked.MonsterInfo != null) //Golden Secret
{
if (Attacked.Name == "ChestDemon")
{
Damage = 1;
}
}

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


[Navicat Codes]

هتضيف الاكواد ديه :
INSERT INTO `monsterspawns` VALUES ('5454454', '1002', '0757', '0485', '0040', '0040', '0015', '0010', '0008', '4214', '0000', '0000', '0000', '0000');
INSERT INTO `npcs` VALUES ('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 `npcs` VALUES ('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 `monsterinfos` VALUES ('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
المهم هتفتح ايا ان كان ده او ده و لو عندك الاتنين هتعمل فيهم الاتنين الى هقولك عليه
هتبحث فيهم على الارقام دى:
3000624
3000625
3000626

لو ملقتش ولا واحد فيهم ,, يبقا هتنزل للاخر خالص , و تضيف دول :
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~ba g~is~filled~with~keys.~You~can~use~a~key~to~open~t he~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~k ey~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~no rmal~key.~Use~it~to~open~the~treasure~chest,~and~y ou~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~de licate~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~ke y~is~made~of~the~finest~gold.~Use~it~to~open~the~G olden~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@@Annivers ary@@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
كويسته جميله

Commander
2019-08-12, 03:57 AM
عااش

Rage
2022-04-25, 08:49 AM
nice

mohammedshafik
2023-05-25, 12:11 PM
thxx