Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 21:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Basic Gourd/Garment socketer

Discussion on [Release] Basic Gourd/Garment socketer within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
Wink [Release] Basic Gourd/Garment socketer

npc talk :


Code:
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...
turk55 is offline  
Thanks
5 Users
Old 02/07/2009, 22:58   #2
 
-Reflexis-'s Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 412
Received Thanks: 314
i already wanted to say "you didnt made this your noob! kinshi did give him credits" but then i saw those big special letters
-Reflexis- is offline  
Old 02/07/2009, 23:07   #3
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
If anyone is intrested, ill release a much better.
_Emme_ is offline  
Old 02/07/2009, 23:12   #4
 
elite*gold: 0
Join Date: Jun 2008
Posts: 384
Received Thanks: 18
Wow nice turk, hey u coming online on MSN? i gotta ask u somethings... but anyways +thnx for you
ph03nixx is offline  
Old 02/07/2009, 23:16   #5
 
-Reflexis-'s Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 412
Received Thanks: 314
Quote:
Originally Posted by EmmeTheCoder View Post
If anyone is intrested, ill release a much better.
well yeah but i think that epvp must leave lotf alone and go further with the basic source of hybrid

well that is what i go do
-Reflexis- is offline  
Old 03/14/2009, 21:52   #6
 
elite*gold: 0
Join Date: Dec 2006
Posts: 133
Received Thanks: 16
Thank's Kinshi88!
and Thank's turk for sharing it!
martoon is offline  
Old 09/26/2010, 16:34   #7
 
elite*gold: 0
Join Date: Sep 2010
Posts: 21
Received Thanks: 2
how do i use this for ?
michael_dus_dis is offline  
Old 09/26/2010, 18:33   #8
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Uh, don't use it.
It's so ****** haha
kinshi88 is offline  
Old 10/04/2010, 20:25   #9
 
sohaib's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 258
Received Thanks: 102
i got tons of errors
sohaib is offline  
Old 10/04/2010, 20:27   #10
 
elite*gold: 0
Join Date: Oct 2010
Posts: 148
Received Thanks: 57
Quote:
Originally Posted by sohaib View Post
i got tons of errors
this is for 5017, not for 5165.
_Vodka is offline  
Reply


Similar Threads Similar Threads
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



All times are GMT +1. The time now is 21:26.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.