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
121
122
###Baby Raptor
id=60
name=Baby Raptor
group=animal
icon=gfx\raptor.bmp
model=gfx\raptor.b3d
scale=0.065
colxr=15
colyr=30
behaviour=monkey
health=40
speed=$speed
eyes=7
turnspeed=3.0
attackrange=65
damage=24
ani_idle1=4,8,0.02
ani_move=2,3,0.06
ani_die=8,11,0.05
ani_attack=12,16,0.07
sfx=raptor
rideoffset=5
acceleration=0.08
maxdepth=35
loot=9,1
loot=94,8
loot=95,4
loot=96,3
loot=4982,6
loot=71,5
script=start
	$hour=hour;
	if ($hour==7) {
		local $hunger;
		$hunger++;
		msg "The baby raptor's hungry!",1;
	}
	if ($hour==12) {
		local $hunger;
		$hunger++;
		msg "The baby raptor's hungry!",1;
	}
	if ($hour==18) {
		local $hunger;
		$hunger++;
		msg "The baby raptor's hungry!",1;
	}
	on:changeday {
		if ($hunger>2) {
			kill "self";
		}
	$lifespan++;
	local $lifespan;
	if ($lifespan==5) {
		scale 0.13;
		$speed=1.5;
	}
	if ($lifespan==10) {
		scale 0.25;
		$speed=1.8;
	}
	if ($lifespan==16) {
		scale 0.35;
		$speed=2.1;
	}
	if ($lifespan==20) {
		scale 0.5;
		$speed=2.5;
	}
	on:use {
	if(playergotitem 9)>0 {
		$hunger--;
		freestored "unit",1,9,1;
		play "eat.wav";
	}elseif(playergotitem 11)>1{
		$hunger--;
		freestored "unit",1,11,2;
		play "eat.wav";
	}else{
		msg "I need raw meat to feed him!",3;
		speech "negitive";
	}
	}
	on:ai_attack {
		if (random(8)==1){
			if (gotstate("unit",1,17)==0){
				if (random(5)<2){
					addstate "unit",1,1;	
				}else{
					addstate "unit",1,7;
				}
			}
		}
	}	
	
	on:kill {
		event "iskill_hunt","global";
	}
	on:create {
		timer "self",3000,0;
		local $babyraptor;
		$babyraptor=1;
		$speed=1.25;
	}
	on:start {
		timer "self",3000,0;
		local $babyraptor;
		$babyraptor=1;
		$speed=1.25;
	}
	on:timer {
		if (health("self")>0){
			ai_mode "self","goto","unit","1";
			ai_center;
		}
		if (count_stored("self")>0){
			addstate "self","particles";
		}else{
			freestate "self","particles";
		}
	}
script=end