MisterBasic

GoldenEyes new Update

Mar 18th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.97 KB | None | 0 0
  1. # Created by MisterBasic
  2. #
  3. # API for addons:
  4. # alert(<message>, <player>)
  5. # gekick(<reason>, <player>)
  6. # gecmd(<cmd>, <player>)
  7. # updatePlayerData(<player>)
  8. #
  9. # Ops bypass checks
  10. # Dependencies:
  11. # Skript
  12. # SkQuery
  13. # SkUtilities
  14. #
  15. #
  16. options:
  17. prefix: §8[§6GoldenEyes§8]§e
  18. version: 0.3
  19. debug: false
  20. kick: false
  21.  
  22. #Checks
  23. autoclicker: 15
  24. autoclicker-kick: 30
  25. reach: 4
  26. fastplace: 20
  27.  
  28. on load:
  29. clear {CONFIG::*}
  30. set {CONFIG::prefix} to yml value "plugin.prefix" of file "plugins/GoldenEyes/config.yml"
  31. set {CONFIG::version} to yml value "plugin.version" of file "plugins/GoldenEyes/config.yml"
  32. set {CONFIG::debug} to yml value "plugin.debug" of file "plugins/GoldenEyes/config.yml"
  33. set {CONFIG::options.kick} to yml value "options.kick" of file "plugins/GoldenEyes/config.yml"
  34. if yml value "plugin.version" of file "plugins/GoldenEyes/config.yml" is not 0.3:
  35. set yml value "plugin.prefix" from file "plugins/GoldenEyes/config.yml" to "&8[&6GoldenEyes&8]&e"
  36. set yml value "plugin.version" from file "plugins/GoldenEyes/config.yml" to 0.3
  37. set yml value "plugin.debug" from file "plugins/GoldenEyes/config.yml" to false
  38. set yml value "options.kick" from file "plugins/GoldenEyes/config.yml" to false
  39. set {CONFIG::prefix} to yml value "plugin.prefix" of file "plugins/GoldenEyes/config.yml"
  40. set {CONFIG::version} to yml value "plugin.version" of file "plugins/GoldenEyes/config.yml"
  41. set {CONFIG::debug} to yml value "plugin.debug" of file "plugins/GoldenEyes/config.yml"
  42. set {CONFIG::options.kick} to yml value "options.kick" of file "plugins/GoldenEyes/config.yml"
  43. # // Configuration Checks (Values+Enabled) //
  44. set yml value "checks.autoclicker.enabled" from file "plugins/GoldenEyes/config.yml" to true
  45. set yml value "checks.autoclicker.maxcps" from file "plugins/GoldenEyes/config.yml" to 15
  46. set yml value "checks.autoclicker.maxcpskick" from file "plugins/GoldenEyes/config.yml" to 30
  47. set yml value "checks.reach.enabled" from file "plugins/GoldenEyes/config.yml" to true # Default
  48. set yml value "checks.reach.maxdistance" from file "plugins/GoldenEyes/config.yml" to 4
  49. set yml value "checks.fastplace.enabled" from file "plugins/GoldenEyes/config.yml" to true
  50. set yml value "checks.fastplace.maxblocks" from file "plugins/GoldenEyes/config.yml" to 20
  51. set yml value "checks.fastbow.enabled" from file "plugins/GoldenEyes/config.yml" to true
  52. set yml value "checks.waterwalk.enabled" from file "plugins/GoldenEyes/config.yml" to true
  53. set yml value "checks.autosneak.enabled" from file "plugins/GoldenEyes/config.yml" to true
  54. set yml value "checks.liquidinteract.enabled" from file "plugins/GoldenEyes/config.yml" to true
  55. set yml value "checks.flight.enabled" from file "plugins/GoldenEyes/config.yml" to true
  56. set yml value "checks.antikb.enabled" from file "plugins/GoldenEyes/config.yml" to true
  57. set yml value "checks.speed.enabled" from file "plugins/GoldenEyes/config.yml" to false
  58.  
  59. on join:
  60. if player has permission "goldeneyes.joinmessage":
  61. gecmd("version", player)
  62. if yml value "violations.%uuid of player%.autoclicker" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  63. set yml value "violations.%uuid of player%.autoclicker" from file "plugins/GoldenEyes/playerdata.yml" to 0
  64. if yml value "violations.%uuid of player%.reach" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  65. set yml value "violations.%uuid of player%.reach" from file "plugins/GoldenEyes/playerdata.yml" to 0
  66. if yml value "violations.%uuid of player%.fastplace" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  67. set yml value "violations.%uuid of player%.fastplace" from file "plugins/GoldenEyes/playerdata.yml" to 0
  68. if yml value "violations.%uuid of player%.fastbow" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  69. set yml value "violations.%uuid of player%.fastbow" from file "plugins/GoldenEyes/playerdata.yml" to 0
  70. if yml value "violations.%uuid of player%.waterwalk" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  71. set yml value "violations.%uuid of player%.waterwalk" from file "plugins/GoldenEyes/playerdata.yml" to 0
  72. if yml value "violations.%uuid of player%.autosneak" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  73. set yml value "violations.%uuid of player%.autosneak" from file "plugins/GoldenEyes/playerdata.yml" to 0
  74. if yml value "violations.%uuid of player%.liquidinteract" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  75. set yml value "violations.%uuid of player%.liquidinteract" from file "plugins/GoldenEyes/playerdata.yml" to 0
  76. if yml value "violations.%uuid of player%.flight" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  77. set yml value "violations.%uuid of player%.flight" from file "plugins/GoldenEyes/playerdata.yml" to 0
  78. if yml value "violations.%uuid of player%.antikb" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  79. set yml value "violations.%uuid of player%.antikb" from file "plugins/GoldenEyes/playerdata.yml" to 0
  80. if yml value "violations.%uuid of player%.speed" from file "plugins/GoldenEyes/playerdata.yml" is not set:
  81. set yml value "violations.%uuid of player%.speed" from file "plugins/GoldenEyes/playerdata.yml" to 0
  82. updatePlayerData(player)
  83. # Fast Clicks
  84. on left click:
  85.  
  86. distance between target block and player > 3
  87. player's held item is not a pickaxe, axe, shovel, or hoe
  88. add 1 to {goldeneyes.cps::%player%}
  89. if {goldeneyes.lastclick.%player%} is not set:
  90. set {goldeneyes.lastclick.%player%} to now
  91. player does not have permission "goldeneyes.autoclicker.bypass"
  92. if {goldeneyes.cps::%player%} >= {@autoclicker}:
  93. add 1 to {CONFIG::violations.%uuid of player%.autoclicker}
  94. alert("%player% failed AutoClicker (CPS: %{goldeneyes.cps::%player%}%) [VL %{goldeneyes.autoclicker.%player%.vl}%]", player, "AutoClicker")
  95. if {goldeneyes.cps::%player%} >= {@autoclicker-kick}:
  96. gekick("AutoClicker", player)
  97. if {goldeneyes.lastclick.%player%} was less than 0.1 ticks ago:
  98. alert("%player% failed AutoClicker [VL %{goldeneyes.autoclicker.%player%.vl}%]", player, "AutoClicker")
  99. every second in "world":
  100. clear {goldeneyes.fastplace::*}
  101. clear {goldeneyes.lastplace::*}
  102. clear {goldeneyes.cps::*}
  103.  
  104. # FastBow
  105. on shoot:
  106. shooter does not have permission "goldeneyes.fastbow.bypass"
  107. projectile is a arrow
  108. if {goldeneyes.lastshot.%shooter%} is not set:
  109. set {goldeneyes.lastshot.%shooter%} to now
  110. stop
  111. if {goldeneyes.lastshot.%shooter%} was less than 2 ticks ago:
  112. set {goldeneyes.lastshot.%shooter%} to now
  113. alert("%shooter% failed FastBow", shooter, "FastBow")
  114. add 1 to {CONFIG::violations.%uuid of shooter%.fastbow}
  115. stop
  116. # Reach
  117. on damage:
  118. attacker does not have permission "goldeneyes.reach.bypass"
  119. attacker is a player
  120. attacker's gamemode is not creative or spectator
  121. #victim is a player
  122. damage cause is not a projectile or potion
  123. if distance between attacker and victim is greater than {@reach}+attacker's ping/200:
  124. add 1 to {goldeneyes.reach.%attacker%.vl}
  125. add 1 to {goldeneyes.reach.%attacker%}
  126. alert("%attacker% failed Reach [VL %{goldeneyes.reach.%attacker%.vl}%] (Distance: %distance between attacker and victim%/%{@reach}+attacker's ping/200% blocks)", attacker, "Reach")
  127. if {goldeneyes.reach.%attacker%} > 20:
  128. gekick("Reach", attacker)
  129. on place:
  130. player does not have permission "goldeneyes.reach.bypass"
  131. player's gamemode is not creative
  132. if distance between event-block and player is greater than 5:
  133. gekick("Reach", player)
  134. # Scaffold / Fastplace
  135. on place:
  136. player does not have permission "goldeneyes.fastplace.bypass"
  137. add 1 to {goldeneyes.fastplace::%player%}
  138. if {goldeneyes.lastplace::%player%} is not set:
  139. set {goldeneyes.lastplace::%player%} to now
  140. stop
  141. if difference between {goldeneyes.lastplace::%player%} and now < 0.9 ticks:
  142. cancel event
  143. add 1 to {goldeneyes.fastplace.%player%.vl}
  144. alert("%player% failed FastPlace [VL %{CONFIG::violations.%uuid of player%.fastplace}%]", player, "Fastplace")
  145. reset {goldeneyes.lastplace::%player%}
  146. stop
  147. if {goldeneyes.fastplace::%player%} >= {@fastplace}:
  148. cancel event
  149. add 1 to {CONFIG::violations.%uuid of player%.fastplace}
  150. alert("%player% failed FastPlace [VL %{CONFIG::violations.%uuid of player%.fastplace}%]", player, "FastPlace")
  151. stop
  152.  
  153. # AutoSneak
  154. on chat:
  155. player does not have permission "goldeneyes.autosneak.bypass"
  156. if player is sneaking:
  157. add 1 to {CONFIG::violations.%uuid of player%.autosneak}
  158. alert("%player% failed AutoSneak [VL %{CONFIG::violations.%uuid of player%.autosneak}%]", player, "AutoSneak")
  159. on inventory close:
  160. player does not have permission "goldeneyes.autosneak.bypass"
  161. if player is sneaking:
  162. add 1 to {CONFIG::violations.%uuid of player%.autosneak}
  163. alert("%player% failed AutoSneak [VL %{CONFIG::violations.%uuid of player%.autosneak}%]", player, "AutoSneak")
  164. # Little extra
  165. clear {menu.%player%}
  166. on inventory click:
  167. player does not have permission "goldeneyes.autosneak.bypass"
  168. if player is sneaking:
  169. add 1 to {CONFIG::violations.%uuid of player%.autosneak}
  170. alert("%player% failed AutoSneak [VL %{CONFIG::violations.%uuid of player%.autosneak}%]", player, "AutoSneak")
  171. # WaterWalk
  172. on walk on water:
  173. player does not have permission "goldeneyes.waterwalk.bypass"
  174. set {_lilypad} to 0
  175. player is not flying
  176. loop all blocks in radius 2 around player:
  177. if loop-block is a lily pad:
  178. add 1 to {_lilypad}
  179. {_lilypad} < 1
  180. if block below the player is water:
  181. if block left of block below the player is water:
  182. if block right of block below the player is water:
  183. if block behind the block below the player is water:
  184. if block infront of block below the player is water:
  185. if block at player is not water:
  186. if block above player is not water:
  187. player is on ground
  188. cancel event
  189.  
  190. add 1 to {CONFIG::violations.%uuid of player%.waterwalk}
  191. add 1 to {goldeneyes.waterwalk.%player%}
  192.  
  193. alert("%player% failed WaterWalk [VL %{CONFIG::violations.%uuid of player%.waterwalk}%]", player, "WaterWalk")
  194. if {goldeneyes.waterwalk.%player%} is greater than 20:
  195. {goldeneyes.waterwalk.%player%}
  196. gekick("WaterWalk", player)
  197. if {_lilypad} > 1:
  198. stop
  199.  
  200. # Liquid Interact
  201. on right click on water or lava:
  202.  
  203. player does not have permission "goldeneyes.liquidinteract.bypass"
  204. cancel event
  205. add 1 to {CONFIG::violations.%uuid of player%.liquidinteract}
  206. alert("%player% failed LiquidInteract [VL %{CONFIG::violations.%uuid of player%.liquidinteract}%]", player, "LiquidInteract")
  207. on block break:
  208. player does not have permission "goldeneyes.liquidinteract.bypass"
  209. if event-block is water or lava:
  210. gekick("LiquidInteract", player)
  211. on block damage:
  212. player does not have permission "goldeneyes.liquidinteract.bypass"
  213. if event-block is water or lava:
  214. gekick("LiquidInteract", player)
  215. # Flight
  216. on any movement:
  217. block below the player is air
  218. block at the player is air
  219. player's flight mode is false
  220. player is not riding
  221. # This part here is really the check, if the player is on the ground and is in the air, it is impossible.
  222. player is on ground
  223. set {_blocks} to 0
  224. player's gamemode is not Creative or Spectator:
  225. # Possible problems if this wasn't here
  226. loop all blocks in radius 3 around player:
  227. if loop-block is stairs or slab:
  228. stop
  229. # Checks if the player is in the air
  230. loop all blocks in radius 2 around player:
  231. if loop-block is not air:
  232. add 1 to {_blocks}
  233. if {_blocks} is greater than 0:
  234. stop
  235. if {_blocks} is less than 1:
  236. # Alerts
  237. add 1 to {CONFIG::violations.%uuid of player%.flight}
  238. add 1 to {goldeneyes.move.%player%}
  239. alert("%player% failed Flight [VL %{CONFIG::violations.%uuid of player%.flight}%]", player, "Flight")
  240. cancel event
  241. if {goldeneyes.move.%player%} is greater than 5:
  242. clear {goldeneyes.move.%player%}
  243. gekick("Flight", player)
  244. # AntiKB
  245. on damage:
  246. attacker is set
  247. if damage cause is fall, fire or potion:
  248. stop
  249. else:
  250. set {_loc1} to location of victim
  251. wait 7 ticks
  252. set {_loc2} to location of victim
  253.  
  254.  
  255. block west of victim is air
  256. block east of victim is air
  257. block north of victim is air
  258. block south the victim is air
  259.  
  260. block west of the block above the victim is air
  261. block east of the block above the victim is air
  262. block north of the block above the victim is air
  263. block south of the block above the victim is air
  264. block below the victim is not water or lava
  265.  
  266. victim is not riding
  267. victim is not flying
  268.  
  269. if block at victim is not cobweb:
  270. if victim's gamemode is not Creative or Spectator:
  271. if distance between {_loc1} and {_loc2} = 0:
  272. if victim's ping is less than 260:
  273. {CONFIG::violations.%uuid of victim%.antikb}
  274. add 1 to {goldeneyes.antikb.%victim%}
  275. alert("%victim% failed AntiKnockBack [VL %{CONFIG::violations.%uuid of victim%.antikb}%]", victim, "AntiKB")
  276. if {goldeneyes.antikb.%victim%} >= 20:
  277. clear {goldeneyes.antikb.%victim%}
  278. gekick("AntiKnockback", victim)
  279. # Speed Check (Fixing)
  280. #on any movement:
  281. # if {goldeneyes.speed.lastcheck} is not set:
  282. # set {goldeneyes.speed.lastcheck} to now
  283. # stop
  284. # difference between {goldeneyes.speed.lastcheck} and now is greater than 2 seconds
  285. # set {goldeneyes.speed.lastcheck} to now
  286. # player's ping is less than 200
  287. # player is not riding
  288. # player is not flying
  289. # #player does not have permission "goldeneyes.speed.bypass"
  290. # if player has swiftness:
  291. # stop
  292. # else:
  293. # set {_locX1} to player's x coordinates
  294. # set {_locZ1} to player's z coordinates
  295. # wait a tick
  296. # set {_locX2} to player's x coordinates
  297. # set {_locZ2} to player's z coordinates
  298. # set {_est} to 10
  299. # set {_distanceX} to distance between {_locX1} and {_locX2}
  300. # set {_distanceZ} to distance between {_locZ1} and {_locZ2}
  301. # block below the player is not ice
  302. # block below the player is not air
  303. # if {_distanceX} is greater than {_est}:
  304. # teleport the player to {_locX1}
  305. # add 1 to {goldeneyes.speed.%player%.vl}
  306. # alert("%player% failed Speed (B: %{_locX1}%) [VL %{goldeneyes.speed.%player%.vl}%]", player)
  307. # stop
  308. # if {_distanceZ} is greater than {_est}:
  309. # teleport the player to {_locZ1}
  310. # add 1 to {goldeneyes.speed.%player%.vl}
  311. # alert("%player% failed Speed (B: %{_locX1}%) [VL %{goldeneyes.speed.%player%.vl}%]", player)
  312. # stop
  313. every minute:
  314. loop all players:
  315. clear {goldeneyes.move.%loop-player%}
  316. clear {goldeneyes.waterwalk.%loop-player%}
  317. clear {goldeneyes.antikb.%loop-player%}
  318. #!@CommandHandler
  319. command /ping:
  320. trigger:
  321. send "Ping: %player's ping%"
  322. command /goldeneyes [<text>] [<text>] [<text>]:
  323. description: Main GoldenEyes Command.
  324. permission: goldeneyes.maincommand
  325. permission message: %{CONFIG::prefix}% &cYou do not have permission to execute this command!
  326. executable by: console and players
  327. trigger:
  328. if arg 1 is not set:
  329. gecmd("version", sender)
  330. else if arg 1 is "checks":
  331. gecmd("checks", sender)
  332. else if arg 1 is "reload":
  333. gecmd("reload", sender)
  334. else if arg 1 is "version":
  335. gecmd("version", sender)
  336. else if arg 1 is "help":
  337. gecmd("help", sender)
  338. else if arg 1 is "notify":
  339. if arg 2 is "true":
  340. gecmd("notify-true", sender)
  341. else if arg 2 is "false":
  342. gecmd("notify-false", sender)
  343. else:
  344. send "%{CONFIG::prefix}% &cPlease specify a boolean: /goldeneyes notify &4<true|false>&c!"
  345. else if arg 1 is "reset":
  346. if arg 3 contains "autoclicker":
  347. clear {goldeneyes.autoclicker.%arg 2%.vl}
  348. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations for AutoClicker!" to sender
  349. if arg 3 contains "fastplace":
  350. clear {goldeneyes.fastplace.%arg 2%.vl}
  351. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations for Fastplace!" to sender
  352. if arg 3 contains "fastbreak":
  353. clear {goldeneyes.nuker.%arg 2%.vl}
  354. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations for FastBreak!" to sender
  355. if arg 3 contains "liquidinteract":
  356. clear {goldeneyes.liquidinteract.%arg 2%.vl}
  357. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations for LiquidInteract!" to sender
  358. if arg 3 contains "waterwalk":
  359. clear {goldeneyes.waterwalk.%arg 2%.vl}
  360. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations for WaterWalk!" to sender
  361. if arg 3 contains "autosneak":
  362. clear {goldeneyes.autosneak.%arg 2%.vl}
  363. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations for AutoSneak!" to sender
  364. if arg 3 contains "reach":
  365. clear {goldeneyes.reach.%arg 2%.vl}
  366. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations for Reach!" to sender
  367. if arg 3 contains "flight":
  368. clear {goldeneyes.move.%arg 2%.vl}
  369. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations for Flight!" to sender
  370. if arg 3 contains "antikb" or "antiknockback":
  371. clear {goldeneyes.antikb.%arg 2%.vl}
  372. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations for AntiKnockback!" to sender
  373. if arg 3 contains "*" or "all":
  374. send "%{CONFIG::prefix}% Reset all of %arg 2%'s violations!" to sender
  375. clear {goldeneyes.reach.%arg 2%.vl}
  376. clear {goldeneyes.move.%arg 2%.vl}
  377. clear {goldeneyes.autosneak.%arg 2%.vl}
  378. clear {goldeneyes.waterwalk.%arg 2%.vl}
  379. clear {goldeneyes.liquidinteract.%arg 2%.vl}
  380. clear {goldeneyes.fastplace.%arg 2%.vl}
  381. clear {goldeneyes.autoclicker.%arg 2%.vl}
  382. clear {goldeneyes.antikb.%arg 2%.vl}
  383. else if arg 1 is "info":
  384. if arg 2 is set:
  385. open chest with 4 rows named "&6&n&lGoldenEyes Player Info" to player
  386. if {goldeneyes.reach.%arg 2%.vl} is not set:
  387. set {goldeneyes.reach.%arg 2%.vl} to 0
  388. if {goldeneyes.move.%arg 2%.vl} is not set:
  389. set {goldeneyes.move.%arg 2%.vl} to 0
  390. if {goldeneyes.autosneak.%arg 2%.vl} is not set:
  391. set {goldeneyes.autosneak.%arg 2%.vl} to 0
  392. if {goldeneyes.waterwalk.%arg 2%.vl} is not set:
  393. set {goldeneyes.waterwalk.%arg 2%.vl} to 0
  394. if {goldeneyes.liquidinteract.%arg 2%.vl} is not set:
  395. set {goldeneyes.liquidinteract.%arg 2%.vl} to 0
  396. if {goldeneyes.fastplace.%arg 2%.vl} is not set:
  397. set {goldeneyes.fastplace.%arg 2%.vl} to 0
  398. if {goldeneyes.autoclicker.%arg 2%.vl} is not set:
  399. set {goldeneyes.autoclicker.%arg 2%.vl} to 0
  400.  
  401. if {goldeneyes.antikb.%arg 2%.vl} is not set:
  402. set {goldeneyes.antikb.%arg 2%.vl} to 0
  403. format slot 4 of player with player head named "&6%arg 2%" with lore "&7Name: %display name of arg 2 parsed as player%||&7UUID: %uuid of arg 2 parsed as player%" to be unstealable
  404. format slot 10 of player with red stained glass named "&4Reach (%{goldeneyes.reach.%arg 2%.vl}%)" with lore "&c&lClick to reset violations" to run [make player execute "/goldeneyes reset %arg 2% Reach"]
  405. format slot 11 of player with red stained glass named "&4WaterWalk (%{goldeneyes.waterwalk.%arg 2%.vl}%)" with lore "&c&lClick to reset violations" to run [make player execute "/goldeneyes reset %arg 2% WaterWalk"]
  406. format slot 12 of player with red stained glass named "&4AntiKB (%{goldeneyes.antikb.%arg 2%.vl}%)" with lore "&c&lClick to reset violations" to run [make player execute "/goldeneyes reset %arg 2% AntiKB"]
  407. format slot 13 of player with red stained glass named "&4AutoSneak (%{goldeneyes.autosneak.%arg 2%.vl}%)" with lore "&c&lClick to reset violations" to run [make player execute "/goldeneyes reset %arg 2% AutoSneak"]
  408. format slot 14 of player with red stained glass named "&4FastPlace (%{goldeneyes.fastplace.%arg 2%.vl}%)" with lore "&c&lClick to reset violations" to run [make player execute "/goldeneyes reset %arg 2% FastPlace"]
  409. format slot 15 of player with red stained glass named "&4LiquidInteract (%{goldeneyes.liquidinteract.%arg 2%.vl}%)" with lore "&c&lClick to reset violations" to run [make player execute "/goldeneyes reset %arg 2% LiquidInteract"]
  410. format slot 16 of player with red stained glass named "&4Flight (%{goldeneyes.move.%arg 2%.vl}%)" with lore "&c&lClick to reset violations" to run [make player execute "/goldeneyes reset %arg 2% Flight"]
  411. set {menu.%player%} to true
  412. else:
  413. gecmd("unknowncmd", player)
  414. # Functions
  415. function gecmd(t: text, p: player):
  416. if {_t} is "version":
  417. send "%{CONFIG::prefix}% Running Version {@version}" to {_p}
  418. if {_t} is "checks":
  419. send "%{CONFIG::prefix}% Avaliable Checks:%nl%AutoClicker, Reach/Killaura, FastBow, FastPlace/Scaffold, WaterWalk, LiquidInteract, AutoSneak, Flight, AntiKB" to {_p}
  420. if {_t} is "reload":
  421. make console execute "/sk reload %script name%.sk"
  422. send "%{CONFIG::prefix}% Fully reloaded GoldenEyes v{@version}!" to {_p}
  423. if {_t} is "unknowncmd":
  424. send "%{CONFIG::prefix}% Invaild Argument. Usage: /goldeneyes (reload|checks|version|notify) [value]" to {_p}
  425. if {_t} is "notify-true":
  426. set {goldeneyes.notify::%{_p}%} to true
  427. send "%{CONFIG::prefix}% Set notifications to True!" to {_p}
  428. if {_t} is "notify-false":
  429. set {goldeneyes.notify::%{_p}%} to false
  430. send "%{CONFIG::prefix}% Set notifications to False!" to {_p}
  431. if {_t} is "help":
  432. send "&8[&a-=-&8]&7&m-----&8[&6GoldenEyes&8]&7&m-----&8[&a-=-&8]&r" to {_p}
  433. send "&8[&a!&8]&6 /goldeneyes reload&e: Reload" to {_p}
  434. send "&8[&a!&8]&6 /goldeneyes version&e: Get the version" to {_p}
  435. send "&8[&a!&8]&6 /goldeneyes notify <true|false>&e: Toggle notifications" to {_p}
  436. send "&8[&a!&8]&6 /goldeneyes checks&e: See the Cheat Checks" to {_p}
  437. send "&8[&a!&8]&6 /goldeneyes help&e: Get Help" to {_p}
  438. send "&8[&a!&8]&6 /goldeneyes info <player>&e: Get Info" to {_p}
  439. send "&8[&a!&8]&6 /goldeneyes reset <player> <violations>&e: Reset Violations" to {_p}
  440. send "&8[&a-=-&8]&7&m-----&8[&6GoldenEyes&8]&7&m-----&8[&a-=-&8]&r" to {_p}
  441. function alert(m: text, p: player, hack: text):
  442. loop all players:
  443. loop-player has permission "goldeneyes.notify":
  444. if {goldeneyes.notify::%loop-player%} is true:
  445. send "%{CONFIG::prefix}% %{_m}% (Ping: %{_p}'s ping%)" to loop-player
  446. send "[GoldenEyesAntiCheat] %{_m}% (Ping: %{_p}'s ping%)" to console
  447. updatePlayerData({_p})
  448. function staffMsg(m: text):
  449. loop all players:
  450. loop-player has permission "goldeneyes.notify":
  451. if {goldeneyes.notify::%loop-player%} is true:
  452. send "%{CONFIG::prefix}% %{_m}%" to loop-player
  453. send "[GoldenEyesAntiCheat] %{_m}%" to console
  454. function gekick(m: text, p: player):
  455. {@kick} is true
  456. kick {_p} due to "%{CONFIG::prefix}% You were disconnected from the server.%nl%%nl%§4Reason: %{_m}%%nl%%nl%§7Please do not do this again!"
  457. send "[GoldenEyesAntiCheat] %{_p}% was kicked from the server. Reason: %{_m}%" to console
  458. loop all players:
  459. if loop-player has permission "goldeneyes.notify" or "goldeneyes.notify.kick":
  460. send "%{CONFIG::prefix}% %{_p}% was kicked from the server. Reason: %{_m}%" to loop-player
  461. function updatePlayerData(p: player):
  462. set {_uuid} to uuid of {_p}
  463. set {CONFIG::violations.%{_uuid}%.autoclicker} to yml value "violations.%uuid of {_p}%.autoclicker" of file "plugins/GoldenEyes/playerdata.yml"
  464. set {CONFIG::violations.%{_uuid}%.reach} to yml value "violations.%uuid of {_p}%.reach" of file "plugins/GoldenEyes/playerdata.yml"
  465. set {CONFIG::violations.%{_uuid}%.fastplace} to yml value "violations.%uuid of {_p}%.fastplace" of file "plugins/GoldenEyes/playerdata.yml"
  466. set {CONFIG::violations.%{_uuid}%.fastbow} to yml value "violations.%uuid of {_p}%.fastbow" of file "plugins/GoldenEyes/playerdata.yml"
  467. set {CONFIG::violations.%{_uuid}%.waterwalk} to yml value "violations.%uuid of {_p}%.waterwalk" of file "plugins/GoldenEyes/playerdata.yml"
  468. set {CONFIG::violations.%{_uuid}%.autosneak} to yml value "violations.%uuid of {_p}%.autosneak" of file "plugins/GoldenEyes/playerdata.yml"
  469. set {CONFIG::violations.%{_uuid}%.liquidinteract} to yml value "violations.%uuid of {_p}%.liquidinteract" of file "plugins/GoldenEyes/playerdata.yml"
  470. set {CONFIG::violations.%{_uuid}%.flight} to yml value "violations.%uuid of {_p}%.flight" of file "plugins/GoldenEyes/playerdata.yml"
  471. set {CONFIG::violations.%{_uuid}%.antikb} to yml value "violations.%uuid of {_p}%.antikb" of file "plugins/GoldenEyes/playerdata.yml"
  472. set {CONFIG::violations.%{_uuid}%.speed} to yml value "violations.%uuid of {_p}%.speed" of file "plugins/GoldenEyes/playerdata.yml"
  473. # End
Advertisement
Add Comment
Please, Sign In to add comment