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
//Planting
	on:useground {
		local $x,$y,$z,$id,$item;
		$x=use_x();
		$y=use_y();
		$z=use_z();
		$item=getplayerweapon();
		
		if (count_stored("unit",1,$item)>0){
			//seaweed
			if ($item==109){
				if ($y<0){
					if (freespace($x,$y,$z,20,1,0,0,0)){
						freestored "unit",1,109,1;
						$id=create("object",48,$x,$z);
						event "plant","object",$id;
						if (skillvalue("plant")>=400){
							process "planting seaweed",250;
						}else{
							process "planting seaweed",1000;
						}
						play "dig.wav";
						play "mat_leaf1.wav";
						event "iskill_plant","global";
					}else{
						speech "negative";
						msg "Here is not enough space!",3;
					}
				}else{
					speech "negative";
					msg "Seaweed does not grow on land!",3;
				}