void main()
{

object oPC = GetPCItemLastEquippedBy();

object oItem = GetPCItemLastEquipped();

int nInt=GetLocalInt(GetFirstPC(), "Underwater");

if (nInt == 1)
   {
   FloatingTextStringOnCreature("You cannot use a torch underwater!", oPC);
   DelayCommand(0.1, AssignCommand(oPC, ActionUnequipItem(oItem)));
   DelayCommand(0.3, DestroyObject(oItem, 0.0));
   }

}
