void main() { object oPC = GetItemActivator(); string sName = GetName(GetItemActivated()); int iThirsty = GetLocalInt(oPC,"drank"); int iDrinks = GetLocalInt(GetItemActivated(),"drinks"); int iFill = GetLocalInt(oPC,"refill"); if (iFill == 1) { if (sName == "Water Canteen") { SetLocalInt(GetItemActivated(),"drinks",3); SendMessageToPC(oPC,sName+" is full."); return; } if (sName == "Water Bottle") { SetLocalInt(GetItemActivated(),"drinks",1); SendMessageToPC(oPC,sName+" is full."); return; } } if (iDrinks >= 1) { if (iThirsty <= 0) { SetLocalInt(oPC,"drank",1); FloatingTextStringOnCreature("You drink from the "+ sName +" and are no longer thirsty.",oPC,TRUE); SetLocalInt(GetItemActivated(),"drinks",iDrinks-1); return; } if (iThirsty == 1) { FloatingTextStringOnCreature("You aren't thirsty, but you drink from the "+ sName +" anyway.",oPC,TRUE); SetLocalInt(GetItemActivated(),"drinks",iDrinks-1); return; } } if (iDrinks == 0) FloatingTextStringOnCreature("This "+ sName +" is empty.",oPC,TRUE); return; }