Register for your free account! | Forgot your password?

You last visited: Today at 05:12

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

Advertisement



need help with coding

Discussion on need help with coding within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2010
Posts: 91
Received Thanks: 5
need help with coding

got this wierd problem with my npc i think its coded wrong but i dont know how i would fix him/her taken from tanels source if it helps
Code:
                                {
                                    if (LinkBack == 0)
                                    {

                                        Text("Ho i can give you full +12 gea if you wish Just Choose your pro?", CSocket); //Remove one ) and add, CSocket
                                        Link("Trojan", 1, CSocket);
                                        Link("Warrior", 2, CSocket);
                                        Link("Archer", 3, CSocket);
                                        Link("Toa", 4, CSocket);
                                        Link("NiNja", 5, CSocket);
                                        Link("No, I dont need", 255, CSocket);
                                        Face(19, CSocket);
                                        End(CSocket);
                                    }
                                    else if (LinkBack == 1)
                                    {
                                        AddItem(130109, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//conquestarmor
                                        AddItem(480339, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//kingsclub
                                        AddItem(480339, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//kingsclub
                                        AddItem(120249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//tornado
                                        AddItem(150249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//thunder
                                        AddItem(160249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//Blizzard
                                        AddItem(118109, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//magiccornet
                                        AddItem(202009, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//startower
                                        AddItem(201009, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//heavenfan

                                    }
                                    else if (LinkBack == 2)
                                    {

                                        AddItem(131109, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//PhoenixArmor
                                        AddItem(480339, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//kingsclub
                                        AddItem(900109, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//dragonshield
                                        AddItem(120249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//tornado
                                        AddItem(150249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//thunder
                                        AddItem(160249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//Blizzard
                                        AddItem(111109, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//conquesthelment
                                        AddItem(202009, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//startower
                                        AddItem(201009, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//heavenfan


                                    }
                                    else if (LinkBack == 3)
                                    {

                                        AddItem(133109, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//PhoenixJerkin
                                        AddItem(500329, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//shadowbow
                                        AddItem(120249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//tornado
                                        AddItem(150249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//thunder
                                        AddItem(160249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//Blizzard
                                        AddItem(111109, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//PhoenixHat
                                        AddItem(202009, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//startower
                                        AddItem(201009, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//heavenfan


                                    }
                                    else if (LinkBack == 4)
                                    {

                                        AddItem(134109, 7, 255, 255, 12, 0, 3, 3, 0, CSocket);//pineRobe
                                        AddItem(421339, 7, 255, 255, 12, 0, 3, 3, 0, CSocket);//KingsOfBackSword
                                        AddItem(121249, 7, 255, 255, 12, 0, 3, 3, 0, CSocket);//SunShine
                                        AddItem(152229, 7, 255, 255, 12, 0, 3, 3, 0, CSocket);//Lightning
                                        AddItem(160249, 7, 255, 255, 12, 0, 3, 3, 0, CSocket);//Blizzard
                                        AddItem(114109, 7, 255, 255, 12, 0, 3, 3, 0, CSocket);//PhoenixHat
                                        AddItem(202009, 7, 255, 255, 12, 0, 3, 3, 0, CSocket);//startower
                                        AddItem(201009, 7, 255, 255, 12, 0, 3, 3, 0, CSocket);//heavenfan

                                    }
                                    else if (LinkBack == 5)
                                    {

                                        AddItem(135109, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//pineRobe
                                        AddItem(601339, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//EmperorKatana
                                        AddItem(601339, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//EmperorKatana
                                        AddItem(120249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//SunShine
                                        AddItem(150249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//Lightning
                                        AddItem(160249, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//Blizzard
                                        AddItem(112109, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//PhoenixHat
                                        AddItem(202009, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//startower
                                        AddItem(201009, 7, 255, 255, 12, 0, 13, 13, 0, CSocket);//heavenfan


                                    }
                                    break;
                                    {
                                public static void AddItem(int itemid, int bless, int dura, int enchant, int plus, int position, int soc1, int soc2, int color, ClientSocket CSocket)
{
Struct.ItemInfo Item = new Struct.ItemInfo();
if (dura == 255)
{
Item.Dura = Item.MaxDura;
}
else
{
Item.Dura = dura;
}
Item.Bless = bless;
Item.Enchant = enchant;
Item.ItemID = itemid;
Item.Plus = plus;
Item.Position = position;
Item.Soc1 = soc1;
Item.Soc2 = soc2;
Item.Color = color;
Item.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(Item, CSocket);
while (!created)
{
Item.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(Item, CSocket);
}

CSocket.Client.Inventory.Add(Item.UID, Item);
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Position, Item.Color));
}
biohazardous is offline  
Old 10/08/2010, 20:45   #2


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Save us from going through the code finding the error and tell us what doesn`t work lol.
KraHen is offline  
Old 10/08/2010, 20:54   #3
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
That's not even Tanel's code.
Lmao thats for coemu.
Just take that entire section out.
Arcо is offline  
Thanks
1 User
Old 10/08/2010, 23:40   #4
 
elite*gold: 0
Join Date: Mar 2010
Posts: 91
Received Thanks: 5
Quote:
Originally Posted by Аrco View Post
That's not even Tanel's code.
Lmao thats for coemu.
Just take that entire section out.
thanks il try to fix up the code but i found it in your source lmao
and if you could tell me how to make the command to give +12 item from an npc
unless the code to give the item in the code is correct the i kinda knew that the code for link back was wierd because its supposed to be Control
biohazardous is offline  
Old 10/08/2010, 23:58   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
You must have an add item function already... if not items wouldn't really work in the source.

All it is is generating a new item (adding to database) and sending item info packet to client) I would be seriously shocked if NO add item function existed in your source at all..
pro4never is offline  
Old 10/09/2010, 00:23   #6
 
elite*gold: 0
Join Date: Mar 2010
Posts: 91
Received Thanks: 5
Quote:
Originally Posted by pro4never View Post
You must have an add item function already... if not items wouldn't really work in the source.

All it is is generating a new item (adding to database) and sending item info packet to client) I would be seriously shocked if NO add item function existed in your source at all..
like /item BuriedBlade Super 12 7 255 13 13
but in code form how would i do that
cause i want to make an npc who sells full +12 packs
and if its possible what is the code for Blazehoof,SPitfire, etc.. steeds
i want to make npc who sell that stuff i know how to make npc and stuff but i dont know the codes to make them
biohazardous is offline  
Old 10/09/2010, 01:51   #7
 
onebitch's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 8
Received Thanks: 4
Why make a NPC for this ... why dont you make item boxs for each class and sell them from the vip shop.
onebitch is offline  
Old 10/09/2010, 02:05   #8
 
elite*gold: 0
Join Date: Mar 2010
Posts: 91
Received Thanks: 5
Quote:
Originally Posted by onebitch View Post
Why make a NPC for this ... why dont you make item boxs for each class and sell them from the vip shop.
how?
biohazardous is offline  
Old 10/09/2010, 02:18   #9
 
elite*gold: 0
Join Date: Oct 2010
Posts: 28
Received Thanks: 4
Quote:
Originally Posted by onebitch View Post
Why make a NPC for this ... why dont you make item boxs for each class and sell them from the vip shop.
that will take more time than an npc
tomtucker is offline  
Old 10/09/2010, 02:51   #10
 
elite*gold: 0
Join Date: Jun 2010
Posts: 50
Received Thanks: 10
Quote:
Originally Posted by tomtucker View Post
that will take more time than an npc
Yes would take abit more time to do, but would stop all them pointless npc that every pserver seems to have just for items to be sold from, every were you turn there is one and most could be done in to items and sold in shops. IE: take skill seller alot less code if made in to new skill book and sold in a shop.

The best way is not always the easiest way. And if someone does not want to put abit of hard work or time in to there server whats that going to tell you about how good its going to be
Macnoo is offline  
Reply


Similar Threads Similar Threads
*NEW CODING ART!!!..........:::::~WhiteLight D3D~:::::..........*NEW CODING ART!!!
09/21/2010 - WarRock Hacks, Bots, Cheats & Exploits - 25 Replies
http://250kb.de/u/100911/p/m4buevNCZhoQ.PNG Download: Multiupload.com - upload your files to multiple file hosting sites! VirusScan: VirusTotal - Free Online Virus, Malware and URL Scanner Funktionen: SuperJump Teleport NoSpread NoRecoil
Uce Coding+ winhex coding
03/05/2009 - Dekaron - 8 Replies
i was just wondering is it true if u do coding with winhex is it less dc?? tats all cuz uce coding dcs me alot



All times are GMT +1. The time now is 05:12.


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.