Try this as the MAIN script of a random entity like a blood splat:
;Artificial Intelligence Script
;Created by Ched 16.01.2011
;Header
;This script uses global variable 1
;globalvar 1 = Drink Level [0:dying]
desc = Manage thirst level
;Triggers
;=====Set Up Variable & start timer
:state=0:globalvar=1,setvar=100
:state=0:etimerstart
:state=0:state=1
;=====Reduce Thirst Level after 1s
:state=1:globalvar=1
:state=1,etimergreater=1000,vargreater=9:decvar=10
:state=1,etimergreater=1000,varless=10:setvar=0
;=====Reduce health if thirsty
:state=1,etimergreater=1000,varequal=0:plrsubhealth=5
:state=1,etimergreater=1000:etimerstart
;End of Script
And try this as the MAIN script for your drink entity:
;Artificial Intelligence Script
;Created by Ched 16.01.2011
;Header
;This script uses global variable 1
;globalvar 1 = Drink Level [0:dying]
desc = Drink entity
;Triggers
;=====Set Up HUD
:state=0:hudreset,hudx=50,hudy=90,hudtext=Press [Enter] to drink me,hudname=DrinkMe,hudhide=0,hudmake=display
:state=0:state=1
;=====If player is close to drink, show "Drink Me" hud.
:state=1,cantake,plrdistwithin=50:state=2
:state=2:hudfadeout=DrinkMe
:state=2,plrdistfurther=51:state=1
;=====If player pressed eneter add to thirst value
:state=2,plrusingaction=1:state=3
:state=3:globalvar=1,incvar=30
:state=3:playertake
;End of Script
Make sure you set the blood splat as a dynamic entity or it won't work.
You'll also need to modify it to get the balancing your want between rate of thirst and how long a drink keeps you alive for.
If you need anything explained let me know.
[url="http://raptr.com/No_Turn_Right?src=em_forum"]
[/url]