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
### Meat
id=9
name=Meat
group=food
icon=gfx\meat.bmp
model=gfx\meat.b3d
scale=0.15
mat=flesh
weight=500
info=a juicy piece of raw meat. I can fry it, eat it as it is or take it in my hand and throw it at wild animals...
behaviour=throw
damage=0
speed=15
drag=1.8
rate=3000
script=start
	//Fry!
	on:use {
		if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){
			process "frying",500;
			fry;
			alteritem 1,10;
		}else{
			msg "I need fire to fry this!",3;
			speech "negative";
		}
	}
	//Eat
	on:eat {
		process "eating",1000;
		eat 5,20,10,0;
		
		store $id,"unit",1;
	}
	//Taming
	on:drop {
		ai_behavioursignal "eat","raptor",300;
	}
	on:ai_eat {
		local $eater,$var;
		$eater=ai_eater();
		if (type("unit",$eater)==2){
			$var=getlocal("unit",$eater,"tameness");
			$var+=2;
			setlocal "unit",$eater,"tameness",$var;
			if (($var>9)&& (gotstate("unit",$eater,"tame")==0)){
				addstate "unit",$eater,"tame";
				corona getx("unit",$eater),getz("unit",$eater),20,255,70,100;
				msg "I tamed it!",4;
			}
		}
	}
//Taming
	on:drop {
		ai_behavioursignal "eat","loin",300;
	}
	on:ai_eat {
		local $eater,$var;
		$eater=ai_eater();
		if (type("unit",$eater)==9){
			$var=getlocal("unit",$eater,"tameness");
			$var+=2;
			setlocal "unit",$eater,"tameness",$var;
			if (($var>9)&& (gotstate("unit",$eater,"tame")==0)){
				addstate "unit",$eater,"tame";
				corona getx("unit",$eater),getz("unit",$eater),20,255,70,100;
				msg "I tamed it!",4;
			}
		}
	}
script=end