· 6 years ago · Aug 16, 2019, 06:12 PM
1#-ZAC-0.5.3.2
2
3#-----Table of Contents-----
4
5#-----1. Functions-----
6
7#-----2. Join Handlers----- (removed for now)
8
9#-----3. Staffmode Handler-----
10
11#-----4. AntiCheat-----
12
13#-----5. AutoClicker-----
14
15#-----6. AntiKockBackA-----
16
17#-----7. AntiKnockbackB-----
18
19#-----8. Reach-----
20
21#-----9. Flight-----
22
23#-----10. CommandHandler-----
24
25options:
26 #checkinterval: {zac.config.antikbdelay}
27 checkinterval: 30
28 tempbantime: 1 day
29 #tempbantime: {zac.config.tempbantime}
30 prefix: &7[&e&lZAC&7]
31 auraname: ZAC
32 killaura: true
33 #judgementday: {zac.config.judgementday}
34 judgementday: true
35 clickdetectitem: diamond axe or diamond sword or air or wood axe or wood sword or stone axe or stone sword or golden axe or golden sword or iron axe or iron sword
36 #jumppadcheck: barrier or red carpet or cobblestone wall or slimeblock or slab or stair or fence or stone slab or stonebrick slab
37 #redstonecheck: slimeblock or red carpet or slab or stair cobblestone wall or fence os stone slab or stonebrick slab
38
39function createConfig(n: number) :: number:
40 wf "##=============================##" to "/plugins/ZAC/config.yml"
41 wf "##-------------ZAC-------------##" to "/plugins/ZAC/config.yml"
42 wf "##--------Version0.5.2---------##" to "/plugins/ZAC/config.yml"
43 wf "##-----------------------------##" to "/plugins/ZAC/config.yml"
44 wf "##=============================##" to "/plugins/ZAC/config.yml"
45 wf "##config" to "/plugins/ZAC/config.yml"
46 wf "##checks" to "/plugins/ZAC/config.yml"
47 wf "Killaura:" to "/plugins/ZAC/config.yml"
48 wf "Speed:" to "/plugins/ZAC/config.yml"
49 set "Killaura" to "true" in yaml file "plugins/ZAC/config.yml"
50 set "Speed" to "true" in yaml file "plugins/ZAC/config.yml"
51
52#function createConfig(n: number) :: number:
53# set "Config.prefix" to "&7[&e&lZAC&7]" in yaml file "plugins/ZAC/config.yml"
54# set "Config.Judgement-day" to "true" in yaml file "plugins/ZAC/config.yml"
55# set "Config.Tempban-Time" to "1800" in yaml file "plugins/ZAC/config.yml"
56# set "Config.Anti-Knockback.Delay" to "25" in yaml file "plugins/ZAC/config.yml"
57
58
59function auraCheck(p: player):
60 delete {fuck.list::*}
61# add "ZAC" to {fuck.list::*}
62 add "{@auraname}" to {fuck.list::*}
63 #add "ZAC420" to {fuck.list::*}
64 #add "ZAC920" to {fuck.list::*}
65 #add "ZAC911" to {fuck.list::*}
66 #add "ZAC619" to {fuck.list::*}
67 #add "ZAC555" to {fuck.list::*}
68 #add "ZAC666" to {fuck.list::*}
69 #add "ZAC819" to {fuck.list::*}
70 set {_name} to a random element of {fuck.list::*}
71 set {_number} to a random element of {numberz.list::*}
72 create a citizen named "%{_name}%" at location of {auracage}
73 if difference between {zac.lastauracheck.%{_p}%} and now is less than 5 seconds:
74 stop
75 loop all entities:
76 loop 1 times:
77 "%name of loop-entity%" is "%{_name}%"
78 if difference between {zac.lastauracheck.%{_p}%} and now is greater than 5 seconds:
79 set {zac.lastauracheck.%{_p}%} to now
80 hide loop-entity from all players
81 wait 1 tick
82 set {zac.kacheck.%{_p}%} to true
83 set {_pos} to position of block 3.2 meters above {_p}'s head
84 teleport loop-entity to {_pos}
85 reveal loop-entity to {_p}
86 wait 0.2 seconds
87 set {_pos} to position of block 2.7 meters above {_p}'s head
88 teleport loop-entity to {_pos}
89 wait 0.2 seconds
90 set {_pos} to position of block 2.5 meters above {_p}'s head
91 teleport loop-entity to {_pos}
92 wait 0.2 seconds
93 set {_pos} to position of block 2.5 meters above {_p}'s head
94 teleport loop-entity to {_pos}
95
96 wait 0.2 seconds
97 set {_pos} to position of block 2.5 meters above {_p}'s head
98 set {_posn} to position of block 1.5 meters north of {_pos}
99 teleport loop-entity to {_posn}
100 wait 0.2 seconds
101 set {_pos} to position of block 2.5 meters above {_p}'s head
102 set {_pose} to position of block 1.5 meters east of {_pos}
103 teleport loop-entity to {_pose}
104 wait 0.2 seconds
105 set {_pos} to position of block 2.5 meters above {_p}'s head
106 set {_poss} to position of block 1.5 meters south of {_pos}
107 teleport loop-entity to {_poss}
108 wait 0.2 seconds
109 set {_pos} to position of block 2.5 meters above {_p}'s head
110 set {_posw} to position of block 1.5 meters west of {_pos}
111 teleport loop-entity to {_posw}
112 wait 0.2 seconds
113 set {_pos} to position of block 2.5 meters above {_p}'s head
114 set {_posn} to position of block 1.5 meters north of {_pos}
115 teleport loop-entity to {_posn}
116 wait 0.2 seconds
117 set {_pos} to position of block 2.5 meters above {_p}'s head
118 teleport loop-entity to {_pos}
119 teleport loop-entity to {auracage}
120 hide loop-entity to all players
121 kill loop-entity
122 stop
123 if {zac.lastauracheck.%{_p}%} doesn't exist:
124 set {zac.lastauracheck.%{_p}%} to now
125 hide loop-entity from all players
126 wait 1 tick
127 set {zac.kacheck.%{_p}%} to true
128 set {_pos} to position of block 3.2 meters above {_p}'s head
129 teleport loop-entity to {_pos}
130 reveal loop-entity to {_p}
131 wait 0.2 seconds
132 set {_pos} to position of block 2.7 meters above {_p}'s head
133 teleport loop-entity to {_pos}
134 wait 0.2 seconds
135 set {_pos} to position of block 2.5 meters above {_p}'s head
136 teleport loop-entity to {_pos}
137 wait 0.2 seconds
138 set {_pos} to position of block 2.5 meters above {_p}'s head
139 teleport loop-entity to {_pos}
140
141 wait 0.2 seconds
142 set {_pos} to position of block 2.5 meters above {_p}'s head
143 set {_posn} to position of block 1.5 meters north of {_pos}
144 teleport loop-entity to {_posn}
145 wait 0.2 seconds
146 set {_pos} to position of block 2.5 meters above {_p}'s head
147 set {_pose} to position of block 1.5 meters east of {_pos}
148 teleport loop-entity to {_pose}
149 wait 0.2 seconds
150 set {_pos} to position of block 2.5 meters above {_p}'s head
151 set {_poss} to position of block 1.5 meters south of {_pos}
152 teleport loop-entity to {_poss}
153 wait 0.2 seconds
154 set {_pos} to position of block 2.5 meters above {_p}'s head
155 set {_posw} to position of block 1.5 meters west of {_pos}
156 teleport loop-entity to {_posw}
157 wait 0.2 seconds
158 set {_pos} to position of block 2.5 meters above {_p}'s head
159 set {_posn} to position of block 1.5 meters north of {_pos}
160 teleport loop-entity to {_posn}
161 wait 0.2 seconds
162 set {_pos} to position of block 2.5 meters above {_p}'s head
163 teleport loop-entity to {_pos}
164 teleport loop-entity to {auracage}
165 hide loop-entity to all players
166 kill loop-entity
167 stop
168 #execute command "npc remove all"
169
170function auraCheckNorth(p: player):
171 delete {fuck.list::*}
172 add "ZAC" to {fuck.list::*}
173 set {_name} to a random element of {fuck.list::*}
174 create a citizen named "%{_name}%" at location of {auracage}
175 loop all entities:
176 loop 1 times:
177 "%name of loop-entity%" is "%{_name}%"
178 if loop-entity is not {_p}:
179 hide loop-entity from all players
180 wait 1 tick
181 set {zac.kacheck.%{_p}%} to true
182 set {_pos} to position of block 3.2 meters above {_p}'s head
183 teleport loop-entity to {_pos}
184 reveal loop-entity to {_p}
185 wait 0.2 seconds
186 set {_pos} to position of block 2.7 meters above {_p}'s head
187 teleport loop-entity to {_pos}
188 wait 0.2 seconds
189 set {_pos} to position of block 2.5 meters above {_p}'s head
190 teleport loop-entity to {_pos}
191 wait 0.2 seconds
192 set {_pos} to position of block 2.7 meters above {_p}'s head
193 teleport loop-entity to {_pos}
194
195 wait 0.2 seconds
196 set {_pos} to position of block 2.7 meters above {_p}'s head
197 set {_posn} to position of block 1.5 meters north of {_pos}
198 teleport loop-entity to {_posn}
199 wait 0.1 seconds
200 set {_pos} to position of block 2.5 meters above {_p}'s head
201 set {_posn} to position of block 1.1 meters north of {_pos}
202 set {_posne} to position of block 1 meters east of {_posn}
203 teleport loop-entity to {_posne}
204 wait 0.1 seconds
205 set {_pos} to position of block 2.7 meters above {_p}'s head
206 set {_posn} to position of block 1.1 meters north of {_pos}
207 set {_posne} to position of block 1.5 meters east of {_posn}
208 teleport loop-entity to {_posne}
209 wait 0.1 seconds
210 set {_pos} to position of block 2.3 meters above {_p}'s head
211 set {_posn} to position of block 1.1 meters north of {_pos}
212 set {_posne} to position of block 2 meters east of {_posn}
213 teleport loop-entity to {_posne}
214
215 wait 0.1 seconds
216 set {_pos} to position of block 2.3 meters above {_p}'s head
217 set {_posn} to position of block 1.1 meters north of {_pos}
218 teleport loop-entity to {_posn}
219 wait 0.1 seconds
220 set {_pos} to position of block 2.3 meters above {_p}'s head
221 set {_posn} to position of block 1.1 meters north of {_pos}
222 set {_posnw} to position of block 1 meters west of {_posn}
223 teleport loop-entity to {_posnw}
224 wait 0.1 seconds
225 set {_pos} to position of block 2.3 meters above {_p}'s head
226 set {_posn} to position of block 1.1 meters north of {_pos}
227 set {_posnw} to position of block 1.5 meters west of {_posn}
228 teleport loop-entity to {_posnw}
229 wait 0.1 seconds
230 set {_pos} to position of block 2.3 meters above {_p}'s head
231 set {_posn} to position of block 1.1 meters north of {_pos}
232 set {_posnw} to position of block 2 meters west of {_posn}
233 teleport loop-entity to {_posnw}
234 wait 0.1 seconds
235 set {_pos} to position of block 2.3 meters above {_p}'s head
236 set {_posn} to position of block 1.1 meters north of {_pos}
237 set {_posnw} to position of block 2 meters west of {_posn}
238 teleport loop-entity to {_posnw}
239 wait 0.1 seconds
240 set {_pos} to position of block 2.3 meters above {_p}'s head
241 set {_posn} to position of block 1.1 meters north of {_pos}
242 set {_posnw} to position of block 2 meters west of {_posn}
243 teleport loop-entity to {_posnw}
244 teleport loop-entity to {auracage}
245 hide loop-entity to all players
246 kill loop-entity
247
248function createFiles(n: number) :: number:
249 if folder "plugins/ZAC" doesn't exists:
250 create folder "plugins/ZAC"
251
252 create folder "plugins/ZAC/logs"
253
254 create folder "plugins/ZAC/logs/alerts"
255 if file "plugins/ZAC/config.yml" doesn't exists:
256 create file "plugins/ZAC/config.yml"
257 createConfig(1)
258 if folder "plugins/ZAC/logs" doesn't exists:
259
260 create folder "plugins/ZAC/logs"
261
262 if folder "plugins/ZAC/logs/alerts" doesn't exists:
263
264 create folder "plugins/ZAC/logs/alerts"
265
266 if file "plugins/ZAC/logs/alerts/Click.txt" doesn't exists:
267
268 create file "plugins/ZAC/logs/alerts/Click.txt"
269
270 if file "plugins/ZAC/judgement.txt" doesn't exists:
271
272 create file "plugins/ZAC/judgement.txt"
273
274 if file "plugins/ZAC/logs/history.txt" doesn't exists:
275
276 create file "plugins/ZAC/logs/history.txt"
277
278 if file "plugins/ZAC/logs/test.txt" doesn't exists:
279
280 create file "plugins/ZAC/logs/test.txt"
281
282 if file "plugins/ZAC/logs/alerts/Reach.txt" doesn't exists:
283
284 create file "plugins/ZAC/logs/alerts/Reach.txt"
285
286 if file "plugins/ZAC/logs/alerts/Knockback.txt" doesn't exists:
287
288 create file "plugins/ZAC/logs/alerts/Knockback.txt"
289
290 if file "plugins/ZAC/logs/alerts/Flight.txt" doesn't exists:
291
292 create file "plugins/ZAC/logs/alerts/Flight.txt"
293
294
295#function loadConfig(n: number) :: number:
296# set {_prefix} to yaml value "Config.Prefix" from "ZAC/config.yml"
297#
298# set {zac.config.prefix} to "%colored {_prefix}%"
299#
300# set {zac.config.judgementday} to yaml value "Config.Judgement-Day" from "ZAC/config.yml"
301#
302# set {zac.config.antikbdelay} to yaml value "Config.Anti-Knockback.Delay" from "ZAC/config.yml"
303#
304# set {zac.config.tempbantime} to yaml value "Config.Tempban-Time" from "ZAC/config.yml"
305
306function isTempBanned(p: player):
307 kick {_p} due to "&eZAC %nl% &cTemporarily banned for Unfair Advantage. %nl% %nl% Date: %{zac.tban.%{_p}%.date}% %nl% Time left: %{zac.tbantimer.%{_p}%}%"
308
309
310function loginHandler(p: player):
311 set {inspawn.%{_p}%} to {_p}'s location
312 set {zac.isSpeeding.%{_p}%} to 0
313 set {zac.didenderpearl.%{_p}%} to 0
314 set {zac.didwalkonjumppad.%{_p}%} to 0
315 set {zac.isFighting.%{_p}%} to 0
316 set {kbtimer.%{_p}%} to 0
317 set {zac.click.%{_p}%} to 0
318 set {logintimer.%{_p}%} to 30
319 set {zac.fastbow.%{_p}%} to 0
320 delete {zac.flighttest.%{_p}%}
321 set {lastmobauracheck.%{_p}%} to now
322
323 wait 30 seconds
324
325 set {logintimer.%{_p}%} to 0
326
327
328
329function saveInventory(p: player):
330 delete {zac.helmet.%{_p}%}
331 delete {zac.chestplate.%{_p}%}
332 delete {zac.leggings.%{_p}%}
333 delete {zac.boots.%{_p}%}
334 wait 1 tick
335 set {zac.inventory.%{_p}%} to serialized contents of {_p}'s inventory
336 set {zac.helmet.%{_p}%} to {_p}'s helmet
337 set {zac.chestplate.%{_p}%} to {_p}'s chestplate
338 set {zac.leggings.%{_p}%} to {_p}'s leggings
339 set {zac.boots.%{_p}%} to {_p}'s boots
340 wait 1 tick
341
342
343function restoreInventory(p: player):
344 clear inventory of {_p}
345 set {_p}'s inventory's serialized contents to {zac.inventory.%{_p}%}
346 set {_p}'s helmet to {zac.helmet.%{_p}%}
347 set {_p}'s chestplate to {zac.chestplate.%{_p}%}
348 set {_p}'s leggings to {zac.leggings.%{_p}%}
349 set {_p}'s boots to {zac.boots.%{_p}%}
350
351
352function quitHandler(p: player):
353 delete {zac.%{_p}%.alerts}
354 set {zac.click.%{_p}%} to 0
355# if {zac.staffmode.%{_p}%} is true:
356# restoreInventory(_p)
357# set {zac.staffmode.%{_p}%} to false
358
359
360function sendAlert(t: text):
361 loop all players:
362 if loop-player has permission "zac.mod":
363 if {zac.%loop-player%.alerts} is set:
364 send "%{_t}%" to loop-player
365
366
367function staffAlert(t: text):
368 loop all players:
369 if loop-player has permission "zac.mod":
370 send "%{_t}%" to loop-player
371
372
373function viewCPS(p: player, p2: player):
374 add {_p2} to {zac.cpslist.%{_p}%::*}
375 send "{@prefix} CPS enabled" to {_p}
376
377
378function clearViolations(p: player):
379 set {improbable.%{_p}%} to 0
380 set {possibleimprobable.%{_p}%} to 0
381 set {combinedimprobable.%{_p}%} to 0
382 set {reachcombined.%{_p}%} to 0
383 set {reachpossible.%{_p}%} to 0
384 set {reachimprobable.%{_p}%} to 0
385 set {knockback.%{_p}%} to 0
386 set {knockbackb.%{_p}%} to 0
387 set {zac.fly.%{_p}%} to 0
388 set {zac.speedA.%{_p}%} to 0
389 set {zac.killAuraA.%{_p}%} to 0
390 set {zac.killAuraB.%{_p}%} to 0
391 set {zac.jesus.%{_p}%} to 0
392 set {zac.glide.%{_p}%} to 0
393 set {zac.fastbow.%{_p}%} to 0
394 #send "{@prefix} Violations cleared for %{_p}%" to {_p}
395
396
397function viewViolations(p: player, p2: player):
398 send "{@prefix} &a%{_p2}%" to {_p}
399 if {improbable.%{_p2}%} > 0:
400 send "{@prefix} &aSwing SpeedA: %{improbable.%{_p2}%}%" to {_p}
401 if {possibleimprobable.%{_p2}%} > 0:
402 send "{@prefix} &aSwing SpeedB: %{possibleimprobable.%{_p2}%}%" to {_p}
403 if {combinedimprobable.%{_p2}%} > 0:
404 send "{@prefix} &aSwing SpeedC: %{combinedimprobable.%{_p2}%}%" to {_p}
405 if {reachimprobable.%{_p2}%} > 0:
406 send "{@prefix} &aReachA: %{reachimprobable.%{_p2}%}%" to {_p}
407 if {reachcombined.%{_p2}%} > 0:
408 send "{@prefix} &aReachB: %{reachcombined.%{_p2}%}%" to {_p}
409 if {reachpossible.%{_p2}%} > 0:
410 send "{@prefix} &aReachC: %{reachpossible.%{_p2}%}%" to {_p}
411 if {knockback.%{_p2}%} > 0:
412 send "{@prefix} &aKnockBackA: %{knockback.%{_p2}%}%" to {_p}
413 if {knockbackb.%{_p2}%} > 0:
414 send "{@prefix} &aKnockBackB: %{knockbackb.%{_p2}%}%" to {_p}
415 if {zac.fly.%{_p2}%} > 0:
416 send "{@prefix} &aFlyA: %{zac.fly.%{_p2}%}%" to {_p}
417 if {zac.speedA.%{_p2}%} > 0:
418 send "{@prefix} &aSpeedA: %{zac.speedA.%{_p2}%}%" to {_p}
419 if {zac.killAuraA.%{_p2}%} > 0:
420 send "{@prefix} &aKillAuraA: %{zac.killAuraA.%{_p2}%}%" to {_p}
421 if {zac.killauraB.%{_p2}%} > 0:
422 send "{@prefix} &aKillAuraB: %{zac.killauraB.%{_p2}%}%" to {_p}
423 if {zac.glide.%{_p2}%} > 0:
424 send "{@prefix} &aGlide: %{zac.glide.%{_p2}%}%" to {_p}
425 if {zac.fastbow.%{_p2}%} > 0:
426 send "{@prefix} &aFastBow: %{zac.fastbow.%{_p2}%}%" to {_p}
427
428
429function broadcast(t: text):
430 loop all players:
431 send "%{_t}%" to loop-player
432
433
434function saveViolations(p: player):
435 wf "[%now%] %{_p}% was ZAC banned. Improbable: %{improbable.%{_p}%}% Possible: %{possibleimprobable.%{_p}%}% Combined: %{combinedimprobable.%{_p}%}% ReachImprob: %{reachimprobable.%{_p}%}% ReachCombined: %{combinedimprobable.%{_p}%}% ReachPossible: %{possibleimprobable.%{_p}%}% KnockBackA: %{knockback.%{_p}%}% KnockBackB: %{knockbackb.%{_p}%}% FlyA: %{zac.fly.%{_p}%}% Speed: %{zac.speedA.%{_p}%}% Killaura: %{zac.killaura.%{_p}%}%" to "plugins/ZAC/logs/history.txt"
436 clearViolations({_p})
437
438function tempBan(p: player, t: text):
439 set {zac.tban.%{_p}%.date} to now
440 add 1 to {history.%{_p}%}
441 set {zac.tban.%{_p}%} to true
442 kick {_p} due to "[&eZAC&7] %nl% &cTemporarily banned for Unfair Advantage"
443 broadcast("{@prefix} &c%{_p}% was temporarily banned for Unfair Advantage")
444 add {_p} to {zac.tbanlist::*}
445 set {zac.tbantimer.%{_p}%} to {@tempbantime}
446 saveViolations({_p})
447 wf "[%now%] %{_p}% was banned for %{_t}%" to "plugins/ZAC/logs/history.txt"
448
449
450function unBan(p: offline player, p2: offline player):
451 if {zac.tban.%{_p2}%} is true:
452 set {zac.tban.%{_p2}%} to false
453 set {zac.tbantimer.%{_p2}%} to 0
454 clear {zac.tban.%{_p2}%.date}
455 staffAlert("{@prefix} &c%{_p2}% was unbanned by %{_p}%")
456 wf "[%now%] %{_p2}% was unbanned by %{_p}%." to "plugins/ZAC/logs/history.txt"
457
458function unBanConsole(p: offline player):
459 if {zac.tban.%{_p}%} is true:
460 set {zac.tban.%{_p}%} to false
461 set {zac.tbantimer.%{_p}%} to 0
462 clear {zac.tban.%{_p}%.date}
463 staffAlert("{@prefix} &c%{_p}% was unbanned by console")
464 wf "[%now%] %{_p2}% was unbanned by console." to "plugins/ZAC/logs/history.txt"
465
466function judgementAdd(p: offline player, t: text):
467 add {_p} to {judgementday.list::*}
468 wf "[%now%] %{_p}% added for %{_t}%" to "plugins/ZAC/judgement.txt"
469 set {judgementday.reason.%{_p}%} to "[%now%] %{_p}% added for %{_t}%"
470
471function judgementRemove(p: offline player):
472 remove {_p} from {judgementday.list::*}
473 wf "[%now%] %{_p}% removed" to "plugins/ZAC/judgement.txt"
474 clear {judgementday.reason.%{_p}%}
475
476function judgementBan(p: offline player):
477 set {zac.jban.%{_p}%.date} to "%now%"
478 set {zac.jban.%{_p}%} to true
479 kick {_p} due to "[&eZAC&7] %nl% &cJUDGEMENT DAY"
480 broadcast("{@prefix} %{_p}% &cwas purged from the server")
481
482function judgementView(p: player):
483 send "{@prefix} %{judgementday.list::*}%" to {_p}
484
485function judgementUnBan(p: player):
486 clear {zac.jban.%{_p}%.date}
487 clear {zac.jban.%{_p}%}
488 sendAlert("{@prefix} %{_p}% unbanned.")
489
490function judgementSelection(n: number) :: number:
491 loop {judgementday.list::*}:
492 set {_rp} to a random element of {judgementday.list::*}
493 if {zac.jban.%{_rp}%} is true:
494 remove {_rp} from {judgementday.list::*}
495 stop
496 judgementBan({_rp})
497
498
499function judgementDay(n: number) :: number:
500 set {_temp} to size of {judgementday.list::*}
501 loop {_temp} times:
502 wait 1 seconds
503 judgementSelection(1)
504 wait 4 seconds
505 add 1 to {_loop}
506 if {_loop} is {_temp}:
507 broadcast("{@prefix} &cJudgement Day over. Thank you everyone for participating.")
508
509
510function randomTP(p: player):
511 set {_randomperson.%{_p}%} to a random player out of all players
512
513 if {_randomperson.%{_p}%} is {_p}:
514
515 delete {_randomperson.%{_p}%}
516
517 set {_randomperson.%{_p}%} to a random player out of all players
518
519 teleport {_p} to {_randomperson.%{_p}%}
520 if {_lastperson.%{_p}%} is not {_randomperson.%{_p}%}:
521
522 teleport {_p} to {_randomperson.%{_p}%}
523
524 set {_lastperson.%{_p}%} to {_randomperson.%{_p}%}
525
526 delete {_randomperson.%{_p}%}
527
528 if {_lastperson.%{_p}%} is {_randomperson.%{_p}%}:
529
530 set {_randomperson.%{_p}%} to a random player out of all players
531
532 teleport {_p} to {_randomperson.%{_p}%}
533
534
535function zacSidespect(p: player, p2: player):
536 wipe {_p2}'s sidebar
537 set name of sidebar of {_p2} to "&a%{_p2}%"
538 loop 26 times:
539 if {_p2}'s gamemode is survival:
540 set score "&a%{_p2}%: &4%health of {_p2}%" in sidebar of {_p2} to 10
541 else:
542 set score "&a%{_p2}%: &4In Creative" in sidebar of {_p2} to 10
543
544 set score "&aPing: %{_p2}'s ping%" in sidebar of {_p2} to 9
545 set score "&aCPS: %{zac.click.%{_p2}%}%" in sidebar of {_p2} to 8
546 wait 1 second
547 wait 15 seconds
548 wipe {_p2}'s sidebar
549 stop
550
551function speedCheckA(p: player):
552 if {_p} is not flying:
553 if {_p}'s gamemode is not creative:
554 if {zac.didenderpearl.%{_p}%} < 1:
555 if {zac.didwalkonjumppad.%{_p}%} < 1:
556 #if {zac.isFighting.%{_p}%} < 1:
557 create a citizen named "%{_p}%1" at {auracage}
558 loop all entities:
559 loop 1 times:
560 "%name of loop-entity%" is "%{_p}%1"
561 hide loop-entity from all players
562 wait 1 second
563 loop all entities:
564 loop 1 times:
565 "%name of loop-entity%" is "%{_p}%1"
566 # hide loop-entity from all players
567 teleport loop-entity to location of {_p}
568 wait 0.5 second
569 set {_dis} to distance between {_p} and loop-entity
570 #execute command "npc remove all"
571
572 if {_p} is sneaking:
573 if {_dis} >= 2:
574 sendAlert("{@prefix} &a%{_p}% is moving fast while sneaking : &e%{_dis}%")
575 add 10 to {zac.isSpeeding.%{_p}%}
576 add 1 to {zac.speedA.%{_p}%}
577 teleport {_p} to loop-entity
578 kill loop-entity
579 stop
580 else:
581 kill loop-entity
582
583 if {_p} has swiftness:
584 if {_dis} >= 4.7:
585 sendAlert("{@prefix} &a%{_p}% is moving fast : &e%{_dis}%")
586 add 2 to {zac.speedA.%{_p}%}
587 add 10 to {zac.isSpeeding.%{_p}%}
588 teleport {_p} to loop-entity
589 kill loop-entity
590 stop
591 else:
592 kill loop-entity
593 else:
594 if {_dis} >= 4.3:
595 sendAlert("{@prefix} &a%{_p}% is moving fast : &e%{_dis}%")
596 add 5 to {zac.speedA.%{_p}%}
597 add 10 to {zac.isSpeeding.%{_p}%}
598 teleport {_p} to loop-entity
599 kill loop-entity
600 stop
601 else:
602 kill loop-entity
603
604function speedCheck2(p: player):
605 if {zac.speedDetect.%{_p}%} does not exist:
606 set {zac.speedDetect.%{_p}%} to location of {_p}
607 if {_p} is not flying:
608 if {_p}'s gamemode is not creative:
609 if {_p}'s walk speed is greater than 1:
610 stop
611 if {_p}'s walk speed is less than 2:
612 if {zac.didenderpearl.%{_p}%} < 1:
613 if {zac.didwalkonjumppad.%{_p}%} < 1:
614 if {zac.didusebow.%{_p}%} < 1:
615 set {zac.fly.x.%{_p}%} to the x location of {_p}
616 set {zac.fly.z.%{_p}%} to the z location of {_p}
617 set {_loc} to location of {_p}
618 wait 0.5 second
619 set {zac.fly.x2.%{_p}%} to the x location of {_p}
620 set {zac.fly.z2.%{_p}%} to the z location of {_p}
621 wait 1 tick
622 if difference between {zac.fly.x.%{_p}%} and {zac.fly.x2.%{_p}%} is greater than 4:
623 set {_distance} to difference between {zac.fly.x.%{_p}%} and {zac.fly.x2.%{_p}%}
624 if {_distance} > 4.7:
625 if {_distance} < 7.1:
626 sendAlert("{@prefix} &a%{_p}% is moving fast : &e%{_distance}% (&cVL %{zac.speedT.%{_p}%}%&a)")
627 add 5 to {zac.speedA.%{_p}%}
628 add 3 to {zac.speedT.%{_p}%}
629 teleport {_p} to {zac.speedDetect.%{_p}%}
630 set {zac.didwalkonjumppad.%{_p}%} to 0
631 stop
632 if {_distance} > 7:
633 sendAlert("{@prefix} &a%{_p}% is moving extremely fast : &e%{_distance}% (&cVL %{zac.speedT.%{_p}%}%&a)")
634 add 7 to {zac.speedA.%{_p}%}
635 add 5 to {zac.speedT.%{_p}%}
636 teleport {_p} to {zac.speedDetect.%{_p}%}
637 set {zac.didwalkonjumppad.%{_p}%} to 0
638 stop
639 if difference between {zac.fly.z.%{_p}%} and {zac.fly.z2.%{_p}%} is greater than 4:
640 set {_distance} to difference between {zac.fly.z.%{_p}%} and {zac.fly.z2.%{_p}%}
641 if {_distance} > 4.7:
642 if {_distance} < 7.1:
643 sendAlert("{@prefix} &a%{_p}% is moving fast : &e%{_distance}% (&cVL %{zac.speedT.%{_p}%}%&a)")
644 add 5 to {zac.speedA.%{_p}%}
645 add 3 to {zac.speedT.%{_p}%}
646 teleport {_p} to {zac.speedDetect.%{_p}%}
647 set {zac.didwalkonjumppad.%{_p}%} to 0
648 stop
649 if {_distance} > 7:
650 sendAlert("{@prefix} &a%{_p}% is moving extremely fast : &e%{_distance}% (&cVL %{zac.speedT.%{_p}%}%&a)")
651 add 7 to {zac.speedA.%{_p}%}
652 add 5 to {zac.speedT.%{_p}%}
653 teleport {_p} to {zac.speedDetect.%{_p}%}
654 set {zac.didwalkonjumppad.%{_p}%} to 0
655 stop
656
657function speedCheck(p: player):
658 if {_p} is not flying:
659 if {_p}'s gamemode is not creative:
660 #if {_p}'s walk speed is greater than 1:
661 # stop
662 #if {_p}'s walk speed is less than 2:
663 if {zac.didenderpearl.%{_p}%} < 1:
664 if {zac.didwalkonjumppad.%{_p}%} < 1:
665 if {zac.isFighting.%{_p}%} < 1:
666 if {zac.didusebow.%{_p}%} < 1:
667 set {zac.fly.x.%{_p}%} to the x location of {_p}
668 set {zac.fly.z.%{_p}%} to the z location of {_p}
669 set {_loc} to location of {_p}
670 wait 0.5 second
671 set {zac.fly.x2.%{_p}%} to the x location of {_p}
672 set {zac.fly.z2.%{_p}%} to the z location of {_p}
673 wait 1 tick
674 if difference between {zac.fly.x.%{_p}%} and {zac.fly.x2.%{_p}%} is greater than 4:
675 set {_distance} to difference between {zac.fly.x.%{_p}%} and {zac.fly.x2.%{_p}%}
676 if {_distance} > 4.6:
677 if {_distance} < 7.1:
678 #sendAlert("{@prefix} &a%{_p}% is moving fast : &e%{_distance}% (&cVL %{zac.speedT.%{_p}%}%&a)")
679 add 10 to {zac.isSpeeding.%{_p}%}
680 #add 1 to {zac.speedA.%{_p}%}
681 #teleport {_p} to {_loc}
682 #set {zac.didwalkonjumppad.%{_p}%} to 0
683 set {zac.failedspeed.%{_p}%} to true
684 stop
685 if {_distance} > 7:
686 #sendAlert("{@prefix} &a%{_p}% is moving extremely fast : &e%{_distance}% (&cVL %{zac.speedT.%{_p}%}%&a)")
687 add 10 to {zac.isSpeeding.%{_p}%}
688 #add 3 to {zac.speedA.%{_p}%}
689 #teleport {_p} to {_loc}
690 #set {zac.didwalkonjumppad.%{_p}%} to 0
691 set {zac.failedspeed.%{_p}%} to true
692 stop
693 if difference between {zac.fly.z.%{_p}%} and {zac.fly.z2.%{_p}%} is greater than 4:
694 set {_distance} to difference between {zac.fly.z.%{_p}%} and {zac.fly.z2.%{_p}%}
695 if {_distance} > 4.6:
696 if {_distance} < 7.1:
697 #sendAlert("{@prefix} &a%{_p}% is moving fast : &e%{_distance}%")
698 add 10 to {zac.isSpeeding.%{_p}%}
699 #add 1 to {zac.speedA.%{_p}%}
700 #teleport {_p} to {_loc}
701 #set {zac.didwalkonjumppad.%{_p}%} to 0
702 set {zac.failedspeed.%{_p}%} to true
703 stop
704 if {_distance} > 7:
705 #sendAlert("{@prefix} &a%{_p}% is moving extremely fast : &e%{_distance}%")
706 add 10 to {zac.isSpeeding.%{_p}%}
707 #add 3 to {zac.speedA.%{_p}%}
708 #teleport {_p} to {_loc}
709 #set {zac.didwalkonjumppad.%{_p}%} to 0
710 set {zac.failedspeed.%{_p}%} to true
711 stop
712
713
714#function zacInspect(p: player, p2: player):
715# open chest with 6 rows named "&aInspect > &e&l%{_p2}%" to {_p}
716# set {_test} to chest
717# open {_test} with 6 rows named "&aInspect > &e&l%{_p}%" to {_p}
718# set {_slot} to 0
719# loop 35 times:
720# set {zac.inspect.%{_p2}%.%{_slot}%} to slot {_slot} of {_p2}'s inventory
721# add 1 to {_slot}
722# set {_slot} to 0
723# set {_slotmenu} to 18
724# wait 1 tick
725# loop 35 times:
726# format slot {_slotmenu} of {_p} with {zac.inspect.%{_p2}%.%{_slot}%} to close
727# add 1 to {_slot}
728# add 1 to {_slotmenu}
729# #wait 1 tick
730# set {_health.%{_p2}%} to {_p2}'s health
731# set {hunger.%{_p2}%} to {_p2}'s hunger
732# set {armorview.helmet.%{_p2}%} to {_p2}'s helmet
733# set {armorview.chestplate.%{_p2}%} to {_p2}'s chestplate
734# set {armorview.leggings.%{_p2}%} to {_p2}'s leggings
735# set {armorview.boots.%{_p2}%} to {_p2}'s boots
736# if {_p2}'s gamemode is survival:
737# format slot 3 of {_test} with {_testvariable} named "&aArmor" with lore "&6%{armorview.helmet.%{_p2}%}%||&6%{armorview.chestplate.%{_p2}%}%||&6%{armorview.leggings.%{_p2}%}%||&6%{armorview.boots.%{_p2}%}%" to close
738# format slot 8 of {_p} with clock named "&aRefresh" to close then run [make {_p} execute command "zac inspect %{_p2}%"]
739# else:
740# format slot 3 of {_p} with iron chestplate named "&aArmor" with lore "&cIn Creative" to close
741# format slot 8 of {_p} with clock named "&aRefresh" to close then run [make {_p} execute command "zac inspect %{_p2}%"]
742# loop 26 times:
743# if {_p2}'s gamemode is survival:
744# format slot 4 of {_p} with {_p2}'s skull named "&aPlayer: %{_p2}%" with lore "&aHealth: &4%{_health.%{_p2}%}% â¤" to close
745# else:
746# format slot 4 of {_p} with {_p2}'s skull named "&a&n%{_p2}%" with lore "&4In Creative â¤" to close
747# if {_p2} is flying:
748# format slot 5 of {_p} with book named "&aInformation" with lore "&7[&e&lZAC&7] &5Ping: %{_p2}'s ping% &5Temp Bans: %{history.%{_p2}%}% Flying: true &7Click to view ZAC violations" to run [make {_p} execute command "zac info %{_p2}%"]
749# if {_p2} is not flying:
750# format slot 5 of {_p} with book named "&aInformation" with lore "&7[&e&lZAC&7] &5Ping: %{_p2}'s ping% &5Temp Bans: %{history.%{_p2}%}% Flying: false &7Click to view ZAC violations" to run [make {_p} execute command "zac info %{_p2}%"]
751# format slot 0 of {_p} with diamond sword named "&aClicks Per Second" with lore "%{zac.click.%{_p2}%}%" to close
752# wait 1 second
753
754
755function antiVPN(p: player):
756 set {_ip} to "%ip of {_p}%"
757 set {_info} to text from "http://legacy.iphub.info/api.php?ip=%{_ip}%&showtype=4"
758 set {_info::*} to {_info} split at ",""asn"":"
759 set {_info} to {_info::2}
760 replace all "}" with "" in {_info}
761 if {_info} contains "ARETI-AS" or "EGIHostings" or "EGIHosting" or "anchorfree" or "Netherlands" or "NFORCE" or "Leaseweb" or "M247" or "PLI-AS" or "HostUS" or "IOMART-AS" or "WideOpenWest" or "Choopa":
762 wf "[%now%] %{_p}% tried to join with IP %ip of {_p}%" to "plugins/ZAC/logs/history.txt"
763 kick {_p} due to "&7[&eZAC&7] &ckicked from the server. Try again without a VPN."
764 staffAlert("{@prefix} &a%{_p}% tried to join on a VPN")
765
766function toggleSpeed(n: number) :: number:
767 if {zac.lookfor.speed} is false:
768 set {zac.lookfor.speed} to true
769 set {speed.isEnabled} to true
770 stop
771 if {zac.lookfor.speed} is true:
772 set {zac.lookfor.speed} to false
773 set {speed.isEnabled} to false
774 stop
775 if {zac.lookfor.speed} doesn't exist:
776 set {zac.lookfor.speed} to true
777 set {speed.isEnabled} to true
778 stop
779
780function toggleKillAura(n: number) :: number:
781 if {zac.lookfor.killaura} is false:
782 set {zac.lookfor.killaura} to true
783 set {killaura.isEnabled} to true
784 stop
785 if {zac.lookfor.killaura} is true:
786 set {zac.lookfor.killaura} to false
787 set {killaura.isEnabled} to false
788 stop
789 if {zac.lookfor.killaura} doesn't exist:
790 set {zac.lookfor.killaura} to true
791 set {killaura.isEnabled} to true
792 stop
793
794function toggleFlight(n: number) :: number:
795 if {zac.lookfor.flight} is false:
796 set {zac.lookfor.flight} to true
797 stop
798 if {zac.lookfor.flight} is true:
799 set {zac.lookfor.flight} to false
800 stop
801 if {zac.lookfor.flight} doesn't exist:
802 set {zac.lookfor.flight} to true
803 stop
804
805function toggleReach(n: number) :: number:
806 if {zac.lookfor.reach} is false:
807 set {zac.lookfor.reach} to true
808 stop
809 if {zac.lookfor.reach} is true:
810 set {zac.lookfor.reach} to false
811 stop
812 if {zac.lookfor.reach} doesn't exist:
813 set {zac.lookfor.reach} to true
814 stop
815
816function adminCommand(p: player):
817 open chest with 3 rows named "&2ZAC > &2Admin-Panel" to {_p}
818 if {zac.lookfor.speed} doesn't exist:
819 set {zac.lookfor.speed} to true
820 if {zac.lookfor.flight} doesn't exist:
821 set {zac.lookfor.flight} to true
822 if {zac.lookfor.reach} doesn't exist:
823 set {zac.lookfor.reach} to true
824 if {zac.lookfor.speed} is true:
825 format slot 0 of {_p} with sugar named "&aSpeed Check" with lore "&7Speed Check: &2ON &7(click to turn off) debug: %{zac.lookfor.speed}%" to close then run [make {_p} execute command "zac toggle speed"]
826 if {zac.lookfor.speed} is false:
827 format slot 0 of {_p} with sugar named "&aSpeed Check" with lore "&7Speed Check: &cOFF &7(click to turn on) debug: %{zac.lookfor.speed}%" to close then run [make {_p} execute command "zac toggle speed"]
828 if {zac.lookfor.flight} is true:
829 format slot 2 of {_p} with feather named "&aFlight Check" with lore "&7Flight Check: &2ON &7(click to turn off) debug: %{zac.lookfor.flight}%" to close then run [make {_p} execute command "zac toggle flight"]
830 if {zac.lookfor.flight} is false:
831 format slot 2 of {_p} with feather named "&aFlight Check" with lore "&7Flight Check: &cOFF &7(click to turn on) debug: %{zac.lookfor.flight}%" to close then run [make {_p} execute command "zac toggle flight"]
832 if {zac.lookfor.reach} is true:
833 format slot 4 of {_p} with lead named "&aReach Check" with lore "&7Reach Check: &2ON &7(click to turn off) debug: %{zac.lookfor.reach}%" to close then run [make {_p} execute command "zac toggle reach"]
834 if {zac.lookfor.reach} is false:
835 format slot 4 of {_p} with lead named "&aReach Check" with lore "&7Reach Check: &cOFF &7(click to turn off) debug: %{zac.lookfor.reach}%" to close then run [make {_p} execute command "zac toggle reach"]
836
837function mainCommand(p: player):
838 open chest with 3 rows named "&2ZAC > &2Anti-Cheat" to {_p}
839 format slot 4 of {_p} with sunflower named "&2/zac admin" with lore "&7Opens admin panel" to close then run [make {_p} execute command "zac admincommand"]
840 format slot 9 of {_p} with book named "&2/zac info (player)" with lore "&7View a player's Violations" to close
841 format slot 11 of {_p} with redstone torch named "&2/zac alerts" with lore "&7Toggles on/off Violation alerts" to close
842 format slot 15 of {_p} with iron sword named "&2/zac cps (player)" with lore "&7View a player's live CPS, /zac cps, to toggle off" to close
843 format slot 17 of {_p} with paper named "&2/zac history (player)" with lore "&7View a player's tempban history" to close
844
845#-----Join Handlers-----
846on join:
847# antiVPN(player)
848 loginHandler(player)
849
850on connect:
851 if {zac.tban.%player%} is true:
852 #isTempBanned(player)
853 kick player due to "%nl% &8[&e&lZAC&r&8] %nl% &cTemporarily banned for Unfair Advantage. %nl% %nl% Date: %{zac.tban.%player%.date}% %nl% Time left: %{zac.tbantimer.%player%}%"
854 staffAlert("{@prefix} &c%player% tried to join but is C-Banned!")
855 if {zac.jban.%player%} is true:
856 kick player due to "%nl% &8[&e&lZAC&r&8] %nl% &cJudgement Day. %nl% %nl% Date: %{zac.jban.%player%.date}%"
857 staffAlert("{@prefix} &c%player% tried to join but is J-Banned!")
858
859on quit:
860 quitHandler(player)
861 if {zac.staffmode.%player%} is true:
862 restoreInventory(player)
863 set {zac.staffmode.%player%} to false
864
865on load:
866 if folder "plugins/ZAC" doesn't exists:
867 createFiles(1)
868 if file "plugins/ZAC/config.yml" doesn't exists:
869 createConfig(1)
870 set {killaura.isEnabled} to single value "Killaura" get of "plugins/ZAC/config.yml"
871 set {speed.isEnabled} to single value "Speed" get of "plugins/ZAC/config.yml"
872
873on death:
874 set {zac.didwalkonjumppad.%player%} to 7
875 if victim's name is "ZAC":
876 set death message to ""
877#-----Staffmode Handler-----
878
879on damage of player:
880 victim's name is "ZAC":
881 sendAlert("{@prefix} &a%victim% failed Kill aura check")
882 victim's name is "{@auraname}":
883 sendAlert("{@prefix} &a%victim% failed Kill aura check")
884
885on pick up:
886
887 if {zac.staffmode.%player%} is true:
888
889 cancel the event
890
891on damage:
892
893 if {zac.staffmode.%victim%} is true:
894
895 cancel the event
896
897 if {zac.staffmode.%attacker%} is true:
898
899 cancel the event
900
901on drop:
902
903 if {zac.staffmode.%player%} is true:
904
905 cancel the event
906
907on inventory click:
908
909 if {zac.staffmode.%player%} is true:
910
911 cancel the event
912
913on respawn:
914 if {zac.staffmode.%player%} is true:
915 restoreInventory(player)
916 set {zac.staffmode.%player%} to false
917
918on rightclick with stick:
919
920 if {zac.staffmode.%player%} is true:
921
922 targeted entity is a player
923
924 set {_target} to targeted entity
925
926 make player ride {_target}
927
928 send "{@prefix} &aYou are now riding &e%{_target}%" to player
929
930on rightclick with potato:
931
932 if {zac.staffmode.%player%} is true:
933
934 targeted entity is a player
935
936
937 set {_target} to targeted entity
938
939 make {_target} ride a saddled pig
940
941 set {_pig} to {_target}'s vehicle
942
943 #send "{@prefix} &aYou are now riding &e%{_target}%" to player
944
945# wait 5 ticks
946# while vehicle of {_target} is {_pig}:
947# change yaw of vehicle of {_target} to yaw of {_target}
948# change pitch of vehicle of {_target} to pitch of {_target}
949# wait 1 tick
950on leftclick with stick:
951
952 if {zac.staffmode.%player%} is true:
953
954 targeted entity is a player
955
956 set {_t.%player%} to targeted entity
957
958 push {_t.%player%} upwards at speed 3
959
960on rightclick with nether star:
961
962 if {zac.staffmode.%player%} is true:
963
964 execute player command "v"
965
966on rightclick with compass:
967
968 if {zac.staffmode.%player%} is true:
969
970 randomTP(player)
971
972on rightclick with book:
973
974 if {zac.staffmode.%player%} is true:
975 targeted entity is a player
976 set {_temp} to targeted entity
977 execute player command "zac info %{_temp}%"
978
979on rightclick with redstone block:
980
981 if {zac.staffmode.%player%} is true:
982 execute player command "zac staffmode off"
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021#-----AntiCheat-----
1022
1023
1024
1025#-----AutoClicker-----
1026
1027
1028on leftclick:
1029 if player is holding {@clickdetectitem}:
1030 add 1 to {zac.click.%player%}
1031on block damage:
1032 remove 1 from {zac.click.%player%}
1033every 1 second:
1034 loop all players:
1035 if {zac.click.%loop-player%} >= 15:
1036 if {zac.click.%loop-player%} < 20:
1037 wf "[%now%] %loop-player% clicked really fast : %{zac.click.%loop-player%}% | ping : %loop-player's ping% | tps : %tps%" to "plugins/ZAC/logs/alerts/Click.txt"
1038 sendAlert("{@prefix} &a%loop-player% clicked really fast : &e%{zac.click.%loop-player%}% (&cVL %{hackdetect.%loop-player%}%&a)")
1039 if loop-player's ping < 125:
1040 if tps > 17:
1041 add 5 to {improbable.%loop-player%}
1042 add 2 to {hackdetect.%loop-player%}
1043 if tps < 17:
1044 add 1 to {possibleimprobable.%loop-player%}
1045 if loop-player's ping > 125:
1046
1047 if tps > 17:
1048
1049 add 1 to {improbable.%loop-player%}
1050
1051 add 1 to {hackdetect.%loop-player%}
1052
1053 if tps < 17:
1054
1055 add 1 to {possibleimprobable.%loop-player%}
1056
1057 if {click.%loop-player%} > 19:
1058
1059 wf "[%now%] %loop-player% clicked extremely fast : %{zac.click.%loop-player%}% | ping : %loop-player's ping% | tps : %tps%" to "plugins/ZAC/logs/alerts/Click.txt"
1060
1061 sendAlert("{@prefix} &a%loop-player% clicked really fast : &e%{zac.click.%loop-player%}% (&cVL %{hackdetect.%loop-player%}%&a)")
1062
1063 if loop-player's ping < 125:
1064
1065 if tps > 17:
1066
1067 add 10 to {improbable.%loop-player%}
1068
1069 add 3 to {hackdetect.%loop-player%}
1070
1071 if tps < 17:
1072
1073 add 3 to {possibleimprobable.%loop-player%}
1074
1075 add 1 to {hackdetect.%loop-player%}
1076
1077 if loop-player's ping > 125:
1078
1079 if tps > 17:
1080
1081 add 5 to {improbable.%loop-player%}
1082
1083 add 2 to {hackdetect.%loop-player%}
1084
1085 if tps < 17:
1086
1087 add 3 to {possibleimprobable.%loop-player%}
1088
1089 add 1 to {hackdetect.%loop-player%}
1090
1091 if {click.%loop-player%} > 23:
1092
1093 add 1 to {combinedimprobable.%loop-player%}
1094
1095 add 1 to {hackdetect.%loop-player%}
1096
1097 if {hackdetect.%loop-player%} >= 10:
1098 judgementAdd(loop-player, "autoclicker")
1099 tempBan(loop-player, "AutoClicker")
1100 set {hackdetect.%loop-player%} to 0
1101
1102 if {combinedimprobable.%loop-player%} >= 5:
1103 judgementAdd(loop-player, "autoclicker")
1104 tempBan(loop-player, "AutoClicker")
1105 set {combinedimprobable.%loop-player%} to 0
1106 loop {zac.cpslist.%loop-player%::*}:
1107 set {_randomperson} to a random element of {zac.cpslist.%loop-player%::*}
1108 if {zac.click.%{_randomperson}%} > 0:
1109 send "&7%{_randomperson}% &8[&a%{zac.click.%{_randomperson}%}%&8]" to loop-player
1110 if {zac.isSpeeding.%loop-player%} > 0:
1111 remove 1 from {zac.isSpeeding.%loop-player%}
1112 speedCheck2(loop-player)
1113 if {zac.isSpeeding.%loop-player%} = 0:
1114 clear {zac.speedDetect.%loop-player%}
1115 delete {zac.speedDetect.%loop-player%}
1116 if {zac.isFighting.%loop-player%} > 0:
1117 remove 1 from {zac.isFighting.%loop-player%}
1118 if {zac.speedT.%loop-player%} >= 10:
1119 tempBan(loop-player, "Speed")
1120 set {zac.speedT.%loop-player%} to 0
1121#-Some timers
1122 if {zac.glide.%loop-player%.combined} > 0:
1123 remove 1 from {zac.glide.%loop-player%.combined}
1124 if {zac.glide.%loop-player%.combined} >= 30:
1125 set {zac.glide.%loop-player%.combined} to 0
1126 tempBan(loop-player, "Glide")
1127 judgementAdd(loop-player, "Glide")
1128 if {zac.multiaura.%loop-player%} >= 5:
1129 remove 5 from {zac.multiaura.%loop-player%}
1130 if {zac.mobaura.%loop-player%} >= 5:
1131 remove 5 from {zac.mobaura.%loop-player%}
1132 if {zac.didwalkonjumppad.%loop-player%} >= 1:
1133 remove 1 from {zac.didwalkonjumppad.%loop-player%}
1134 if {zac.didenderpearl.%loop-player%} >= 1:
1135 remove 1 from {zac.didenderpearl.%loop-player%}
1136 if {zac.flyA.%loop-player%} > 20:
1137 tempBan(loop-player, "Flight")
1138 judgementAdd(loop-player, "Flight")
1139 set {zac.flyA.%loop-player%} to 0
1140 if {zac.didusebow.%loop-player%} > 0:
1141 reduce {zac.didusebow.%loop-player%} by 1
1142 if {zac.glide.%loop-player%.failtimer} > 0:
1143 remove 1 from {zac.glide.%loop-player%.failtimer}
1144 if {zac.glide.%loop-player%.failtimer} = 0:
1145 clear {zac.glide.%loop-player%.lastloc}
1146 if {zac.killAuraB.%loop-player%.combined} >= 40:
1147 tempBan(loop-player, "KillAura")
1148 judgementAdd(loop-player, "KillAura")
1149 set {zac.killAuraB.%loop-player%.combined} to 0
1150 if {zac.multiaura.%loop-player%} >= 10:
1151 clear {zac.multiaura.%loop-player%}
1152 set {zac.click.%loop-player%} to 0
1153 loop {zac.tbanlist::*}:
1154 if {zac.tbantimer.%loop-value%} > 1 seconds:
1155 remove 1 seconds from {zac.tbantimer.%loop-value%}
1156 if {zac.tbantimer.%loop-value%} = 0 seconds:
1157 remove loop-value from {zac.tbanlist::*}
1158 unBanConsole(loop-value)
1159#-More timers
1160every 10 seconds:
1161 loop all players:
1162 if {zac.killAuraB.%loop-player%.combined} >= 20:
1163 remove 20 from {zac.killAuraB.%loop-player%.combined}
1164 if {zac.jesus.%loop-player%.combined} >= 1:
1165 remove 3 from {zac.jesus.%loop-player%.combined}
1166 if {zac.mobaura.%loop-player%} >= 1:
1167 clear {zac.mobaura.%loop-player%}
1168 if {zac.groundposition.%loop-player%} exists:
1169 clear {zac.groundposition.%loop-player%}
1170 if {zac.speedT.%loop-player%} >= 3:
1171 reduce {zac.speedT.%loop-player%} by 3
1172 if {zac.flyA.%loop-player%} >= 3:
1173 reduce {zac.flyA.%loop-player%} by 3
1174 if {zac.flyA.%loop-player%} < 0:
1175 set {zac.flyA.%loop-player%} to 0
1176 if {hackdetect.%loop-player%} > 0:
1177 reduce {hackdetect.%loop-player%} by 1
1178 if {reachdetect.%loop-player%} > 0:
1179 reduce {reachdetect.%loop-player%} by 1
1180 if {reachcombined.%loop-player%} > 0:
1181 reduce {reachcombined.%loop-player%} by 1
1182 if loop-player is alive:
1183 set {isalive.%loop-player%} to true
1184 if loop-player is not alive:
1185 set {isalive.%loop-player%} to false
1186 if {kbtimer.%loop-player%} > 0:
1187 reduce {kbtimer.%loop-player%} by 10
1188 if {zac.killauraA.%loop-player%} > 0:
1189 reduce {zac.killauraA.%loop-player%} by 1
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200#-----AntiKockBackA-----
1201
1202
1203on damage of a player:
1204
1205 if victim's gamemode is survival or adventure:
1206
1207 if damage was caused by fall:
1208
1209 stop
1210
1211 if damage was caused by potion:
1212
1213 stop
1214
1215 if block behind victim is not air:
1216
1217 stop
1218
1219 if attacker is a player:
1220
1221 set {_loc1} to location of victim
1222
1223 wait 10 ticks
1224
1225 set {_loc2} to location of victim
1226
1227 block at victim is not cobweb:
1228
1229 victim is not riding:
1230
1231 distance between {_loc1} and {_loc2} = 0:
1232
1233 if victim's ping < 125:
1234
1235 add 3 to {knockback.%victim%}
1236
1237 if {kbtimer.%victim%} is less than 1:
1238
1239 sendAlert("{@prefix} &a%victim% might be using Anti-knockback")
1240
1241 wf "[%now%] %victim% did not move in combat | ping : %victim's ping% | tps : %tps%" to "plugins/ZAC/logs/alerts/Knockback.txt"
1242
1243 add 10 to {kbtimer.%victim%}
1244
1245 if victim's ping > 125:
1246
1247 add 1 to {knockback.%victim%}
1248
1249 if {kbtimer.%victim%} is less than 1:
1250
1251 sendAlert("{@prefix} &a%victim% might be lagging or using anti-knockback")
1252
1253 wf "[%now%] %victim% did not move in combat | ping : %victim's ping% | tps : %tps%" to "plugins/ZAC/logs/alerts/Knockback.txt"
1254
1255 add 10 to {kbtimer.%victim%}
1256
1257
1258#-----AntiKnockbackB-----
1259
1260
1261#every 60 seconds:
1262# loop all players:
1263# {logintimer.%loop-player-1%} is less than 1
1264# {isalive.%loop-player%} is true
1265# set {_og%loop-player-1%} to location of loop-player-1
1266# {inspawn.%loop-player-1%} is not {_og%loop-player-1%}
1267# loop-player-1 is alive
1268# set {_1%loop-player-1%} to location of loop-player-1
1269# wait 7 tick
1270# set {_2%loop-player%} to location of loop-player-1
1271# {_1%loop-player-1%} is {_2%loop-player-1%}
1272# block north of loop-player-1 is air or long grass or double long grass or sign
1273# set {_a%loop-player-1%} to loop-player-1's location
1274# push loop-player-1 north at speed .1
1275# wait 3 tick
1276# set {_b%loop-player-1%} to loop-player-1's location
1277# wait 1 tick
1278# teleport loop-player-1 to {_a%loop-player%}
1279# if {_a%loop-player-1%} is {_b%loop-player%}:
1280# add .3 to z-coord of {_a%loop-player%}
1281# block at {_a%loop-player%} is not lava or cactus or fire
1282# teleport loop-player-1 to {_a%loop-player%}
1283# loop-player-1 is alive
1284# set {_1%loop-player-1%} to location of loop-player-1
1285# wait 7 tick
1286# set {_2%loop-player%} to location of loop-player-1
1287# {_1%loop-player-1%} is {_2%loop-player-1%}
1288# block north of loop-player-1 is air or long grass or double long grass or sign
1289# set {_a%loop-player-1%} to loop-player-1's location
1290# push loop-player-1 north at speed .1
1291# wait 3 tick
1292# set {_b%loop-player-1%} to loop-player-1's location
1293# wait 1 tick
1294# teleport loop-player-1 to {_a%loop-player%}
1295# if {_a%loop-player-1%} is {_b%loop-player%}:
1296# if loop-player-1's ping is less than 200:
1297# add loop-player-1 to {_hackerlist::*}
1298# add 3 to {knockbackb.%loop-player-1%}
1299# sendAlert("{@prefix} &a%loop-player-1% is lagging or using Anti-knockback")
1300# wf "[%now%] %loop-player-1% did not move during automated check | ping : %loop-player-1's ping% | tps : %tps%" to "plugins/ZAC/logs/alerts/Knockback.txt"
1301# teleport loop-player-1 to {_og%loop-player-1%}
1302#
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318#-----Reach-----
1319
1320on damage:
1321 if attacker is a player:
1322 if victim is a player:
1323 if attacker's gamemode is survival or adventure:
1324 damage wasn't caused by thorns or projectile:
1325 if {zac.staffmode.%victim%} is true:
1326 stop
1327 set {_dist.%attacker%} to distance between attacker and victim
1328 set {_ping} to attacker's ping
1329 if {_dist.%attacker%} is greater than 5.67:
1330 if {_ping} is greater than 350:
1331 add 1 to {reachpossible.%attacker%}
1332 sendAlert("{@prefix} &a%attacker% reached far or is lagging. Distance: &e%{_dist.%attacker%}%")
1333 wf "[%now%] %attacker% reached far or is lagging : %{_dist.%attacker%}% | ping : %attacker's ping% | tps : %tps%" to "plugins/ZAC/logs/alerts/Reach.txt"
1334 if {_ping} is less than 350:
1335 add 3 to {reachimprobable.%attacker%}
1336 add 1 to {reachdetect.%attacker%}
1337 sendAlert("{@prefix} &a%attacker% reached far. Distance: &e%{_dist.%attacker%}% (&cVL %{reachdetect.%attacker%}%&a)")
1338 wf "[%now%] %attacker% reached far : %{_dist.%attacker%}% | ping : %attacker's ping% | tps : %tps%" to "plugins/ZAC/logs/alerts/Reach.txt"
1339 if {_dist.%attacker%} is greater than 5.85:
1340 if {_ping} is greater than 350:
1341 add 3 to {reachpossible.%attacker%}
1342 if {_ping} is less than 350:
1343 add 1 to {reachcombined.%attacker%}
1344 add 2 to {reachdetect.%attacker%}
1345 if {reachcombined.%attacker%} > 10:
1346 tempBan(attacker, "Reach")
1347 judgementAdd(attacker, "reach")
1348 set {reachcombined.%attacker%} to 0
1349 if {reachdetect.%attacker%} >= 15:
1350 tempBan(attacker, "Reach")
1351 judgementAdd(attacker, "reach")
1352 set {reachdetect.%attacker%} to 0
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363#-----Flight-----
1364
1365
1366on any movement:
1367 block under player is not air:
1368 set {zac.originalposition.%player%} to player's position
1369 block under player is barrier or red carpet:
1370 if {zac.didwalkonjumppad.%player%} > 14:
1371 set {zac.didwalkonjumppad.%player%} to 2
1372 else:
1373 add 7 to {zac.didwalkonjumppad.%player%}
1374# block under player is slime block or stone pressure plate:
1375# if {zac.didwalkonjumppad.%player%} > 14:
1376# set {zac.didwalkonjumppad.%player%} to 2
1377# else:
1378# add 7 to {zac.didwalkonjumppad.%player%}
1379# block at player is slime block or stone pressure plate:
1380# if {zac.didwalkonjumppad.%player%} > 14:
1381# set {zac.didwalkonjumppad.%player%} to 2
1382# else:
1383# add 7 to {zac.didwalkonjumppad.%player%}
1384# block at player is stone slab or stair:
1385# if {zac.didwalkonjumppad.%player%} > 14:
1386# set {zac.didwalkonjumppad.%player%} to 2
1387# else:
1388# add 7 to {zac.didwalkonjumppad.%player%}
1389 block under player is stone brick stairs:
1390 if {zac.didwalkonjumppad.%player%} > 14:
1391 set {zac.didwalkonjumppad.%player%} to 2
1392 else:
1393 add 7 to {zac.didwalkonjumppad.%player%}
1394 block under player is stone slab:
1395 if {zac.didwalkonjumppad.%player%} > 14:
1396 set {zac.didwalkonjumppad.%player%} to 2
1397 else:
1398 add 7 to {zac.didwalkonjumppad.%player%}
1399 block under player is slab:
1400 if {zac.didwalkonjumppad.%player%} > 14:
1401 set {zac.didwalkonjumppad.%player%} to 2
1402 else:
1403 add 7 to {zac.didwalkonjumppad.%player%}
1404
1405# block under player is barrier or red carpet or slime block or stone pressure plate or slab or stair or stone slab or cobblestone wall or fence or stone brick stairs or stone stairs:
1406# if {zac.didwalkonjumppad.%player%} > 14:
1407# set {zac.didwalkonjumppad.%player%} to 2
1408# else:
1409# add 7 to {zac.didwalkonjumppad.%player%}
1410# block at player is slime block or stone pressure plate or slab or stair or cobblestone wall or fence or red carpetor stone brick stairs or stone stairs:
1411# if {zac.didwalkonjumppad.%player%} > 14:
1412# set {zac.didwalkonjumppad.%player%} to 2
1413# else:
1414# add 7 to {zac.didwalkonjumppad.%player%}
1415
1416 player's gamemode is not creative:
1417 if player's fly mode is not true:
1418 player does not have permission "zac.player":
1419 add 1 to {zac.player.flydetect}
1420 else:
1421 set {zac.ypos.%player%} to player's altitude
1422 set {_temporaryblockpos} to block at player
1423 set {_temporaryblockpos2} to block under {_temporaryblockpos}
1424 if {_temporaryblockpos2} is not air:
1425 set {zac.isflying.%player%} to false
1426 stop
1427 else:
1428 wait 2 ticks
1429 set {_temporaryblockpos} to block at player
1430 set {_temporaryblockpos2} to block under {_temporaryblockpos}
1431
1432 set {_northtempblock} to block north of {_temporaryblockpos2}
1433 set {_westtempblock} to block west of {_temporaryblockpos2}
1434 set {_southtempblock} to block south of {_temporaryblockpos2}
1435 set {_easttempblock} to block east of {_temporaryblockpos2}
1436 set {_northeastblock} to block east of {_northtempblock}
1437 set {_southeastblock} to block east of {_southtempblock}
1438 set {_northwestblock} to block west of {_northtempblock}
1439 set {_southwestblock} to block west of {_southtempblock}
1440 if {zac.didwalkonjumppad.%player%} < 1:
1441 if {_temporaryblockpos2} is air or sugar cane:
1442 if {_northtempblock} is not air:
1443 stop
1444 if {_easttempblock} is not air:
1445 stop
1446 if {_southtempblock} is not air:
1447 stop
1448 if {_westtempblock} is not air:
1449 stop
1450 if {_northeastblock} is not air:
1451 stop
1452 if {_northwestblock} is not air:
1453 stop
1454 if {_southeastblock} is not air:
1455 stop
1456 if {_southwestblock} is not air:
1457 stop
1458 if {zac.didwalkonjumppad.%player%} < 1:
1459 if {zac.isFighting.%player%} < 1:
1460 if {zac.didenderpearl.%player%} < 1:
1461 if {zac.didusebow.%player%} < 1:
1462 if {zac.failedspeed.%player%} is not set:
1463 if {zac.ypos.%player%} is less than or equal to player's altitude:
1464 wait 3 ticks
1465 if {zac.ypos.%player%} is less than or equal to player's altitude:
1466 set {_temporaryblockpos} to block at player
1467 set {_temporaryblockpos2} to block under {_temporaryblockpos}
1468 if {_temporaryblockpos2} is air or sugar cane:
1469 wait 3 ticks
1470 if {zac.ypos.%player%} is less than or equal to player's altitude:
1471 wait 3 ticks
1472 if {zac.ypos.%player%} is less than or equal to player's altitude:
1473 set {_temporaryblockpos} to block at player
1474 set {_temporaryblockpos2} to block under {_temporaryblockpos}
1475 set {_distance} to difference between {zac.ypos.%player%} and player's altitude
1476 if {_temporaryblockpos2} is air or sugar cane:
1477 set {zac.isflying.%player%} to true
1478 sendAlert("{@prefix} &a%player% flew or jumped very high : &e %{_distance}% (&cVL %{zac.flyA.%player%}%&a)")
1479 wf "[%now%] %player% flew or jumped very high : %{_distance}%" to "plugins/ZAC/logs/alerts/Flight.txt"
1480 add 1 to {zac.fly.%player%}
1481 add 4 to {zac.flyA.%player%}
1482 delete {zac.player.flydetect}
1483 else:
1484 set {zac.isflying.%player%} to false
1485
1486 if {zac.isflying.%player%} is true:
1487 if {zac.originalposition.%player%} is set:
1488 teleport player to {zac.originalposition.%player%}
1489 else:
1490 loop blocks under player:
1491 player is not flying:
1492 loop-block is not air:
1493 block above loop-block is air:
1494 teleport player to loop-block
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514#-----Speed-----
1515on rightclick:
1516 player's tool is a enderpearl:
1517 if {zac.didenderpearl.%player%} > 7:
1518 set {zac.didenderpearl.%player%} to 2
1519 else:
1520 add 3 to {zac.didenderpearl.%player%}
1521#on world change:
1522# if {zac.didwalkonjumppad.%player%} > 14:
1523# set {zac.didwalkonjumppad.%player%} to 2
1524# else:
1525# add 7 to {zac.didwalkonjumppad.%player%}
1526on death of player:
1527 if {zac.didwalkonjumppad.%victim%} > 14:
1528 set {zac.didwalkonjumppad.%victim%} to 2
1529 else:
1530 add 7 to {zac.didwalkonjumppad.%victim%}
1531on teleport:
1532 if {zac.didwalkonjumppad.%player%} > 14:
1533 set {zac.didwalkonjumppad.%player%} to 2
1534 else:
1535 add 7 to {zac.didwalkonjumppad.%player%}
1536every 2 seconds:
1537 loop all players:
1538 speedCheck(loop-player)
1539every 30 seconds:
1540 execute command "npc remove all"
1541on damage:
1542 if attacker is a player:
1543 if victim is a player:
1544 if attacker's gamemode is survival or adventure:
1545 damage wasn't caused by thorns or projectile:
1546 if tool of the attacker is enchanted with knockback 2:
1547 if {zac.isFighting.%victim%} = 0:
1548 add 5 to {zac.isFighting.%victim%}
1549 if tool of the attacker is enchanted with knockback 1:
1550 if {zac.isFighting.%victim%} = 0:
1551 add 5 to {zac.isFighting.%victim%}
1552 else:
1553 if {zac.isFighting.%victim%} = 0:
1554 add 4 to {zac.isFighting.%victim%}
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576#-----FastBow-----
1577
1578#-Synd-1.2
1579on shoot:
1580 if projectile is an arrow:
1581 if difference between {lastshoot.%shooter%} and now is less than 0.1 seconds:
1582 if tps is more than 19:
1583 if shooter's ping is less than 250:
1584 set {lastshoot.%shooter%} to now
1585 add 1 to {zac.fastbow.%shooter%}
1586 sendAlert("{@prefix} &a%shooter% tried to shoot very fast!")
1587 if {zac.fastbow.%shooter%} >= 5:
1588 tempBan(shooter, "FastBow")
1589 judgementAdd(shooter, "Fastbow")
1590 set {lastshoot.%shooter%} to now
1591every minutes:
1592 loop all players:
1593 if {zac.fastbow.%loop-player%} >= 1:
1594 remove 1 from {zac.fastbow.%loop-player%}
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604#-bowaimbot Testing
1605#on left click:
1606# set {yaw.%player%} to player's yaw
1607# set {pitch.%player%} to player's pitch
1608# send "%{yaw.%player%}% %{pitch.%player%}%" to player
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632#-KillAura Testing
1633on damage:
1634 attacker is a player:
1635 victim is a player:
1636# if {killaura.isEnabled} is true:
1637 if {@killaura} is true:
1638 if {zac.lastauracheck.attacker} is not set:
1639 set {zac.lastauracheck.attacker} to now
1640 chance of 20:
1641 auraCheck(attacker)
1642
1643on npc left click:
1644 set {_target} to targeted entity
1645 if {_target} is "{@auraname}":
1646 kill targeted entity
1647 hide targeted entity to player
1648 add 1 to {zac.killAuraA.%player%}
1649 add 3 to {zac.killAuraA.%player%.combined}
1650 sendAlert("{@prefix} &a%player% failed Kill Aura check (&cVL %{zac.killAuraA.%player%.combined}%&a)")
1651 if {zac.killAuraA.%player%.combined} >= 15:
1652 set {zac.killAuraA.%player%.combined} to 0
1653 tempBan(player, "Killaura")
1654 judgementAdd(player, "Killaura")
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673#-----Jesus Testing-----
1674on any move:
1675 player is not flying
1676 gamemode of player is survival
1677 set {_1stblock} to block under player
1678 if {_1stblock} is water:
1679 wait 5 ticks
1680 set {_blockatfeet} to block at player
1681 set {_nblock} to block north of {_1stblock}
1682 set {_wblock} to block west of {_1stblock}
1683 set {_eblock} to block east of {_1stblock}
1684 set {_sblock} to block south of {_1stblock}
1685 set {_neblock} to block east of {_nblock}
1686 set {_nwblock} to block west of {_nblock}
1687 set {_swblock} to block west of {_sblock}
1688 set {_seblock} to block east of {_sblock}
1689 if {_blockatfeet} is air:
1690 if {_nblock} is water:
1691 if {_eblock} is water:
1692 if {_sblock} is water:
1693 if {_wblock} is water:
1694 if {_neblock} is water:
1695 if {_nwblock} is water:
1696 if {_swblock} is water:
1697 if {_seblock} is water:
1698 teleport player to {_1stblock}
1699 add 1 to {zac.jesus.%player%}
1700 add 3 to {zac.jesus.%player%.combined}
1701 set {zac.failedjesus.%player%} to true
1702 sendAlert("{@prefix} &a%player% walked on water (&eVL %{zac.jesus.%player%.combined}%&a)")
1703 if {zac.jesus.%player%.combined} > 15:
1704 set {zac.jesus.%player%.combined} to 0
1705 tempBan(player, "Jesus")
1706 judgementAdd(player, "Jesus")
1707
1708on any move:
1709 if {zac.failedglide.%player%} is set:
1710 cancel event
1711 wait 20 ticks
1712 clear {zac.failedglide.%player%}
1713 stop
1714 if {zac.failedjesus.%player%} is set:
1715 cancel event
1716 wait 20 ticks
1717 clear {zac.failedjesus.%player%}
1718 stop
1719 if {zac.failedspeed.%player%} is set:
1720 cancel event
1721 wait 20 ticks
1722 clear {zac.failedspeed.%player%}
1723 stop
1724 if {zac.failedflight.%player%} is set:
1725 cancel event
1726 wait 20 ticks
1727 clear {zac.failedflight.%player%}
1728 stop
1729#--flight 2 test---
1730#on any move:
1731# set {_1stblock} to block at player
1732# set {_1stloc} to y coordinate of player
1733# if {_1stblock} is air:
1734# wait 5 ticks
1735# set {_2ndblock} to block under player
1736# if {_2ndblock} is air:
1737# set {_2ndloc} to y coordinate of player
1738# if {_2ndloc} > {_1stloc}:
1739# set {_test} to difference between {_2ndloc} and {_1stloc}
1740# player is not flying
1741# gamemode of player is survival
1742# if {zac.isFighting.%player%} is less than or equal to 0:
1743# if {zac.didwalkonjumppad.%player%} is less than or equal to 0:
1744# if {zac.didenderpearl.%player%} is less than or equal to 0:
1745# if {zac.didusebow.%player%} is less than or equal to 0:
1746# if player has jump boost:
1747# if {_test} > 2.4:
1748# loop blocks under player:
1749# player is not flying:
1750# loop-block is not air:
1751# block above loop-block is air:
1752# set {zac.failedflight.%player%} to true
1753# set {_block} to block above loop-block
1754# teleport player to {_block}
1755# send "%{_test}% flight2" to player
1756# stop
1757# else:
1758# if {_test} > 2.4:
1759# if {zac.groundposition.%player%} doesn't exist:
1760# loop blocks under player:
1761# player is not flying:
1762# loop-block is not air:
1763# block above loop-block is air:
1764# set {_block} to location of block above loop-block
1765# teleport player to {_block}
1766# set {zac.groundposition.%player%} to player's location
1767# send "%{_test}% flight2" to player
1768# stop
1769# if {zac.groundposition.%player%} exists:
1770# teleport player to {zac.groundposition.%player%}
1771# send "%{_test}%" to player
1772# stop
1773
1774
1775on damage:
1776 if damage was caused by projectile:
1777 projectile is arrow:
1778 attacker is victim:
1779 set {zac.didusebow.%victim%} to 3
1780
1781
1782
1783
1784#-Multi Aura Testing
1785
1786#on damage:
1787# if attacker is a player:
1788# if attacker is holding {@clickdetectitem}:
1789# if victim is not a player:
1790# add 1 to {zac.mobaura.%attacker%}
1791# if {zac.mobaura.%attacker%} >= 20:
1792# if difference between {lastmobauracheck.%attacker%} and now is greater than 5 seconds:
1793# set {lastmobauracheck.%attacker%} to now
1794# add 1 to {zac.killAuraB.%attacker%}
1795# add 3 to {zac.killAuraB.%attacker%.combined}
1796# sendAlert("{@prefix} &a%attacker% hit multiple entities: &e%{zac.mobaura.%attacker%}% &a(&eVL %{zac.killAuraB.%attacker%.combined}%")
1797# if victim is a player:
1798# add 1 to {zac.multiaura.%attacker%}
1799# if {zac.multiaura.%attacker%} >= 20:
1800# add 1 to {zac.killAuraB.%attacker%}
1801# add 3 to {zac.killAuraB.%attacker%.combined}
1802# sendAlert("{@prefix} &a%attacker% hit multiple entities: &e%{zac.multiaura.%attacker%}% &a(&eVL %{zac.killAuraB.%attacker%.combined}%")
1803
1804
1805
1806
1807#-Glide Testing
1808#on damage:
1809# victim is a player:
1810# set {zac.glide.%victim%.lastloc} to victim's location
1811# set {zac.glide.%victim%.failtimer} to 5
1812#on any movement:
1813# if player's gamemode is survival:
1814# if player is not flying:
1815# if {zac.isFighting.%player%} is less than or equal to 0:
1816# set {_block} to block under player
1817# set {_y1} to y coordinate of player
1818# set {_1stloc} to location of player
1819# set {_blockatfeet} to block at player
1820# if {_block} is air:
1821# if {_blockatfeet} is air:
1822# wait 5 ticks
1823# set {_block2} to block under player
1824# set {_nblock} to block north of {_block2}
1825# set {_wblock} to block west of {_block2}
1826# set {_eblock} to block east of {_block2}
1827# set {_sblock} to block south of {_block2}
1828# set {_neblock} to block east of {_nblock}
1829# set {_nwblock} to block west of {_nblock}
1830# set {_swblock} to block west of {_sblock}
1831# set {_seblock} to block east of {_sblock}
1832#
1833# set {_y2} to y coordinate of player
1834# set {_2ndloc} to location of player
1835# if {_block2} is air:
1836# if {_nblock} is air:
1837# if {_sblock} is air:
1838# if {_wblock} is air:
1839# if {_neblock} is air:
1840# if {_nwblock} is air:
1841# if {_swblock} is air:
1842# if {_seblock} is air:
1843# if {_y2} is less than {_y1}:
1844# set {_difference} to difference between {_y2} and {_y1}
1845# if player has jump boost:
1846# if {_difference} > 0.10:
1847# if {_difference} < 0.27:
1848# if {zac.glide.%player%.checkfor} is set:
1849# if {zac.glide.%player%.lastloc} is set:
1850# teleport player to {zac.glide.%player%.lastloc}
1851# set {zac.failedglide.%player%} to true
1852# if player's ping < 125:
1853# add 1 to {zac.glide.%player%}
1854# add 3 to {zac.glide.%player%.combined}
1855# sendAlert("{@prefix} &a%player% failed glide check: &e%{_difference}% &a(&eVL %{zac.glide.%player%.combined}%&a)")
1856# if player's ping > 125:
1857# add 1 to {zac.glide.%player%}
1858# add 2 to {zac.glide.%player%.combined}
1859# sendAlert("{@prefix} &a%player% failed glide check: &e%{_difference}% &a(&eVL %{zac.glide.%player%.combined}%&a)")
1860# if {zac.glide.%player%.lastloc} is not set:
1861# set {zac.failedglide.%player%} to true
1862# if player's ping < 125:
1863# add 1 to {zac.glide.%player%}
1864# add 3 to {zac.glide.%player%.combined}
1865# sendAlert("{@prefix} &a%player% failed glide check: &e%{_difference}% &a(&eVL %{zac.glide.%player%.combined}%&a)")
1866# if player's ping > 125:
1867# add 1 to {zac.glide.%player%}
1868# add 2 to {zac.glide.%player%.combined}
1869# sendAlert("{@prefix} &a%player% failed glide check: &e%{_difference}% &a(&eVL %{zac.glide.%player%.combined}%&a)")
1870# stop
1871#
1872# if {zac.glide.%player%.checkfor} doesn't exist:
1873# if {zac.glide.%player%.lastloc} is set:
1874# teleport player to {zac.glide.%player%.lastloc}
1875# set {zac.failedglide.%player%} to true
1876# set {zac.glide.%player%.checkfor} to true
1877# if {zac.glide.%player%.lastloc} is not set:
1878# set {zac.failedglide.%player%} to true
1879# set {zac.glide.%player%.checkfor} to true
1880# stop
1881# else if {_difference} > 0.10:
1882# if {_difference} < 0.35:
1883# if {zac.glide.%player%.lastloc} is set:
1884# teleport player to {zac.glide.%player%.lastloc}
1885# set {zac.failedglide.%player%} to true
1886# if player's ping < 125:
1887# add 1 to {zac.glide.%player%}
1888# add 3 to {zac.glide.%player%.combined}
1889# sendAlert("{@prefix} &a%player% failed glide check: &e%{_difference}% &a(&eVL %{zac.glide.%player%.combined}%&a)")
1890# if player's ping > 125:
1891# add 1 to {zac.glide.%player%}
1892# add 2 to {zac.glide.%player%.combined}
1893# sendAlert("{@prefix} &a%player% failed glide check: &e%{_difference}% &a(&eVL %{zac.glide.%player%.combined}%&a)")
1894# if {zac.glide.%player%.lastloc} is not set:
1895# set {zac.failedglide.%player%} to true
1896# if player's ping < 125:
1897# add 1 to {zac.glide.%player%}
1898# add 3 to {zac.glide.%player%.combined}
1899# sendAlert("{@prefix} &a%player% failed glide check: &e%{_difference}% &a(&eVL %{zac.glide.%player%.combined}%&a)")
1900# if player's ping > 125:
1901# add 1 to {zac.glide.%player%}
1902# add 2 to {zac.glide.%player%.combined}
1903# sendAlert("{@prefix} &a%player% failed glide check: &e%{_difference}% &a(&eVL %{zac.glide.%player%.combined}%&a)")
1904
1905
1906
1907
1908
1909
1910#-TriggerBot Test:
1911on damage of player:
1912 attacker is a player:
1913 set {zac.triggerbot.%attacker%.checkforclicks} to true
1914 add 1 to {zac.triggerbot.%attacker%.hits}
1915on left click with {@clickdetectitem}:
1916 if {zac.triggerbot.%player%.checkforclicks} is set:
1917 add 1 to {zac.triggerbot.%player%.clicks}
1918 wait 5 seconds
1919 clear {zac.triggerbot.%player%.checkforclicks}
1920
1921every 2 seconds:
1922 loop all players:
1923 if {zac.triggerbot.%loop-player%.failed} >= 50:
1924 # send "test" to loop-player
1925 clear {zac.triggerbot.%loop-player%.failed}
1926 if {lastdif.%loop-player%} is less than or equal to 3:
1927 set {_dif} to difference between {zac.triggerbot.%loop-player%.hits} and {zac.triggerbot.%loop-player%.clicks}
1928 if {_dif} is less than or equal to 3:
1929 set {lastdif.%loop-player%} to {_dif}
1930 if {lastdif.%loop-player%} is 0:
1931 stop
1932 if {zac.triggerbot.%loop-player%.clicks} doesn't exist:
1933 stop
1934 if {zac.triggerbot.%loop-player%.hits} doesn't exist:
1935 stop
1936 add 10 to {zac.triggerbot.%loop-player%.failed}
1937 # send "hits2: %{zac.triggerbot.%loop-player%.hits}% clicks: %{zac.triggerbot.%loop-player%.clicks}% VL: %{zac.triggerbot.%loop-player%.failed}%" to loop-player
1938 clear {lastdif.%loop-player%}
1939 stop
1940 if {lastdif.%loop-player%} is not set:
1941 set {_dif} to difference between {zac.triggerbot.%loop-player%.hits} and {zac.triggerbot.%loop-player%.clicks}
1942 if {_dif} is less than or equal to 3:
1943 set {lastdif.%loop-player%} to {_dif}
1944 # send "hits: %{zac.triggerbot.%loop-player%.hits}% clicks: %{zac.triggerbot.%loop-player%.clicks}%" to loop-player
1945 clear {zac.triggerbot.%loop-player%.hits}
1946 clear {zac.triggerbot.%loop-player%.clicks}
1947
1948every 10 seconds:
1949 loop all players:
1950 if {zac.triggerbot.%loop-player%.failed} > 2:
1951 remove 2 from {zac.triggerbot.%loop-player%.failed}
1952
1953
1954
1955
1956
1957
1958function southEastCheck(a: player, v: player, sxd: text, szd: text, ya: text):
1959 if {_sxd} > 0:
1960 if {_szd} > 0:
1961
1962
1963 if {_sxd} < 2:
1964 if {_szd} < 2:
1965 if {_ya} >= 270:
1966 if {_ya} <= 360:
1967 stop
1968 else:
1969 send "&1test Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
1970 stop
1971 if {_szd} >= 2:
1972 if {_szd} < 3:
1973 if {_ya} >= 313.5:
1974 if {_ya} <= 360:
1975 stop
1976 else:
1977 send "&4test Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
1978 stop
1979 if {_szd} >= 3:
1980 if {_ya} >= 324.5:
1981 if {_ya} < 360:
1982 stop
1983 else:
1984 send "&2test Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
1985 stop
1986
1987 if {_sxd} >= 2:
1988 if {_sxd} < 3:
1989 if {_szd} >=2:
1990 if {_szd} < 3:
1991 if {_ya} >= 300:
1992 if {_ya} <= 330:
1993 stop
1994 else:
1995 send "&0test Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
1996 stop
1997 else:
1998 send "&0test Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
1999 stop
2000
2001 if {_szd} < 2:
2002 if {_ya} >= 273:
2003 if {_ya} <= 322.5:
2004 stop
2005 else:
2006 send "&etest Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
2007 stop
2008 else:
2009 send "&etest Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
2010 stop
2011 if {_sxd} >= 3:
2012 if {_szd} < 2:
2013 if {_ya} >= 273:
2014 if {_ya} <= 308:
2015 stop
2016 else:
2017 send "&dtest Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
2018 stop
2019 else:
2020 send "&dtest Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
2021 stop
2022 if {_szd} >= 2:
2023 if {_szd} >= 3:
2024 if {_ya} >= 313:
2025 if {_ya} <= 336:
2026 stop
2027 else:
2028 send "&6test Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
2029 stop
2030 else:
2031 send "&6test Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
2032 stop
2033
2034 if {_szd} < 3:
2035 if {_ya} >= 292:
2036 if {_ya} <= 318:
2037 stop
2038 else:
2039 send "&7test Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
2040 stop
2041 else:
2042 send "&7test Yaw2: %yaw of {_a}% Pitch2: %pitch of {_a}%" to {_a}
2043 stop
2044
2045#-KillAuraC
2046#on left click with {@clickdetectitem}:
2047# send "Yaw: %yaw of player% Pitch: %pitch of player%" to player
2048
2049#on damage of player:
2050# attacker is a player:
2051# send "Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2052
2053#on damage of player:
2054# attacker is a player:
2055# damage wasn't caused by thorns or projectile:
2056# set {_xcoordattacker} to attacker's x coordinate
2057# set {_xcoordvictim} to victim's x coordinate
2058# set {_zcoordattacker} to attacker's z coordinate
2059# set {_zcoordvictim} to victim's z coordinate
2060# set {_ya} to attacker's yaw
2061# if {_xcoordattacker} < {_xcoordvictim}:
2062# if {_zcoordattacker} < {_zcoordvictim}:
2063# #southeast--------------------------------------
2064# set {_tempxattacker} to {_xcoordattacker}
2065# set {_tempxvictim} to {_xcoordvictim}
2066#
2067# set {_tempzattacker} to {_zcoordattacker}
2068# set {_tempzvictim} to {_zcoordvictim}
2069#
2070# remove {_tempxattacker} from {_tempxvictim}
2071# remove {_tempzattacker} from {_tempzvictim}
2072#
2073# set {_southeastxdistance} to {_tempxvictim}
2074# set {_southeastzdistance} to {_tempzvictim}
2075# if {_southeastxdistance} > 0:
2076# if {_southeastzdistance} > 0:
2077# if {_southeastxdistance} < 2:
2078# if {_southeastzdistance} < 2:
2079# if {_southxdistance} >= 0.2:
2080# if {_southzdistance} >= 0.2:
2081# if {_ya} >= 270:
2082# if {_ya} <= 360:
2083# stop
2084# else:
2085# send "&1test Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2086# stop
2087# if {_southeastzdistance} >= 2:
2088# if {_southeastzdistance} < 3:
2089# if {_ya} >= 313.5:
2090# if {_ya} <= 360:
2091# stop
2092# else:
2093# send "&4test Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2094# stop
2095# if {_southeastzdistance} >= 3:
2096# if {_ya} >= 324.5:
2097# if {_ya} < 360:
2098# stop
2099# else:
2100# send "&2test Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2101# stop
2102#
2103# if {_southeastxdistance} >= 2:
2104# if {_southeastxdistance} < 3:
2105# if {_southeastzdistance} >=2:
2106# if {_southeastzdistance} < 3:
2107# if {_ya} >= 300:
2108# if {_ya} <= 330:
2109# stop
2110# else:
2111# send "&0test Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2112# stop
2113# else:
2114# send "&0test Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2115# stop
2116#
2117# if {_southeastzdistance} < 2:
2118# if {_ya} >= 273:
2119# if {_ya} <= 322.5:
2120# stop
2121# else:
2122# send "&etest Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2123# stop
2124# else:
2125# send "&etest Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2126# stop
2127# if {_southeastxdistance} >= 3:
2128# if {_southeastzdistance} < 2:
2129# if {_southeastzdistance} > 1:
2130# if {_ya} >= 280:
2131# if {_ya} <= 308:
2132# stop
2133# else:
2134# send "&dtest Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2135# stop
2136# else:
2137# send "&dtest Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2138# stop
2139# if {_southeastzdistance} >= 2:
2140# if {_southeastzdistance} >= 3:
2141# if {_ya} >= 313:
2142# if {_ya} <= 334:
2143# stop
2144# else:
2145# send "&6test Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2146# stop
2147# else:
2148# send "&6test Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2149# stop
2150#
2151# if {_southeastzdistance} < 3:
2152# if {_ya} >= 292:
2153# if {_ya} <= 318:
2154# stop
2155# else:
2156# send "&7test Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2157# stop
2158# else:
2159# send "&7test Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2160# stop
2161#
2162#
2163#
2164#
2165# if {_xcoordattacker} > {_xcoordvictim}:
2166# if {_zcoordattacker} < {_zcoordvictim}:
2167# #southwest--------------------------------------
2168# set {_tempxattacker} to {_xcoordattacker}
2169# set {_tempxvictim} to {_xcoordvictim}
2170#
2171# set {_tempzattacker} to {_zcoordattacker}
2172# set {_tempzvictim} to {_zcoordvictim}
2173#
2174# remove {_tempxattacker} from {_tempxvictim}
2175# remove {_tempzattacker} from {_tempzvictim}
2176#
2177# set {_southwestxdistance} to {_tempxvictim}
2178# set {_southwestzdistance} to {_tempzvictim}
2179# send "SWX: %{_southwestxdistance}% SWZ: %{_southwestzdistance}%" to attacker
2180# if {_southwestxdistance} < 0:
2181# if {_southwestzdistance} > 0:
2182# if {_southwestxdistance} <= -1:
2183# if {_southwestzdistance} <= 1.5:
2184# if {_southwestzdistance} >= 0.53:
2185# if {_ya} >= 16:
2186# if {_ya} <= 85:
2187# stop
2188# else:
2189# send "&atest Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2190# stop
2191# else:
2192# send "&atest Yaw2: %yaw of attacker% Pitch2: %pitch of attacker%" to attacker
2193# stop
2194
2195#-----CommandHandler-----
2196
2197command /zac [<text>] [<offline player>] [<offline player>]:
2198 permission: zac.mod
2199 trigger:
2200 if arg 1 is "info":
2201 viewViolations(player, arg 2)
2202 if arg 1 is "clear":
2203 clearViolations(arg 2)
2204 send "{@prefix} Violations cleared for %arg 2%" to player
2205 if arg 1 is "tempban":
2206 tempBan(arg 2, "console")
2207 if arg 1 is "history":
2208 send "{@prefix} &a%arg 2% has %{history.%arg 2%}% tempbans."
2209 if arg 1 is "unban":
2210 unBan(player, arg 2)
2211 if arg 1 is "consoleunban":
2212 unBanConsole(arg 2)
2213 if arg 1 is "staffmode":
2214 if arg 2 is "on":
2215 if {zac.staffmode.%player%} doesn't exist:
2216 set {zac.staffmode.%player%} to true
2217 stop
2218 if {zac.staffmode.%player%} is true:
2219 send "{@prefix} &cStaff mode already on!" to player
2220 stop
2221 if {zac.staffmode.%player%} is false:
2222 set {zac.staffmode.%player%} to true
2223 saveInventory(player)
2224 wait 5 ticks
2225 clear player's inventory
2226 equip player with golden helmet
2227 equip player with chain chestplate
2228 equip player with golden leggings
2229 equip player with chain boots with lore "&2VIP"
2230 give stick named "&e&lTroll Stick" to slot 0 of player
2231 give potato named "&eTroll Potato" to slot 1 of player
2232 give nether star named "&e&lVanish" to slot 4 of player
2233 give book named "&e&lInspector" to slot 5 of player
2234 give compass named "&e&lRandom Player TP" to slot 7 of player
2235 give block of redstone named "&e&lToggle Staff Mode Off" to slot 8 of player
2236 stop
2237 if arg 2 is "off":
2238 if {zac.staffmode.%player%} doesn't exist:
2239 set {zac.staffmode.%player%} to false
2240 stop
2241 if {zac.staffmode.%player%} is true:
2242 restoreInventory(player)
2243 set {zac.staffmode.%player%} to false
2244 send "{@prefix} Staff mode turned off"
2245 stop
2246 else:
2247 send "{@prefix} &cStaff mode not on!"
2248 stop
2249 if arg 1 is "cps":
2250 if arg 2 is a player:
2251 delete {zac.cpslist.%player%::*}
2252 viewCPS(player, arg 2)
2253 stop
2254 delete {zac.cpslist.%player%::*}
2255 send "{@prefix} &7CPS disabled."
2256 if arg 1 is "reload":
2257 execute player command "sk reload ZAC"
2258 send "{@prefix} &aRELOADED" to player
2259 if arg 1 is "alerts":
2260 if {zac.%player%.alerts} is not set:
2261 set {zac.%player%.alerts} to false
2262 send "{@prefix} &7You will see alerts now."
2263 else:
2264 delete {zac.%player%.alerts}
2265 send "{@prefix} &7Alerts disabled."
2266 #if arg 1 is "inspect":
2267 # if arg 2 is a player:
2268 # zacInspect(player, arg 2)
2269 if arg 1 is "inspect2":
2270 if arg 2 is a player:
2271 zacSidespect(player, arg 2)
2272 if arg 1 is "ac":
2273 if arg 2 is a player:
2274 auraCheck(arg 2)
2275 if arg 1 is "acage":
2276 set {auracage} to location of player
2277 if arg 1 is "debug":
2278 send "%{zac.isSpeeding.%arg 2%}% %{zac.didwalkonjumppad.%arg 2%}% %{zac.didenderpearl.%arg 2%}%" to player
2279 if arg 1 is "debugtest":
2280 set {_loc} to player's location
2281 set {_x1} to player's x coordinate
2282 set {_z1} to player's z coordinate
2283 set {_xx1} to rounded {_x1}
2284 set {_zz1} to rounded {_z1}
2285 wait 2 second
2286 set {_loc2} to player's location
2287 set {_x2} to player's x coordinate
2288 set {_z2} to player's z coordinate
2289 set {_xx2} to rounded {_x2}
2290 set {_zz2} to rounded {_z2}
2291 wait 1 tick
2292 set {_difference} to difference between {_loc} and {_loc2}
2293 send "First pos:%{_loc}%"
2294 send "Second pos:%{_loc2}%"
2295 wait 1 second
2296 subtract {_xx1} from {_xx2}
2297 subtract {_yy1} from {_yy2}
2298 set {_te} to {_xx2}
2299 set {_de} to {_yy2}
2300 loop {_te} times:
2301 add {_te} to {_testvar}
2302 loop {_de} times:
2303 add {_de} to {_testvar2}
2304 add {_testvar} to {_testvar2}
2305 set {_dis} to sqrt of {_testvar2}
2306 send "Difference:%{_dis}%"
2307 if arg 1 is "distance":
2308 speedCheckA(arg 2)
2309 if arg 1 is "acn":
2310 if arg 2 is a player:
2311 auraCheckNorth(player)
2312 if arg 1 is "judgementday":
2313 if arg 2 is "start":
2314 judgementDay(1)
2315 if arg 2 is "add":
2316 judgementAdd(arg 3, "autoclicker")
2317 send "{@prefix} Added %arg 3% to the Judgement List!" to player
2318 if arg 2 is "remove":
2319 judgementRemove(arg 3)
2320 send "{@prefix} Removed %arg 3% from the Judgement List!" to player
2321 if arg 2 is "view":
2322 judgementView(player)
2323 if arg 1 is not set:
2324 mainCommand(player)
2325 if arg 1 is "toggle":
2326 if arg 2 is "speed":
2327 toggleSpeed(1)
2328 if arg 2 is "flight":
2329 toggleFlight(1)
2330 if arg 2 is "reach":
2331 toggleReach(1)
2332 if arg 1 is "admin":
2333 adminCommand(player)
2334 if arg 1 is "zetest":
2335 if arg 2 is a player:
2336 make arg 2 ride a saddled pig
2337 if arg 1 is "test1":
2338 send "%{zac.flighttest.%player%}%" to player
2339 if arg 1 is "testclear":
2340 clear {zac.flighttest.%player%}
2341#on vehicle steer:
2342# if event-button is space:
2343# push vehicle of player upwards at speed 0.4
2344# if event-button is w:
2345# push vehicle of player in the direction of player at speed 1
2346# if event-button is a:
2347# push vehicle of player to the left at speed 0.7
2348# if event-button is d:
2349# push vehicle of player to the right at speed 0.7
2350# if event-button is s:
2351# push vehicle of player backwards at speed 1