-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path36465_vendor_food.cos
155 lines (140 loc) · 3.44 KB
/
36465_vendor_food.cos
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
**
** Food vendor script
**
**
** Install script
**
** Engine
new: comp 2 23 36465 "betaship_vendor" 1 0 2500
mesg wrt+ targ 1000 54668 26584 1
** Main
new: comp 2 23 36465 "betaship_vendor" 1 0 2500
mesg wrt+ targ 1000 54750 27259 1
** Arctic
new: comp 2 23 36465 "betaship_vendor" 1 0 2500
mesg wrt+ targ 1000 53539 27979 1
** Desert
new: comp 2 23 36465 "betaship_vendor" 1 0 2500
mesg wrt+ targ 1000 56263 27753 1
** Ocean
new: comp 2 23 36465 "betaship_vendor" 1 0 2500
mesg wrt+ targ 1000 51238 27007 1
**
** Event scripts
**
* Vendor creation script
scrp 2 23 36465 1000
* fruit button: part 2 script 1001
pat: butt 2 "betaship_agents" 1 1 -1 -1 -1 [] 1001 1
* food button: part 3 script 1002
pat: butt 3 "betaship_agents" 2 1 23 -1 -1 [] 1002 1
* seed button: part 4 script 1003
pat: butt 4 "betaship_agents" 0 1 -1 22 -1 [] 1003 1
* toy button: part 5 script 1004
pat: butt 5 "betaship_agents" 3 1 23 21 -1 [] 1004 1
* Attr: mouseable 2 + collide 64 + physics 128 = 194
attr 194
* Bhvr: act1 1 + hit 8 + pick up 32 = 41
bhvr 41
* Set physics attributes
accg 2
aero 3
* Set collision attributes
perm 100
fric 90
elas 20
* create a timer to check if there aren't too many surrounding toys
tick 500
rnge 700
* Move to the spot if possible
doif tmvt _p1_ _p2_ ne 0
mvto _p1_ _p2_
else
kill targ
endi
endm
** Creature push script
scrp 2 23 36465 1
doif crea from eq 1
targ from
* get hunger for protein-fat-carb and boredom chemicals
setv va00 chem 149
setv va01 chem 151
setv va02 chem 150
setv va03 chem 159
stim writ from 90 rand 1 3
setv va05 posx
setv va06 post
targ ownr
* Fruit
doif va00 gt va01 and va00 gt va02 and va00 gt va03
stim writ from 61 1
new: simp 2 8 36463 "betaship_agents" 1 1 rand 1500 4000
mesg wrt+ targ 1000 va05 va06 1
elif va01 gt va00 and va01 gt va02 and va01 gt va03
stim writ from 63 1
new: simp 2 11 36463 "betaship_agents" 1 2 rand 1500 4000
mesg wrt+ targ 1000 va05 va06 1
elif va02 gt va00 and va02 gt va01 and va02 gt va03
stim writ from 62 1
new: simp 2 3 36463 "betaship_agents" 1 0 rand 1500 4000
mesg wrt+ targ 1000 va05 va06 1
elif va03 gt va01 and va03 gt va02 and va03 gt va00
new: simp 2 21 36463 "betaship_agents" 1 3 rand 1500 3000
mesg wrt+ targ 1000 va05 va06 1
else
setv va00 rand 1 3
doif va00 eq 1
new: simp 2 8 36463 "betaship_agents" 1 1 rand 1500 4000
elif va00 eq 2
new: simp 2 11 36463 "betaship_agents" 1 2 rand 1500 4000
elif va00 eq 3
new: simp 2 3 36463 "betaship_agents" 1 0 rand 1500 4000
endi
mesg wrt+ targ 1000 va05 va06 1
endi
endi
endm
scrp 2 23 36465 9
setv va00 0
esee 2 21 36463
addv va00 1
doif va00 gt 4
doif carr eq null
kill targ
endi
endi
next
endm
scrp 2 23 36465 1001
setv va00 posx
setv va01 post
new: simp 2 8 36463 "betaship_agents" 1 1 rand 1500 4000
mesg wrt+ targ 1000 va00 va01 0
velo rand -5 5 rand -5 -3
endm
scrp 2 23 36465 1002
setv va00 posx
setv va01 post
new: simp 2 11 36463 "betaship_agents" 1 2 rand 1500 4000
mesg wrt+ targ 1000 va00 va01 0
velo rand -5 5 rand -5 -3
endm
scrp 2 23 36465 1003
setv va00 posx
setv va01 post
new: simp 2 3 36463 "betaship_agents" 1 0 rand 1500 4000
mesg wrt+ targ 1000 va00 va01 0
velo rand -5 5 rand -5 -3
endm
scrp 2 23 36465 1004
setv va00 posx
setv va01 post
new: simp 2 21 36463 "betaship_agents" 1 3 rand 1500 3000
mesg wrt+ targ 1000 va00 va01 0
velo rand -5 5 rand -5 -3
endm
rscr
enum 2 23 36465
kill targ
next