game inf has written
//Sleeping
on:sleep {
if (getplayervalue(4)>5){
local $y;
$y=gety("unit",1);
if ($y>0){
if (playerspotted()==0){
//Exhaustion
consume 0,-35,-35,100;
//Alcohol Stuff
if ($s2g_alc>100){$s2g_alc=100;}
$s2g_alc-=50;
if ($s2g_alc<0){$s2g_alc=0;}
//States
freestate "unit",1,"dizzy";
freestate "unit",1,"fuddle";
//Damage if there is no Cover
if (count_behaviourinrange("object","cover")==0){
$damage=random(10,20);
damage "unit",1,$damage;
freevar $damage;
}
}else{
speech "negative";
msg "Ich sollte jetzt besser",3;
msg "nicht schlafen!",3;
skipevent;
}
}else{
speech "negative";
msg "Im Wasser schlafen?",3;
msg "Keine so gute Idee...",3;
skipevent;
}
freevar $y;
}else{
speech "negative";
msg "Ich bin nicht müde",3;
msg "genug um einschlafen",3;
msg "zu können!",3;
skipevent;
}
}