ITEM c;
int tradestart(int s, int i){	P_CHAR pc_currchar = MAKE_CHAR_REF(currchar[s]);	P_CHAR pc_i        = MAKE_CHAR_REF(i);	ITEM c;	unsigned char msg[90];	P_ITEM pi_bps = Packitem(pc_currchar);	P_ITEM pi_bpi = Packitem(pc_i);	UOXSOCKET s2 = calcSocketFromChar(DEREF_P_CHAR(pc_i));	if (pi_bps == NULL) //LB	{		sysmessage(s, "Time to buy a backpack!");		sysmessage(s2, "%s doesnt have a backpack!", pc_currchar->name);		return 0;	}	if (pi_bpi == NULL)	{		sysmessage(s2, "Time to buy a backpack!");		sysmessage(s, "%s doesnt have a backpack!", pc_i->name);		return 0;	}	P_ITEM pi_ps = Items->SpawnItem(s2, DEREF_P_CHAR(pc_currchar), 1, "#", 0, 0x1E, 0x5E, 0, 0, 0, 0);	if(pi_ps == NULL) 		return 0;	pi_ps->pos = Coord_cl(26, 0, 0);	pi_ps->SetContSerial(pc_currchar->serial);	pi_ps->layer=0;	pi_ps->type=1;	pi_ps->dye=0;	sendbpitem(s, pi_ps);	if (s2 != INVALID_UOXSOCKET) 		sendbpitem(s2, pi_ps);	P_ITEM pi_pi = Items->SpawnItem(s2,i,1,"#",0,0x1E,0x5E,0,0,0,0);	if (pi_pi == NULL) 		return 0;	pi_pi->pos = Coord_cl(26, 0, 0);	pi_pi->SetContSerial(pc_i->serial);	pi_pi->layer=0;	pi_pi->type=1;	pi_pi->dye=0;	sendbpitem(s, pi_pi);	if (s2 != INVALID_UOXSOCKET) 		sendbpitem(s2, pi_pi);	pi_pi->moreb1 = pi_ps->ser1;	pi_pi->moreb2 = pi_ps->ser2;	pi_pi->moreb3 = pi_ps->ser3;	pi_pi->moreb4 = pi_ps->ser4;	pi_ps->moreb1 = pi_pi->ser1;	pi_ps->moreb2 = pi_pi->ser2;	pi_ps->moreb3 = pi_pi->ser3;	pi_ps->moreb4 = pi_pi->ser4;	pi_ps->morez  = 0;	pi_pi->morez  = 0;	msg[0] = 0x6F; // Header Byte	msg[1] = 0; // Size	msg[2] = 47; // Size	msg[3] = 0; // Initiate	LongToCharPtr(pc_i->serial,msg+4);	LongToCharPtr(pi_ps->serial,msg+8);	LongToCharPtr(pi_pi->serial,msg+12);	msg[16]=1;	strcpy((char*)&(msg[17]), pc_i->name);	Xsend(s, msg, 47);	if (s2 != INVALID_UOXSOCKET)	{		msg[0]=0x6F; // Header Byte		msg[1]=0;    // Size		msg[2]=47;   // Size		msg[3]=0;    // Initiate		LongToCharPtr(pc_currchar->serial,msg+4);		LongToCharPtr(pi_pi->serial,msg+8);		LongToCharPtr(pi_ps->serial,msg+12);		msg[16]=1;		strcpy((char*)&(msg[17]), pc_currchar->name);		Xsend(s2, msg, 47);	}	return DEREF_P_ITEM(pi_ps);}