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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
### Hemp
id=134
name=Hemp
group=bush
icon=gfx\hemp.bmp
model=gfx\hemp.b3d
col=2
health=150
autofade=1500
mat=leaf
swayspeed=2
swaypower=1
var=water,Watered,0,0
var=needs,Needs,0,0
var=die,Die,4,0
var=watered,Effects,0,0
growtime=9
script=start
	on:kill {
		$tmp=1;
	 $tmp2=spawntimer("self");
		if($tmp2>-5){$tmp=2;}
		if($tmp2>-1){
		 $tmp=3;
			create "item",49,getx("self"),getz("self"),1;
		}
create "item",83,getx("self"),getz("self"),$tmp;
	 corona getx("self"),getz("self");
freevar $tmp,$tmp2;
	}
	on:load{
if($difficulty>2){
			if($die==3){
				color 255,255,255;
			}elseif($die==2){
				color 150,100,10;
			}elseif($die==1){
				color 0,0,0;
			}
		}else{
		 if($die==4){
			 color 255,255,255;
		 }elseif($die==3){
				color 200,200,200;
			}elseif($die==2){
				color 150,100,10;
			}elseif($die==1){
				color 0,0,0;
			}
		}
	}
	on:plant {
		spawntimer "self",-8;
		$needs=1;
		timer "unit",1,1000,1,"farming";
		local $x,$y,$z,$screen,$get1,$get2;
		$x=getx("unit",1);
		$y=(gety("unit",1)+18); //same as the camera height/eyes definition
		$z=getz("unit",1);
		$get1=getpitch("unit",1);
		$get2=(($tmp1/18)/18);				//divided by twice the camera height/eyes definition
		$screen=create("object",3782,$x,$z);
		if(($get1 < 1) && ($get1 > -1)){
			setrot "object",$screen,0,getyaw("unit",1),0;
			setpos "object",$screen,$x,$y,$z;
		}elseif($get2>=0){
			setrot "object",$screen,0+$get1,getyaw("unit",1),0;
			setpos "object",$screen,$x,$y-$get2,$z;
		}elseif($get2<=0){
			setrot "object",$screen,0+$get1,getyaw("unit",1),0;
			setpos "object",$screen,$x,$y+$get2,$z;
		}
	}
	on:changeday {
		if($difficulty > 1){
			if($needs==(1)){
if(getweather()==1){
timer "self",1,1,"watered";
				}elseif(count_inrange("object",188,160,"self")>=1){
timer "self",1,1,"watered";
}else{
				 if($water==(0)){
					 $die--;
				 }
if($die==3){
					 color 240,180,80;
				 }elseif($die==2){
					 color 150,100,10;
				 }elseif($die==1){
					 color 0,0,0;
				 }elseif($die==0){
					 alterobject "self",4986;
				 }
}
				$water=0;
				$watered=0;
			}
		}
	 if($season==0){
		 if(count_inrange("object",3578,62,"self")==0){
				free "self";
			}
		}
	}
	on:watered {
		if($watered==0){
			$watered=1;
			$water=1;
			if($difficulty>2){
				$die=3;
			}else{
				$die=4;
			}
			color 255,255,255;
		}
	}
script=end
description=start
I don't think I can get into trouble smoking this stuff out here anyways. Maybe I could sell it in bulk to the pirate. I could use a few whaling spears, or maybe that pistol finally.
description=end