vitormm escreveu:Bom vou postar!o #region Item Socket Fixed!
#region Item Socket
case 550:
{
if (option == 0)
{
GC.AddSend(Packets.NPCSay("Hey did you hear about me, i can put a socket to any item u want."));
GC.AddSend(Packets.NPCSay("It will cost you 12 DragonBalls to create the first socket."));
GC.AddSend(Packets.NPCSay("The second one will cost you 7 Tough Drills."));
GC.AddSend(Packets.NPCLink("I want to create a first socket.", 1));
GC.AddSend(Packets.NPCLink("I want to create a second socket.", 2));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (option == 1 || option == 2)
{
if (option == 1)
GC.AddSend(Packets.NPCSay("Prepare 12 DragonBalls and 250,000 silvers for the socket and choose the equipment you want the socket to be created in."));
else
GC.AddSend(Packets.NPCSay("Prepare 5 Tough Drills and 500,000 silvers for the socket and choose the equipment you want the socket to be created in."));
GC.AddSend(Packets.NPCLink("Headgear", (byte)(option * 100 + 1)));
GC.AddSend(Packets.NPCLink("Necklace/Bag", (byte)(option * 100 + 2)));
GC.AddSend(Packets.NPCLink("Armor", (byte)(option * 100 + 3)));
GC.AddSend(Packets.NPCLink("Shield", (byte)(option * 100 + 5)));
GC.AddSend(Packets.NPCLink("Ring", (byte)(option * 100 + 6)));
GC.AddSend(Packets.NPCLink("Boots", (byte)(option * 100 +
));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (option > 100 && option <= 103 || option == 105 || option == 106 || option == 108)
{
byte Pos = (byte)(option - 100);
Game.Item Eq = GC.MyChar.Equips.Get(Pos);
if (Eq.Soc1 == ConquerSx.Game.Item.Gem.NoSocket)
{
if (GC.MyChar.Silvers >= 250000 && GC.MyChar.InventoryContains(1088000, 12,GC))
{
GC.MyChar.EquipStats(Pos, false);
for (byte i = 0; i < 18; i++)
GC.MyChar.RemoveItem(1088000, 12, GC);
http://GC.MyChar.RemoveItem(GC.MyChar.NextItem(1088000));
GC.MyChar.Silvers -= 250000;
Eq.Soc1 = ConquerSx.Game.Item.Gem.EmptySocket;
GC.MyChar.Equips.Replace(Pos, Eq, GC.MyChar);
GC.MyChar.EquipStats(Pos, true);
GC.AddSend(Packets.NPCSay("Congratulations! You now have the first socket in your equipment."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You don't have the materials."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else
{
GC.AddSend(Packets.NPCSay("The item already has the first socket."));
GC.AddSend(Packets.NPCLink("Oh, right.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else if (option > 200 && option <= 203 || option == 205 || option == 206 || option == 208)
{
byte Pos = (byte)(option - 200);
Game.Item Eq = GC.MyChar.Equips.Get(Pos);
if (Eq.Soc1 != ConquerSx.Game.Item.Gem.NoSocket)
{
if (Eq.Soc2 == ConquerSx.Game.Item.Gem.NoSocket)
{
if (GC.MyChar.Silvers >= 500000 && GC.MyChar.InventoryContains(1200005, 5, GC))
{
GC.MyChar.EquipStats(Pos, false);
for (byte i = 0; i < 7; i++)
GC.MyChar.RemoveItem(1200005, 5, GC);
http://GC.MyChar.RemoveItem(GC.MyChar.NextItem(1200005));
GC.MyChar.Silvers -= 500000;
Eq.Soc2 = ConquerSx.Game.Item.Gem.EmptySocket;
GC.MyChar.Equips.Replace(Pos, Eq, GC.MyChar);
GC.MyChar.EquipStats(Pos, true);
GC.AddSend(Packets.NPCSay("Congratulations! You now have the second socket in your equipment."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You don't have the materials."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else
{
GC.AddSend(Packets.NPCSay("The item already has the second socket."));
GC.AddSend(Packets.NPCLink("Oh, right.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else
{
GC.AddSend(Packets.NPCSay("You first need the first socket done. Then i can make the second one."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
Por favor..todos creditos ao renan!