forked from Amaikokonut/Elevines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dovines script.cos
473 lines (403 loc) · 9.17 KB
/
Dovines script.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
**CAOS2PRAY
*# Pray-File "dovines.agents"
*# DS-Name "dovines"
*# Depend blnk.c16
*# attach elevinehelp.catalogue dovines.c16
*# desc = "An easy-to-use custom door system. Read the help file included for details. Lovely sprites by Mea."
*# Agent Animation File = "dovines.c16"
*# Agent Sprite First Image = 4
*# Agent Animation Gallery = "dovines"
*# Web URL = "naturingnurturing.blogspot.com"
*# Web Label = "Naturing :: Nurturing"
*lift teleporting ball things.
new: comp 2 2 21051 "dovines" 13 4 2000
*Inject it where it belongs:
*Why are you including a C3 inject script when this isn't even C3 compatible?
*Probably because I am lazy and just want to copypaste my install script....
doif gnam eq "Docking Station"
setv va00 game "CreatorX"
setv va01 game "CreatorY"
doif va00 eq 0 and va01 eq 0
setv va00 6110
setv va01 9200
endi
doif tmvt va00 va01 eq 1
mvto va00 va01
else
mvsf va00 va01
endi
elif gnam eq "Creatures 3"
doif tmvt 5671 3599 eq 1
mvto 5671 3599
else
mvsf 5671 3599
endi
endi
clac 1000
bhvr 3
*activate 1 (1) activate 2 (2)
tick 30
setv ov11 0
attr 198
*mouse pickupable (2) mouseclickable (4) collisions (64) physics (128)
accg 30
elas 20
fric 100
perm 100
*ov98 and 99 are going to be the random tinos, ov97 is the random -pose-
setv ov96 rand 0 12
setv ov97 rand 50 200
setv ov98 rand 50 200
setv ov99 rand 50 200
pose ov96
tino ov97 ov98 ov99 128 128
*We'll base your ID number off your tinos, just for fun:
sets ov00 vtos ov97
adds ov00 vtos ov98
adds ov00 vtos ov99
*parts-- 1, top button, 2, bottom
pat: dull 1 "dovines" 0 6 21 1
pat: dull 2 "dovines" 2 12 72 1
*Push -- Want to go to next door
scrp 2 2 21051 1
inst
lock
*set the little serchagent to null
seta va01 null
*enum through other circles
doif va01 eq null
enum 2 2 21051
*only check ones of your code
doif mv00 eq ov00 and targ ne ownr
*so NOW check to see if a previous agent has been found
doif va01 eq null
*if not, make it the favorite
seta va01 targ
endi
endi
next
endi
*So va01 should be the ideal ring to tele to now
*assuming there is one.
*if there's NOT, stop this whole thing now!
doif va01 eq null
*make sure there's a FROM creature
doif from ne null
*who pushed you?
seta va00 from
targ va00
doif fmly = 4
*put a bug in it's ear-- stop pushing this!
urge writ targ 26 -2 -1 2
sndc "buzz"
*disappointment
stim writ va00 0 1
stop
else
stop
endi
else
stop
endi
*else there IS a va01!
else
*if it's being carried (like by the hand), stop
targ va01
doif movs ne 0
stop
endi
*now, make sure there's a creature to move
doif from ne null
seta va00 from
targ va00
doif fmly = 4
*set the coords of va01 into va09 and va10
targ va01
setv va09 posx
setv va10 posb
subv va10 1
*Lock it out from creatures for a second!
tick tick
attr 214
*now targ the norn
targ va00
*make sure it's not being carried
doif movs ne 0
stop
endi
*Make sure it's a VALID place to move it!
doif tmvf va09 va10 = 1
*and move it!
mvft va09 va10
*tell the norn it just travled
stim writ targ 96 1
*and it needs to wait?
* stim writ va00 75 1
*tell the norn to STOP now..
urge writ targ 26 -2 -1 2
*and make some dingysound
sndc "snap"
else
*if it's not a VALID PLACE make a sndc
sndc "buzz"
stop
endi
else
*set the coords of va01 into va09 and va10
targ va01
setv va09 posl
setv va10 posb
subv va10 1
*Lock it out from creatures for a second!
tick tick
attr 214
*now targ the norn
targ va00
subv va10 hght
*make sure it's not being carried
doif movs ne 0
stop
endi
*Make sure it's a VALID place to move it!
doif tmvt va09 va10 = 1
*and move it!
mvto va09 va10
*and make some dingysound
sndc "snap"
endi
endi
endi
endi
endm
*Pull -- Want to go door
scrp 2 2 21051 2
inst
lock
*set the little serchagent to null
seta va01 null
*enum through other circles
doif va01 eq null
enum 2 2 21051
*only check ones of your code
doif mv00 eq ov00 and targ ne ownr
*so NOW check to see if a previous agent has been found
doif va01 eq null
*if not, make it the favorite
seta va01 targ
endi
endi
next
endi
*So va01 should be the ideal ring to tele to now
*assuming there is one.
*if there's NOT, stop this whole thing now!
doif va01 eq null
*make sure there's a FROM creature
doif from ne null
*who pushed you?
seta va00 from
targ va00
doif fmly = 4
*put a bug in it's ear-- stop pushing this!
urge writ targ 26 -2 -1 2
sndc "buzz"
*disappointment
stim writ va00 0 1
stop
else
stop
endi
else
stop
endi
*else there IS a va01!
else
*if it's being carried (like by the hand), stop
targ va01
doif movs ne 0
stop
endi
*now, make sure there's a creature to move
doif from ne null
seta va00 from
targ va00
doif fmly = 4
*set the coords of va01 into va09 and va10
targ va01
setv va09 posx
setv va10 posb
subv va10 1
*Lock it out from creatures for a second!
tick tick
attr 214
*now targ the norn
targ va00
*make sure it's not being carried
doif movs ne 0
stop
endi
*Make sure it's a VALID place to move it!
doif tmvf va09 va10 = 1
*and move it!
mvft va09 va10
*tell the norn it just travled
stim writ targ 96 1
*and it needs to wait?
* stim writ va00 75 1
*tell the norn to STOP now..
urge writ targ 26 -2 -1 2
*and make some dingysound
sndc "snap"
else
*if it's not a VALID PLACE make a sndc
sndc "buzz"
stop
endi
else
*set the coords of va01 into va09 and va10
targ va01
setv va09 posl
setv va10 posb
subv va10 1
*Lock it out from creatures for a second!
tick tick
attr 214
*now targ the norn
targ va00
subv va10 hght
*make sure it's not being carried
doif movs ne 0
stop
endi
*Make sure it's a VALID place to move it!
doif tmvt va09 va10 = 1
*and move it!
mvto va09 va10
*and make some dingysound
sndc "snap"
endi
endi
endi
endi
endm
*you've been CLICKED or clac'd or something
scrp 2 2 21051 1000
inst
*where are you?
setv va20 posl
setv va21 post
*Here is how it works....
*shift+click creates a copy of the same OV
*ctrl+click creates a copy of a new OV
*shift+click kills it.
sndc "opn1"
*shift -- make a copy, save OV, same tino
doif keyd 16 eq 1 and keyd 17 eq 0 and ov11 eq 0
setv ov11 15
sndc "opn1"
new: comp 2 2 21051 "dovines" 13 4 2000
*move it to the old one, and make it hop a bit
mvsf va20 va21
velo 15 100
clac 1000
bhvr 3
*activate 1 (1) activate 2 (2)
tick 30
setv ov11 15
attr 198
*mouse pickupable (2) mouseclickable (4) collisions (64) physics (128)
accg 30
elas 20
fric 100
perm 100
*ov97, 96, 98 and 99 are going to be COPIED
setv ov96 mv96
setv ov97 mv97
setv ov98 mv98
setv ov99 mv99
pose ov96
tino ov97 ov98 ov99 128 128
*We'll base your ID number off your tinos, just for fun:
sets ov00 vtos ov97
adds ov00 vtos ov98
adds ov00 vtos ov99
*parts-- 1, top button, 2, bottom
pat: dull 1 "dovines" 0 6 21 1
pat: dull 2 "dovines" 2 12 72 1
*ctrl
elif keyd 16 eq 0 and keyd 17 eq 1
sndc "unlk"
*lift teleporting ball things.
new: comp 2 2 21051 "dovines" 13 4 2000
*move it to the old one, and make it hop a bit
mvsf va20 va21
velo 15 100
clac 1000
bhvr 3
*activate 1 (1) activate 2 (2)
tick 30
setv ov10 0
attr 198
*mouse pickupable (2) mouseclickable (4) collisions (64) physics (128)
accg 30
elas 20
fric 100
perm 100
*ov98 and 99 are going to be the random tinos, ov96 is the random -pose-
setv ov96 rand 0 12
setv ov97 rand 50 200
setv ov98 rand 50 200
setv ov99 rand 50 200
pose ov96
tino ov97 ov98 ov99 128 128
*We'll base your ID number off your tinos, just for fun:
sets ov00 vtos ov97
adds ov00 vtos ov98
adds ov00 vtos ov99
*parts-- 1, top button, 2, bottom
pat: dull 1 "dovines" 0 6 21 1
pat: dull 2 "dovines" 2 12 72 1
*both
elif keyd 16 eq 1 and keyd 17 eq 1
kill ownr
else
sndc "buzz"
endi
endm
*Meh. I tried to avoid using a timer for this but it's just
*SO MUCH MORE FLUID with it. ]:
scrp 2 2 21051 9
inst
*reset the attr if it's been changed
attr 198
*mouse pickupable (2) mouseclickable (4) collisions (64) physics (128)
*the indicator orbs change color. Yay.
setv va30 0
setv va31 0
*check where you are
setv ov10 posy
*enum through other circles
enum 2 2 21051
*only check ones of your code
doif mv00 eq ov00
*see if it's on a higher level-- that is, the y coord is less than mv10
doif posy lt mv10
setv va30 1
setv ov10 15
*lower?
elif posy gt mv10
setv va31 1
setv ov10 15
endi
endi
next
*pose accordingly!
part 1
pose va30
part 2
pose va31
endm
rscr
enum 2 2 21051
kill targ
next