on:load { timer 0,50000,0,tempdown; timer 0,10000,0,tempup; timer 0,10000,0,tempak;
if (count ("info",52)<1) { text 1, "Температура: $cels"; } } on:tempdown { if (count ("info",52)>0) { $cels=37; } $cels--; if($cels<32) { msg "Замерзаю!",3; addstate "unit",1,6; } }
on:tempup { if ($cels>31) { freestate "unit",1,6; } if ($cels>39) { msg "У МЕНЯ ЖАР!",3; damage "unit",1,5; }
if ($cels>42) { addstate "unit",1,4; damage "unit",1,5; }
if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){ $cels++; } }
on:tempak { if (count ("info",52)>0) { $cels=37; }
if (count ("info",52)<1) { freetext 1; text 1, "Температура: $cels"; }
local "$blub"; $blub=gety("unit",1); if ($blub<=0) { if (inarea_freshwater("unit",1)==1) { $cels++; }else{ $cels--; } } }
еще добавить в on:start - $cels=37;