You last visited: Today at 06:39
Advertisement
need help with coding
Discussion on need help with coding within the CO2 Private Server forum part of the Conquer Online 2 category.
10/07/2010, 07:06
#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));
}
10/08/2010, 20:45
#2
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.
10/08/2010, 20:54
#3
elite*gold: 0
Join Date: Oct 2009
Posts: 8,791
Received Thanks: 5,310
That's not even Tanel's code.
Lmao thats for coemu.
Just take that entire section out.
10/08/2010, 23:40
#4
elite*gold: 0
Join Date: Mar 2010
Posts: 91
Received Thanks: 5
Quote:
Originally Posted by
Аrco
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
10/08/2010, 23:58
#5
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,387
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..
10/09/2010, 00:23
#6
elite*gold: 0
Join Date: Mar 2010
Posts: 91
Received Thanks: 5
Quote:
Originally Posted by
pro4never
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
10/09/2010, 01:51
#7
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.
10/09/2010, 02:05
#8
elite*gold: 0
Join Date: Mar 2010
Posts: 91
Received Thanks: 5
Quote:
Originally Posted by
onebitch
Why make a NPC for this ... why dont you make item boxs for each class and sell them from the vip shop.
how?
10/09/2010, 02:18
#9
elite*gold: 0
Join Date: Oct 2010
Posts: 28
Received Thanks: 4
Quote:
Originally Posted by
onebitch
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
10/09/2010, 02:51
#10
elite*gold: 0
Join Date: Jun 2010
Posts: 50
Received Thanks: 10
Quote:
Originally Posted by
tomtucker
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
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 06:39 .