-
Notifications
You must be signed in to change notification settings - Fork 2
/
reuben.sk
248 lines (216 loc) · 8.96 KB
/
reuben.sk
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
# ### Reuben NPC by Roy Curtis
# ### Licensed under MIT, 2015
# ### Events
on load:
set {reuben.last} to now
# Normal responses
clear {reuben::normal::*}
add "oinks despondently" to {reuben::normal::*}
add "gives you a curious look" to {reuben::normal::*}
add "carefully considers life" to {reuben::normal::*}
add "wallows in self-pity" to {reuben::normal::*}
add "ignores you" to {reuben::normal::*}
add "misses his enderdragon suit" to {reuben::normal::*}
add "looks around nervously for British prime ministers" to {reuben::normal::*}
# Thundering
clear {reuben::thunder::*}
add "shivers nervously" to {reuben::thunder::*}
add "cowers in the mud" to {reuben::thunder::*}
add "startles" to {reuben::thunder::*}
# Flying
clear {reuben::flying::*}
add "is jealous" to {reuben::flying::*}
add "hops in a pathetic attempt to fly" to {reuben::flying::*}
add "stares at you in disbelief" to {reuben::flying::*}
add "oinks begrudgingly" to {reuben::flying::*}
# Wearing leather
clear {reuben::leather::*}
add "frowns at your choice of clothing" to {reuben::leather::*}
add "attempts to moo at you condescendingly" to {reuben::leather::*}
# Poisoned
clear {reuben::poison::*}
add "eyes you wearily" to {reuben::poison::*}
add "shies away from you" to {reuben::poison::*}
add "hopes you are not contagious" to {reuben::poison::*}
# Burning (not working)
# add "smells the good kind of bacon" to {reuben::burning::*}
# add "oinks appreciatively" to {reuben::burning::*}
# add "is blinded by your bright 'personality'" to {reuben::burning::*}
# Holding leash
clear {reuben::lead::*}
add "snaps at the leash" to {reuben::lead::*}
add "shies away from the leash" to {reuben::lead::*}
add "exercises self-restraint" to {reuben::lead::*}
add "isn't into that" to {reuben::lead::*}
# Holding saddle
clear {reuben::saddle::*}
add "dashes from under the saddle" to {reuben::saddle::*}
add "tries to neigh at you sarcastically" to {reuben::saddle::*}
add "squeals and bucks the saddle off" to {reuben::saddle::*}
# Holding pork
clear {reuben::pork::*}
add "frowns at your choice of food" to {reuben::pork::*}
add "mourns his tasty bretheren" to {reuben::pork::*}
add "hopes you hold human flesh" to {reuben::pork::*}
add "disapproves of your offering" to {reuben::pork::*}
# Holding other meat
clear {reuben::meat::*}
add "looks away from your offering" to {reuben::meat::*}
add "prefers something palatable" to {reuben::meat::*}
add "looks uninterested" to {reuben::meat::*}
# Holding veggies
clear {reuben::veggie::*}
add "appreciates your good taste" to {reuben::veggie::*}
add "feels healthy" to {reuben::veggie::*}
add "om-noms happily" to {reuben::veggie::*}
# Holding carrot
clear {reuben::carrot::*}
add "appreciates your offering" to {reuben::carrot::*}
add "feels warm and fuzzy inside" to {reuben::carrot::*}
add "has a sudden urge to cuddle your leg aggressively" to {reuben::carrot::*}
# Holding carrot on a stick
clear {reuben::carrotstick::*}
add "attempts to follow" to {reuben::carrotstick::*}
add "gives you a bitter stare" to {reuben::carrotstick::*}
add "thinks it's bad luck to go fishing for pigs" to {reuben::carrotstick::*}
# Holding apple
clear {reuben::apple::*}
add "appreciates the apple, but will not heal your warts" to {reuben::apple::*}
add "finds your taste in food pretentious" to {reuben::apple::*}
add "dislikes rich foods" to {reuben::apple::*}
# Holding wheat
clear {reuben::wheat::*}
add "senses a storm brewing" to {reuben::wheat::*}
add "feels positively bovine" to {reuben::wheat::*}
# Holding weapon
clear {reuben::weapon::*}
add "thinks you can do better than that" to {reuben::weapon::*}
add "eyes your weapon wearily" to {reuben::weapon::*}
add "frowns at your blade" to {reuben::weapon::*}
add "feels a little triggered" to {reuben::weapon::*}
# Holding fiery stuff
clear {reuben::lighter::*}
add "squeals painfully" to {reuben::lighter::*}
add "did not appreciate that" to {reuben::lighter::*}
add "does not go well with hot sauce" to {reuben::lighter::*}
add "emits a sudden bacony waft" to {reuben::lighter::*}
# Holding explosive stuff
clear {reuben::explode::*}
add "experiences a critical acceleration of anti-gravity" to {reuben::explode::*}
add "yelps explosively" to {reuben::explode::*}
add "goes flying" to {reuben::explode::*}
# Melee attack responses
clear {reuben::attacked::*}
add "does not respond to your aggression" to {reuben::attacked::*}
add "dodges your attack" to {reuben::attacked::*}
add "snaps at you" to {reuben::attacked::*}
add "bites your ankle" to {reuben::attacked::*}
# Projectile attack responses
clear {reuben::attacked-proj::*}
add "ducks, oinks quackingly" to {reuben::attacked-proj::*}
add "sausage-rolls out of the way" to {reuben::attacked-proj::*}
add "dives into the mud" to {reuben::attacked-proj::*}
add "yelps despondently" to {reuben::attacked-proj::*}
on damage of a pig:
# Conditions
victim's name is "Reuben"
cancel the event
{reuben.last} was more than 1 second ago
attacker is a player
# State
set {reuben.last} to now
# Logic
if projectile exists:
set {_msg} to random element of {reuben::attacked-proj::*}
delete the projectile
else:
set {_msg} to random element of {reuben::attacked::*}
show mobspawner flames on victim
console command "/playsound entity.zombie_pig.hurt neutral %attacker% ~ ~ ~ 1 1 1"
send "&5* Reuben %{_msg}%" to attacker
on rightclick on a pig:
# Conditions
pig's name is "Reuben"
cancel the event
{reuben.last} was more than 1 second ago
# State
set {reuben.last} to now
set {_type} to "normal"
set {_sound} to "entity.pig.ambient"
set {_hold} to player's held item
# Decide action based on player or world conditions
if is thundering in pig's world:
chance of 10%
set {_type} to "thunder"
if player is flying:
chance of 50%
set {_type} to "flying"
if player is wearing leather armour:
chance of 50%
set {_type} to "leather"
if player is poisoned:
chance of 50%
set {_type} to "poison"
if {_hold} is lead:
set {_type} to "lead"
if {_hold} is saddle:
set {_type} to "saddle"
if {_hold} is any porkchop:
set {_type} to "pork"
if {_hold} is any beef or any chicken or any mutton or any rabbit meat:
chance of 75%
set {_type} to "meat"
if {_hold} is any fish or any pufferfish or any clownfish or any salmon:
chance of 75%
set {_type} to "meat"
if {_hold} is any potato or any carrot or any apple or bread or cookie:
chance of 75%
set {_type} to "veggie"
if {_hold} is melon slice or pumpkin pie:
chance of 75%
set {_type} to "veggie"
if {_hold} is any carrot:
chance of 90%
set {_type} to "carrot"
if {_hold} is carrot on a stick:
chance of 50%
set {_type} to "carrotstick"
if {_hold} is any apple:
chance of 50%
set {_type} to "apple"
if {_hold} is wheat:
chance of 50%
set {_type} to "wheat"
if {_hold} is sword or axe:
chance of 50%
set {_type} to "weapon"
if {_hold} is flint'n'steel or blaze rod or blaze powder or lava bucket:
set {_type} to "lighter"
# 1.9 BUG: Not triggering for firework
if {_hold} is gunpowder or TNT or firework rocket:
set {_type} to "explode"
# Apply special effects
if {_type} is "thunder":
strike lightning effect at the pig
set {_sound} to "entity.zombie_pig.hurt"
show hurt on pig
if {_type} is "pork" or "meat" or "lead" or "saddle":
set {_sound} to "entity.zombie_pig.hurt"
show mobspawner flames on pig
if {_type} is "veggie" or "carrot":
apply potion of regeneration to pig for 5 seconds
if {_type} is "weapon":
apply potion of nausea to pig for 5 seconds
if {_type} is "lighter":
set {_sound} to "entity.zombie_pig.hurt"
ignite pig for 5 seconds
if {_type} is "explode":
set {_sound} to "entity.zombie_pig.hurt"
show mobspawner flames on pig
create a fake explosion at pig
push the pig upwards at speed 1
push the pig upwards at speed 0.3
console command "/playsound %{_sound}% neutral %player% ~ ~ ~ 1 1 1"
# Create and send message
set {_msg} to random element of {reuben::%{_type}%::*}
send "&5* Reuben %{_msg}%" to player