if (CurrentNPC == 10002) //Socket Gourd/Garment Quest
{
SendPacket(General.MyPackets.NPCSay("Would you like me to make a socket in an item for you?"));
SendPacket(General.MyPackets.NPCSay(" You must prepare 10 Star Drills and the Gem you want to Socket."));
SendPacket(General.MyPackets.NPCSay(" Please make sure you only have ONE gem in your inventory."));
SendPacket(General.MyPackets.NPCLink("Socket Garment.", 10));
SendPacket(General.MyPackets.NPCLink("Socket Gourd.", 20));
SendPacket(General.MyPackets.NPCLink("Change Socket.", 1));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
npc controlls :
Code:
if (CurrentNPC == 10002)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("I will only charge 1 StarDrill to change the socketed Gem."));
SendPacket(General.MyPackets.NPCSay(" Change which socket?"));
SendPacket(General.MyPackets.NPCLink("Garment.", 2));
SendPacket(General.MyPackets.NPCLink("Gourd.", 3));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 2 || Control == 3)
{
string name = "Item";
if (Control == 2)
name = "Garment";
if (Control == 3)
name = "Gourd";
byte into = 0;
if (Control == 10 && MyChar.Equips[9] != null && MyChar.Equips[9] != "0")
into = 9;
else if (Control == 20 && MyChar.Equips[7] != null && MyChar.Equips[7] != "0")
into = 7;
else
{
SendPacket(General.MyPackets.NPCSay("You don't have a " + name + " to socket!"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
return;
}
if (MyChar.InventoryContains(1200006, 1))
{
string[] item = MyChar.Equips[into].Split('-');
if (item[4] != "0")
return;
if (MyChar.InventoryContains(700001, 1))
item[4] = "01";
else if (MyChar.InventoryContains(700002, 1))
item[4] = "02";
else if (MyChar.InventoryContains(700003, 1))
item[4] = "03";
else if (MyChar.InventoryContains(700011, 1))
item[4] = "11";
else if (MyChar.InventoryContains(700012, 1))
item[4] = "12";
else if (MyChar.InventoryContains(700013, 1))
item[4] = "13";
else if (MyChar.InventoryContains(700021, 1))
item[4] = "21";
else if (MyChar.InventoryContains(700022, 1))
item[4] = "22";
else if (MyChar.InventoryContains(700023, 1))
item[4] = "23";
else if (MyChar.InventoryContains(700031, 1))
item[4] = "31";
else if (MyChar.InventoryContains(700032, 1))
item[4] = "32";
else if (MyChar.InventoryContains(700033, 1))
item[4] = "33";
else if (MyChar.InventoryContains(700041, 1))
item[4] = "41";
else if (MyChar.InventoryContains(700042, 1))
item[4] = "42";
else if (MyChar.InventoryContains(700043, 1))
item[4] = "43";
else if (MyChar.InventoryContains(700051, 1))
item[4] = "51";
else if (MyChar.InventoryContains(700052, 1))
item[4] = "52";
else if (MyChar.InventoryContains(700053, 1))
item[4] = "53";
else if (MyChar.InventoryContains(700061, 1))
item[4] = "61";
else if (MyChar.InventoryContains(700062, 1))
item[4] = "62";
else if (MyChar.InventoryContains(700063, 1))
item[4] = "63";
else if (MyChar.InventoryContains(700071, 1))
item[4] = "71";
else if (MyChar.InventoryContains(700072, 1))
item[4] = "72";
else if (MyChar.InventoryContains(700073, 1))
item[4] = "73";
else
{
SendPacket(General.MyPackets.NPCSay("You don't have a Gem to Socket."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
return;
}
MyChar.RemoveItem(MyChar.ItemNext(uint.Parse("7000" + item[4])));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.Equips[into] = item[0] + "-" + item[1] + "-" + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5];
SendPacket(General.MyPackets.AddItem((long)MyChar.Equips_UIDs[into], int.Parse(item[0]), byte.Parse(item[1]), byte.Parse(item[2]), byte.Parse(item[3]), byte.Parse(item[4]), byte.Parse(item[5]), (byte)into, 100, 100));
SendPacket(General.MyPackets.NPCSay("Your " + name + " has been socketed sucessfully!"));
SendPacket(General.MyPackets.NPCLink("Thanks!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("You don't have enough StarDrills."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 10 || Control == 20)
{
string name = "Item";
if (Control == 10)
name = "Garment";
if (Control == 20)
name = "Gourd";
byte into = 0;
if (Control == 10 && MyChar.Equips[9] != null && MyChar.Equips[9] != "0")
into = 9;
else if (Control == 20 && MyChar.Equips[7] != null && MyChar.Equips[7] != "0")
into = 7;
else
{
SendPacket(General.MyPackets.NPCSay("You don't have a " + name + " to socket!"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
return;
}
if (MyChar.InventoryContains(1200006, 10))
{
string[] item = MyChar.Equips[into].Split('-');
if (item[4] != "0")
return;
if (MyChar.InventoryContains(700001, 1))
item[4] = "01";
else if (MyChar.InventoryContains(700002, 1))
item[4] = "02";
else if (MyChar.InventoryContains(700003, 1))
item[4] = "03";
else if (MyChar.InventoryContains(700011, 1))
item[4] = "11";
else if (MyChar.InventoryContains(700012, 1))
item[4] = "12";
else if (MyChar.InventoryContains(700013, 1))
item[4] = "13";
else if (MyChar.InventoryContains(700021, 1))
item[4] = "21";
else if (MyChar.InventoryContains(700022, 1))
item[4] = "22";
else if (MyChar.InventoryContains(700023, 1))
item[4] = "23";
else if (MyChar.InventoryContains(700031, 1))
item[4] = "31";
else if (MyChar.InventoryContains(700032, 1))
item[4] = "32";
else if (MyChar.InventoryContains(700033, 1))
item[4] = "33";
else if (MyChar.InventoryContains(700041, 1))
item[4] = "41";
else if (MyChar.InventoryContains(700042, 1))
item[4] = "42";
else if (MyChar.InventoryContains(700043, 1))
item[4] = "43";
else if (MyChar.InventoryContains(700051, 1))
item[4] = "51";
else if (MyChar.InventoryContains(700052, 1))
item[4] = "52";
else if (MyChar.InventoryContains(700053, 1))
item[4] = "53";
else if (MyChar.InventoryContains(700061, 1))
item[4] = "61";
else if (MyChar.InventoryContains(700062, 1))
item[4] = "62";
else if (MyChar.InventoryContains(700063, 1))
item[4] = "63";
else if (MyChar.InventoryContains(700071, 1))
item[4] = "71";
else if (MyChar.InventoryContains(700072, 1))
item[4] = "72";
else if (MyChar.InventoryContains(700073, 1))
item[4] = "73";
else
{
SendPacket(General.MyPackets.NPCSay("You don't have a Gem to Socket."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
return;
}
MyChar.RemoveItem(MyChar.ItemNext(uint.Parse("7000" + item[4])));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.Equips[into] = item[0] + "-" + item[1] + "-" + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5];
SendPacket(General.MyPackets.AddItem((long)MyChar.Equips_UIDs[into], int.Parse(item[0]), byte.Parse(item[1]), byte.Parse(item[2]), byte.Parse(item[3]), byte.Parse(item[4]), byte.Parse(item[5]), (byte)into, 100, 100));
SendPacket(General.MyPackets.NPCSay("Your " + name + " has been socketed sucessfully!"));
SendPacket(General.MyPackets.NPCLink("Thanks!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("You don't have enough StarDrills."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
Credits go to Kinshi88 i've asked him for this so ya...
NPC to socket gourd |Talisman| , garment 08/15/2020 - CO2 PServer Guides & Releases - 25 Replies ok .. here's my first npc i share in the first website that i love ..
i hope no one copy and paste it in other websites .... coz i worked kinda hard to make it . thanks
#region GG Socket
case 0000:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("I can socket your Gourd , Garment and Steed !!. "));
GC.AddSend(Packets.NPCSay("It cost 10 (StarDrill) for first socket. "));
[Re-Release]2soc Gourd 08/01/2009 - CO2 PServer Guides & Releases - 0 Replies I can't remember who originally posted this. I looked for their post but couldn't find it :p. Credit for this does not go to me all I did was make it work better.
Enjoy =)
In case 2031:
add
if (CurrentNPC == 7501) // Socketed Gourd Seller
{
SendPacket(General.MyPackets.NPCSay("Would you be interested in buying one of my socketed gourds? Just give me 10000 CPs and choose your gems. After you purchase one of these it appears...
[RELEASE] Garment guy 04/19/2009 - CO2 PServer Guides & Releases - 21 Replies Hello guys... Well I am not so good in coding... But I can create a NPC like that. Please don't flame me, because I am really noob here. I'd like to relase a Garment Guy. What it does? It's simple! He gives you garments for free, of course not all but Dark Wizard, Colorful Dress, Good Luck etc. well. The NPC is created 100% by my job, and it's fully working. Here we go...
NPC Talk code
if (CurrentNPC == 3356) // Garment guy, coded by Doku
{
...
[Noob Release]Socketed Gourd Seller - Lotf 04/05/2009 - CO2 PServer Guides & Releases - 6 Replies Credits 2 Tao4429 aka Saint
and PeteNinja
both for their help on 1 error xD
**ALL CREDITS TO KINSHI! SOZ FOR DOUBLE POST!!! BUT THIS IS HOW IT WORKS! MY VERSIONS 2 LONG =/
Well here it is!
if (CurrentNPC == 7501) // Socket'd Gourd Seller
{
Missing Skin Files Cp, Garment, and Gourd Slots. 03/26/2007 - CO2 Weapon, Armor, Effects & Interface edits - 6 Replies I was recently reading about missing skin files for the new patches.
So here are the missing .dds files for all of the HUD Skin Modders.
Brought to you by Impeccable.
Contains 6 Files.
Inventory With Cp
Status Screen With Garment and Gourd Slot
Player Shop window