Spoiler 
change that to 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
on:sleep {
		if (getplayervalue(4)>5){
				if (playerspotted()==0){
					//Exhaustion
					consume 0,-35,-35,100;
		
					//Alcohol Stuff
					if ($s2g_alc>200){$s2g_alc=200;}
					$s2g_alc-=60;
					if ($s2g_alc<0){$s2g_alc=0;}
					//Free 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{
						//Treehouse Recover
						if (count_inrange("object",190)>0){
							consume 5,10,10,0;
						//Hut Recover
						}elseif (count_inrange("object",206)>0){
							consume 10,15,15,0;
						}
					}
					
					//Plague?
					if (count("object",121)>$s2g_plagues){
						if (skillvalue("plant")>40){
							if (random(1,3)==1){
								$tmp=0;
								$tmp2=random(5,7);
								loop ("objects",121){
									$tmp++;
									if ($tmp>=$tmp2){
										$tmp=0;
										$id=loop_id();
										$x=getx("object",$id);
										$z=getz("object",$id);
										create "unit",43,$x,$z;
									}
								}
								freevar $id,$x,$z;
							}
						}
					}
					//Autosave
					autosave;
					msg "You slept",4;
					msg "Saved (Autosave)",1;
				}else{
					speech "negative";
					msg "I should not sleep now!",3;
					skipevent;
				}
			}else{
				speech "negative";
				msg "Sleeping in the water?",3;
				msg "Not a good idea...",3;
				skipevent;
			}
			freevar $y;
		}else{
			speech "negative";
			msg "I'm not tired enough!",3;
			skipevent;
		}
	}
Spoiler 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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>200){$s2g_alc=200;}
					$s2g_alc-=60;
					if ($s2g_alc<0){$s2g_alc=0;}
					//Free 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{
						//Treehouse Recover
						if (count_inrange("object",190)>0){
							consume 5,10,10,0;
						//Hut Recover
						}elseif (count_inrange("object",206)>0){
							consume 10,15,15,0;
						}
					}
					
					//Plague?
					if (count("object",121)>$s2g_plagues){
						if (skillvalue("plant")>40){
							if (random(1,3)==1){
								$tmp=0;
								$tmp2=random(5,7);
								loop ("objects",121){
									$tmp++;
									if ($tmp>=$tmp2){
										$tmp=0;
										$id=loop_id();
										$x=getx("object",$id);
										$z=getz("object",$id);
										create "unit",43,$x,$z;
									}
								}
								freevar $id,$x,$z;
							}
						}
					}
					//Autosave
					autosave;
					msg "You slept",4;
					msg "Saved (Autosave)",1;
				}else{
					speech "negative";
					msg "I should not sleep now!",3;
					skipevent;
				}
	
	}
Alienation Modeling help...


Offline