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
##################
id=289
name=Hanfknolle
icon=gfx\ext\icons\bud.bmp
group=ext,stuff,weasel
model=gfx\ext\bud.b3d
scale=0.5
mat=leaf
weight=5
info=Eine dicke Knolle Weed...
param=plantable,1
param=plantobject,134
param=plantplace,20
param=plantduration,1000
script=start
	on:changeday {
		local $c;
		$c+=count_inrange("item",289,20,"self");
		$c+=count_inrange("item",289,20,"self");
		$c+=count_inrange("item",289,20,"self");
		$c+=count_inrange("item",289,20,"self");
		$c+=count_inrange("item",289,20,"self");
		
	 if ($c<3){
			local $htyp,$hx,$hy,$hz,$hid;
			$c=random(1,20);
			$htyp=0;
			if (($c>=1) and ($c<=5)){ $htyp=16; }
			if (($c>=6) and ($c<=8)){ $htyp=17; }
			if ($c==9){ $htyp=18; }
			if (($c>=10) and ($c<=14)){ $htyp=19; }
			if (($c>=15) and ($c<=20)){ $htyp=20; }
			if ($htyp>0){
				$hx=getx("self");
				$hy=gety("self");
				$hz=getz("self");
				$hx+=random(-10,10);
				$hz+=random(-10,10);
				$hid=create("item",$htyp,$hx,$hz);
				$hy+=10;
				setpos "item",$hid,"self",$hy,"self";
			}
			freevar $htyp,$hx,$hy,$hz,$hid;
		}
		freevar $c;
	}
	on:eat {
		process "Essen",1000;
		eat -5,15,-15,-1;
		addstate "unit",1,"fuddle";
		statevalue "unit",1,"fuddle",5;
	}
	on:use {
		msg "Ich muss das in die Hand nehmen",3;
		msg "und dann den Boden benutzen!",3;
		speech "negative";
	}
script=end