Register for your free account! | Forgot your password?

You last visited: Today at 07:41

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

Advertisement



[Release]ShopBoy - COEmu

Discussion on [Release]ShopBoy - COEmu within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
[Release]ShopBoy - COEmu

This is the NPC in Twin City.. to dye your armor.. CoEmu

Code:
                #region shopboy
                case 10063://ShopBoy
                    {
                        if (LinkBack == 0)
                        {
                            Text("I have been dying armors for my whole life, soon my son will take my job, would you like me to die your armor?", CSocket);
                            Link("Black", 1, CSocket);
                            Link("Orange", 2, CSocket);
                            Link("Blue", 3, CSocket);
                            Link("Red", 4, CSocket);
                            Link("Yellow", 5, CSocket);
                            Link("Purple", 6, CSocket);
                            Link("White", 7, CSocket);
                            Link("Never Mind", 255, CSocket);

                            //Link("No Thanks", 2, CSocket);
                            End(CSocket);
                        }
                        if (LinkBack == 1)
                        {
                            if (CSocket.Client.CPs >= 215)
                            {
                                CPs(-215, CSocket);
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 2;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now black!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 2)
                        {
                            if (CSocket.Client.CPs >= 215)
                            {
                                CPs(-215, CSocket);
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 3;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now orange!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 3)
                        {
                            if (CSocket.Client.CPs >= 215)
                            {
                                CPs(-215, CSocket);
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 4;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now blue!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 4)
                        {
                            if (CSocket.Client.CPs >= 215)
                            {
                                CPs(-215, CSocket);
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 5;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now red!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 5)
                        {
                            if (CSocket.Client.CPs >= 215)
                            {
                                CPs(-215, CSocket);
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 7;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now yellow!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 6)
                        {
                            if (CSocket.Client.CPs >= 215)
                            {
                                CPs(-215, CSocket);
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 8;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now purple!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 7)
                        {
                            if (CSocket.Client.CPs >= 215)
                            {
                                CPs(-215, CSocket);
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 9;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now white!", Struct.ChatType.Top));
                                }

                            }
                        }
                        break;

                    }
                #endregion
1supertao is offline  
Thanks
1 User
Old 09/08/2009, 13:49   #2
 
NukingFuts's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 480
Received Thanks: 111
nice work m8
NukingFuts is offline  
Old 09/08/2009, 16:59   #3
 
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
did u try this?
samehvan is offline  
Old 09/08/2009, 18:12   #4
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
You can make that about 5x Smaller, by making the 'LinkBack', equal the armor color, then you can just make the Color = LinkBack; Just don't include your exit option.
© Haydz is offline  
Old 09/08/2009, 20:58   #5
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
Yes I tested it.. It works 100% And its fine how it is, later I will update it to change color of head gear...
1supertao is offline  
Thanks
1 User
Old 09/09/2009, 01:16   #6
 
elite*gold: 0
Join Date: Nov 2006
Posts: 65
Received Thanks: 2
Error 1 No overload for method 'ItemInfo' takes '1' arguments C:\Documents and Settings\Owner\Desktop\my pserver\OneCo2 Source\CoEmu v2\CoEmu v2 GameServer\Handlers\NpcTalk.cs 7432 50 CoEmu v2 GameServer


i have this error which is this code: ConquerPacket.ItemInfo(itm)
killerbee is offline  
Old 09/09/2009, 05:34   #7
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
Did u try to put helmet into it to? if u did thats the problem... but if not change it to
ConquerPacket.ItemInfo(item)
1supertao is offline  
Old 09/09/2009, 06:50   #8
 
elite*gold: 0
Join Date: Nov 2006
Posts: 65
Received Thanks: 2
Quote:
Originally Posted by 1supertao View Post
Did u try to put helmet into it to? if u did thats the problem... but if not change it to
ConquerPacket.ItemInfo(item)
i did not put helmet into it. but when i change to ConquerPacket.ItemInfo(item), the word item does not exist in the current .content
killerbee is offline  
Old 09/09/2009, 08:13   #9
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
Give more details... anyy chance u already have him coded? post a Screen Shot
1supertao is offline  
Old 09/09/2009, 09:36   #10
 
$HaDoW's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 285
Received Thanks: 78
srr dude but this is totally not like real code made it ! here you go ! this is how it was made!
Code:
case 10063://shopboy dude
                    {
                        if (LinkBack == 0)
                        {
                            Text("Our shop is famous for dyeing. If you want to have your equipment dyed please wear the item before you enter. You have a wide choice of colors. One meteor will be charged before you try the colors. Do you want a try?", CSocket);
                            Link("Yes, here is a meteor.", 1, CSocket);
							Link("Can you dye my armor black?", 2, CSocket);
							Link("Just passing by.", 255, CSocket);
                            Face(30, CSocket);
							End(CSocket);
                        }
						else if (LinkBack == 1)
                        {
							if (InventoryContains(1088001, CSocket))
							{
								Teleport(1008, 22, 26, 0, CSocket);
								int uid = ReturnUID(1088001, CSocket);
								CSocket.Client.Inventory.Remove(uid);
								CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
								Database.Database.DeleteItem(uid);
							}
							else
                            {
                                Text("You don't have a Meteor. Get The hell out of here before I Fucking call the Guards", CSocket);
                                Link("Oh shit! Sorry dude.", 255, CSocket);
                                Face(30, CSocket);
                                End(CSocket);
                            }
                        }
						else if (LinkBack == 2)
                        {
                            {
                                Text("Sure. Once your armor is dyed black, it will never fade no matter how it is updated, unless i dye it to other colors, i wil charge 1 dragonball to do it.", CSocket);
								Link("Yes, here's a Dragonball.", 4, CSocket);
								Link("Let me think it over.", 255, CSocket);
                                Face(30, CSocket);
								End(CSocket);
                            }
                        }
						else if (LinkBack == 4)
                        {
                            if (InventoryContains(1088000, CSocket))
                            {
                                int uid = ReturnUID(1088000, CSocket);
								CSocket.Client.Inventory.Remove(uid);
								CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
								Database.Database.DeleteItem(uid);
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 2;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now black!", Struct.ChatType.Top));
                                }
                            }
							else
                            {
                                Text("You don't have a Dragonball. Get The hell out of here before I Fucking call the Guards", CSocket);
                                Link("Oh shit! Sorry dude.", 255, CSocket);
                                Face(30, CSocket);
                                End(CSocket);
                            }
                        }
                        break;
                    }
I will add the dude inside the shop in few mins
$HaDoW is offline  
Old 09/09/2009, 09:49   #11
 
$HaDoW's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 285
Received Thanks: 78
Here you go the inside dude
Code:
#region shopboyIn
                case 10064://ShopBoy inside
                    {
                        if (LinkBack == 0)
                        {
                            Text("I have been dying armors for my whole life, soon my son will take my job, would you like me to die your armor?", CSocket);
                            Link("Orange", 2, CSocket);
                            Link("Blue", 3, CSocket);
                            Link("Red", 4, CSocket);
                            Link("Yellow", 5, CSocket);
                            Link("Purple", 6, CSocket);
                            Link("White", 7, CSocket);
                            Link("Never Mind", 255, CSocket);
							Face(30, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 2)
                        {
                            if (CSocket.Client.CPs >= 0)
                            {
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 3;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now orange!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 3)
                        {
                            if (CSocket.Client.CPs >= 0)
                            {
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 4;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now blue!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 4)
                        {
                            if (CSocket.Client.CPs >= 0)
                            {
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 5;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now red!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 5)
                        {
                            if (CSocket.Client.CPs >= 0)
                            {
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 7;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now yellow!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 6)
                        {
                            if (CSocket.Client.CPs >= 0)
                            {
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 8;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now purple!", Struct.ChatType.Top));
                                }
                            }
                        }
                        else if (LinkBack == 7)
                        {
                            if (CSocket.Client.CPs >= 0)
                            {
                                if (CSocket.Client.Equipment.ContainsKey(3))
                                {
                                    Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                                    CSocket.Send(ConquerPacket.ItemUsage(itm.UID, 255, Struct.ItemUsage.RemoveItem));
                                    itm.Color = 9;
                                    CSocket.Send(ConquerPacket.ItemInfo(itm));
                                    Database.Database.UpdateItem(itm);
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now white!", Struct.ChatType.Top));
                                }

                            }
                        }
                        break;

                    }
                #endregion
$HaDoW is offline  
Old 09/09/2009, 17:17   #12
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
Quote:
Originally Posted by $HaDoW View Post
Here you go the inside dude
Code:
#region Shopboy #endregion
The dude inside is called Tinter
© Haydz is offline  
Old 09/09/2009, 19:19   #13
 
$HaDoW's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 285
Received Thanks: 78
whatever :P I call them dudes and ******* :P
$HaDoW is offline  
Old 09/10/2009, 00:18   #14
 
elite*gold: 0
Join Date: Nov 2006
Posts: 65
Received Thanks: 2
heres the snap shot


killerbee is offline  
Old 09/10/2009, 00:51   #15
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
Do u have the definition of... itemadd .. or itemupdate?
1supertao is offline  
Closed Thread


Similar Threads Similar Threads
[Release]4 new items for CoEmu V2
02/06/2012 - CO2 PServer Guides & Releases - 45 Replies
I ported over the FairySuits (+1 that TQ didn't bother to release) from the TQCO (out of boredom) and made them into GMRobe like items. Stats are: Female only +30k-30k Attack +30k M-Attack +30k Defence +30k HP +30k Mana
[HELP] PLEASE Coemu release 180
09/08/2010 - CO2 Private Server - 2 Replies
Hello everyone good morning everyone! Well folks I'm trying to use the Coemu but the recent release that came out good I downloaded the source code and compiled it, if I did not know but was sure: D lol but one detail appeared very npcs are with the dialogues as if I was not wrong. Can someone give me a Help please or copille me if I did something wrong! ss follows below! http://img822.imageshack.us/img822/9706/1942037.t h.jpg Uploaded with ImageShack.us
[Release] >>>> CoEmu.V3
11/09/2009 - CO2 PServer Guides & Releases - 20 Replies
i got a new CoEmu from a china site but i don't know how to setup it this is the link of the source 4shared.com - online file sharing and storage - download NewCoemu.rar pass: AhmedZero
[Release] Second Reborn (CoEmu v2)
09/07/2009 - CO2 PServer Guides & Releases - 17 Replies
Hello!! It can have some bugs yet because it's on development! but here we go!! Obs.: 1º: Don't flame.... 2º if you wanna help... feel free to post!! First at all you need to have the first rb maded by samehvan!! and them you can make this... now Lets begin!
[Release] Skillbooks (CoEmu V2)
06/03/2009 - CO2 PServer Guides & Releases - 10 Replies
# Deleted, i've decided to let people attempt to code the source themselves, thus becoming a better programmer.



All times are GMT +2. The time now is 07:41.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.