Even for contributing the easiest things possible to create it is still a need to have proper npcs. Feel free to press thanks, if you don't i don't care either way.
**PrizeNPC
In character.cs
Then the npc itsself:Quote:
public bool Claim = false;
Quote:
#region PrizeNPC
case 47:
{
if (LinkBack == 0)
{
Text("Are you coming for your prize? You can come to claim your prize if the system", CSocket);
Text("notifies you that you have got a prize.", CSocket);
Link("Claim my prize.", 1, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
if (CSocket.Client.Claim)
{
}
else
{
Text("Sorry. You do not have any prize to claim.", CSocket);
Link("O, I see.", 255, CSocket);
End(CSocket);
}
}
break;
}
#endregion
#region ArenaGuard
case 10021:
{
if (LinkBack == 0)
{
Text("The arena is open. Welcome to challenge other people. The admission fee", CSocket);
Text(" is only 50 silvers. If you PK in the arena, you wil not gain or lose any", CSocket);
Text(" experience or items equippped, and will get revived at the place you died. The", CSocket);
Text(" Kungfu circle is very dangerous, I suggest you PK in area.", CSocket);
Link("Enter the arena.", 1, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
if (CSocket.Client.Money >= 50)
{
Money(-50, CSocket);
Teleport(1005, 051, 068, 0, CSocket);
}
else
{
Text("You fool, you have not 50 slivers!", CSocket);
Link("Sorry.", 255, CSocket);
End(CSocket);
}
}
break;
}
#endregion
case 10021:
{
if (LinkBack == 0)
{
Text("The arena is open. Welcome to challenge other people. The admission fee", CSocket);
Text(" is only 50 silvers. If you PK in the arena, you wil not gain or lose any", CSocket);
Text(" experience or items equippped, and will get revived at the place you died. The", CSocket);
Text(" Kungfu circle is very dangerous, I suggest you PK in area.", CSocket);
Link("Enter the arena.", 1, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
if (CSocket.Client.Money >= 50)
{
Money(-50, CSocket);
Teleport(1005, 051, 068, 0, CSocket);
}
else
{
Text("You fool, you have not 50 slivers!", CSocket);
Link("Sorry.", 255, CSocket);
End(CSocket);
}
}
break;
}
#endregion
#region Warden
case 42:
{
if (LinkBack == 0)
{
Text("Lucky for you, the player who killed you is willing to drop the murder charges", CSocket);
Text(" if you pay him according to what you did. Luck for you, the player who killed you", CSocket);
Text(" is willing to drop the murder charges if you pay him 500,000 silvers.", CSocket);
Link("Ok! Let me out from here!", 1, CSocket);
Link("Any chance of a discount?", 2, CSocket);
Link("I would rather rot in hell!", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
if (CSocket.Client.PkPoints < 100)
{
Text("You needn't stay here any more. Let me hep you out.", CSocket);
Link("Ok,thanks.", 3, CSocket);
Link("Leave me alone.", 255, CSocket);
End(CSocket);
}
else
{
Text("You have killed too many in order to leave here you must pay 500,000 silvers.", CSocket);
Link("I don't care just get me out of here!", 4, CSocket);
Link("When pigs fly.", 255, CSocket);
End(CSocket);
}
}
if (LinkBack == 2)
{
Text("The red name, whose PK Points are 30-99, can leave here without any", CSocket);
Text(" price. The black name, whose PK Points are 100 or above, should pay", CSocket);
Text(" 500,000 as recognizance to leave here.", CSocket);
Link("Okay, I will pay.", 255, CSocket);
Link("I would rather stay here.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 3)
{
Teleport(1002, 518, 356, 0, CSocket);
}
if (LinkBack == 4)
{
if (CSocket.Client.Money >= 500000)
{
Money(-500000, CSocket);
Teleport(1002, 518, 356, 0, CSocket);
}
else
{
Text("I'm sorry, you don't have 500,000 silvers.", CSocket);
Link("My bad.", 255, CSocket);
End(CSocket);
}
}
break;
}
#endregion
case 42:
{
if (LinkBack == 0)
{
Text("Lucky for you, the player who killed you is willing to drop the murder charges", CSocket);
Text(" if you pay him according to what you did. Luck for you, the player who killed you", CSocket);
Text(" is willing to drop the murder charges if you pay him 500,000 silvers.", CSocket);
Link("Ok! Let me out from here!", 1, CSocket);
Link("Any chance of a discount?", 2, CSocket);
Link("I would rather rot in hell!", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
if (CSocket.Client.PkPoints < 100)
{
Text("You needn't stay here any more. Let me hep you out.", CSocket);
Link("Ok,thanks.", 3, CSocket);
Link("Leave me alone.", 255, CSocket);
End(CSocket);
}
else
{
Text("You have killed too many in order to leave here you must pay 500,000 silvers.", CSocket);
Link("I don't care just get me out of here!", 4, CSocket);
Link("When pigs fly.", 255, CSocket);
End(CSocket);
}
}
if (LinkBack == 2)
{
Text("The red name, whose PK Points are 30-99, can leave here without any", CSocket);
Text(" price. The black name, whose PK Points are 100 or above, should pay", CSocket);
Text(" 500,000 as recognizance to leave here.", CSocket);
Link("Okay, I will pay.", 255, CSocket);
Link("I would rather stay here.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 3)
{
Teleport(1002, 518, 356, 0, CSocket);
}
if (LinkBack == 4)
{
if (CSocket.Client.Money >= 500000)
{
Money(-500000, CSocket);
Teleport(1002, 518, 356, 0, CSocket);
}
else
{
Text("I'm sorry, you don't have 500,000 silvers.", CSocket);
Link("My bad.", 255, CSocket);
End(CSocket);
}
}
break;
}
#endregion
#region CaptainLi
case 43:
{
if (LinkBack == 0)
{
Text("What can I do for you?", CSocket);
Link("Visit the jail.", 1, CSocket);
Link("Just passing by..", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Text("Give me 1000 silver, I will teleport you there.", CSocket);
Link("Here are 1000 silver.", 2, CSocket);
Link("If so, I will stay here.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 2)
{
if (CSocket.Client.Money >= 1000)
{
Teleport(6000, 029, 072, 0, CSocket);
Money(-1000, CSocket);
}
}
break;
}
#endregion
case 43:
{
if (LinkBack == 0)
{
Text("What can I do for you?", CSocket);
Link("Visit the jail.", 1, CSocket);
Link("Just passing by..", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Text("Give me 1000 silver, I will teleport you there.", CSocket);
Link("Here are 1000 silver.", 2, CSocket);
Link("If so, I will stay here.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 2)
{
if (CSocket.Client.Money >= 1000)
{
Teleport(6000, 029, 072, 0, CSocket);
Money(-1000, CSocket);
}
}
break;
}
#endregion
#region Ethereal
case 35015:
{
if (LinkBack == 0)
{
Text("Tortoise Gem is an ancient rarity. It can not only reduce the damage taken,", CSocket);
Text("but also upgrade the blessed equipment. If we craft it with blessed", CSocket);
Text("equipment, its power will be brought into full play. only i know the recipe. By", CSocket);
Text("the way, you may compose +n items in Wuxing Oven beside me.", CSocket);
Link("I want to upgrade my blessed equipment.", 11, CSocket);
Link("How can i upgrade my blessed attribute?", 12, CSocket);
Link("How to compose +n items?", 13, CSocket);
Link("What an unusual stove you got there?", 14, CSocket);
End(CSocket);
}
if (LinkBack == 11)
{
Text("Please select the blessed equipment you want to upgrade", CSocket);
Link("Boots", 7, CSocket);
Link("HeadGear", 1, CSocket);
Link("Necklace/Bag", 2, CSocket);
Link("Armor/Coat/Robe", 3, CSocket);
Link("Weapons", 4, CSocket);
Link("Shield/Left-Weapon", 5, CSocket);
Link("Ring/Bracelete", 6, CSocket);
End(CSocket);
}
if (LinkBack == 12)
{
Text("Only blessed equipment can be upgraded. Super Tortoise Gems are", CSocket);
Text("required. After blessed attribute is upgraded, more damages takenw ill be", CSocket);
Text("redued. When blessed attribute reaches level 4 (the highest), the damage", CSocket);
Text("taken will be reduced by 7.", CSocket);
Link("How many super Tortoise Gems are required?", 15, CSocket);
End(CSocket);
}
if (LinkBack == 13)
{
Text("You may promote the bonus level of items in Wuxing Oven, namely compose", CSocket);
Text("+n items. +n items have +n stats which can make your items much more", CSocket);
Text("powerfull.", CSocket);
Link("Oh. I see.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 14)
{
Text("It's called the WuxingOven. It has marvelous magic powers. It can be used to", CSocket);
Text("enchant your weapons with a gem. The enchanted weapon will increase", CSocket);
Text("your maximum HP and it can also help to compose your equipment.", CSocket);
Link("Tell me more about enchanted items.", 16, CSocket);
Link("Tell me more about equipment composition.", 17, CSocket);
End(CSocket);
}
if (LinkBack == 15)
{
Text("If you want to upgrade your blessed attribute to level 2, you must have level -1", CSocket);
Text("blessed equipment and a Super tortoise Gem. After it is upgraded to level 2,", CSocket);
Text("the damage taken will be reduced by 3.If you want to upgrade your blessed", CSocket);
Text("attribute to level 3,you must have level-2 blessed equipment and 3 Super", CSocket);
Text("Tortoise Gems. After it is upgraded to level 3, the damage takenw ill be", CSocket);
Text("reduced by 5. if you want to upgrade your blessed attribute to level 4,you", CSocket);
Text("must have level-3 blessed equipment and 5 Super Tortoise Gems. After it is", CSocket);
Text("upgraded to level 4, the damage taken will be reduced by 7", CSocket);
Link("I see. Thanks.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 16)
{
Text("The enchanted weapon can increase up to 255 HP. The higher quality gem", CSocket);
Text("will enchant higher HP. The enchanted effect also vary with the type", CSocket);
Text("of the gem. Your luck is a very important factor, too.", CSocket);
Link("Can my weapon be enchanted repeatedly?", 18, CSocket);
Link("What gems are required?", 19, CSocket);
End(CSocket);
}
else if (LinkBack == 17)
{
Text("You can obtain Composition Points from minor items and make your main", CSocket);
Text("items reach the next bonus level. Items, which are locked or with the highest", CSocket);
Text("Battle Power of its type can not be composed as the minor item.", CSocket);
Link("What about the remainder after the composition?", 20, CSocket);
Link("Can I use Dragonballs to compose?", 21, CSocket);
End(CSocket);
}
else if (LinkBack == 18)
{
Text("Sure you can re-enchant your weapon. If the new attribute is higher, it will", CSocket);
Text("replace the old one, otherwise, it won't replace.", CSocket);
Link("I see. Thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 19)
{
Text("They can be Dragon, Phoenix, Tortoise, Rainbow, Moon, Violet, Fury, or Kylin.", CSocket);
Text("The enchanted effects vary with the gem quality", CSocket);
Link("I see. Thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 20)
{
Text("It adds to the total of the main item for the next level. For example, a +3 main", CSocket);
Text("item, which requires 240 to level up, is compo with a +4 minor item, which", CSocket);
Text("grants 360 Composition Points. The original +3 item becomes a +4 item", CSocket);
Text("with 120 Composition Points remaining.", CSocket);
Link("Thanks. I never knew.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 21)
{
Text("No, you cannot. You can only use +1 +8 items ore Stones to compose items to", CSocket);
Text("be +9 or above", CSocket);
Link("Got it, Thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack >= 1 && LinkBack < 9)
{
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
int ItemId = CSocket.Client.Equipment[LinkBack].ItemID; byte Plus = (byte)CSocket.Client.Equipment[LinkBack].Plus;
foreach (Struct.ItemInfo EquipItem in CSocket.Client.Equipment.Values)
{
if (EquipItem.Bless == 1)
{
if (HasItem(700072, 1, CSocket))
{
DeleteItem(700072, 1, CSocket);
EquipItem.Bless = 2;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 2)
{
if (HasItem(700072, 3, CSocket))
{
EquipItem.Bless = 3;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 3)
{
if (HasItem(700072, 5, CSocket))
{
EquipItem.Bless = 4;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 4)
{
if (HasItem(700072, 7, CSocket))
{
EquipItem.Bless = 5;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 5)
{
if (HasItem(700072, 9, CSocket))
{
EquipItem.Bless = 6;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 6)
{
if (HasItem(700072, 11, CSocket))
{
EquipItem.Bless = 7;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 7)
{
Text("Your item already have the max bless!", CSocket);
Link("Yay!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("Your item must have the required bless!", CSocket);
Link("Sorry", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
}
break;
}
#endregion
case 35015:
{
if (LinkBack == 0)
{
Text("Tortoise Gem is an ancient rarity. It can not only reduce the damage taken,", CSocket);
Text("but also upgrade the blessed equipment. If we craft it with blessed", CSocket);
Text("equipment, its power will be brought into full play. only i know the recipe. By", CSocket);
Text("the way, you may compose +n items in Wuxing Oven beside me.", CSocket);
Link("I want to upgrade my blessed equipment.", 11, CSocket);
Link("How can i upgrade my blessed attribute?", 12, CSocket);
Link("How to compose +n items?", 13, CSocket);
Link("What an unusual stove you got there?", 14, CSocket);
End(CSocket);
}
if (LinkBack == 11)
{
Text("Please select the blessed equipment you want to upgrade", CSocket);
Link("Boots", 7, CSocket);
Link("HeadGear", 1, CSocket);
Link("Necklace/Bag", 2, CSocket);
Link("Armor/Coat/Robe", 3, CSocket);
Link("Weapons", 4, CSocket);
Link("Shield/Left-Weapon", 5, CSocket);
Link("Ring/Bracelete", 6, CSocket);
End(CSocket);
}
if (LinkBack == 12)
{
Text("Only blessed equipment can be upgraded. Super Tortoise Gems are", CSocket);
Text("required. After blessed attribute is upgraded, more damages takenw ill be", CSocket);
Text("redued. When blessed attribute reaches level 4 (the highest), the damage", CSocket);
Text("taken will be reduced by 7.", CSocket);
Link("How many super Tortoise Gems are required?", 15, CSocket);
End(CSocket);
}
if (LinkBack == 13)
{
Text("You may promote the bonus level of items in Wuxing Oven, namely compose", CSocket);
Text("+n items. +n items have +n stats which can make your items much more", CSocket);
Text("powerfull.", CSocket);
Link("Oh. I see.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 14)
{
Text("It's called the WuxingOven. It has marvelous magic powers. It can be used to", CSocket);
Text("enchant your weapons with a gem. The enchanted weapon will increase", CSocket);
Text("your maximum HP and it can also help to compose your equipment.", CSocket);
Link("Tell me more about enchanted items.", 16, CSocket);
Link("Tell me more about equipment composition.", 17, CSocket);
End(CSocket);
}
if (LinkBack == 15)
{
Text("If you want to upgrade your blessed attribute to level 2, you must have level -1", CSocket);
Text("blessed equipment and a Super tortoise Gem. After it is upgraded to level 2,", CSocket);
Text("the damage taken will be reduced by 3.If you want to upgrade your blessed", CSocket);
Text("attribute to level 3,you must have level-2 blessed equipment and 3 Super", CSocket);
Text("Tortoise Gems. After it is upgraded to level 3, the damage takenw ill be", CSocket);
Text("reduced by 5. if you want to upgrade your blessed attribute to level 4,you", CSocket);
Text("must have level-3 blessed equipment and 5 Super Tortoise Gems. After it is", CSocket);
Text("upgraded to level 4, the damage taken will be reduced by 7", CSocket);
Link("I see. Thanks.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 16)
{
Text("The enchanted weapon can increase up to 255 HP. The higher quality gem", CSocket);
Text("will enchant higher HP. The enchanted effect also vary with the type", CSocket);
Text("of the gem. Your luck is a very important factor, too.", CSocket);
Link("Can my weapon be enchanted repeatedly?", 18, CSocket);
Link("What gems are required?", 19, CSocket);
End(CSocket);
}
else if (LinkBack == 17)
{
Text("You can obtain Composition Points from minor items and make your main", CSocket);
Text("items reach the next bonus level. Items, which are locked or with the highest", CSocket);
Text("Battle Power of its type can not be composed as the minor item.", CSocket);
Link("What about the remainder after the composition?", 20, CSocket);
Link("Can I use Dragonballs to compose?", 21, CSocket);
End(CSocket);
}
else if (LinkBack == 18)
{
Text("Sure you can re-enchant your weapon. If the new attribute is higher, it will", CSocket);
Text("replace the old one, otherwise, it won't replace.", CSocket);
Link("I see. Thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 19)
{
Text("They can be Dragon, Phoenix, Tortoise, Rainbow, Moon, Violet, Fury, or Kylin.", CSocket);
Text("The enchanted effects vary with the gem quality", CSocket);
Link("I see. Thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 20)
{
Text("It adds to the total of the main item for the next level. For example, a +3 main", CSocket);
Text("item, which requires 240 to level up, is compo with a +4 minor item, which", CSocket);
Text("grants 360 Composition Points. The original +3 item becomes a +4 item", CSocket);
Text("with 120 Composition Points remaining.", CSocket);
Link("Thanks. I never knew.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 21)
{
Text("No, you cannot. You can only use +1 +8 items ore Stones to compose items to", CSocket);
Text("be +9 or above", CSocket);
Link("Got it, Thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack >= 1 && LinkBack < 9)
{
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
int ItemId = CSocket.Client.Equipment[LinkBack].ItemID; byte Plus = (byte)CSocket.Client.Equipment[LinkBack].Plus;
foreach (Struct.ItemInfo EquipItem in CSocket.Client.Equipment.Values)
{
if (EquipItem.Bless == 1)
{
if (HasItem(700072, 1, CSocket))
{
DeleteItem(700072, 1, CSocket);
EquipItem.Bless = 2;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 2)
{
if (HasItem(700072, 3, CSocket))
{
EquipItem.Bless = 3;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 3)
{
if (HasItem(700072, 5, CSocket))
{
EquipItem.Bless = 4;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 4)
{
if (HasItem(700072, 7, CSocket))
{
EquipItem.Bless = 5;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 5)
{
if (HasItem(700072, 9, CSocket))
{
EquipItem.Bless = 6;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 6)
{
if (HasItem(700072, 11, CSocket))
{
EquipItem.Bless = 7;
ItemUnequip(EquipItem.Position, EquipItem.UID, CSocket);
ItemEquip(EquipItem.Position, EquipItem.UID, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
else
{
Text("How dare you try to deceive me, vanish!", CSocket);
Link("Sorry!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
break;
}
else if (EquipItem.Bless == 7)
{
Text("Your item already have the max bless!", CSocket);
Link("Yay!", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("Your item must have the required bless!", CSocket);
Link("Sorry", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
}
break;
}
#endregion
#region PrisonOfficer
case 6003:
{
if (LinkBack == 0)
{
Text("Welcome, Welcome to our BotJail travel tour. If you are level 14 or below, I ", CSocket);
Text("will show you to the BotJail to take a look around for free. Do you wanna go?", CSocket);
Link("Yes, please send me there.", 1, CSocket);
Link("No thanks.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
if (CSocket.Client.Level < 14)
{
Teleport(6001, 0, 0, 0, CSocket);
}
else
{
Text("Sorry, you are level 15 or above, so I can not send you to the botjail", CSocket);
Link("Oh, what a pity!", 255, CSocket);
End(CSocket);
}
}
break;
}
#endregion
case 6003:
{
if (LinkBack == 0)
{
Text("Welcome, Welcome to our BotJail travel tour. If you are level 14 or below, I ", CSocket);
Text("will show you to the BotJail to take a look around for free. Do you wanna go?", CSocket);
Link("Yes, please send me there.", 1, CSocket);
Link("No thanks.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
if (CSocket.Client.Level < 14)
{
Teleport(6001, 0, 0, 0, CSocket);
}
else
{
Text("Sorry, you are level 15 or above, so I can not send you to the botjail", CSocket);
Link("Oh, what a pity!", 255, CSocket);
End(CSocket);
}
}
break;
}
#endregion
#region Starlit
case 600055:
{
if (LinkBack == 0)
{
Text("One star in the sky represents a person. When a star falls, one person will", CSocket);
Text("disappear. Couples rely on each, others as their stars in the sky do. When they", CSocket);
Text("do not get along with each other, I shall take them apart since they have", CSocket);
Text("suffered a lot from their marriage and decide to end up their relationship.", CSocket);
Link("Can you help me divorce?", 1, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
if (CSocket.Client.Spouse == "None")
{
Text("You are still single. Do not play such a joke on me.", CSocket);
Link("Just a joke.", 255, CSocket);
End(CSocket);
}
Text("Congratulations, you got divorced!", CSocket);
Link("Thank you.", 255, CSocket);
CSocket.Client.Spouse = "None";
Database.Database.SaveCharacter(CSocket.Client);
End(CSocket);
}
break;
}
#endregion
case 600055:
{
if (LinkBack == 0)
{
Text("One star in the sky represents a person. When a star falls, one person will", CSocket);
Text("disappear. Couples rely on each, others as their stars in the sky do. When they", CSocket);
Text("do not get along with each other, I shall take them apart since they have", CSocket);
Text("suffered a lot from their marriage and decide to end up their relationship.", CSocket);
Link("Can you help me divorce?", 1, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
if (CSocket.Client.Spouse == "None")
{
Text("You are still single. Do not play such a joke on me.", CSocket);
Link("Just a joke.", 255, CSocket);
End(CSocket);
}
Text("Congratulations, you got divorced!", CSocket);
Link("Thank you.", 255, CSocket);
CSocket.Client.Spouse = "None";
Database.Database.SaveCharacter(CSocket.Client);
End(CSocket);
}
break;
}
#endregion
#region Shelby
case 300000:
{
if (LinkBack == 0)
{
Text("We hope all can help each other. If you power level the newbies, we may", CSocket);
Text("reward you Experience or meteors. Are you interested?", CSocket);
Link("Tell me more details.", 1, CSocket);
Link("Check my virtue points.", 2, CSocket);
Link("Claim prize.", 3, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
Text("If you are above level 70 and try to power level the newbies ( at least 20 levels", CSocket);
Text("lower than you), you may gain virtue points.", CSocket);
Link("What are the virtuepoints?", 4, CSocket);
End(CSocket);
}
if (LinkBack == 2)
{
ErrorMsg("Your current virtue points are " + CSocket.Client.VirtuePoints + ", please try to gain more.", CSocket);
}
if (LinkBack == 3)
{
Text("What prize do you prefer?", CSocket);
Link("Meteor", 7, CSocket);
Link("Exp.", 8, CSocket);
Link("Let me think it over", 255, CSocket);
End(CSocket);
}
if (LinkBack == 4)
{
Text("The more newbies you power level, the more virtue points you gain. I shall", CSocket);
Text("give you a good reward for a certain virtue points.", CSocket);
Link("How can i gain virtue points?", 5, CSocket);
Link("What prizes can i expect?", 6, CSocket);
End(CSocket);
}
if (LinkBack == 5)
{
ErrorMsg("Once the newbies are one level up, the team captain can gain virtue points\n accordingly.", CSocket);
}
if (LinkBack == 6)
{
ErrorMsg("I shall reward you exp. of equivalent to an ExpBall for 15,000 virtue points or a\n meteor for 5000 virtue points.", CSocket);
}
else if (LinkBack == 7)
{
if (CSocket.Client.VirtuePoints > 5000)
{
Struct.ItemInfo Item = new Struct.ItemInfo();
CSocket.Client.VirtuePoints -= 5000;
CSocket.Client.Inventory.Add(1088001, Item);
}
else
{
ErrorMsg("You don't have 5000 virtuepoints or more", CSocket);
}
}
else if (LinkBack == 8)
{
if (CSocket.Client.VirtuePoints > 15000)
{
CSocket.Client.VirtuePoints -= 15000;
CSocket.Client.Exp += 15;
}
else
{
ErrorMsg("You don't have 15000 virtuepoints or more", CSocket);
}
}
break;
}
#endregion
case 300000:
{
if (LinkBack == 0)
{
Text("We hope all can help each other. If you power level the newbies, we may", CSocket);
Text("reward you Experience or meteors. Are you interested?", CSocket);
Link("Tell me more details.", 1, CSocket);
Link("Check my virtue points.", 2, CSocket);
Link("Claim prize.", 3, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
Text("If you are above level 70 and try to power level the newbies ( at least 20 levels", CSocket);
Text("lower than you), you may gain virtue points.", CSocket);
Link("What are the virtuepoints?", 4, CSocket);
End(CSocket);
}
if (LinkBack == 2)
{
ErrorMsg("Your current virtue points are " + CSocket.Client.VirtuePoints + ", please try to gain more.", CSocket);
}
if (LinkBack == 3)
{
Text("What prize do you prefer?", CSocket);
Link("Meteor", 7, CSocket);
Link("Exp.", 8, CSocket);
Link("Let me think it over", 255, CSocket);
End(CSocket);
}
if (LinkBack == 4)
{
Text("The more newbies you power level, the more virtue points you gain. I shall", CSocket);
Text("give you a good reward for a certain virtue points.", CSocket);
Link("How can i gain virtue points?", 5, CSocket);
Link("What prizes can i expect?", 6, CSocket);
End(CSocket);
}
if (LinkBack == 5)
{
ErrorMsg("Once the newbies are one level up, the team captain can gain virtue points\n accordingly.", CSocket);
}
if (LinkBack == 6)
{
ErrorMsg("I shall reward you exp. of equivalent to an ExpBall for 15,000 virtue points or a\n meteor for 5000 virtue points.", CSocket);
}
else if (LinkBack == 7)
{
if (CSocket.Client.VirtuePoints > 5000)
{
Struct.ItemInfo Item = new Struct.ItemInfo();
CSocket.Client.VirtuePoints -= 5000;
CSocket.Client.Inventory.Add(1088001, Item);
}
else
{
ErrorMsg("You don't have 5000 virtuepoints or more", CSocket);
}
}
else if (LinkBack == 8)
{
if (CSocket.Client.VirtuePoints > 15000)
{
CSocket.Client.VirtuePoints -= 15000;
CSocket.Client.Exp += 15;
}
else
{
ErrorMsg("You don't have 15000 virtuepoints or more", CSocket);
}
}
break;
}
#endregion
#region SurgeonMiracle
case 3381:
{
if (LinkBack == 0)
{
Text("Do you want to have your size changed so that you can become much more", CSocket);
Text(" adorable? Now here is a precious chance for you.", CSocket);
Link("I want to change my size", 1, CSocket);
Link("I don't want to change.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
Text("If you pay me one dragonball, I can have your size changed. You will become", CSocket);
Text("more attractive and start a fresh life. By the way, to avoid some unexpected", CSocket);
Text("things, make sure you are not in any disguise form.", CSocket);
Link("Here is a dragonball.", 2, CSocket);
Link("I have no dragonball.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 2)
{
if (InventoryContains(1088000, CSocket))
{
int Model = (int)CSocket.Client.Model % 10;
switch (Model)
{
case 2:
case 4:
CSocket.Client.Model--;
CSocket.Client.GhostModel--;
break;
case 1:
case 3:
CSocket.Client.Model++;
CSocket.Client.GhostModel++;
break;
}
ConquerPacket.ToLocal(ConquerPacket.Status(CSocket , 2, CSocket.Client.Model, Struct.StatusTypes.Model), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
RemoveItem(1088000, CSocket);
End(CSocket);
}
else
{
ErrorMsg("Sorry, there is no dragonball in your inventory. I can't have your size changed.", CSocket);
}
}
break;
}
#endregion
case 3381:
{
if (LinkBack == 0)
{
Text("Do you want to have your size changed so that you can become much more", CSocket);
Text(" adorable? Now here is a precious chance for you.", CSocket);
Link("I want to change my size", 1, CSocket);
Link("I don't want to change.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
Text("If you pay me one dragonball, I can have your size changed. You will become", CSocket);
Text("more attractive and start a fresh life. By the way, to avoid some unexpected", CSocket);
Text("things, make sure you are not in any disguise form.", CSocket);
Link("Here is a dragonball.", 2, CSocket);
Link("I have no dragonball.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 2)
{
if (InventoryContains(1088000, CSocket))
{
int Model = (int)CSocket.Client.Model % 10;
switch (Model)
{
case 2:
case 4:
CSocket.Client.Model--;
CSocket.Client.GhostModel--;
break;
case 1:
case 3:
CSocket.Client.Model++;
CSocket.Client.GhostModel++;
break;
}
ConquerPacket.ToLocal(ConquerPacket.Status(CSocket , 2, CSocket.Client.Model, Struct.StatusTypes.Model), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
RemoveItem(1088000, CSocket);
End(CSocket);
}
else
{
ErrorMsg("Sorry, there is no dragonball in your inventory. I can't have your size changed.", CSocket);
}
}
break;
}
#endregion
#region GodlyArtisan
case 10065:
{
if (LinkBack == 0)
{
Text("Magic Artisan and i are classmates. Our Teacher liked us very much and", CSocket);
Text("taught us his unique skills. MagicArtisan is adept in upgrading the item,", CSocket);
Text("while I am proficient in repairing the max durability. Our teacher told us that", CSocket);
Text("we should help others with all our hearts. So i am here to help those people", CSocket);
Text("who want their items repaired badly. What items do you want me to repair?", CSocket);
Link("Repair The Talisman.", 1, CSocket);
Link("Cap, Earring.", 2, CSocket);
Link("Bag, necklace.", 3, CSocket);
Link("Robe.", 4, CSocket);
Link("Sword.", 5, CSocket);
Link("Bracelet.", 6, CSocket);
Link("Boots.", 7, CSocket);
End(CSocket);
}
else if (LinkBack > 1 && LinkBack < 8)
{
Struct.ItemInfo Item;
if (CSocket.Client.Equipment.TryGetValue(LinkBack, out Item))
{
if (Item.MaxDura < 74)
{
Item.MaxDura += 5625;
Database.Database.UpdateItem(Item);
CSocket.Client.Equipment[LinkBack] = Item;
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Suspicious, Item.Free, Item.Locked, Item.Progress, Item.SocketProgress, Item.Position, Item.Color));
CSocket.Send(ConquerPacket.ItemUsage(Item.UID, LinkBack, Struct.ItemUsage.UpdateItem));
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter (CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
}
else { ErrorMsg("It's already on it's maximum level.", CSocket); }
}
}
break;
}
#endregion
case 10065:
{
if (LinkBack == 0)
{
Text("Magic Artisan and i are classmates. Our Teacher liked us very much and", CSocket);
Text("taught us his unique skills. MagicArtisan is adept in upgrading the item,", CSocket);
Text("while I am proficient in repairing the max durability. Our teacher told us that", CSocket);
Text("we should help others with all our hearts. So i am here to help those people", CSocket);
Text("who want their items repaired badly. What items do you want me to repair?", CSocket);
Link("Repair The Talisman.", 1, CSocket);
Link("Cap, Earring.", 2, CSocket);
Link("Bag, necklace.", 3, CSocket);
Link("Robe.", 4, CSocket);
Link("Sword.", 5, CSocket);
Link("Bracelet.", 6, CSocket);
Link("Boots.", 7, CSocket);
End(CSocket);
}
else if (LinkBack > 1 && LinkBack < 8)
{
Struct.ItemInfo Item;
if (CSocket.Client.Equipment.TryGetValue(LinkBack, out Item))
{
if (Item.MaxDura < 74)
{
Item.MaxDura += 5625;
Database.Database.UpdateItem(Item);
CSocket.Client.Equipment[LinkBack] = Item;
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Suspicious, Item.Free, Item.Locked, Item.Progress, Item.SocketProgress, Item.Position, Item.Color));
CSocket.Send(ConquerPacket.ItemUsage(Item.UID, LinkBack, Struct.ItemUsage.UpdateItem));
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter (CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
}
else { ErrorMsg("It's already on it's maximum level.", CSocket); }
}
}
break;
}
#endregion
#region Weaponmaster
case 7050:
{
if (LinkBack == 0)
{
Text("MagicArtisan is very trustworthy, he can always upgrade the level and the\n", CSocket);
Text("quality of your equipment without failure. However, he is helpless in\n", CSocket);
Text("upgrading the high-level equipment. I can do what he can't do. What are you\n", CSocket);
Text("going to ugrade?", CSocket);
Link("Headwear", 1, CSocket);
Link("Necklace/Bag", 2, CSocket);
Link("Armor", 3, CSocket);
Link("Weapon", 4, CSocket);
Link("Shield/Off-Hand Weapon", 5, CSocket);
Link("Ring/Bracelet", 6, CSocket);
Link("Boots", 8, CSocket);
Link("Keep your offers away from me.", 255, CSocket);
Face(32, CSocket);
End(CSocket);
CSocket.Client.ItemUpgrade = false;
}
else if (LinkBack >= 1 && LinkBack <= 8)
{
Struct.ItemInfo Item;
if (CSocket.Client.Equipment.TryGetValue(LinkBack, out Item))
{
Struct.ItemData ItemsData;
if (Nano.Items.TryGetValue(Item.ItemID, out ItemsData))
{
int NextItemID;
NextItemID = Calculation.NextEquipLevel(Item.ItemID);
Struct.ItemData NextItemData;
Nano.Items.TryGetValue(NextItemID, out NextItemData);
if (NextItemData == null) return;
if (NextItemData.Level < ItemsData.Level)
return;
if (NextItemData.Level > CSocket.Client.Level)
return;
byte Meteors = 0;
if (ItemsData.Level > 115)
{
Meteors = (byte)(ItemsData.Level / 10);
if (Meteors == 0)
Meteors = 1;
}
int Quality = Item.ItemID % 10;
if (Meteors != 0)
{
if (Quality < 7)
Meteors = 2;
if (Quality == 7)
Meteors = (byte)(2 + Meteors / 5);
if (Quality == 8)
Meteors = (byte)(Meteors * 2.6);
if (Quality == 9)
Meteors = (byte)(Meteors * 3.1);
}
if (ItemsData.Level >= 130)
{
Text("Sorry it reached max lvl , Go to weaponmaster he might help you", CSocket);
Link("Okay thank you", 255, CSocket);
End(CSocket);
return;
}
if (!CSocket.Client.ItemUpgrade)
{
Text("In exchange of upgrading your item, i'd like 1 dragonball.", CSocket);
Link("Do you accept?", LinkBack, CSocket);
Link("No thank you.", 255, CSocket);
End(CSocket);
}
else
{
if (InventoryContains(1088000, CSocket))
{
if (NextItemData.Level < ItemsData.Level)
return;
if (NextItemData.Level > CSocket.Client.Level)
return;
Item.ItemID = NextItemID;
Item.Dura = NextItemData.Dura;
Item.MaxDura = NextItemData.Dura;
Database.Database.UpdateItem(Item);
RemoveItem(1088000, CSocket);
CSocket.Client.Equipment[LinkBack] = Item;
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Suspicious, Item.Free, Item.Locked, Item.Progress, Item.SocketProgress, Item.Position, Item.Color));
CSocket.Send(ConquerPacket.ItemUsage(Item.UID, LinkBack, Struct.ItemUsage.UpdateItem));
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter (CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
}
}
CSocket.Client.ItemUpgrade = true;
}
}
}
else if (LinkBack == 200)
{
Text("Chose what do you want to upgrade.", CSocket);
Link("Headwear", 11, CSocket);
Link("Necklace/Bag", 12, CSocket);
Link("Armor", 13, CSocket);
Link("Weapon", 14, CSocket);
Link("Shield/Off-Hand Weapon", 15, CSocket);
Link("Ring/Bracelet", 16, CSocket);
Link("Boots", 18, CSocket);
Link("Nothing.", 255, CSocket);
Face(32, CSocket);
End(CSocket);
}
else if (LinkBack >= 11 && LinkBack <= 18)
{
LinkBack -= 10;
Struct.ItemInfo Item;
if (CSocket.Client.Equipment.TryGetValue(LinkBack, out Item))
{
Struct.ItemData ItemsData;
if (Nano.Items.TryGetValue(Item.ItemID, out ItemsData))
{
int DragonBalls = 0;
DragonBalls = ItemsData.Level / 20;
if (DragonBalls == 0)
DragonBalls = 1;
int Quality = Item.ItemID % 10;
if (Quality == 6)
DragonBalls += 2;
if (Quality == 7)
DragonBalls += 3;
if (Quality == 8)
DragonBalls += 4;
if (Quality == 9) return;
if (!CSocket.Client.ItemUpgrade)
{
Text("In exchange of upgrading your item, i'd like " + DragonBalls + " dragonballs.", CSocket);
Link("Do you accept?", LinkBack + 10, CSocket);
Link("No thank you.", 255, CSocket);
End(CSocket);
}
else
{
if (InventoryContains(1088000, CSocket, DragonBalls))
{
Item.ItemID += 1;
Item.Dura = Item.MaxDura;
Database.Database.UpdateItem(Item);
RemoveItem(1088000, CSocket, DragonBalls);
CSocket.Client.Equipment[LinkBack] = Item;
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Suspicious, Item.Free, Item.Locked, Item.Progress, Item.SocketProgress, Item.Position, Item.Color));
CSocket.Send(ConquerPacket.ItemUsage(Item.UID, LinkBack, Struct.ItemUsage.UpdateItem));
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter (CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
}
}
CSocket.Client.ItemUpgrade = true;
}
}
}
}
break;
#endregion
case 7050:
{
if (LinkBack == 0)
{
Text("MagicArtisan is very trustworthy, he can always upgrade the level and the\n", CSocket);
Text("quality of your equipment without failure. However, he is helpless in\n", CSocket);
Text("upgrading the high-level equipment. I can do what he can't do. What are you\n", CSocket);
Text("going to ugrade?", CSocket);
Link("Headwear", 1, CSocket);
Link("Necklace/Bag", 2, CSocket);
Link("Armor", 3, CSocket);
Link("Weapon", 4, CSocket);
Link("Shield/Off-Hand Weapon", 5, CSocket);
Link("Ring/Bracelet", 6, CSocket);
Link("Boots", 8, CSocket);
Link("Keep your offers away from me.", 255, CSocket);
Face(32, CSocket);
End(CSocket);
CSocket.Client.ItemUpgrade = false;
}
else if (LinkBack >= 1 && LinkBack <= 8)
{
Struct.ItemInfo Item;
if (CSocket.Client.Equipment.TryGetValue(LinkBack, out Item))
{
Struct.ItemData ItemsData;
if (Nano.Items.TryGetValue(Item.ItemID, out ItemsData))
{
int NextItemID;
NextItemID = Calculation.NextEquipLevel(Item.ItemID);
Struct.ItemData NextItemData;
Nano.Items.TryGetValue(NextItemID, out NextItemData);
if (NextItemData == null) return;
if (NextItemData.Level < ItemsData.Level)
return;
if (NextItemData.Level > CSocket.Client.Level)
return;
byte Meteors = 0;
if (ItemsData.Level > 115)
{
Meteors = (byte)(ItemsData.Level / 10);
if (Meteors == 0)
Meteors = 1;
}
int Quality = Item.ItemID % 10;
if (Meteors != 0)
{
if (Quality < 7)
Meteors = 2;
if (Quality == 7)
Meteors = (byte)(2 + Meteors / 5);
if (Quality == 8)
Meteors = (byte)(Meteors * 2.6);
if (Quality == 9)
Meteors = (byte)(Meteors * 3.1);
}
if (ItemsData.Level >= 130)
{
Text("Sorry it reached max lvl , Go to weaponmaster he might help you", CSocket);
Link("Okay thank you", 255, CSocket);
End(CSocket);
return;
}
if (!CSocket.Client.ItemUpgrade)
{
Text("In exchange of upgrading your item, i'd like 1 dragonball.", CSocket);
Link("Do you accept?", LinkBack, CSocket);
Link("No thank you.", 255, CSocket);
End(CSocket);
}
else
{
if (InventoryContains(1088000, CSocket))
{
if (NextItemData.Level < ItemsData.Level)
return;
if (NextItemData.Level > CSocket.Client.Level)
return;
Item.ItemID = NextItemID;
Item.Dura = NextItemData.Dura;
Item.MaxDura = NextItemData.Dura;
Database.Database.UpdateItem(Item);
RemoveItem(1088000, CSocket);
CSocket.Client.Equipment[LinkBack] = Item;
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Suspicious, Item.Free, Item.Locked, Item.Progress, Item.SocketProgress, Item.Position, Item.Color));
CSocket.Send(ConquerPacket.ItemUsage(Item.UID, LinkBack, Struct.ItemUsage.UpdateItem));
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter (CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
}
}
CSocket.Client.ItemUpgrade = true;
}
}
}
else if (LinkBack == 200)
{
Text("Chose what do you want to upgrade.", CSocket);
Link("Headwear", 11, CSocket);
Link("Necklace/Bag", 12, CSocket);
Link("Armor", 13, CSocket);
Link("Weapon", 14, CSocket);
Link("Shield/Off-Hand Weapon", 15, CSocket);
Link("Ring/Bracelet", 16, CSocket);
Link("Boots", 18, CSocket);
Link("Nothing.", 255, CSocket);
Face(32, CSocket);
End(CSocket);
}
else if (LinkBack >= 11 && LinkBack <= 18)
{
LinkBack -= 10;
Struct.ItemInfo Item;
if (CSocket.Client.Equipment.TryGetValue(LinkBack, out Item))
{
Struct.ItemData ItemsData;
if (Nano.Items.TryGetValue(Item.ItemID, out ItemsData))
{
int DragonBalls = 0;
DragonBalls = ItemsData.Level / 20;
if (DragonBalls == 0)
DragonBalls = 1;
int Quality = Item.ItemID % 10;
if (Quality == 6)
DragonBalls += 2;
if (Quality == 7)
DragonBalls += 3;
if (Quality == 8)
DragonBalls += 4;
if (Quality == 9) return;
if (!CSocket.Client.ItemUpgrade)
{
Text("In exchange of upgrading your item, i'd like " + DragonBalls + " dragonballs.", CSocket);
Link("Do you accept?", LinkBack + 10, CSocket);
Link("No thank you.", 255, CSocket);
End(CSocket);
}
else
{
if (InventoryContains(1088000, CSocket, DragonBalls))
{
Item.ItemID += 1;
Item.Dura = Item.MaxDura;
Database.Database.UpdateItem(Item);
RemoveItem(1088000, CSocket, DragonBalls);
CSocket.Client.Equipment[LinkBack] = Item;
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Suspicious, Item.Free, Item.Locked, Item.Progress, Item.SocketProgress, Item.Position, Item.Color));
CSocket.Send(ConquerPacket.ItemUsage(Item.UID, LinkBack, Struct.ItemUsage.UpdateItem));
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter (CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
}
}
CSocket.Client.ItemUpgrade = true;
}
}
}
}
break;
#endregion
#region UknownMan
case 3825:
{
if (LinkBack == 0)
{
Text("Hey, young man. Nice to meet you again. Do you bring any good wine for", CSocket);
Text("me? Sigh, the only wine that I'm missing is DrunkCelestial produced by the", CSocket);
Text("Flying with Moon Restaurant. If i have chance to savor it again, I won't mind", CSocket);
Text("helping you drawing energy from the powerful DragonBall to increase your\n experience", CSocket);
Link("Here is a bottle of DrunkCelestial", 1, CSocket);
Link("Sorry. I forgot to bring it.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.DbExpUsed)
{
ErrorMsg("What a shame... Dont worry, tomorrow i'll be right here, waiting for you.", CSocket);
return;
}
Text("Once it starts, it cant be stopped. Dont ask me, what level will you have", CSocket);
Text(", because i dont know. We will see.", CSocket);
Link("Alright, Lets do it!", 3, CSocket);
Link("Then nevermind.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 3)
{
if (InventoryContains(1088000, CSocket) && InventoryContains(722185, CSocket))
{
RemoveItem(1088000, CSocket);
CSocket.Client.DbExpUsed = true;
Database.Database.UpdateDbExpUse(CSocket);
int ExpToGive = (int)Math.Floor(600000 * (1 + ((CSocket.Client.Level - 1) * 0.1)) * 2);
Calculation.GiveExp(CSocket, ExpToGive);
}
else
{
Text("How dare you deceive me? You don't have any DrunkCelestial with you at all!", CSocket);
Text("You are wasting my time. I don't want you to say one more word. Get away!", CSocket);
Link("Sorry.", 255, CSocket);
End(CSocket);
}
}
}
break;
#endregion
case 3825:
{
if (LinkBack == 0)
{
Text("Hey, young man. Nice to meet you again. Do you bring any good wine for", CSocket);
Text("me? Sigh, the only wine that I'm missing is DrunkCelestial produced by the", CSocket);
Text("Flying with Moon Restaurant. If i have chance to savor it again, I won't mind", CSocket);
Text("helping you drawing energy from the powerful DragonBall to increase your\n experience", CSocket);
Link("Here is a bottle of DrunkCelestial", 1, CSocket);
Link("Sorry. I forgot to bring it.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.DbExpUsed)
{
ErrorMsg("What a shame... Dont worry, tomorrow i'll be right here, waiting for you.", CSocket);
return;
}
Text("Once it starts, it cant be stopped. Dont ask me, what level will you have", CSocket);
Text(", because i dont know. We will see.", CSocket);
Link("Alright, Lets do it!", 3, CSocket);
Link("Then nevermind.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 3)
{
if (InventoryContains(1088000, CSocket) && InventoryContains(722185, CSocket))
{
RemoveItem(1088000, CSocket);
CSocket.Client.DbExpUsed = true;
Database.Database.UpdateDbExpUse(CSocket);
int ExpToGive = (int)Math.Floor(600000 * (1 + ((CSocket.Client.Level - 1) * 0.1)) * 2);
Calculation.GiveExp(CSocket, ExpToGive);
}
else
{
Text("How dare you deceive me? You don't have any DrunkCelestial with you at all!", CSocket);
Text("You are wasting my time. I don't want you to say one more word. Get away!", CSocket);
Link("Sorry.", 255, CSocket);
End(CSocket);
}
}
}
break;
#endregion
#region ProficiencyGod
case 941://DeleteItem(ItemID, WeaponLevel + 1, CSocket);
{
if (LinkBack == 0)
{
Text("Young conquerer, have you ever heard of the magical Expball? With the\n", CSocket);
Text("energy of Expball, I can help you to sharply enhance the proficiency of\n weapons in a moment.", CSocket);
Link("I want to upgrade the proficiency of one-handed", 1, CSocket);
Link("I want to upgrade the proficiency of two-handed", 3, CSocket);
Link("I want to upgrade the proficiency of boxing", 4, CSocket);
Link("I want to upgrade the proficiency of shield.", 5, CSocket);
Link("Just passing by.", 255, CSocket);
Face(56, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Text("ExpBall can help you to promote the proficiency of one-handed weapon up to\n", CSocket);
Text("level 12 level by level. But you should train the weapon proficiency to level 1\n", CSocket);
Text("first.", CSocket);
Link("I want to upgrade the proficiency of club", 11, CSocket);
Link("I want to upgrade the proficiency of sword", 12, CSocket);
Link("I want to upgrade the proficiency of blade", 13, CSocket);
Link("I want to upgrade the proficiency of hook", 16, CSocket);
Link("I want to upgrade the proficiency of axe", 17, CSocket);
Link("Next Page.", 2, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 2)
{
Text("ExpBall can help you to promote the proficiency of one-handed weapon up to\n", CSocket);
Text("level 12 level by level. But you should train the weapon proficiency to level 1\n", CSocket);
Text("first.", CSocket);
Link("I want to upgrade the proficiency of backsword", 14, CSocket);
Link("I want to upgrade the proficiency of katana", 15, CSocket);
Link("I want to upgrade the proficiency of dagger", 49, CSocket);
Link("Previous page.", 1, CSocket);
Link("Just passing by.", 255, CSocket);
Face(65, CSocket);
End(CSocket);
}
else if (LinkBack == 3)
{
Text("ExpBall can help you to promote the proficiency of two-handed weapon up to\n", CSocket);
Text("level 12 level by level. But you should train the weapon proficiency to level 1\n", CSocket);
Text("first.", CSocket);
Link("I want to upgrade the proficiency of Glaive", 24, CSocket);
Link("I want to upgrade the proficiency of Poleaxe", 23, CSocket);
Link("I want to upgrade the proficiency of LongHammer", 25, CSocket);
Link("I want to upgrade the proficiency of Spear", 22, CSocket);
Link("I want to upgrade the proficiency of Bow", 20, CSocket);
Link("I want to upgrade the proficiency of Halbert", 26, CSocket);
Link("I want to upgrade the proficiency of wand", 21, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 4)
{
Text("To upgrade the proficiency of boxing, one ExpBall(s) is required and\n", CSocket);
Text("you should reach level 10. Would you like to have a try now? I will never let you\n down.", CSocket);
Link("Yes, please.", 27, CSocket);
Link("No, thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 5)
{
Text("To upgrade the proficiency of shield, some ExpBall(s) is required and\n", CSocket);
Text("you should reach level 10. Would you like to have a try now? I will never let you\n down.", CSocket);
Link("Yes, please.", 28, CSocket);
Link("No, thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack > 10 && LinkBack < 30)
{
int WeaponId = 480;//Club
if (LinkBack == 12) WeaponId = 420;//Sword ,BS=421
else if (LinkBack == 13) WeaponId = 410;//Blade
else if (LinkBack == 14) WeaponId = 421;//BackSword
else if (LinkBack == 15) WeaponId = 601;//Katana
else if (LinkBack == 16) WeaponId = 430;//Hook
else if (LinkBack == 17) WeaponId = 450;//Axe
else if (LinkBack == 20) WeaponId = 500;//Bow
else if (LinkBack == 21) WeaponId = 561;//Wand
else if (LinkBack == 22) WeaponId = 560;//Spear
else if (LinkBack == 23) WeaponId = 530;//Poleaxe
else if (LinkBack == 24) WeaponId = 510;//Glave
else if (LinkBack == 25) WeaponId = 540;//LongHammer
else if (LinkBack == 26) WeaponId = 580;//Poleaxe
else if (LinkBack == 27) WeaponId = 000;// Boxing
else if (LinkBack == 28) WeaponId = 900;// Shield
int WeaponLevel = 0;
if (CSocket.Client.Profs.ContainsKey(WeaponId))
{
WeaponLevel = CSocket.Client.Profs[WeaponId].Level;
}
if (HasItem(722136, WeaponLevel + 1, CSocket))
{
if (CSocket.Client.Profs.ContainsKey(WeaponId))
{
Struct.CharProf Prof = CSocket.Client.Profs[WeaponId];
Prof.Level = WeaponLevel + 1;
Prof.Exp = 0;
DeleteItem(722136, WeaponLevel + 1, CSocket);
Database.Database.UpdateProf(Prof.ID, Prof.Level, Prof.Exp, CSocket.Client.ID);
}
else
{
Struct.CharProf Prof = new Struct.CharProf();
Prof.Level = 1;
Prof.ID = WeaponId;
DeleteItem(722136, WeaponLevel + 1, CSocket);
CSocket.Client.Profs.Add(Prof.ID, Prof);
Database.Database.NewProf(WeaponId, 1, 0, CSocket.Client.ID);
}
CSocket.Send(ConquerPacket.Prof(WeaponId, WeaponLevel + 1, 0));
}
else { Text("Sorry. Without the power of ExpBall, I can't promote your proficiency. Please\n", CSocket); Text("come back when you obtain some.", CSocket); Link("I'll find some ExpBalls later.", 255, CSocket); End(CSocket); }
}
break;
}
#endregion ProficiencyGod
case 941://DeleteItem(ItemID, WeaponLevel + 1, CSocket);
{
if (LinkBack == 0)
{
Text("Young conquerer, have you ever heard of the magical Expball? With the\n", CSocket);
Text("energy of Expball, I can help you to sharply enhance the proficiency of\n weapons in a moment.", CSocket);
Link("I want to upgrade the proficiency of one-handed", 1, CSocket);
Link("I want to upgrade the proficiency of two-handed", 3, CSocket);
Link("I want to upgrade the proficiency of boxing", 4, CSocket);
Link("I want to upgrade the proficiency of shield.", 5, CSocket);
Link("Just passing by.", 255, CSocket);
Face(56, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Text("ExpBall can help you to promote the proficiency of one-handed weapon up to\n", CSocket);
Text("level 12 level by level. But you should train the weapon proficiency to level 1\n", CSocket);
Text("first.", CSocket);
Link("I want to upgrade the proficiency of club", 11, CSocket);
Link("I want to upgrade the proficiency of sword", 12, CSocket);
Link("I want to upgrade the proficiency of blade", 13, CSocket);
Link("I want to upgrade the proficiency of hook", 16, CSocket);
Link("I want to upgrade the proficiency of axe", 17, CSocket);
Link("Next Page.", 2, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 2)
{
Text("ExpBall can help you to promote the proficiency of one-handed weapon up to\n", CSocket);
Text("level 12 level by level. But you should train the weapon proficiency to level 1\n", CSocket);
Text("first.", CSocket);
Link("I want to upgrade the proficiency of backsword", 14, CSocket);
Link("I want to upgrade the proficiency of katana", 15, CSocket);
Link("I want to upgrade the proficiency of dagger", 49, CSocket);
Link("Previous page.", 1, CSocket);
Link("Just passing by.", 255, CSocket);
Face(65, CSocket);
End(CSocket);
}
else if (LinkBack == 3)
{
Text("ExpBall can help you to promote the proficiency of two-handed weapon up to\n", CSocket);
Text("level 12 level by level. But you should train the weapon proficiency to level 1\n", CSocket);
Text("first.", CSocket);
Link("I want to upgrade the proficiency of Glaive", 24, CSocket);
Link("I want to upgrade the proficiency of Poleaxe", 23, CSocket);
Link("I want to upgrade the proficiency of LongHammer", 25, CSocket);
Link("I want to upgrade the proficiency of Spear", 22, CSocket);
Link("I want to upgrade the proficiency of Bow", 20, CSocket);
Link("I want to upgrade the proficiency of Halbert", 26, CSocket);
Link("I want to upgrade the proficiency of wand", 21, CSocket);
Link("Just passing by.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 4)
{
Text("To upgrade the proficiency of boxing, one ExpBall(s) is required and\n", CSocket);
Text("you should reach level 10. Would you like to have a try now? I will never let you\n down.", CSocket);
Link("Yes, please.", 27, CSocket);
Link("No, thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 5)
{
Text("To upgrade the proficiency of shield, some ExpBall(s) is required and\n", CSocket);
Text("you should reach level 10. Would you like to have a try now? I will never let you\n down.", CSocket);
Link("Yes, please.", 28, CSocket);
Link("No, thanks.", 255, CSocket);
End(CSocket);
}
else if (LinkBack > 10 && LinkBack < 30)
{
int WeaponId = 480;//Club
if (LinkBack == 12) WeaponId = 420;//Sword ,BS=421
else if (LinkBack == 13) WeaponId = 410;//Blade
else if (LinkBack == 14) WeaponId = 421;//BackSword
else if (LinkBack == 15) WeaponId = 601;//Katana
else if (LinkBack == 16) WeaponId = 430;//Hook
else if (LinkBack == 17) WeaponId = 450;//Axe
else if (LinkBack == 20) WeaponId = 500;//Bow
else if (LinkBack == 21) WeaponId = 561;//Wand
else if (LinkBack == 22) WeaponId = 560;//Spear
else if (LinkBack == 23) WeaponId = 530;//Poleaxe
else if (LinkBack == 24) WeaponId = 510;//Glave
else if (LinkBack == 25) WeaponId = 540;//LongHammer
else if (LinkBack == 26) WeaponId = 580;//Poleaxe
else if (LinkBack == 27) WeaponId = 000;// Boxing
else if (LinkBack == 28) WeaponId = 900;// Shield
int WeaponLevel = 0;
if (CSocket.Client.Profs.ContainsKey(WeaponId))
{
WeaponLevel = CSocket.Client.Profs[WeaponId].Level;
}
if (HasItem(722136, WeaponLevel + 1, CSocket))
{
if (CSocket.Client.Profs.ContainsKey(WeaponId))
{
Struct.CharProf Prof = CSocket.Client.Profs[WeaponId];
Prof.Level = WeaponLevel + 1;
Prof.Exp = 0;
DeleteItem(722136, WeaponLevel + 1, CSocket);
Database.Database.UpdateProf(Prof.ID, Prof.Level, Prof.Exp, CSocket.Client.ID);
}
else
{
Struct.CharProf Prof = new Struct.CharProf();
Prof.Level = 1;
Prof.ID = WeaponId;
DeleteItem(722136, WeaponLevel + 1, CSocket);
CSocket.Client.Profs.Add(Prof.ID, Prof);
Database.Database.NewProf(WeaponId, 1, 0, CSocket.Client.ID);
}
CSocket.Send(ConquerPacket.Prof(WeaponId, WeaponLevel + 1, 0));
}
else { Text("Sorry. Without the power of ExpBall, I can't promote your proficiency. Please\n", CSocket); Text("come back when you obtain some.", CSocket); Link("I'll find some ExpBalls later.", 255, CSocket); End(CSocket); }
}
break;
}
#endregion ProficiencyGod
#region MagicArtisan
case 10062: //Magic Artisan
{
if (LinkBack == 0)
{
Text("I am a master of upgrading items. My skills are almost transcendent. I never", CSocket);
Text("fail. I have heard of others who can upgrade items, but I also know that they", CSocket);
Text("sometimes fail and break their customer's items. I charge a higher fee for", CSocket);
Text("my services, but I never disappoint a customer. What is your desire?", CSocket);
Link("UpgradeQuality", 20, CSocket);
Link("Upgrade item level.", 10, CSocket);
Face(55, CSocket);
End(CSocket);
}
#region Upgrade item level.
else if (LinkBack == 10)
{
Text("I see. Upgrading an item's level makes it more powerful, but also harder to", CSocket);
Text("use, increasing the item level prerequisite.", CSocket);
Link("Helmet, Earring", 1, CSocket);
Link("Upgrade necklace level.", 2, CSocket);
Link("Upgrade armor level.", 3, CSocket);
Link("Upgrade weapon level.", 4, CSocket);
Link("Upgrade ring, heavy ring level.", 6, CSocket);
Link("Upgrade boots level.", 8, CSocket);
Link("Goodbye", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack > 0 && LinkBack < 9)
{
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
int ItemId = CSocket.Client.Equipment[LinkBack].ItemID; byte Plus = (byte)CSocket.Client.Equipment[LinkBack].Plus;
byte MetsNeed = Calculation.MetsNeeded(ItemId, Plus);
if (MetsNeed < 1)
{
Text("Oh sorry this item is very high for me to deal with", CSocket);
Text("Try your luck with WeaponMaster beside me,or ArtisanWind at TC", CSocket);
Link("Looser ", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
if (HasItem(1088001, MetsNeed, CSocket))
{
int NewItemId = Calculation.NextEquipLevel(ItemId);
if (NewItemId != ItemId && ReqLvl(NewItemId, CSocket))
{
CSocket.Client.Equipment[LinkBack].ItemID = NewItemId;
DeleteItem(1088001, MetsNeed, CSocket); ItemId = CSocket.Client.Equipment[LinkBack].UID;
ItemUnequip(LinkBack, ItemId, CSocket);
ItemEquip(LinkBack, ItemId, CSocket);
Text("Congratulations your item has been upgraded", CSocket);
Link("Thanks.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("Sorry, I cannot upgrade this item. You either dont have the required items or", CSocket);
Text("your level isn't sufficient", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
else
{
Text("You have to give me "+MetsNeed+" meteors,meteor tears or the equivalent number of", CSocket);
Text("meteor packs.", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
else
{
Text("Sorry, please wear the item you want to upgrade first.", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
#endregion
#region UpgradeQuality
else if (LinkBack == 18)
{
Text("Which piece of equipment do you want to upgrade the quality of?", CSocket);
Link("Boots.", 28, CSocket);
Link("Previous.", 20, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack == 20)
{
Text("Which piece of equipment do you want to upgrade the quality of?", CSocket);
Link("Attack Talisman.", 31, CSocket);
Link("Defense Talisman.", 30, CSocket);
Link("Helmet/Head Band/Earring.", 21, CSocket);
Link("Necklace.", 22, CSocket);
Link("Armor.", 23, CSocket);
Link("Weapon.", 24, CSocket);
Link("Ring/Heavy Ring.", 26, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack > 20)
{
LinkBack -= 20;
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
int ItemId = CSocket.Client.Equipment[LinkBack].ItemID;
byte DbNeed = Calculation.DbNeeded(ItemId);
if (DbNeed < 1)
{
Text("Sorry, this item is a super one. There is no quality higher than this. It's.", CSocket);
Text("perfect!", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
if (HasItem(1088000, DbNeed, CSocket))
{
int NewItemId = ItemId + 1;
CSocket.Client.Equipment[LinkBack].ItemID = NewItemId;
DeleteItem(1088000, DbNeed, CSocket); ItemId = CSocket.Client.Equipment[LinkBack].UID;
ItemUnequip(LinkBack, ItemId, CSocket);
ItemEquip(LinkBack, ItemId, CSocket);
Text("Congratulations, your item has been upgraded.", CSocket);
Link("Thanks.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("You have to give me " + DbNeed + " dragonballs or the equivalent number of", CSocket);
Text("dragon packs.", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
else
{
Text("Sorry, please wear the item you want to upgrade first.", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
#endregion
break;
}
#endregion
case 10062: //Magic Artisan
{
if (LinkBack == 0)
{
Text("I am a master of upgrading items. My skills are almost transcendent. I never", CSocket);
Text("fail. I have heard of others who can upgrade items, but I also know that they", CSocket);
Text("sometimes fail and break their customer's items. I charge a higher fee for", CSocket);
Text("my services, but I never disappoint a customer. What is your desire?", CSocket);
Link("UpgradeQuality", 20, CSocket);
Link("Upgrade item level.", 10, CSocket);
Face(55, CSocket);
End(CSocket);
}
#region Upgrade item level.
else if (LinkBack == 10)
{
Text("I see. Upgrading an item's level makes it more powerful, but also harder to", CSocket);
Text("use, increasing the item level prerequisite.", CSocket);
Link("Helmet, Earring", 1, CSocket);
Link("Upgrade necklace level.", 2, CSocket);
Link("Upgrade armor level.", 3, CSocket);
Link("Upgrade weapon level.", 4, CSocket);
Link("Upgrade ring, heavy ring level.", 6, CSocket);
Link("Upgrade boots level.", 8, CSocket);
Link("Goodbye", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack > 0 && LinkBack < 9)
{
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
int ItemId = CSocket.Client.Equipment[LinkBack].ItemID; byte Plus = (byte)CSocket.Client.Equipment[LinkBack].Plus;
byte MetsNeed = Calculation.MetsNeeded(ItemId, Plus);
if (MetsNeed < 1)
{
Text("Oh sorry this item is very high for me to deal with", CSocket);
Text("Try your luck with WeaponMaster beside me,or ArtisanWind at TC", CSocket);
Link("Looser ", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
if (HasItem(1088001, MetsNeed, CSocket))
{
int NewItemId = Calculation.NextEquipLevel(ItemId);
if (NewItemId != ItemId && ReqLvl(NewItemId, CSocket))
{
CSocket.Client.Equipment[LinkBack].ItemID = NewItemId;
DeleteItem(1088001, MetsNeed, CSocket); ItemId = CSocket.Client.Equipment[LinkBack].UID;
ItemUnequip(LinkBack, ItemId, CSocket);
ItemEquip(LinkBack, ItemId, CSocket);
Text("Congratulations your item has been upgraded", CSocket);
Link("Thanks.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("Sorry, I cannot upgrade this item. You either dont have the required items or", CSocket);
Text("your level isn't sufficient", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
else
{
Text("You have to give me "+MetsNeed+" meteors,meteor tears or the equivalent number of", CSocket);
Text("meteor packs.", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
else
{
Text("Sorry, please wear the item you want to upgrade first.", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
#endregion
#region UpgradeQuality
else if (LinkBack == 18)
{
Text("Which piece of equipment do you want to upgrade the quality of?", CSocket);
Link("Boots.", 28, CSocket);
Link("Previous.", 20, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack == 20)
{
Text("Which piece of equipment do you want to upgrade the quality of?", CSocket);
Link("Attack Talisman.", 31, CSocket);
Link("Defense Talisman.", 30, CSocket);
Link("Helmet/Head Band/Earring.", 21, CSocket);
Link("Necklace.", 22, CSocket);
Link("Armor.", 23, CSocket);
Link("Weapon.", 24, CSocket);
Link("Ring/Heavy Ring.", 26, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack > 20)
{
LinkBack -= 20;
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
int ItemId = CSocket.Client.Equipment[LinkBack].ItemID;
byte DbNeed = Calculation.DbNeeded(ItemId);
if (DbNeed < 1)
{
Text("Sorry, this item is a super one. There is no quality higher than this. It's.", CSocket);
Text("perfect!", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
if (HasItem(1088000, DbNeed, CSocket))
{
int NewItemId = ItemId + 1;
CSocket.Client.Equipment[LinkBack].ItemID = NewItemId;
DeleteItem(1088000, DbNeed, CSocket); ItemId = CSocket.Client.Equipment[LinkBack].UID;
ItemUnequip(LinkBack, ItemId, CSocket);
ItemEquip(LinkBack, ItemId, CSocket);
Text("Congratulations, your item has been upgraded.", CSocket);
Link("Thanks.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("You have to give me " + DbNeed + " dragonballs or the equivalent number of", CSocket);
Text("dragon packs.", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
else
{
Text("Sorry, please wear the item you want to upgrade first.", CSocket);
Link("Oh, I see. Farewell.", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
#endregion
break;
}
#endregion
The npc:
The function:
Quote:
#region Alex
case 3600:// Alex
{
if (LinkBack == 0)
{
Text("You are eligible for second rebirth, but you need to complete a great quest to", CSocket);
Text("eliminate the evil and save the Sorrowfoul souls in EvilAbyss first. After second", CSocket);
Text("rebirth, you can learn Bless and and bear unique aura, and enjoy many benefits", CSocket);
Link("What quest", 1, CSocket);
Link("I've got the exemptiontoken", 3, CSocket);
Link("I dont wan't second rebirth.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Text("You need to go through many tests in Evil Abyss. It is a very dangerous quest, moreover, after you complete your second rebirth, you ", CSocket);
Text("will start a new and pay trible efforts to level up. You had better think it over before you make such vital decisions.", CSocket);
Link("I decide to take this quest", 2, CSocket);
Link("I don't want to risk my life.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 2)
{
Teleport(1700, 609, 643, 0, CSocket);
End(CSocket);
}
else if (LinkBack == 3)
{
if (CSocket.Client.CanSecondReborn == true && CSocket.Client.Level >= 120)
{
Text("While going through the rebirth you can change your class if you'd like.", CSocket);
Text("What class would you like to reborn to?", CSocket);
Link("Trojan", 11, CSocket);
Link("Warrior", 21, CSocket);
Link("Archer", 41, CSocket);
Link("Water Taoist", 132, CSocket);
Link("Fire Taoist", 142, CSocket);
Link("Ninja", 50, CSocket);
End(CSocket);
}
else
{
Text("You have to use the ExemptionToken first.", CSocket);
Link("I see.", 255, CSocket);
End(CSocket);
}
}
else if (LinkBack > 11 && LinkBack == 144)
{
Reborn2(LinkBack, CSocket);
}
}
break;
#endregion
Quote:
public static void Reborn2(int Class, ClientSocket CSocket)
{
Database.Database.UpdateStats(CSocket);
CSocket.Client.Class = (Struct.ClassType)Class;
CSocket.Client.Level = 15;
CSocket.Client.Reborn = 2;
CSocket.Send(ConquerPacket.Status(CSocket, 2, (int)CSocket.Client.Reborn, Struct.StatusTypes.RebornCount));
CSocket.Send(ConquerPacket.Status(CSocket, 2, (int)CSocket.Client.Level, Struct.StatusTypes.Level));
CSocket.Send(ConquerPacket.Status(CSocket, 2, (int)CSocket.Client.Class, Struct.StatusTypes.Job));
ConquerPacket.ToServer(ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "CONGRATULATIONS! " + CSocket.Client.Name + " has just been second reborn! Good job!", Struct.ChatType.Center), 0);
Teleport(1002, 439, 390, 0, CSocket);
#region ItemCheck
for (int i = 1; i < 9; i++)
{
if (i != 7)
{
if (CSocket.Client.Equipment.ContainsKey(i))
{
CSocket.Client.Equipment[i].ItemID =
Calculation.DownLevel(CSocket.Client.Equipment[i].ItemID);
Database.Database.UpdateItem(CSocket.Client.Equipm ent[i]);
CSocket.Send(ConquerPacket.ItemInfo(
CSocket.Client.Equipment[i].UID,
CSocket.Client.Equipment[i].ItemID,
CSocket.Client.Equipment[i].Plus,
CSocket.Client.Equipment[i].Bless,
CSocket.Client.Equipment[i].Enchant,
CSocket.Client.Equipment[i].Soc1,
CSocket.Client.Equipment[i].Soc2,
CSocket.Client.Equipment[i].Dura,
CSocket.Client.Equipment[i].MaxDura,
CSocket.Client.Equipment[i].Suspicious,
CSocket.Client.Equipment[i].Free,
CSocket.Client.Equipment[i].Locked,
CSocket.Client.Equipment[i].Progress,
CSocket.Client.Equipment[i].SocketProgress,
i,
CSocket.Client.Equipment[i].Color));
}
}
}
#endregion
}
Important: If you miss definitions or functions just say it and i will add it!
I will be adding more npcs later, this is my first ones i did in my spare time.






