//This will identify and label the blood in 'oPC's inventory. will return TRUE on //complete sucess, FALSE on failure due to lack of funds. int doIdentify(object oPC, int iCost = 50) { object oCheck = GetFirstItemInInventory(oPC); string sResRef; int iStack; while(GetIsObjectValid(oCheck)) { sResRef = GetResRef(oCheck); if(sResRef == "blood" || sResRef == "bloodbad" || sResRef == "bloodchild" || sResRef == "bloodvirgin") { for(iStack = GetItemStackSize(oCheck) - 1; iStack > 0; iStack--) { if(GetGold(oPC) < iCost) return FALSE; TakeGoldFromCreature(iCost, oPC, TRUE); SetItemStackSize(oCheck, iStack); CreateItemOnObject("g" + sResRef, oPC); } if(GetGold(oPC) < iCost) return FALSE; TakeGoldFromCreature(iCost, oPC, TRUE); DestroyObject(oCheck); CreateItemOnObject("g" + sResRef, oPC); } oCheck = GetNextItemInInventory(oPC); } return TRUE; }