So far things are well onlive server.
Also i have started working at Wuxing oven and thanks to Fang I found old pictures with it.
Below is the Composition so far only for +1 to +9 and +9 to +10 (rest i'll finish them tonight)
also for enchanting i don't know what window to pop up so i place the compose window so far for testing
Also i am interested in that function just like items checking for more than one but now for deleting to improve it's performance later on.
Also i have started working at Wuxing oven and thanks to Fang I found old pictures with it.
Below is the Composition so far only for +1 to +9 and +9 to +10 (rest i'll finish them tonight)
also for enchanting i don't know what window to pop up so i place the compose window so far for testing
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Redux.Packets.Game;
namespace Redux.Npcs
{
/// <summary>
/// Handles NPC usage for [35016] Compose Items NPC
/// </summary>
public class NPC_35016 : INpc
{
public NPC_35016(Game_Server.Player _client)
: base(_client)
{
ID = 35016;
Face = 9;
}
public override void Run(Game_Server.Player _client, ushort _linkback)
{
Responses = new List<NpcDialogPacket>();
AddAvatar();
switch (_linkback)
{
case 0:
AddText("A good set of equipment can help you a lot in future battles.Is there something I can do for you?");
AddOption("Enchant HP to my gears.", 1);
AddOption("Composing Upgrade.", 2);
break;
case 1:
_client.Send(GeneralActionPacket.Create(_client.UID, Enum.DataAction.OpenWindow, 116));
break;
case 2:
AddText("There are two ways of composing from +1 to +9 with +n stones or +n items and from +9 to +12 with DragonBalls.");
AddText("Whitch one would you want?");
AddOption("Compose +1 to +9.", 3);
AddOption("Compose +9 to +12.", 4);
AddOption("How does composing +9 to +12 works?", 5);
break;
case 3:
_client.Send(GeneralActionPacket.Create(_client.UID, Enum.DataAction.OpenWindow, 1));
break;
case 4:
AddText("What a glorious day! I belive it's the best weather to refine equipment in. Do you need my help with anything?");
AddOption("Compose +9 Equipment to +10.", 6);
AddOption("Compose +10 Equipment to +11.", 7);
AddOption("Compose +11 Equipment to +12.", 8);
AddOption("Nothing right now, thanks.", 255);
break;
case 5:
AddText("If you have any +9 items, you may use DragonBalls to refine it and upgrade its bonus level up to +12.");
AddOption("Are there any limits to equipment refining?", 9);
AddOption("How many DragonBalls would I need?",10);
break;
case 9:
AddText("When your level reaches 130, I can help you upgrade the bonus level of your equiment and weapons.");
AddText("However, there are limitations.Only right-Handed weapons can be refined. Whereas, there are no limits to equipment refining.");
AddOption("Thanks. I never knew.", 255);
break;
case 10:
AddText("12 DragonBalls are required for refining +9 items to +10, ");
AddText("25 DragonBalls are required for refining +10 items to +11, ");
AddText("4 DBScrolls are required for refining +11 items to +12,");
AddOption("Got it, thanks.", 255);
break;
case 6:
AddText("Choose the equipment you want to upgrade from +9 to +10 from the list below. ");
AddOption("Helmet/Earrings/TaoCap ", 11);
AddOption("Ring/Bracelet ", 12);
AddOption("Necklace/Bag ", 13);
AddOption("Boots ", 14);
AddOption("Armor ", 15);
AddOption("Shield ", 16);
AddOption("Weapon ", 17);
AddOption("I changed my mind. ", 255);
break;
#region +9 to +10
case 11:
var head = _client.Equipment.GetItemBySlot(Enum.ItemLocation.Helmet);
if (_client.HasItem(1088000, 12) && head != null && head.Plus == 9)
{
head.Plus++;
_client.Send(ItemInformationPacket.Create(head));
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
break;
case 12:
var ring = _client.Equipment.GetItemBySlot(Enum.ItemLocation.Ring);
if (_client.HasItem(1088000, 12) && ring != null && ring.Plus == 9)
{
ring.Plus++;
_client.Send(ItemInformationPacket.Create(ring));
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
break;
case 13:
var necklace = _client.Equipment.GetItemBySlot(Enum.ItemLocation.Necklace);
if (_client.HasItem(1088000, 12) && necklace != null && necklace.Plus == 9)
{
necklace.Plus++;
_client.Send(ItemInformationPacket.Create(necklace));
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
break;
case 14:
var boots = _client.Equipment.GetItemBySlot(Enum.ItemLocation.Boots);
if (_client.HasItem(1088000, 12) && boots != null && boots.Plus == 9)
{
boots.Plus++;
_client.Send(ItemInformationPacket.Create(boots));
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
break;
case 15:
var armor = _client.Equipment.GetItemBySlot(Enum.ItemLocation.Armor);
if (_client.HasItem(1088000, 12) && armor != null && armor.Plus == 9)
{
armor.Plus++;
_client.Send(ItemInformationPacket.Create(armor));
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
break;
case 16:
var shield = _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponL);
if (_client.HasItem(1088000, 12) && shield != null && shield.Plus == 9)
{
shield.Plus++;
_client.Send(ItemInformationPacket.Create(shield));
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
break;
case 17:
var weapon = _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR);
if (_client.HasItem(1088000, 12) && weapon != null && weapon.Plus == 9)
{
weapon.Plus++;
_client.Send(ItemInformationPacket.Create(weapon));
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
_client.DeleteItem(1088000);
AddText("There you go!");
AddOption("Thanks!", 255);
}
break;
#endregion
}
AddFinish();
Send();
}
}
}
Also i am interested in that function just like items checking for more than one but now for deleting to improve it's performance later on.