|
You last visited: Today at 18:38
Advertisement
[Help]tradind almost done...
Discussion on [Help]tradind almost done... within the CO2 Private Server forum part of the Conquer Online 2 category.
07/12/2009, 05:01
|
#1
|
elite*gold: 0
Join Date: Mar 2006
Posts: 17
Received Thanks: 0
|
[Help]trade system almost done...
hi all, i downloaded that source [Relese]Source CoEmu V2 For All now Have Some Npc Work , coz the original dont have the trade system, and im new to c#.. but, this trade system is ALMOST working, its accept, money, cps, close, but the itens dont trade it..... when i remove the /*.... /* from the part of the code whos make the trade done, 2 errors came...
Code:
case 6://Add an item
{
ClientSocket Who = Nano.ClientPool[(int)CSocket.Client.TradingWith];
if (Who.Client.Inventory.Count + CSocket.Client.MyTradeSideCount < 40)
{
//string Item = CSocket.Client.FindItem(UID);
Struct.ItemInfo Item = CSocket.Client.Inventory[(int)UID];
Who.Send(ConquerPacket.TradeItem(UID, Item));
//Who.MyClient.SendPacket(General.MyPackets.TradeItem(UID, Item));
CSocket.Client.MyTradeSide.Add(UID);
CSocket.Client.MyTradeSideCount++;
}
else
{
CSocket.Send(ConquerPacket.TradePacket(CSocket.Client.ID, 11));
Who.Send(ConquerPacket.TradePacket(CSocket.Client.ID, 11));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[Trade]Your trade partner can't hold any more items.", Struct.ChatType.Top));
}
break;
}
got that errors:
Error 1 The best overloaded method match for 'CoEmu_v2_GameServer.Packets.ConquerPacket.TradeIt em(uint, string)' has some invalid arguments C:\Documents and Settings\Administrador\Desktop\CoEmu v2\CoEmu v2\CoEmu v2 GameServer\PacketProcessor.cs 1871 61 CoEmu v2 GameServer
Error 2 Argument '2': cannot convert from 'CoEmu_v2_GameServer.Structs.Struct.ItemInfo' to 'string' C:\Documents and Settings\Administrador\Desktop\CoEmu v2\CoEmu v2\CoEmu v2 GameServer\PacketProcessor.cs 1871 90 CoEmu v2 GameServer
if someone use that same source and alread fix that, can help me??
sry for my english, real sry
|
|
|
07/12/2009, 05:48
|
#2
|
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
|
Code:
public static byte[] TradeItem(int UID, int itemid, int Plus, int Minus, int Enchant, int soc1, int soc2, int currentdura, int maxdura, int Location, int Color/*, int Free, int Progress, int Suspicious, int Locked, int Effect*/)
{
PacketBuilder Packet = new PacketBuilder(1008, 48);
Packet.Long(UID);
Packet.Long(itemid);
Packet.Int(1);
Packet.Int(1);
Packet.Int(1);
Packet.Int(1);
Packet.Short(2);
Packet.Int(255);
Packet.Long(0);
//Packet.Int(Effect);
Packet.Int(soc1);
Packet.Int(soc2);
Packet.Short(2);
Packet.Int(Plus);
Packet.Int(Minus);
//Packet.Int(Free);
Packet.Long(Enchant);
Packet.Int(0);
//Packet.Short(Suspicious);
//Packet.Short(Locked);
Packet.Long(Color);
//Packet.Long(Progress);
return Packet.getFinal();
}
public static byte[] Trade(int UID, int Option)
{
PacketBuilder Packet = new PacketBuilder(1056, 12);
Packet.Long(UID);
Packet.Long(Option);
return Packet.getFinal();
}
public class ItemInfo
{
public int UID;
public int ItemID;
public int Plus;
public int Bless;
public int Enchant;
public int Soc1;
public int Soc2;
public int Dura;
public int MaxDura;
public int Position;
public int Color = 4;
}
there not gona tell you whereto put it ..
|
|
|
07/12/2009, 06:48
|
#3
|
elite*gold: 0
Join Date: Mar 2006
Posts: 17
Received Thanks: 0
|
Quote:
Originally Posted by taylor2846
Code:
public static byte[] TradeItem(int UID, int itemid, int Plus, int Minus, int Enchant, int soc1, int soc2, int currentdura, int maxdura, int Location, int Color/*, int Free, int Progress, int Suspicious, int Locked, int Effect*/)
{
PacketBuilder Packet = new PacketBuilder(1008, 48);
Packet.Long(UID);
Packet.Long(itemid);
Packet.Int(1);
Packet.Int(1);
Packet.Int(1);
Packet.Int(1);
Packet.Short(2);
Packet.Int(255);
Packet.Long(0);
//Packet.Int(Effect);
Packet.Int(soc1);
Packet.Int(soc2);
Packet.Short(2);
Packet.Int(Plus);
Packet.Int(Minus);
//Packet.Int(Free);
Packet.Long(Enchant);
Packet.Int(0);
//Packet.Short(Suspicious);
//Packet.Short(Locked);
Packet.Long(Color);
//Packet.Long(Progress);
return Packet.getFinal();
}
public static byte[] Trade(int UID, int Option)
{
PacketBuilder Packet = new PacketBuilder(1056, 12);
Packet.Long(UID);
Packet.Long(Option);
return Packet.getFinal();
}
public class ItemInfo
{
public int UID;
public int ItemID;
public int Plus;
public int Bless;
public int Enchant;
public int Soc1;
public int Soc2;
public int Dura;
public int MaxDura;
public int Position;
public int Color = 4;
}
there not gona tell you whereto put it ..
|
that is the kinshi88 version of the trade system, im not using that coz cannot fix all the errors, im using that source"" [Relese]Source CoEmu V2 For All now Have Some Npc Work"" , alread came with a trade system... too diferent by the way
|
|
|
07/12/2009, 07:07
|
#4
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
|
Quote:
Originally Posted by brugo
that is the kinshi88 version of the trade system, im not using that coz cannot fix all the errors, im using that source"" [Relese]Source CoEmu V2 For All now Have Some Npc Work"" , alread came with a trade system... too diferent by the way
|
While it is different, you should be able to convert some of it to work in this trade system, or at least learn how to re-script it using kinshi's as an example.
|
|
|
07/12/2009, 07:09
|
#5
|
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
|
the only problem i got from the one kinshi88 trade system is can not trade items.. lol when i trade a item to a player it dont show up in the other players item box and it will kick them did not find out why this is happening yet i probably did something wrong lol
btw. if you are not using his vs that means you are using the one in his souce only has 100% trading send request its a lil short from any tang ealse and if you cant fix that 2 earrors what are you trying to get codes form kinshi88 and put them in with his vs. dont thank that will work lol.
|
|
|
Similar Threads
|
Tradind lv 91 nuker ff in sjsro new
03/19/2010 - Silkroad Online Trading - 0 Replies
THE ACC GOT A LV 91 NUKER FF .
AND A HYBIRD BOWER LV 78 FF
AND A LV 56 GLAIVIER FF
I WANNA TRADE IT FOR A LV 70+ ACCOUNT IN SWSRO 1/2
BUT I DONT GOT THE QQ AND EMAIL SO U WONT GIVE ME YOURS TO
I WILL GIVE U A NAME OF SOME ONE THAT CAN TALLED YOU THAT I TRUSTABLE...
PM ME OR TALK HERE .
|
All times are GMT +2. The time now is 18:38.
|
|