-
Notifications
You must be signed in to change notification settings - Fork 1
/
36464_bubble.cos
163 lines (142 loc) · 2.06 KB
/
36464_bubble.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
**
** Bubble script
** Creatures breathe 56 air every 20 ticks
**
** Vendor injection
*new: simp 2 23 36464 "blnk" 1 1 0
*mvto 52638 27309
**
**
** VENDOR
**
**
** Creation script
**
scrp 2 23 36464 10
* Attr: mouseable 2 + invisible 16
attr 18
* Bhvr: none
tick rand 300 600
endm
**
** Timer script
**
scrp 2 23 36464 9
tick rand 200 600
setv va00 posx
setv va01 post
** Bubble Injection script
new: simp 2 21 36464 "betaship_air" 1 1 rand 2000 4000
mesg wrt+ targ 1000 va00 va01 0
velo rand -15 15 0
endm
**
**
** BUBBLE
**
**
** Creation script
**
** Toy creation
scrp 2 21 36464 1000
* Attr: mouseable 2 + activateable 4 + collide 64 + physics 128 = 198
attr 198
* Bhvr: act1 1 + hit 8 + pick up 32 = 41
bhvr 41
* Set physics attributes
accg -0.05
aero 10
* Set collision attributes
perm 60
fric 0
elas 60
* Set tick
tick 60
* Move to the spot if possible
doif tmvt _p1_ _p2_ ne 0
mvto _p1_ _p2_
else
kill targ
endi
endm
**
** Pickup script
**
** Toy pickup
scrp 2 21 36464 4
doif ov00 eq 0
setv ov00 1
endi
* If creature, inject with oxygen (?)
doif crea from eq 1
chem 29 255
chem 30 20
endi
addv ov00 1
doif ov00 gt 20
* Pop the bubble
kill ownr
endi
endm
**
** Play script
**
** Toy play
scrp 2 21 36464 1
* stim played with toy
stim writ from 97 2
* If creature, inject with oxygen (?)
doif crea from eq 1
chem 29 255
chem 30 20
endi
* Pop the bubble
kill ownr
endm
**
** Hit script
**
** Toy hit
scrp 2 21 36464 3
* Stim agression
stim writ from 44 2
* stim played with toy
stim writ from 97 2
* If creature, inject with oxygen (?)
doif crea from eq 1
chem 29 255
chem 30 20
endi
* Pop the bubble
kill ownr
endm
**
** Toy timer
**
scrp 2 21 36464 9
doif ov01 eq 0
setv ov01 1
endi
addv ov01 1
doif ov01 gt 25
kill ownr
stop
endi
etch 4 0 0
chem 29 255
chem 30 55
next
doif grap posx posy ne -1
doif rtyp grap posx posy ne 9 and rtyp grap posx posy ne 8
kill ownr
stop
endi
endi
endm
**
** Collision script
**
** The bubble will (probably) pop when it collides
scrp 2 21 36464 6
kill ownr
endm