P_ITEM pPack= Packitem(currchar[s]); if (pPack == NULL) return; amount=(amount>0 ? amount : 1); switch(ingottype) { case 1: pPack->DeleteAmount(amount, 0x1BF2, 0x0961); break; case 2: pPack->DeleteAmount(amount, 0x1BF2, 0x0466); break; case 3: pPack->DeleteAmount(amount, 0x1BF2, 0x0150); break; case 4: pPack->DeleteAmount(amount, 0x1BF2, 0x0386); break; case 5: pPack->DeleteAmount(amount, 0x1BF2, 0x0191); break; case 6: pPack->DeleteAmount(amount, 0x1BF2, 0x02E7); break; case 7: pPack->DeleteAmount(amount, 0x1BF2, 0x022F); break; case 8: pPack->DeleteAmount(amount, 0x1BF2, 0x02C3); break; case 9: pPack->DeleteAmount(amount, 0x1BF2, 0x046E); break; case 10:pPack->DeleteAmount(amount, 0x1BF2, 0x0000); break; } ingottype=0;
P_ITEM pPack=Packitem(currchar[s]); if (!pPack) return; int amt = max(amount, 1);  if (itemmake[s].Mat1id==0x1BE0||itemmake[s].Mat1id==0x1BD7) itemmake[s].Mat1color=0;  pPack->DeleteAmount(amt,itemmake[s].Mat1id,itemmake[s].Mat1color); if (itemmake[s].Mat2id) pPack->DeleteAmount(amt,itemmake[s].Mat2id,itemmake[s].Mat2color);
	virtual void deletematerial(SOCK s, int amount)	{		P_ITEM pPack= Packitem(currchar[s]);		if (pPack == NULL)			return;		amount=(amount>0 ? amount : 1);		switch(ingottype)		{			case 1: pPack->DeleteAmount(amount, 0x1BF2, 0x0961); break;//delete iron			case 2: pPack->DeleteAmount(amount, 0x1BF2, 0x0466); break;//delete golden			case 3: pPack->DeleteAmount(amount, 0x1BF2, 0x0150); break;//delete agapite			case 4: pPack->DeleteAmount(amount, 0x1BF2, 0x0386); break;//delete shadow			case 5: pPack->DeleteAmount(amount, 0x1BF2, 0x0191); break;//delete mythril			case 6: pPack->DeleteAmount(amount, 0x1BF2, 0x02E7); break;//delete bronze			case 7: pPack->DeleteAmount(amount, 0x1BF2, 0x022F); break;//delete verite			case 8: pPack->DeleteAmount(amount, 0x1BF2, 0x02C3); break;//delete merkite			case 9: pPack->DeleteAmount(amount, 0x1BF2, 0x046E); break;//delete copper			case 10:pPack->DeleteAmount(amount, 0x1BF2, 0x0000); break;//delete silver		}		ingottype=0;	}