CHARACTER cc = currchar[ts];
static void handle_IADD(UOXSOCKET const ts, int const ttype, 						const int coloring,const unsigned char memcolor1,const unsigned char memcolor2,						char* scpname){	cline = &script2[0];	splitline();	unsigned int ItemNum = makenumber(0);	unsigned int InBackpack = makenumber(1);	CHARACTER cc = currchar[ts];	P_CHAR pc_currchar = MAKE_CHARREF_LR(currchar[ts]);		switch (pc_currchar->dir)	{	case 0: 		triggerx = pc_currchar->pos.x;		triggery = pc_currchar->pos.y - 1;		break;	case 1: 		triggerx = pc_currchar->pos.x + 1;		triggery = pc_currchar->pos.y - 1;		break;	case 2: 		triggerx = pc_currchar->pos.x + 1;		triggery = pc_currchar->pos.y;		break;	case 3: 		triggerx = pc_currchar->pos.x + 1;		triggery = pc_currchar->pos.y + 1;		break;	case 4: 		triggerx = pc_currchar->pos.x;		triggery = pc_currchar->pos.y + 1;		break;	case 5: 		triggerx = pc_currchar->pos.x - 1;		triggery = pc_currchar->pos.y + 1;		break;	case 6: 		triggerx = pc_currchar->pos.x - 1;		triggery = pc_currchar->pos.y;		break;	case 7: 		triggerx = pc_currchar->pos.x - 1;		triggery = pc_currchar->pos.y - 1;		break;	default: 		triggerx = pc_currchar->pos.x + 1;		triggery = pc_currchar->pos.y + 1;		break;	}	triggerz = pc_currchar->pos.z;	long pos = ftell(scpfile);	closescript();	// first create the item on the ground	int i = Targ->AddMenuTarget(ts, 1, str2num(script2));	triggerx = 0;	int pack = packitem(cc);		if (pack!=-1 && i!=-1)	{		// if player has a backpack		if (InBackpack)		{			// and item has to be added in player's backpack			items[pack].AddItem(&items[i]);			Weight->NewCalc(cc);			statwindow(ts, cc);		}	}// if player has backpack	// else leave it where it is (on the ground)	// Added colormem token here! by Magius(CHE) 	if (i>-1 && coloring>-1)	{		items[i].color1 = memcolor1;		items[i].color2 = memcolor2;		RefreshItem(i);	}	// end addons	if (ttype)		openscript(scpname);	else 		openscript("wtrigrs.scp");	fseek(scpfile, pos, SEEK_SET);	strcpy((char*)script1, "DUMMY");}