Advertisement
Guest User

Untitled

a guest
Nov 14th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.19 KB | None | 0 0
  1. # Hydra AntiCheat from the developers of WASP AntiCheat know as _LkZ#9628
  2. # Detections: Killaura, Fly, Speed, Reach, SelfHurt, NoFall and AirWalk, WaterWalk, HighJump, FastBow (More Coming Soon)
  3. # Main Developer: _LkZ
  4. # Other Developers: MikkelOnTop, MrStompy
  5. # find our terms of use and more updates at: https://hydra-anticheat.carrd.co
  6. # the guy who like fixed all the lag and added 3 new epic detections: dnadany (https://discord.gg/6RFZYxt)
  7.  
  8. options:
  9. version: 1.4
  10. NoPermission: &c&lHydra &8>> &4Invalid Permission!
  11. chat_cooldown_seconds: 3
  12. eula: false
  13. kick_10_alerts: true
  14. KickMessage: &C&lHydra &8>> &cCheating
  15.  
  16.  
  17. command /hydra [<text>] [<offline player>]:
  18. permission: hydra.command.command
  19. permission message: {@NoPermission}
  20. trigger:
  21. if arg 1 is not set:
  22. send "&c&lHydra &8>> &c/hydra help"
  23. if arg 1 is "help":
  24. send "&c&lHydra AntiCheat. &fMade by _LkZ, and MikkelOnTop"
  25. send "&c/hydra help"
  26. send "&c/hydra freeze <player>"
  27. send "&c/hydra alerts <player>"
  28. send "&c/hydra addons"
  29. send "&c/addbannedword <word>"
  30. send "&c/bannedwords"
  31. send "&c/clearbannedwords"
  32. send "&c/report <player> <reason>"
  33. send "&c/reports <player>"
  34. send "&c/clearreports <player>"
  35. if arg 1 is "addons":
  36. {hydrApi::addons::*} is set:
  37. send "&c&lHydra AntiCheat Loaded Addons."
  38. send "&c&l--------------------------------"
  39. loop {hydrApi::addons::*}:
  40. send "&c%loop-value%"
  41. send "&c&l--------------------------------"
  42. stop
  43. send "&4&lERROR &cNo addons loaded"
  44. if arg 1 is "freeze":
  45. if arg 2 is set:
  46. if player has permission "hydra.command.freeze":
  47. if {freezed::%arg 2%} is false:
  48. set {freezed.%arg 2%} to true
  49. send "&c&lHydra &8>> &c%arg 2%&f is now frozen!"
  50. else:
  51. set {freezed::%arg 2%} to false
  52. send "&c&lHydra &8>> &c%arg 2% is no longer frozen!"
  53. else:
  54. send "{@NoPermission}"
  55. if arg 1 is "alerts" or "logs":
  56. if arg 2 is set:
  57. if player has permission "hydra.command.logs":
  58. send "&cAuto Clicker Logs: %{autoclickerlogs::%arg 2%}%"
  59. send "&cFlight / AirWalk / NoFall Logs: %{flightlogs::%arg 2%}%"
  60. send "&cKillaura logs: %{killauralogs::%arg 2%}%"
  61. send "&cSpeed / Flight Logs: %{speedalerts::%arg 2%}%"
  62. send "&cReach Logs: %{reachalerts::%arg 2%}%"
  63. send "&cAnti Knockback Logs: %{antikbalerts::%arg 2%}%"
  64. send "&cFast Bow Logs: %{fastbowalerts::%arg 2%}%"
  65. send "&cWaterwalk Logs: %{waterwalk::%arg 2%}%"
  66. send "&cHigh Jump Logs: %{highjumplogs::%arg 2%}%"
  67. send "&Spider Logs: %{spiderlogs::%arg 2%}%"
  68. else:
  69. send "{@NoPermission}"
  70. else:
  71. send "&c&lHydra &8>> &cPlease specify a player!"
  72.  
  73. command /report [<offline player>] [<text>]:
  74. permission: hydra.report.use
  75. permission message: {@NoPermission}
  76. trigger:
  77. if arg 1 is set:
  78. if arg 2 is set:
  79. if arg 1 does not have permission "hydra.report.bypass":
  80. "%arg 1%" != "%player%":
  81. add 1 to {reports::%arg 1%}
  82. set {report::%arg 1%::%{reports::%arg 1%}%} to arg 2
  83. add {report::%arg 1%::%{reports::%arg 1%}%} to {reports::%arg 1%::*}
  84. send "&c&lHydra &8>> &fYou have reported &c%arg 1%&f for the reason &c%arg 2%."
  85. send "&c&lHydra &8>> &c%player% has reported &c%arg 1% for the reason &c%arg 2%." to all players where [player input has permission "hydra.logs"]
  86. else:
  87. send "&c&lHydra &8>> &fYou cant report yourself, silly!"
  88. else:
  89. send "&c&lHydra &8>> &fYou cannot report that player!"
  90. else:
  91. send "&c&lHydra &8>> &f/report <player> <reason>"
  92. else:
  93. send "&c&lHydra &8>> &f/report <player> <reason>"
  94.  
  95. command /reports [<offline player>]:
  96. permission: hydra.report.see
  97. permission message: {@NoPermission}
  98. trigger:
  99. if arg 1 is set:
  100. set {e} to 1
  101. send "&a---------------------"
  102. loop 20 times:
  103. if {reports::%arg 1%::%{e}%} is set:
  104. send "%{reports::%arg 1%::%{e}%}%"
  105. add 1 to {e}
  106. send "&a---------------------"
  107.  
  108. command /clearreports [<offline player>]:
  109. permission: hydra.report.clear
  110. permission message: {@NoPermission}
  111. trigger:
  112. delete {reports::%arg 1%::*}
  113. delete {reports::%arg 1%}
  114. delete {report::%arg 1%::*}
  115.  
  116.  
  117. every 30 seconds:
  118. delete {alerts::*}
  119.  
  120. on left click:
  121. if {@eula} is true:
  122. player does not have permission "hydra.bypass.autoclicker":
  123. add 1 to {killaura::%player%}
  124. if {killaura::%player%} >= 20:
  125. set {_ping} to player's ping
  126. alert(player, "Auto Clicker")
  127. add 1 to {autoclickerlogs::%player%}
  128. execute console command "auratest %player%"
  129. add 1 to {alerts::%player%}
  130. if {alerts::%player%} >= 10:
  131. if {kick_10_alerts} is true:
  132. hydrApi_kickPlayer(player)
  133.  
  134. on left click:
  135. if {@eula} is true:
  136. add 1 to {clickauratest::%player%}
  137. player does not have permission "hydra.bypass.killaura"
  138. if {clickauratest::%player%} >= 13:
  139. execute console command "auratest %player%"
  140.  
  141. every 1 second:
  142. delete {clickauratest::*}
  143. delete {killaura::*}
  144.  
  145.  
  146. on damage:
  147. attacker is a player:
  148. if attacker's targeted entity is not set:
  149. if {@eula} is true:
  150. if attacker does not have permission "hydra.bypass.invalidtarget":
  151. set {_ping} to attacker's ping
  152. alert(attacker, "Invalid Target")
  153. add 1 to {killauralogs::%attacker%}
  154. add 1 to {alerts::%attacker%}
  155. if {alerts::%attacker%} >= 10:
  156. if {kick_10_alerts} is true:
  157. hydrApi_kickPlayer(attacker)
  158.  
  159.  
  160. on damage:
  161. add 1 to {hits::%attacker%}
  162.  
  163. on left click:
  164. add 1 to {leftclicks::%player%}
  165.  
  166. on death:
  167. if {@eula} is true:
  168. if player does not have permission "hydra.bypass.killaura":
  169. if {hits::%attacker%} = {leftclicks::%attacker%}:
  170. execute console command "auratest %attacker%"
  171.  
  172. command /auratest [<player>]:
  173. permission: hydra.command.auratest
  174. permission message: &c&lHydra >> No Permissions
  175. trigger:
  176. if {auratest.%arg 1%} is false:
  177. set {loc} to location behind arg 1
  178. set {attacker} to arg 1
  179. set {auratest.%arg 1%} to true
  180. spawn a zombie at {loc}
  181. set {bot} to last spawned entity
  182. wait 5 ticks
  183. set {auratest.%arg 1%} to false
  184. delete last spawned entity
  185.  
  186. on damage:
  187. if attacker is {attacker}:
  188. if victim is {bot}:
  189. delete {bot}
  190. alert(attacker, "Killaura")
  191. add 1 to {killauralogs::%attacker%}
  192. add 1 to {alerts::%attacker%}
  193. if {alerts::%attacker%} >= 10:
  194. if {kick_10_alerts} is true:
  195. hydrApi_kickPlayer(attacker)
  196. else:
  197. if victim is {bot}:
  198. cancel event
  199.  
  200.  
  201.  
  202.  
  203.  
  204. on any move:
  205. {@eula} is true
  206. player's gamemode is not creative
  207. player does not have permission "hydra.bypass.fly"
  208. difference between {log.%player%} and now is more than 0.3 seconds
  209. player is on ground
  210. block below player is air
  211. block north below player is air
  212. block south below player is air
  213. block west below player is air
  214. block east below player is air
  215. block north east below player is air
  216. block south east below player is air
  217. block north west below player is air
  218. block south west below player is air
  219. add 1 to {fly::%player%}
  220. if {fly::%player%} >= 3:
  221. alert(player, "Groundspoof")
  222. teleport player to {rubberband.%player%}
  223. add 1 to {alerts::%player%}
  224. add 1 to {flightlogs::%player%}
  225. if {alerts::%player%} >= 10:
  226. if {kick_10_alerts} is true:
  227. hydrApi_kickPlayer(player)
  228.  
  229.  
  230.  
  231. on any move:
  232. player does not have permission "hydra.bypass.fly"
  233. player's gamemode is survival or adventure
  234. player's flight mode is false
  235. set {_y1} to y pos of player
  236. wait 2 ticks
  237. set {_y2} to y pos of player
  238. difference between {_y1} and {_y2} is less than 0.4
  239. difference between {log.%player%} and now is more than 0.5 seconds
  240. difference between {reload.%player%} and now is more than 5 seconds
  241. add 1 to {fly::%player%}
  242. if {fly::%player%} >= 3:
  243. alert(player, "AirWalk")
  244. teleport player to {rubberband.%player%}
  245. add 1 to {alerts::%player%}
  246. add 1 to {flightlogs::%player%}
  247. if {alerts::%player%} >= 10:
  248. if {kick_10_alerts} is true:
  249. hydrApi_kickPlayer(player)
  250.  
  251. on any move:
  252. player does not have permission "hydra.bypass.fly"
  253. player's gamemode is survival or adventure
  254. player's flight mode is false
  255. set {_y1} to y pos of player
  256. wait 2 ticks
  257. set {_y2} to y pos of player
  258. difference between {_y1} and {_y2} is more than 0.3
  259. {_y1} < {_y2}
  260. difference between {log.%player%} and now is more than 0.5 seconds
  261. difference between {reload.%player%} and now is more than 5 seconds
  262. add 1 to {fly::%player%}
  263. if {fly::%player%} >= 3:
  264. alert(player, "Fly")
  265. teleport player to {rubberband.%player%}
  266. add 1 to {alerts::%player%}
  267. add 1 to {flightlogs::%player%}
  268. if {alerts::%player%} >= 10:
  269. if {kick_10_alerts} is true:
  270. hydrApi_kickPlayer(player)
  271.  
  272.  
  273.  
  274. on any move:
  275. player does not have permission "hydra.bypass.fly"
  276. player's gamemode is survival or adventure
  277. player's flight mode is false
  278. set {_y1} to y pos of player
  279. wait 2 ticks
  280. set {_y2} to y pos of player
  281. wait 2 ticks
  282. set {_y3} to y pos of player
  283. difference between {_y1} and {_y2} > difference between {_y1} and {_y3}
  284. difference between {log.%player%} and now is more than 0.7 seconds
  285. difference between {reload.%player%} and now is more than 5 seconds
  286. player's flight mode is false
  287. add 1 to {fly::%player%}
  288. if {fly::%player%} >= 3:
  289. alert(player, "Glide")
  290. teleport player to {rubberband.%player%}
  291. add 1 to {alerts::%player%}
  292. add 1 to {flightlogs::%player%}
  293. if {alerts::%player%} >= 10:
  294. if {kick_10_alerts} is true:
  295. hydrApi_kickPlayer(player)
  296.  
  297. on any move:
  298. if {@eula} is true:
  299. #player does not have permission "hydra.bypass.highjump":
  300. player is not flying
  301. player is not riding
  302. set {_pos} to player's location
  303. set {_loc} to player's y coordinate
  304. wait 1 ticks
  305. set {_loc1} to player's y coordinate
  306. wait 1 ticks
  307. set {_loc2} to player's y coordinate
  308. wait 2 ticks
  309. set {_loc3} to player's y coordinate
  310. wait 2 ticks
  311. set {_loc4} to player's y coordinate
  312. difference between {_loc} and {_loc1} > 0.2
  313. difference between {_loc} and {_loc1} = difference between {_loc1} and {_loc2}
  314. #difference between {_loc1} and {_loc2} = difference between {_loc2} and {_loc3}
  315. #difference between {_loc2} and {_loc3} = difference between {_loc3} and {_loc4}
  316. block below player is not a stair
  317. block south below player is not a stair
  318. block east below player is not a stair
  319. block west below player is not a stair
  320. block north below player is not a stair
  321. block below player is not a slab
  322. block south below player is not a slab
  323. block east below player is not a slab
  324. block west below player is not a slab
  325. block north below player is not a slab
  326. teleport player to {_pos}
  327. add 1 to {spiderlogs::%player%}
  328. add 1 to {alerts::%player%}
  329. alert(player, "Fly")
  330.  
  331.  
  332. on unload:
  333. loop all players:
  334. set {reload.%loop-player%} to now
  335.  
  336. every 5 ticks:
  337. loop all players:
  338. set {_loc} to location of loop-player
  339. loop all blocks in radius 2.5 around {_loc}:
  340. if loop-block is not air:
  341. set {log.%loop-player%} to now
  342. set {rubberband.%loop-player%} to location of loop-player
  343.  
  344. the gliding state of loop-player is true:
  345. loop-player's chestplate is elytra:
  346. set {log.%loop-player%} to now
  347.  
  348. loop-player is flying:
  349. set {lastflying::%loop-player%} to now
  350.  
  351.  
  352.  
  353.  
  354.  
  355. on any move:
  356. player does not have permission "hydra.bypass.speed":
  357. if {@eula} is true:
  358. player doesn't have speed
  359. set {_loc::%player%} to the x location of player
  360. set {speedsetback::%player%} to location of the player
  361. wait 5 ticks
  362. set {_loc1::%player%} to the x location of player
  363. wait 1 tick
  364. set {_diffyx::%player%} to difference between {_loc::%player%} and {_loc1::%player%}
  365. if difference between {_loc::%player%} and {_loc1::%player%} >= 3.7:
  366. player's gamemode is not creative
  367. player is not flying
  368. add 1 to {speed::%player%}
  369. if {speed::%player%} >= 3:
  370. teleport player to {speedsetback::%player%}
  371. alert(player, "Speed")
  372. add 1 to {speedalerts::%player%}
  373. add 1 to {alerts::%player%}
  374. if {alerts::%player%} >= 10:
  375. if {kick_10_alerts} is true:
  376. hydrApi_kickPlayer(player)
  377.  
  378. on any move:
  379. player does not have permission "hydra.bypass.speed":
  380. if {@eula} is true:
  381. player doesn't have speed
  382. set {_locz::%player%} to the z location of player
  383. set {speedsetback::%player%} to location of the player
  384. wait 5 ticks
  385. set {_loc1z::%player%} to the z location of player
  386. wait 1 tick
  387. set {_diffy::%player%} to difference between {_locz::%player%} and {_loc1z::%player%}
  388. if difference between {_locz::%player%} and {_loc1z::%player%} >= 3.7:
  389. player's gamemode is not creative
  390. player is not flying
  391. add 1 to {speed::%player%}
  392. if {speed::%player%} >= 3:
  393. teleport player to {speedsetback::%player%}
  394. alert(player, "Speed")
  395. add 1 to {speedalerts::%player%}
  396. add 1 to {alerts::%player%}
  397. if {alerts::%player%} >= 10:
  398. if {kick_10_alerts} is true:
  399. hydrApi_kickPlayer(player)
  400.  
  401. on damage:
  402. attacker does not have permission "hydra.bypass.reach":
  403. if {@eula} is true:
  404. attacker is a player
  405. set {_reach} to distance between attacker and victim
  406. if {_reach} > 4.5:
  407. if damage cause is not a projectile:
  408. attacker's gamemode is not creative:
  409. cancel event
  410. alert(attacker, "Reach")
  411. add 1 to {reachalerts::%attacker%}
  412. add 1 to {alerts::%attacker%}
  413. if {alerts::%attacker%} >= 10:
  414. if {kick_10_alerts} is true:
  415. hydrApi_kickPlayer(attacker)
  416.  
  417.  
  418. on damage:
  419. attacker does not have permission "hydra.bypass.selfhurt":
  420. if {@eula} is true:
  421. if attacker is victim:
  422. if damage cause is not a projectile:
  423. cancel event
  424. set {_ping} to attacker's ping
  425. alert(attacker, "SelfHurt")
  426.  
  427.  
  428. on damage of a player:
  429. victim is not flying
  430. damage wasn't caused by fall, potion, lava, burning, fire, poison or wither
  431. victim is not burning
  432. victim doesn't have poison
  433. victim doesn't have wither:
  434. set {antikb::%victim%} to location of victim
  435. wait 10 ticks
  436. set {antikb2::%victim%} to location of victim
  437. block at victim is not cobweb:
  438. block at victim is not water:
  439. victim is not riding:
  440. if {antikb::%victim%} = {antikb2::%victim%}:
  441. attacker does not have permission "hydra.bypass.antiknockback":
  442. if {@eula} is true:
  443. alert(victim, "AntiKnockback")
  444. add 1 to {alerts::%victim%}
  445. add 1 to {antikbalerts::%victim%}
  446. if {alerts::%victim%} >= 10:
  447. if {kick_10_alerts} is true:
  448. hydrApi_kickPlayer(victim)
  449.  
  450. on chat:
  451. wait 1 tick
  452. set {chatcooldown::%player%} to true
  453. wait {@chat_cooldown_seconds} seconds
  454. delete {chatcooldown::%player%}
  455.  
  456. on chat:
  457. if {@eula} is true:
  458. if {chatcooldown::%player%} is true:
  459. player does not have permission "hydra.bypass.chatcooldown":
  460. send "&cThere is a {@chat_cooldown_seconds}&c second chat cooldown!"
  461. cancel event
  462.  
  463. on shoot:
  464. if projectile is an arrow:
  465. if difference between {bow::%shooter%} and now is less than 2 ticks:
  466. cancel event
  467. shooter does not have permission "hydra.bypass.fastbow":
  468. if {@eula} is true:
  469. alert(shooter, "FastBow")
  470. add 1 to {alerts::%shooter%}
  471. add 1 to {fastbowalerts::%shooter%}
  472. if {alerts::%shooter%} >= 10:
  473. if {kick_10_alerts} is true:
  474. hydrApi_kickPlayer(shooter)
  475. set {bow::%shooter%} to now
  476.  
  477.  
  478. on walk on water:
  479. player is on ground
  480. player's gamemode is not creative
  481. player is not riding
  482. player is not sneaking
  483. block below player is water
  484. block south below player is water
  485. block east below player is water
  486. block west below player is water
  487. block north below player is water
  488. block south player is air
  489. block north player is air
  490. block west player is air
  491. block east player is air
  492. player does not have permission "hydra.bypass.waterwalk"
  493. if {@eula} is true:
  494. cancel event
  495. add 1 to {alerts::%player%}
  496. add 1 to {waterwalk::%player%}
  497. alert(player, "Waterwalk")
  498.  
  499. on jump:
  500. if {@eula} is true:
  501. player does not have permission "hydra.bypass.highjump":
  502. player's gamemode is not creative
  503. player is not flying
  504. player is not riding
  505. set {_loc} to player's y coordinate
  506. set {_pos} to player's location
  507. wait 7 ticks
  508. set {_loc1} to player's y coordinate
  509. difference between {_loc} and {_loc1} >= 1.8:
  510. block below player is not a stair
  511. block south below player is not a stair
  512. block east below player is not a stair
  513. block west below player is not a stair
  514. block north below player is not a stair
  515. block below player is not a slab
  516. block south below player is not a slab
  517. block east below player is not a slab
  518. block west below player is not a slab
  519. block north below player is not a slab
  520. teleport player to {loc::%player%}
  521. add 1 to {highjumplogs::%player%}
  522. add 1 to {alerts::%player%}
  523. alert(player, "High Jump")
  524.  
  525.  
  526.  
  527. command /addbannedword [<text>]:
  528. permission: hydra.words.addbanned
  529. permission message: {@NoPermission}
  530. trigger:
  531. if {bannedwords::*} contains {bannedword::%arg 1%}:
  532. send "&c&lHydra &8>> &cThat word is already added to the banned word list! Check all of the banned words with /bannedwords"
  533. else:
  534. set {bannedword::%arg 1%} to arg 1
  535. add {bannedword::%arg 1%} to {bannedwords::*}
  536. send "&cAdded the word &d%arg 1%&c to the banned word list"
  537.  
  538. command /clearbannedwords:
  539. permission: hydra.words.clearbanned
  540. permission message: {@NoPermission}
  541. trigger:
  542. delete {bannedword::*}
  543. delete {bannedwords::*}
  544. send "&cCleared all banned words!"
  545.  
  546. command /bannedwords:
  547. permission: hydra.words.listbanned
  548. permission message: {@NoPermission}
  549. trigger:
  550. set {e} to 1
  551. loop 1000 times:
  552. if {bannedwords::%{e}%} is set:
  553. send "%{bannedwords::%{e}%}%"
  554. add 1 to {e}
  555.  
  556. on chat:
  557. loop {bannedwords::*}:
  558. if message contains loop-value:
  559. if player does not have permission "hydra.bypass.bannedwords":
  560. send "&c&lHydra &8>> &c%player% has tried to type a &cBanned Word&f. The word they typed was &c%loop-value%" to all players where [player input has permission "hydra.logs"]
  561. send "&c&lHydra &8>> &cOriginal Message: &f%message%"
  562. replace all "%loop-value%" with "" in message
  563.  
  564.  
  565. function alert(p: player, cheat: text):
  566. set {_ping} to {_p}'s ping
  567. send "&c&lHydra &8>> &c%{_p}% has failed &c%{_cheat}%. (&c%{_ping}%&c MS&f)" to all players where [player input has permission "hydra.logs"]
  568. send "&c&lHydra &8>> &c%{_p}% has failed &c%{_cheat}%. (&c%{_ping}%&c MS&f)" to console
  569.  
  570.  
  571. command /alert [<player>] [<text>]:
  572. permission: hydra.alert
  573. permission message: {@NoPermission}
  574. trigger:
  575. if arg 1 is set:
  576. if arg 2 is set:
  577. alert(arg 1, "%arg 2%")
  578. else:
  579. send "/alert <player> <reason>"
  580. else:
  581. send "/alert <player> <reason>"
  582.  
  583. #-----------------------------------------------------------------------------------------------------------------------
  584.  
  585. #API Docs:
  586.  
  587. #Making a Hydra Addon (Guide)
  588. #hydrAPI allows for custom hydra addons coded in skript using simple functions
  589. #BE SURE THE ADDON NAME IN THE SERVER FILES IS WRITTEN WITH LOWERCASE OR IT WILL NOT BE AUTOLOADED OR HOOKED INTO HYDRA.
  590.  
  591.  
  592.  
  593.  
  594. #The most basic thing of a hydra addon is registering it, we have made it as simple as possible.
  595. #When a On Load is called be sure to use the "hydrApi_registerAddon" function.
  596. #The first argument (ADDON NAME) Indicates your addon's name (Allowed to be uppercase).
  597. #The second argument (EXTRA TEXT) Indicates anything following your addons name, like a version number or your name.
  598. #The third argument (script) is to tell hydrAPI what the scripts name is in your server files. DO NOT CHANGE.
  599.  
  600. #on load:
  601. #hydrApi_registerAddon("ADDON NAME", "EXTRA TEXT", script)
  602.  
  603.  
  604.  
  605.  
  606. #Other things you may need
  607.  
  608.  
  609. #Returns the players violations, this can be used as a variable like "if hydrApi_getVL(player) is more than 5:"
  610. #Change ARGUMENT to the player name, player doesnt need to be online.
  611. #Will return 0 if the player hasnt had any VL's or if the player doesnt exist.
  612. #hydrApi_getVL(ARGUMENT)
  613.  
  614.  
  615. #Adds ARGUMENT2 violations to ARGUMENT1.
  616. #Change ARGUMENT1 to the player name, player doesnt need to be online.
  617. #Change ARGUMENT2 to the to the amount of violations to add.
  618. #hydrApi_addVL(ARGUMENT1, ARGUMENT2)
  619.  
  620.  
  621. #Sets ARGUMENT1's violations to ARGUMENT2.
  622. #Change ARGUMENT1 to the player name, player doesnt need to be online.
  623. #Change ARGUMENT2 to the to the amount of violations to set to.
  624. #hydrApi_setVL(ARGUMENT1, ARGUMENT2)
  625.  
  626.  
  627. #Makes a violation and announces it to all staff.
  628. #Change ARGUMENT1 to the player name.
  629. #Change ARGUMENT2 to the chat they were flagged for.
  630. #hydrApi_alert(ARGUMENT1, "ARGUMENT2")
  631.  
  632.  
  633. #That is the Hydra API documentation. Happy Coding!
  634.  
  635. #-----------------------------------------------------------------------------------------------------------------------
  636.  
  637. on load:
  638. set {kick_10_alerts} to {@kick_10_alerts}
  639. set {hydra::action::alert} to true
  640. set {hydra::action::alertFunc} to false
  641. loop {hydrApi::addons::*}:
  642. delete {hydrApi::addons::%loop-index%}
  643. execute console command "sk reload %loop-index%"
  644.  
  645. function hydrApi_registerAddon(p: text, v: text, n: text):
  646. set {hydrApi::addons::%{_n}%} to "%{_p}% - %{_v}%"
  647. send "&cLoaded Hydra Addon %{_p}% - %{_v}%" to console
  648.  
  649. function hydrApi_getVL(p: offlineplayer) :: number:
  650. {alerts::%{_p}%} is not set:
  651. set {alerts::%{_p}%} to 0
  652. return {alerts::%{_p}%}
  653.  
  654. function hydrApi_reportPlayer(p: offline player, r: text):
  655. add 1 to {reports::%{_p}%}
  656. set {report::%{_p}%::%{reports::%{_p}%}%} to {_r}
  657. add {report::%{_p}%::%{reports::%{_p}%}%} to {reports::%{_p}%::*}
  658.  
  659. function hydrApi_clearReportsPlayer(p: offline player):
  660. delete {reports::%{_p}%}
  661. delete {report::%{_p}%::*}
  662. delete {reports::%{_p}%::*}
  663.  
  664. function hydrApi_addVL(p: offlineplayer, vl: number):
  665. add {_vl} to {alerts::%{_p}%}
  666.  
  667. function hydrApi_setVL(p: offlineplayer, vl: number):
  668. set {alerts::%{_p}%} to {_vl}
  669.  
  670. function hydrApi_alert(p: offlineplayer, h: text):
  671. alert({_p}, {_h})
  672.  
  673. function hydrApi_setKick(b: boolean):
  674. set {kick_10_alerts} to {_b}
  675.  
  676. function hydrApi_setAlertBool(b: boolean):
  677. set {hydra::action::alert} to {_b}
  678.  
  679. function hydrApi_setAlertCallFunc(f: boolean):
  680. set {hydra::action::alertFunc} to {_f}
  681.  
  682. function hydrApi_kickPlayer(p: player):
  683. kick {_p} due to "{@KickMessage}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement