الموضوع : NPC [Map] Stables للناس الي عاوزه تفكسد السورس زي كونكر
شرح الاضافة:
هتفتح كلاس NPC.cs
وتضيف ده
الكود:
#region [Map] Stables
// ID Map = (1006)
#region MountTrainer
case 9881:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("I`m the best Mount Trainer in the Empire. You can learn the Mount Skills from me. It costs 50,000 silver for the Riding skill,~100,000 silver for the Spook skill, and 1,000,000 silver for the War Cry skill. Is there something you needed?");
dialog.Option("Learn~Riding(50000~silver)", 1);
dialog.Option("Learn~Spook(100000~silver)", 2);
dialog.Option("Learn~War~Cry(1000000~silver)", 3);
dialog.Option("ChargingVortex[500,000~silver]", 4);
dialog.Option("Just~passing~by.", 255);
dialog.Avatar(15);
dialog.Send();
break;
}
case 1:
{
dialog.Text("After the mount is equipped, you can right click the Riding button or drag the button into the shortcut column to ride");
dialog.Text("~your mount. The higher the Lineage Level, the higher Vigor and the less limits for your mount!");
dialog.Option("Learn~Riding~skill.", 5);
dialog.Option("Just~passing~by.", 255);
dialog.Avatar(15);
dialog.Send();
break;
}
case 2:
{
dialog.Text("After you equip and ride your mount, you can right click the Spook skill to dismount a player whose mount`s Lineage Level is");
dialog.Text("~lower than yours and force the Vigor of his mount drop to 0. Cool down time: 15 seconds.");
dialog.Option("Learn~Spook.", 6);
dialog.Avatar(15);
dialog.Send();
break;
}
case 3:
{
dialog.Text("After you equip and ride your mount, you can right click the War Cry skill to dismount the players in a certain area whose");
dialog.Text("~mounts` Lineage Levels are lower than yours and force the Vigors of their mounts drop to 0. Cool down time: 60 seconds.");
dialog.Option("Learn~War~Cry.", 7);
dialog.Avatar(15);
dialog.Send();
break;
}
case 4:
{
dialog.Text("It`s upgradable. You`ll need to equip a two-handed weapon and be mounted to use this skill. You will attack a target area within 15 paces and cause");
dialog.Text("~70%damage on all targets within 3 paces. It costs 30 Stamina. Are you sure you want to pay 500,000 silver to learn it?");
dialog.Option("Yes.)", 8);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Avatar(15);
dialog.Send();
break;
}
case 5:
{
if (client.Entity.Money >= 50000)
{
if (!client.AddSpell(LearnableSpell(7001)))
{
dialog.Text("You`ve learned the Riding skill! Enjoy riding your mount!");
dialog.Option("Great!", 255);
dialog.Avatar(15);
dialog.Send();
}
else
{
client.Entity.Money -= 50000;
client.Entity.Update(10, "eidolon", true);
}
}
else
{
dialog.Text("You don`t have 50,000 silver. You are unable to learn the Riding.");
dialog.Option("Oh,~I`ll~fetch~some~money!", 255);
dialog.Avatar(15);
}
break;
}
case 6:
{
if (client.Entity.Money >= 100000)
{
if (!client.AddSpell(LearnableSpell(7002)))
{
dialog.Text("You`ve learned the Spook skill!");
dialog.Option("Nice!", 255);
dialog.Avatar(15);
dialog.Send();
}
else
{
client.Entity.Money -= 100000;
client.Entity.Update(10, "eidolon", true);
}
}
else
{
dialog.Text("You don`t have 100,000 silver. You are unable to learn the Spook skill.");
dialog.Option("Oh,~I`ll~fetch~some~money!", 255);
dialog.Avatar(15);
}
break;
}
case 7:
{
if (client.Entity.Money >= 100000)
{
if (!client.AddSpell(LearnableSpell(7003)))
{
dialog.Text("You`ve learned the War Cry skill!");
dialog.Option("Nice!", 255);
dialog.Avatar(15);
dialog.Send();
}
else
{
client.Entity.Money -= 100000;
client.Entity.Update(10, "eidolon", true);
}
}
else
{
dialog.Text("You don`t have 1,000,000 silver. You are unable to learn the War Cry skill.");
dialog.Option("Oh,~I`ll~fetch~some~money!", 255);
dialog.Avatar(15);
}
break;
}
case 8:
{
if (client.Entity.Money >= 500000)
{
if (!client.AddSpell(LearnableSpell(11190)))
{
dialog.Text("You`ve learned the ChargingVortex skill!");
dialog.Option("Nice!", 255);
dialog.Avatar(15);
dialog.Send();
}
else
{
client.Entity.Money -= 500000;
client.Entity.Update(10, "eidolon", true);
}
}
else
{
dialog.Text("Sorry, but you don`t have enough silver.");
dialog.Option("I~see.", 255);
dialog.Avatar(15);
}
break;
}
}
break;
}
#endregion
#region MountOfficer
case 5603:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("What? A group of Cattle Thieves stole the Saddles of the cavalry! Without the Saddles, they won`t be able to hold any drills.");
dialog.Text("~If you can help get the Saddles from the Cattle Thieves, I just might give you a Steed as a reward!");
dialog.Option("Here~is~the~Saddle.", 1);
dialog.Option("Where~are~the~thieves?", 3);
dialog.Option("I~have~no~time.", 255);
dialog.Avatar(107);
dialog.Send();
break;
}
case 1:
{
if (client.Inventory.Contains(723903, 1))
{
dialog.Text("Great! You`ve brought back a Saddle from the Cattle Thieves! You can take a Steed as reward! Which one do you like?");
dialog.Option("Maroon~Steed", 4);
dialog.Option("White~Steed", 5);
dialog.Option("Black~Steed", 6);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Avatar(107);
dialog.Send();
}
else
{
dialog.Text("You haven`t brought back a Saddle from the Cattle Thieves. What are you waiting on? Christmas? Get on it!");
dialog.Option("Where~are~the~thieves?", 3);
dialog.Option("I`ll~get~it~back~now!", 255);
dialog.Avatar(107);
dialog.Send();
}
break;
}
case 3:
{
dialog.Text("The Cattle Thieves stole Saddles and hid separately. I heard someone saw them in Kylin Cave, Dragon Pool, and Tiger Cave.");
dialog.Text("~They must be planning something... Find the Plains Thief or the Thief Leader to get some clues.");
dialog.Option("Okay,~I`ll~go~now.", 255);
dialog.Avatar(107);
break;
}
case 4:
{
dialog.Text("Each Saddle that you retrieved can be used to exchange for a Maroon Steed. Well, how many Saddles have you collected?");
dialog.Option("1~Saddle.", 7 * 4);
dialog.Option("5~Saddles.", 8 * 4);
dialog.Option("10~Saddles.", 9 * 4);
dialog.Option("20~Saddles.", 11 * 4);
dialog.Option("Let~me~see.", 255);
dialog.Avatar(107);
dialog.Send();
break;
}
case 5:
{
dialog.Text("Each Saddle that you retrieved can be used to exchange for a White Steed. Well, how many Saddles have you collected?");
dialog.Option("1~Saddle.", 7 * 5);
dialog.Option("5~Saddles.", 8 * 5);
dialog.Option("10~Saddles.", 9 * 5);
dialog.Option("20~Saddles.", 10 * 5);
dialog.Option("Let~me~see.", 255);
dialog.Avatar(107);
dialog.Send();
break;
}
case 6:
{
dialog.Text("Each Saddle that you retrieved can be used to exchange for a Black Steed. Well, how many Saddles have you collected?");
dialog.Option("1~Saddle.", 7 * 6);
dialog.Option("5~Saddles.", 8 * 6);
dialog.Option("10~Saddles.", 9 * 6);
dialog.Option("20~Saddles.", 10 * 6);
dialog.Option("Let~me~see.", 255);
dialog.Avatar(107);
dialog.Send();
break;
}
default:
{
switch (npcRequest.OptionID)
{
#region 1 Saddle
case 7 * 4:
case 7 * 5:
case 7 * 6:
{
if (client.Inventory.Contains(723903, 1))
{
if (client.Inventory.Count <= 39)
{
if (npcRequest.OptionID == 7 * 4)
{
client.Inventory.Add(723900, 0, 1);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~a~+0~Maroon~Steed~Pack!");
}
if (npcRequest.OptionID == 7 * 5)
{
client.Inventory.Add(723901, 0, 1);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~a~+0~White~Steed~Pack!");
}
if (npcRequest.OptionID == 7 * 6)
{
client.Inventory.Add(723902, 0, 1);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~a~+0~Black~Steed~Pack!");
}
client.Inventory.Remove(723903, 1);
}
else
{
client.MessageBox("You Inventory Is Full!");
}
}
else
{
client.MessageBox("You Don't Have Enough Saddles!");
}
break;
}
#endregion
#region 5 Saddles
case 8 * 4:
case 8 * 5:
case 8 * 6:
{
if (client.Inventory.Contains(723903, 5))
{
if (client.Inventory.Count <= 35)
{
if (npcRequest.OptionID == 8 * 4)
{
client.Inventory.Add(723900, 0, 5);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~5~+0~Maroon~Steed~Pack!");
}
if (npcRequest.OptionID == 8 * 5)
{
client.Inventory.Add(723901, 0, 5);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~5~+0~White~Steed~Pack!");
}
if (npcRequest.OptionID == 8 * 6)
{
client.Inventory.Add(723902, 0, 5);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~5~+0~Black~Steed~Pack!");
}
client.Inventory.Remove(723903, 5);
}
else
{
client.MessageBox("You Inventory Is Full!");
}
}
else
{
client.MessageBox("You Don't Have Enough Saddles!");
}
break;
}
#endregion
#region 10 Saddles
case 9 * 4:
case 9 * 5:
case 9 * 6:
{
if (client.Inventory.Contains(723903, 10))
{
if (client.Inventory.Count <= 30)
{
if (npcRequest.OptionID == 9 * 4)
{
client.Inventory.Add(723900, 0, 10);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~5~+0~Maroon~Steed~Pack!");
}
if (npcRequest.OptionID == 9 * 5)
{
client.Inventory.Add(723901, 0, 10);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~5~+0~White~Steed~Pack!");
}
if (npcRequest.OptionID == 9 * 6)
{
client.Inventory.Add(723902, 0, 10);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~5~+0~Black~Steed~Pack!");
}
client.Inventory.Remove(723903, 10);
}
else
{
client.MessageBox("You Inventory Is Full!");
}
}
else
{
client.MessageBox("You Don't Have Enough Saddles!");
}
break;
}
#endregion
#region 20 Saddles
case 11 * 4:
case 10 * 5:
case 10 * 6:
{
if (client.Inventory.Contains(723903, 20))
{
if (client.Inventory.Count <= 20)
{
if (npcRequest.OptionID == 11 * 4)
{
client.Inventory.Add(723900, 0, 20);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~20~+0~Maroon~Steed~Pack!");
}
if (npcRequest.OptionID == 11 * 5)
{
client.Inventory.Add(723901, 0, 20);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~20~+0~White~Steed~Pack!");
}
if (npcRequest.OptionID == 11 * 6)
{
client.Inventory.Add(723902, 0, 20);
client.MessageBox("You`ve~brought~back~the~Saddle~and~swapped~it~for~20~+0~Black~Steed~Pack!");
}
client.Inventory.Remove(723903, 20);
}
else
{
client.MessageBox("You Inventory Is Full!");
}
}
else
{
client.MessageBox("You Don't Have Enough Saddles!");
}
break;
}
#endregion
}
break;
}
case 255:
{
break;
}
}
break;
}
#endregion
#region Breeder
case 9883:
{
Data data = new Data(true);
data.ID = Data.OpenWindow;
data.UID = client.Entity.UID;
data.TimeStamp = Time32.Now;
data.dwParam = Data.WindowCommands.Breeding;
data.wParam1 = client.Entity.X;
data.wParam2 = client.Entity.Y;
client.Send(data);
break;
}
#endregion
#endregion
وتخش فى النافى كات على npcs وتضيف ده فى سطر جديد
الكود:
9881 MountTrainer 2 6327 1002 260 286
5603 MountOfficer 2 6224 1006 38 34
5517 MountRetailer 1 5836 1006 19 29
87464 AgateSteed 0 5864 1006 21 33
87465 RedSteed 0 7644 1006 24 33
87466 TawnySteed 0 7674 1006 29 33
765 BlackSteed 0 7650 1006 32 22
9871 Blazehoof 0 5844 1006 17 33
8745 NightMare 0 7630 1006 24 22
87462 Zebra 0 5850 1006 17 22