Aller au contenu
  • 0

Command incorrect.


Question

Posté(e)

Bonjour, Bonsoir !

 

Donc j'ai pris un skript "Gandalf" (AntiCheat) mais quand je fait /gandalf sa me dit commande incorrect ...

 

command /gandalf [<text>] [<offline player>] [<text>]:
   permission: Gandalf.staff
   permission message: &c[Gandalf] Vous n'avez pas la permission.
   trigger:
       if arg-1 is not set:
           open chest with 3 rows named "&cConfiguration" to player
           wait 2 tick
           format slot 11 of player with compass named "&9Checks" with lore "&eClique pour voir les checks." to run [make player execute command "/gandalf checks"]
           format slot 15 of player with book named "&3Bans" with lore "&cBientôt disponible." to run [make player execute command "/gandalf bans"]
       if arg-1 is "checks":
           open chest with 6 rows named "&aTout les cheats détectés" to player
           wait 2 ticks
           format slot 50 of player with green stained clay named "&7Suivant" with lore "&cBientôt" to close
           format slot 49 of player with arrow named "&7Fermer" to close
           format slot 48 of player with red stained clay named "&7Retour" to run [make player execute command "/gandalf"]
           while inventory name of current inventory of player is "&aTout les cheats détectés":
               {gandalf-Reach.enable} is "true":
                   format slot 0 of player with light green dye named "&3&lReach" with lore "||&7Mode: &e%{gandalf-Reach.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Reach.enable} to "false"]
               else:
                   format slot 0 of player with gray dye named "&3&lReach" with lore "||&7Mode: &e%{gandalf-Reach.mode}%|| ||&7Fait par: ANDROBAL" to run [set {gandalf-Reach.enable} to "true"]
               {gandalf-Fly_or_HightJump.enable} is "true":
                   format slot 1 of player with light green dye named "&3&lFly_or_HightJump" with lore "||&7Mode: &e%{gandalf-Fly_or_HightJump.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Fly_or_HightJump.enable} to "false"]
               else:
                   format slot 1 of player with gray dye named "&3&lFly_or_HightJump" with lore "||&7Mode: &e%{gandalf-Fly_or_HightJump.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Fly_or_HightJump.enable} to "true"]
               {gandalf-FastBow.enable} is "true":
                   format slot 2 of player with light green dye named "&3&lFastBow" with lore "||&7Mode: &e%{gandalf-FastBow.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastBow.enable} to "false"]
               else:
                   format slot 2 of player with gray dye named "&3&lFastBow" with lore "||&7Mode: &e%{gandalf-FastBow.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastBow.enable} to "true"]
               {gandalf-FastEat.enable} is "true":
                   format slot 3 of player with light green dye named "&3&lFastEat" with lore "||&7Mode: &e%{gandalf-FastEat.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastEat.enable} to "false"]
               else:
                   format slot 3 of player with gray dye named "&3&lFastEat" with lore "||&7Mode: &e%{gandalf-FastEat.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastEat.enable} to "true"]
               {gandalf-Speed.enable} is "true":
                   format slot 4 of player with light green dye named "&3&lSpeed" with lore "||&7Mode: &e%{gandalf-Speed.mode}%||&7Fait par: Ozachi" to run [set {gandalf-Speed.enable} to "false"]
               else:
                   format slot 4 of player with gray dye named "&3&lSpeed" with lore "||&7Mode: &e%{gandalf-Speed.mode}%||&7Fait par: Ozachi" to run [set {gandalf-Speed.enable} to "true"]
               wait 5 ticks
       else if arg-1 is "bans":
           open chest with 6 rows named "&6Gandalf Bans" to player
           wait 2 ticks
           set {_s} to 0
           loop {gandalf.bans::*}:
               format slot {_s} of player with paper named "&a%loop-value%" to close
               add 1 to {_s}
       else if arg-1 is "ban":
           if arg-2 is not set:
               message "&c/Gandalf ban <joueur> <raison>."
           else:
               if arg-3 is not set:
                   message "&c/Gandalf ban <joueur> <raison>."
               else:
                   wf "[%now%] %arg-2% vient d'être banni pour %arg-3%" to "plugins/Gandalf/Data/Bans.yml"
                   set {vl.%arg-2%.Reach} to 0
                   set {vl.%arg-2%.Fly_or_HightJump} to 0
                   set {vl.%arg-2%.FastBow} to 0
                   set {vl.%arg-2%.FastEat} to 0
                   set {vl.%arg-2%.Speed} to 0
                   launch ball large firework colored light blue at arg 2 timed 0
                   launch Creeper firework colored blue and green at arg 2's location timed -0
                   set {_b} to {gandalf-custom_punish}
                   replace "{hacker}" with "%arg-2%" in {_b}
                   execute command "%{_b}%"
                   set {gandalf.bans::%arg-2%} to "&c%arg-2% &7(&c%arg-3%&7)"
                   {gandalf-broadcast} is "true"
                   set {_c} to {gandalf-banmsg}
                   replace "{hacker}" with "%arg-2%" in {_c}
                   broadcast "%{_c}%"
       else if arg-1 is "reset":
           if arg-2 is not set:
               message "&c/Gandalf reset <joueur>."
           else:
               set {vl.Reach.%arg-2%} to 0
               set {vl.Speed.%arg-2%} to 0
               set {vl.FastBow.%arg-2%} to 0
               set {vl.FastEat.%arg-2%} to 0
               set {vl.Fly_or_HightJump.%arg-2%} to 0
               set {autoban.%arg-2%} to false
               message "&aReset des stats de %arg-2% terminé."

 

Script Complet !

 



#
# Version 0.1 de Gandalf - BETA
#


on load:
   if file "plugins/Gandalf/config.yml" doesn't exists:
       send "&3La config de Gandalf vient d'être reload." to all ops
       set "Gandalf.Permission" to "Gandalf.staff" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Tps-min" to "19" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Ping-Max" to "400" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Execute-Punish" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Custom-Punish" to "/kick {hacker} [Gandalf] Unfair Advantage" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Ban-Message" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Broadcast" to "&6Gandalf &cvient de détecté &6{hacker}&c utilisant un cheat et l'a banni du network." in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Alert-msg" to "&7[&cGandalf&7] &c{hacker} &7utilise probablement un &c{cheat} &7[&cVL&7:&c {violations}&7]" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Autoban-alert" to "&7[&cGandalf&7] &c{hacker} &7va être banni pour &c&l{cheat} &7dans &c5 secondes." in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Reach.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Reach.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Reach.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Fly_or_HightJump.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Fly_or_HightJump.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Fly_or_HightJump.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastBow.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastBow.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastBow.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastEat.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastEat.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastEat.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Speed.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Speed.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Speed.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.StrangeMove.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.StrangeMove.Mode" to "Alert" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.StrangeMove.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
   if file "plugins/Gandalf/Data/Bans.yml" doesn't exists:
       send "&3La Data de Gandalf vient d'être reload." to all ops
       create file "plugins/Gandalf/Data/Bans.yml"
   set {gandalf-perm} to value "Gandalf.Permission" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-tps} to value "Gandalf.Tps-min" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-ping} to value "Gandalf.Ping-Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-execute_punish} to value "Gandalf.Execute-Punish" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-custom_punish} to value "Gandalf.Custom-Punish" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-custom_punish} to "%colored {gandalf-custom_punish}%"
   set {gandalf-broadcast} to value "Gandalf.Ban-Message" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-banmsg} to value "Gandalf.Broadcast" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-banmsg} to "%colored {gandalf-banmsg}%"
   set {gandalf-alertmsg} to value "Gandalf.Alert-msg" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-alertmsg} to "%colored {gandalf-alertmsg}%"
   set {gandalf-autobanalert} to value "Gandalf.Autoban-alert" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-autobanalert} to "%colored {gandalf-autobanalert}%"
   set {gandalf-Reach.enable} to value "Checks.Reach.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Reach.mode} to value "Checks.Reach.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Reach.Max} to value "Checks.Reach.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-Fly_or_HightJump.enable} to value "Checks.Fly_or_HightJump.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Fly_or_HightJump.mode} to value "Checks.Fly_or_HightJump.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Fly_or_HightJump.Max} to value "Checks.Fly_or_HightJump.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-FastBow.enable} to value "Checks.FastBow.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-FastBow.mode} to value "Checks.FastBow.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-FastBow.Max} to value "Checks.FastBow.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-FastEat.enable} to value "Checks.FastEat.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-FastEat.mode} to value "Checks.FastEat.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-FastEat.Max} to value "Checks.FastEat.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-Speed.enable} to value "Checks.Speed.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Speed.mode} to value "Checks.Speed.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Speed.Max} to value "Checks.Speed.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-StrangeMove.enable} to value "Checks.StrangeMove.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-StrangeMove.mode} to value "Checks.StrangeMove.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-StrangeMove.Max} to value "Checks.StrangeMove.Max" get of "plugins/Gandalf/config.yml" parsed as number

# Permet l'envoie d'alertes.
function Alert(hacker: player, reason: text, info: text):
   tps is more than {gandalf-tps}
   {_hacker}'s ping is less than {gandalf-ping}
   {gandalf-%{_reason}%.enable} is "true"
   loop all players:
       loop-player have permission "%{gandalf-perm}%"
       {Gandalf.alerts.%loop-player%} is true or "true"
       set {_a} to {gandalf-alertmsg}
       replace "{hacker}" with "%{_hacker}%" in {_a}
       replace "{cheat}" with "%{_reason}%" in {_a}
       replace "{violations}" with "%{vl.%{_reason}%.%{_hacker}%}%" in {_a}
       set {_b} to {gandalf-custom_punish}
       replace "{hacker}" with "%{_hacker}%" in {_b}
       json("%loop-value%", "%{_a}%||ttp:&3%{_info}%||cmd:%{_b}%")

# Permet l'autoban d'un joueur.  
function AutoBan(hacker: player, reason: text):
   tps is more than {gandalf-tps}
   {gandalf-%{_reason}%.enable} is "true"
   {gandalf-%{_reason}%.mode} is "AutoBan"
   {autoban.%{_hacker}%} is not true:
       {vl.%{_reason}%.%{_hacker}%} >= {gandalf-%{_reason}%.Max}
       {_hacker}'s ping is less than {gandalf-ping}
       loop all players:
           loop-player have permission "%{gandalf-perm}%"
           {Gandalf.alerts.%loop-player%} is true or "true":
               set {_b} to {gandalf-autobanalert}
               replace "{hacker}" with "%{_hacker}%" in {_b}
               replace "{cheat}" with "%{_reason}%" in {_b}
               json("%loop-value%", "%{_b}%||ttp:&cClique &cPour &cAnnuler||cmd:/Gandalf reset %{_hacker}%")
               set {autoban.%{_hacker}%} to true
       wait 5 seconds
       {autoban.%{_hacker}%} is true:
           set {autoban.%{_hacker}%} to false
           execute command "/gandalf ban %{_hacker}% Unfair Advantage"
           set {vl.%{_reason}%.%{_hacker}%} to 0



# Commande principale.
command /gandalf [<text>] [<offline player>] [<text>]:
   trigger:
       if arg 1 is not set:
           open chest with 3 rows named "&cConfiguration" to player
           wait 2 tick
           format slot 11 of player with compass named "&9Checks" with lore "&eClique pour voir les checks." to run [make player execute command "/gandalf checks"]
           format slot 15 of player with book named "&3Bans" with lore "&cBientôt disponible." to run [make player execute command "/gandalf bans"]
       if arg-1 is "checks":
           open chest with 6 rows named "&aTout les cheats détectés" to player
           wait 2 ticks
           format slot 50 of player with green stained clay named "&7Suivant" with lore "&cBientôt" to close
           format slot 49 of player with arrow named "&7Fermer" to close
           format slot 48 of player with red stained clay named "&7Retour" to run [make player execute command "/gandalf"]
           while inventory name of current inventory of player is "&aTout les cheats détectés":
               {gandalf-Reach.enable} is "true":
                   format slot 0 of player with light green dye named "&3&lReach" with lore "||&7Mode: &e%{gandalf-Reach.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Reach.enable} to "false"]
               else:
                   format slot 0 of player with gray dye named "&3&lReach" with lore "||&7Mode: &e%{gandalf-Reach.mode}%|| ||&7Fait par: ANDROBAL" to run [set {gandalf-Reach.enable} to "true"]
               {gandalf-Fly_or_HightJump.enable} is "true":
                   format slot 1 of player with light green dye named "&3&lFly_or_HightJump" with lore "||&7Mode: &e%{gandalf-Fly_or_HightJump.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Fly_or_HightJump.enable} to "false"]
               else:
                   format slot 1 of player with gray dye named "&3&lFly_or_HightJump" with lore "||&7Mode: &e%{gandalf-Fly_or_HightJump.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Fly_or_HightJump.enable} to "true"]
               {gandalf-FastBow.enable} is "true":
                   format slot 2 of player with light green dye named "&3&lFastBow" with lore "||&7Mode: &e%{gandalf-FastBow.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastBow.enable} to "false"]
               else:
                   format slot 2 of player with gray dye named "&3&lFastBow" with lore "||&7Mode: &e%{gandalf-FastBow.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastBow.enable} to "true"]
               {gandalf-FastEat.enable} is "true":
                   format slot 3 of player with light green dye named "&3&lFastEat" with lore "||&7Mode: &e%{gandalf-FastEat.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastEat.enable} to "false"]
               else:
                   format slot 3 of player with gray dye named "&3&lFastEat" with lore "||&7Mode: &e%{gandalf-FastEat.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastEat.enable} to "true"]
               {gandalf-Speed.enable} is "true":
                   format slot 4 of player with light green dye named "&3&lSpeed" with lore "||&7Mode: &e%{gandalf-Speed.mode}%||&7Fait par: Ozachi" to run [set {gandalf-Speed.enable} to "false"]
               else:
                   format slot 4 of player with gray dye named "&3&lSpeed" with lore "||&7Mode: &e%{gandalf-Speed.mode}%||&7Fait par: Ozachi" to run [set {gandalf-Speed.enable} to "true"]
               wait 5 ticks
       else if arg-1 is "bans":
           open chest with 6 rows named "&6Gandalf Bans" to player
           wait 2 ticks
           set {_s} to 0
           loop {gandalf.bans::*}:
               format slot {_s} of player with paper named "&a%loop-value%" to close
               add 1 to {_s}
       else if arg-1 is "ban":
           if arg-2 is not set:
               message "&c/Gandalf ban <joueur> <raison>."
           else:
               if arg-3 is not set:
                   message "&c/Gandalf ban <joueur> <raison>."
               else:
                   wf "[%now%] %arg-2% vient d'être banni pour %arg-3%" to "plugins/Gandalf/Data/Bans.yml"
                   set {vl.%arg-2%.Reach} to 0
                   set {vl.%arg-2%.Fly_or_HightJump} to 0
                   set {vl.%arg-2%.FastBow} to 0
                   set {vl.%arg-2%.FastEat} to 0
                   set {vl.%arg-2%.Speed} to 0
                   launch ball large firework colored light blue at arg 2 timed 0
                   launch Creeper firework colored blue and green at arg 2's location timed -0
                   set {_b} to {gandalf-custom_punish}
                   replace "{hacker}" with "%arg-2%" in {_b}
                   execute command "%{_b}%"
                   set {gandalf.bans::%arg-2%} to "&c%arg-2% &7(&c%arg-3%&7)"
                   {gandalf-broadcast} is "true"
                   set {_c} to {gandalf-banmsg}
                   replace "{hacker}" with "%arg-2%" in {_c}
                   broadcast "%{_c}%"
       else if arg-1 is "reset":
           if arg-2 is not set:
               message "&c/Gandalf reset <joueur>."
           else:
               set {vl.Reach.%arg-2%} to 0
               set {vl.Speed.%arg-2%} to 0
               set {vl.FastBow.%arg-2%} to 0
               set {vl.FastEat.%arg-2%} to 0
               set {vl.Fly_or_HightJump.%arg-2%} to 0
               set {autoban.%arg-2%} to false
               message "&aReset des stats de %arg-2% terminé."

# Commande pour activer / désactiver les alertes.
command /alerts:
   permission: Gandalf.staff
   permission message: &c[Gandalf] Vous n'avez pas la permission.
   trigger:
       if {Gandalf.alerts.%player%} is not set:
           set {Gandalf.alerts.%player%} to true
           message "&7Vous avez &aActivé &7vos alertes."
       else:
           delete {Gandalf.alerts.%player%}
           message "&7Vous avez &cDésactivé &7vos alertes."

# Commande pour voir les logs d'un joueur.
command /logs [<player>]:
   permission: Gandalf.staff
   permission message: &c[Gandalf] Vous n'avez pas la permission.
   trigger:
       if arg-1 is not set:
           message "&c/logs <joueur>."
       else:
           message "&eTous les logs de &6%arg-1%&e."
           message " &e- &6Reach: &e%{vl.reach.%arg-1%}%"
           message " &e- &6Fly_or_HightJump: &e%{vl.Fly_or_HightJump.%arg-1%}%"
           message " &e- &6FastBow: &e%{vl.fastbow.%arg-1%}%"
           message " &e- &6FastEat: &e%{vl.fasteat.%arg-1%}%"
           message " &e- &6Speed: &e%{vl.speed.%arg-1%}%"

#
# CHECKS
#


# AntiReach

on damage:# of player:
   attacker's gamemode is not creative
   damage cause is attack
   set {_diff} to difference between victim's yaw and attacker's yaw
   if attacker's ping < 150:
       set {_max} to 5
   else if attacker's ping < 250:
       set {_max} to 5.4
   else:
       set {_max} to 5.8
   distance between attacker and victim > {_max}
   if {_diff} is between 100 and 280:
       difference between {last.reach.%attacker%} and now is less than 1.5 seconds:
           attacker's ping is less than 400:
               add 1 to {vl.Reach.%attacker%}
           Alert(attacker, "Reach", "%distance between attacker and victim% Blocs")
           AutoBan(attacker, "Reach")
       set {last.reach.%attacker%} to now
   else:
       distance between attacker and victim > 6:
           attacker's ping is less than 400
           Alert(attacker, "Reach", "[Experimental]")
           AutoBan(attacker, "Reach")



# Anti Fly_or_HightJump

on jump:
   player's gamemode is survival or adventure
   player is not flying
   player is not riding
   if block at player is air:
       wait 3 ticks
       player is not on ground
       set {_y} to player's y-location
       loop 3 times:
           set {_p} to location of player
           block below player is air
           block 0.3 under player is air
           set {_y1} to player's y-location
           wait 2 ticks
           set {_y2} to player's y-location
           block 0.3 under player is air
           if {_y2} is greater than {_y1}:
               add 1 to {_success}
       {_success} > 2:
           distance between {_p} and location of player > 0.5
           difference between {Gandalf.lastfly.%player%} and now is less than 10 ticks:
               exit
           else:
               difference between {last.j_or_tp.%player%} and now is greater than 1 second
               set {Gandalf.lastfly.%player%} to now
               add 1 to {vl.Fly_or_HightJump.%player%}
               set {_distance} to difference between {_y} and player's y-location
               Alert(player, "Fly_or_HightJump", "Distance: %{_distance}*3% blocs")
               AutoBan(player, "Fly_or_HightJump")
               clear {_success}



# AntiFastBow      

on shoot:
   projectile is arrow
   difference between {lastshoot.%shooter%} and now < 2 ticks:
       difference between {lastfastbow.%shooter%} and now is less than 2 ticks:
           stop
       else:
           shooter's ping is less than 400:
               add 1 to {vl.FastBow.%shooter%}
           set {lastfastbow.%shooter%} to now
           Alert(shooter, "FastBow", "Delay: %difference between {lastshoot.%shooter%} and now%")
           AutoBan(shooter, "FastBow")
   set {lastshoot.%shooter%} to now



# AntiFastEat

on drop:
   delete {lasteat.%player%}

on consume:
   player's ping <= 400
   difference between {lasteat.%player%} and now < 25 ticks:
       difference between {lastfasteat.%player%} and now is less than 20 ticks:
           stop
       else:
           player's ping is less than 400:
               add 1 to {vl.FastEat.%player%}
           set {lastfasteat.%player%} to now
           Alert(player, "FastEat", "Delay: %difference between {lasteat.%player%} and now%")
           AutoBan(player, "FastEat")
   set {lasteat.%player%} to now



# AntiSpeed - Sol

on any move:
   chance of 30%
   player's walk speed is less than 0.3
   player's gamemode is survival or adventure
   player is not flying
   player is not riding
   loop 5 times:
       set {_y} to player's y-location
       set {_p} to player's location
       wait 2 ticks
       set {_y2} to player's y-location
       set {_p2} to player's location
       set {_0} to difference between {_y} and {_y2}
       if {_0} is between 0 and 1:
           set {_distance1} to distance between {_p} and {_p2}
           distance between {_p} and {_p2} is greater than 1
           add 1 to {_flags}
   if {_flags} is greater than 3:
       difference between {lastspeed.%player%} and now is less than 10 ticks:
           stop
       else:
           difference between {last.j_or_tp.%player%} and now is greater than 1 second
           player's ping is less than 600:
               add 1 to {vl.Speed.%player%}
           set {lastspeed.%player%} to now
           Alert(player, "Speed", "Distance: %({_distance1}+{_distance2})*2%")
           AutoBan(player, "Speed")

# Anti StrangeMove (HardSpeed - Blink - VanillaTP)

on jump:
   difference between {last.move.%player%} and now is less than 15 ticks
   set {_y} to y-location of player
   set {_a} to location of player
   wait 10 ticks
   distance between {_a} and location of player > 7:
       block below player is not air
       {_y} <= y-location of player
       difference between {last.move.%player%} and now is less than 15 ticks:
           stop
       else:
           difference between {last.j_or_tp.%player%} and now is greater than 1 second
           player's ping is less than 400:
               add 1 to {vl.StrangeMove.%player%}
           set {last.move.%player%} to now
           Alert(player, "StrangeMove", "Distance: %distance between {_a} and location of player% blocs")
           AutoBan(player, "StrangeMove")


#          
# Utiles (Ne pas supprimer !)
#



on teleport:
   set {last.j_or_tp.%player%} to now  
on damage of player:
   set {last.j_or_tp.%victim%} to now
on join:
   set {last.j_or_tp.%player%} to now
   set {vl.Reach.%player%} to 0
   set {vl.Fly_or_HightJump.%player%} to 0
   set {vl.FastBow.%player%} to 0
   set {vl.FastEat.%player%} to 0
   set {vl.Speed.%player%} to 0
on quit:
   set {last.j_or_tp.%player%} to now
every 30 seconds:
   loop all players:
       if {vl.Reach.%loop-player%} > 1:
           remove 1 from {vl.Reach.%loop-player%}
       if {vl.Speed.%loop-player%} > 1:
           remove 1 from {vl.Speed.%loop-player%}
       if {vl.Fly_or_HightJump.%loop-player%} > 1:
           remove 1 from {vl.Fly_or_HightJump.%loop-player%}
       if {vl.FastBow.%loop-player%} > 1:
           remove 1 from {vl.FastBow.%loop-player%}
       if {vl.FastEat.%loop-player%} > 1:
           remove 1 from {vl.FastEat.%loop-player%}

 

Or, Aucune erreurs

8 réponses à cette question

Messages recommandés

  • 0
Posté(e)
Bonjour, Bonsoir !

 

Donc j'ai pris un skript "Gandalf" (AntiCheat) mais quand je fait /gandalf sa me dit commande incorrect ...

 

command /gandalf [<text>] [<offline player>] [<text>]:
   permission: Gandalf.staff
   permission message: &c[Gandalf] Vous n'avez pas la permission.
   trigger:
       if arg-1 is not set:
           open chest with 3 rows named "&cConfiguration" to player
           wait 2 tick
           format slot 11 of player with compass named "&9Checks" with lore "&eClique pour voir les checks." to run [make player execute command "/gandalf checks"]
           format slot 15 of player with book named "&3Bans" with lore "&cBientôt disponible." to run [make player execute command "/gandalf bans"]
       if arg-1 is "checks":
           open chest with 6 rows named "&aTout les cheats détectés" to player
           wait 2 ticks
           format slot 50 of player with green stained clay named "&7Suivant" with lore "&cBientôt" to close
           format slot 49 of player with arrow named "&7Fermer" to close
           format slot 48 of player with red stained clay named "&7Retour" to run [make player execute command "/gandalf"]
           while inventory name of current inventory of player is "&aTout les cheats détectés":
               {gandalf-Reach.enable} is "true":
                   format slot 0 of player with light green dye named "&3&lReach" with lore "||&7Mode: &e%{gandalf-Reach.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Reach.enable} to "false"]
               else:
                   format slot 0 of player with gray dye named "&3&lReach" with lore "||&7Mode: &e%{gandalf-Reach.mode}%|| ||&7Fait par: ANDROBAL" to run [set {gandalf-Reach.enable} to "true"]
               {gandalf-Fly_or_HightJump.enable} is "true":
                   format slot 1 of player with light green dye named "&3&lFly_or_HightJump" with lore "||&7Mode: &e%{gandalf-Fly_or_HightJump.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Fly_or_HightJump.enable} to "false"]
               else:
                   format slot 1 of player with gray dye named "&3&lFly_or_HightJump" with lore "||&7Mode: &e%{gandalf-Fly_or_HightJump.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Fly_or_HightJump.enable} to "true"]
               {gandalf-FastBow.enable} is "true":
                   format slot 2 of player with light green dye named "&3&lFastBow" with lore "||&7Mode: &e%{gandalf-FastBow.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastBow.enable} to "false"]
               else:
                   format slot 2 of player with gray dye named "&3&lFastBow" with lore "||&7Mode: &e%{gandalf-FastBow.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastBow.enable} to "true"]
               {gandalf-FastEat.enable} is "true":
                   format slot 3 of player with light green dye named "&3&lFastEat" with lore "||&7Mode: &e%{gandalf-FastEat.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastEat.enable} to "false"]
               else:
                   format slot 3 of player with gray dye named "&3&lFastEat" with lore "||&7Mode: &e%{gandalf-FastEat.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastEat.enable} to "true"]
               {gandalf-Speed.enable} is "true":
                   format slot 4 of player with light green dye named "&3&lSpeed" with lore "||&7Mode: &e%{gandalf-Speed.mode}%||&7Fait par: Ozachi" to run [set {gandalf-Speed.enable} to "false"]
               else:
                   format slot 4 of player with gray dye named "&3&lSpeed" with lore "||&7Mode: &e%{gandalf-Speed.mode}%||&7Fait par: Ozachi" to run [set {gandalf-Speed.enable} to "true"]
               wait 5 ticks
       else if arg-1 is "bans":
           open chest with 6 rows named "&6Gandalf Bans" to player
           wait 2 ticks
           set {_s} to 0
           loop {gandalf.bans::*}:
               format slot {_s} of player with paper named "&a%loop-value%" to close
               add 1 to {_s}
       else if arg-1 is "ban":
           if arg-2 is not set:
               message "&c/Gandalf ban <joueur> <raison>."
           else:
               if arg-3 is not set:
                   message "&c/Gandalf ban <joueur> <raison>."
               else:
                   wf "[%now%] %arg-2% vient d'être banni pour %arg-3%" to "plugins/Gandalf/Data/Bans.yml"
                   set {vl.%arg-2%.Reach} to 0
                   set {vl.%arg-2%.Fly_or_HightJump} to 0
                   set {vl.%arg-2%.FastBow} to 0
                   set {vl.%arg-2%.FastEat} to 0
                   set {vl.%arg-2%.Speed} to 0
                   launch ball large firework colored light blue at arg 2 timed 0
                   launch Creeper firework colored blue and green at arg 2's location timed -0
                   set {_b} to {gandalf-custom_punish}
                   replace "{hacker}" with "%arg-2%" in {_b}
                   execute command "%{_b}%"
                   set {gandalf.bans::%arg-2%} to "&c%arg-2% &7(&c%arg-3%&7)"
                   {gandalf-broadcast} is "true"
                   set {_c} to {gandalf-banmsg}
                   replace "{hacker}" with "%arg-2%" in {_c}
                   broadcast "%{_c}%"
       else if arg-1 is "reset":
           if arg-2 is not set:
               message "&c/Gandalf reset <joueur>."
           else:
               set {vl.Reach.%arg-2%} to 0
               set {vl.Speed.%arg-2%} to 0
               set {vl.FastBow.%arg-2%} to 0
               set {vl.FastEat.%arg-2%} to 0
               set {vl.Fly_or_HightJump.%arg-2%} to 0
               set {autoban.%arg-2%} to false
               message "&aReset des stats de %arg-2% terminé."

 

Script Complet !

 



#
# Version 0.1 de Gandalf - BETA
#


on load:
   if file "plugins/Gandalf/config.yml" doesn't exists:
       send "&3La config de Gandalf vient d'être reload." to all ops
       set "Gandalf.Permission" to "Gandalf.staff" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Tps-min" to "19" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Ping-Max" to "400" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Execute-Punish" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Custom-Punish" to "/kick {hacker} [Gandalf] Unfair Advantage" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Ban-Message" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Broadcast" to "&6Gandalf &cvient de détecté &6{hacker}&c utilisant un cheat et l'a banni du network." in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Alert-msg" to "&7[&cGandalf&7] &c{hacker} &7utilise probablement un &c{cheat} &7[&cVL&7:&c {violations}&7]" in yaml file "plugins/Gandalf/config.yml"
       set "Gandalf.Autoban-alert" to "&7[&cGandalf&7] &c{hacker} &7va être banni pour &c&l{cheat} &7dans &c5 secondes." in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Reach.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Reach.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Reach.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Fly_or_HightJump.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Fly_or_HightJump.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Fly_or_HightJump.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastBow.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastBow.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastBow.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastEat.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastEat.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.FastEat.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Speed.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Speed.Mode" to "Autoban" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.Speed.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.StrangeMove.Enable" to "true" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.StrangeMove.Mode" to "Alert" in yaml file "plugins/Gandalf/config.yml"
       set "Checks.StrangeMove.Max" to "10" in yaml file "plugins/Gandalf/config.yml"
   if file "plugins/Gandalf/Data/Bans.yml" doesn't exists:
       send "&3La Data de Gandalf vient d'être reload." to all ops
       create file "plugins/Gandalf/Data/Bans.yml"
   set {gandalf-perm} to value "Gandalf.Permission" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-tps} to value "Gandalf.Tps-min" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-ping} to value "Gandalf.Ping-Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-execute_punish} to value "Gandalf.Execute-Punish" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-custom_punish} to value "Gandalf.Custom-Punish" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-custom_punish} to "%colored {gandalf-custom_punish}%"
   set {gandalf-broadcast} to value "Gandalf.Ban-Message" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-banmsg} to value "Gandalf.Broadcast" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-banmsg} to "%colored {gandalf-banmsg}%"
   set {gandalf-alertmsg} to value "Gandalf.Alert-msg" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-alertmsg} to "%colored {gandalf-alertmsg}%"
   set {gandalf-autobanalert} to value "Gandalf.Autoban-alert" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-autobanalert} to "%colored {gandalf-autobanalert}%"
   set {gandalf-Reach.enable} to value "Checks.Reach.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Reach.mode} to value "Checks.Reach.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Reach.Max} to value "Checks.Reach.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-Fly_or_HightJump.enable} to value "Checks.Fly_or_HightJump.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Fly_or_HightJump.mode} to value "Checks.Fly_or_HightJump.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Fly_or_HightJump.Max} to value "Checks.Fly_or_HightJump.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-FastBow.enable} to value "Checks.FastBow.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-FastBow.mode} to value "Checks.FastBow.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-FastBow.Max} to value "Checks.FastBow.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-FastEat.enable} to value "Checks.FastEat.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-FastEat.mode} to value "Checks.FastEat.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-FastEat.Max} to value "Checks.FastEat.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-Speed.enable} to value "Checks.Speed.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Speed.mode} to value "Checks.Speed.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-Speed.Max} to value "Checks.Speed.Max" get of "plugins/Gandalf/config.yml" parsed as number
   set {gandalf-StrangeMove.enable} to value "Checks.StrangeMove.Enable" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-StrangeMove.mode} to value "Checks.StrangeMove.Mode" get of "plugins/Gandalf/config.yml" parsed as text
   set {gandalf-StrangeMove.Max} to value "Checks.StrangeMove.Max" get of "plugins/Gandalf/config.yml" parsed as number

# Permet l'envoie d'alertes.
function Alert(hacker: player, reason: text, info: text):
   tps is more than {gandalf-tps}
   {_hacker}'s ping is less than {gandalf-ping}
   {gandalf-%{_reason}%.enable} is "true"
   loop all players:
       loop-player have permission "%{gandalf-perm}%"
       {Gandalf.alerts.%loop-player%} is true or "true"
       set {_a} to {gandalf-alertmsg}
       replace "{hacker}" with "%{_hacker}%" in {_a}
       replace "{cheat}" with "%{_reason}%" in {_a}
       replace "{violations}" with "%{vl.%{_reason}%.%{_hacker}%}%" in {_a}
       set {_b} to {gandalf-custom_punish}
       replace "{hacker}" with "%{_hacker}%" in {_b}
       json("%loop-value%", "%{_a}%||ttp:&3%{_info}%||cmd:%{_b}%")

# Permet l'autoban d'un joueur. 
function AutoBan(hacker: player, reason: text):
   tps is more than {gandalf-tps}
   {gandalf-%{_reason}%.enable} is "true"
   {gandalf-%{_reason}%.mode} is "AutoBan"
   {autoban.%{_hacker}%} is not true:
       {vl.%{_reason}%.%{_hacker}%} >= {gandalf-%{_reason}%.Max}
       {_hacker}'s ping is less than {gandalf-ping}
       loop all players:
           loop-player have permission "%{gandalf-perm}%"
           {Gandalf.alerts.%loop-player%} is true or "true":
               set {_b} to {gandalf-autobanalert}
               replace "{hacker}" with "%{_hacker}%" in {_b}
               replace "{cheat}" with "%{_reason}%" in {_b}
               json("%loop-value%", "%{_b}%||ttp:&cClique &cPour &cAnnuler||cmd:/Gandalf reset %{_hacker}%")
               set {autoban.%{_hacker}%} to true
       wait 5 seconds
       {autoban.%{_hacker}%} is true:
           set {autoban.%{_hacker}%} to false
           execute command "/gandalf ban %{_hacker}% Unfair Advantage"
           set {vl.%{_reason}%.%{_hacker}%} to 0



# Commande principale.
command /gandalf [<text>] [<offline player>] [<text>]:
   trigger:
       if arg 1 is not set:
           open chest with 3 rows named "&cConfiguration" to player
           wait 2 tick
           format slot 11 of player with compass named "&9Checks" with lore "&eClique pour voir les checks." to run [make player execute command "/gandalf checks"]
           format slot 15 of player with book named "&3Bans" with lore "&cBientôt disponible." to run [make player execute command "/gandalf bans"]
       if arg-1 is "checks":
           open chest with 6 rows named "&aTout les cheats détectés" to player
           wait 2 ticks
           format slot 50 of player with green stained clay named "&7Suivant" with lore "&cBientôt" to close
           format slot 49 of player with arrow named "&7Fermer" to close
           format slot 48 of player with red stained clay named "&7Retour" to run [make player execute command "/gandalf"]
           while inventory name of current inventory of player is "&aTout les cheats détectés":
               {gandalf-Reach.enable} is "true":
                   format slot 0 of player with light green dye named "&3&lReach" with lore "||&7Mode: &e%{gandalf-Reach.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Reach.enable} to "false"]
               else:
                   format slot 0 of player with gray dye named "&3&lReach" with lore "||&7Mode: &e%{gandalf-Reach.mode}%|| ||&7Fait par: ANDROBAL" to run [set {gandalf-Reach.enable} to "true"]
               {gandalf-Fly_or_HightJump.enable} is "true":
                   format slot 1 of player with light green dye named "&3&lFly_or_HightJump" with lore "||&7Mode: &e%{gandalf-Fly_or_HightJump.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Fly_or_HightJump.enable} to "false"]
               else:
                   format slot 1 of player with gray dye named "&3&lFly_or_HightJump" with lore "||&7Mode: &e%{gandalf-Fly_or_HightJump.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-Fly_or_HightJump.enable} to "true"]
               {gandalf-FastBow.enable} is "true":
                   format slot 2 of player with light green dye named "&3&lFastBow" with lore "||&7Mode: &e%{gandalf-FastBow.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastBow.enable} to "false"]
               else:
                   format slot 2 of player with gray dye named "&3&lFastBow" with lore "||&7Mode: &e%{gandalf-FastBow.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastBow.enable} to "true"]
               {gandalf-FastEat.enable} is "true":
                   format slot 3 of player with light green dye named "&3&lFastEat" with lore "||&7Mode: &e%{gandalf-FastEat.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastEat.enable} to "false"]
               else:
                   format slot 3 of player with gray dye named "&3&lFastEat" with lore "||&7Mode: &e%{gandalf-FastEat.mode}%||&7Fait par: ANDROBAL" to run [set {gandalf-FastEat.enable} to "true"]
               {gandalf-Speed.enable} is "true":
                   format slot 4 of player with light green dye named "&3&lSpeed" with lore "||&7Mode: &e%{gandalf-Speed.mode}%||&7Fait par: Ozachi" to run [set {gandalf-Speed.enable} to "false"]
               else:
                   format slot 4 of player with gray dye named "&3&lSpeed" with lore "||&7Mode: &e%{gandalf-Speed.mode}%||&7Fait par: Ozachi" to run [set {gandalf-Speed.enable} to "true"]
               wait 5 ticks
       else if arg-1 is "bans":
           open chest with 6 rows named "&6Gandalf Bans" to player
           wait 2 ticks
           set {_s} to 0
           loop {gandalf.bans::*}:
               format slot {_s} of player with paper named "&a%loop-value%" to close
               add 1 to {_s}
       else if arg-1 is "ban":
           if arg-2 is not set:
               message "&c/Gandalf ban <joueur> <raison>."
           else:
               if arg-3 is not set:
                   message "&c/Gandalf ban <joueur> <raison>."
               else:
                   wf "[%now%] %arg-2% vient d'être banni pour %arg-3%" to "plugins/Gandalf/Data/Bans.yml"
                   set {vl.%arg-2%.Reach} to 0
                   set {vl.%arg-2%.Fly_or_HightJump} to 0
                   set {vl.%arg-2%.FastBow} to 0
                   set {vl.%arg-2%.FastEat} to 0
                   set {vl.%arg-2%.Speed} to 0
                   launch ball large firework colored light blue at arg 2 timed 0
                   launch Creeper firework colored blue and green at arg 2's location timed -0
                   set {_b} to {gandalf-custom_punish}
                   replace "{hacker}" with "%arg-2%" in {_b}
                   execute command "%{_b}%"
                   set {gandalf.bans::%arg-2%} to "&c%arg-2% &7(&c%arg-3%&7)"
                   {gandalf-broadcast} is "true"
                   set {_c} to {gandalf-banmsg}
                   replace "{hacker}" with "%arg-2%" in {_c}
                   broadcast "%{_c}%"
       else if arg-1 is "reset":
           if arg-2 is not set:
               message "&c/Gandalf reset <joueur>."
           else:
               set {vl.Reach.%arg-2%} to 0
               set {vl.Speed.%arg-2%} to 0
               set {vl.FastBow.%arg-2%} to 0
               set {vl.FastEat.%arg-2%} to 0
               set {vl.Fly_or_HightJump.%arg-2%} to 0
               set {autoban.%arg-2%} to false
               message "&aReset des stats de %arg-2% terminé."

# Commande pour activer / désactiver les alertes.
command /alerts:
   permission: Gandalf.staff
   permission message: &c[Gandalf] Vous n'avez pas la permission.
   trigger:
       if {Gandalf.alerts.%player%} is not set:
           set {Gandalf.alerts.%player%} to true
           message "&7Vous avez &aActivé &7vos alertes."
       else:
           delete {Gandalf.alerts.%player%}
           message "&7Vous avez &cDésactivé &7vos alertes."

# Commande pour voir les logs d'un joueur.
command /logs [<player>]:
   permission: Gandalf.staff
   permission message: &c[Gandalf] Vous n'avez pas la permission.
   trigger:
       if arg-1 is not set:
           message "&c/logs <joueur>."
       else:
           message "&eTous les logs de &6%arg-1%&e."
           message " &e- &6Reach: &e%{vl.reach.%arg-1%}%"
           message " &e- &6Fly_or_HightJump: &e%{vl.Fly_or_HightJump.%arg-1%}%"
           message " &e- &6FastBow: &e%{vl.fastbow.%arg-1%}%"
           message " &e- &6FastEat: &e%{vl.fasteat.%arg-1%}%"
           message " &e- &6Speed: &e%{vl.speed.%arg-1%}%"

#
# CHECKS
#


# AntiReach

on damage:# of player:
   attacker's gamemode is not creative
   damage cause is attack
   set {_diff} to difference between victim's yaw and attacker's yaw
   if attacker's ping < 150:
       set {_max} to 5
   else if attacker's ping < 250:
       set {_max} to 5.4
   else:
       set {_max} to 5.8
   distance between attacker and victim > {_max}
   if {_diff} is between 100 and 280:
       difference between {last.reach.%attacker%} and now is less than 1.5 seconds:
           attacker's ping is less than 400:
               add 1 to {vl.Reach.%attacker%}
           Alert(attacker, "Reach", "%distance between attacker and victim% Blocs")
           AutoBan(attacker, "Reach")
       set {last.reach.%attacker%} to now
   else:
       distance between attacker and victim > 6:
           attacker's ping is less than 400
           Alert(attacker, "Reach", "[Experimental]")
           AutoBan(attacker, "Reach")



# Anti Fly_or_HightJump

on jump:
   player's gamemode is survival or adventure
   player is not flying
   player is not riding
   if block at player is air:
       wait 3 ticks
       player is not on ground
       set {_y} to player's y-location
       loop 3 times:
           set {_p} to location of player
           block below player is air
           block 0.3 under player is air
           set {_y1} to player's y-location
           wait 2 ticks
           set {_y2} to player's y-location
           block 0.3 under player is air
           if {_y2} is greater than {_y1}:
               add 1 to {_success}
       {_success} > 2:
           distance between {_p} and location of player > 0.5
           difference between {Gandalf.lastfly.%player%} and now is less than 10 ticks:
               exit
           else:
               difference between {last.j_or_tp.%player%} and now is greater than 1 second
               set {Gandalf.lastfly.%player%} to now
               add 1 to {vl.Fly_or_HightJump.%player%}
               set {_distance} to difference between {_y} and player's y-location
               Alert(player, "Fly_or_HightJump", "Distance: %{_distance}*3% blocs")
               AutoBan(player, "Fly_or_HightJump")
               clear {_success}



# AntiFastBow     

on shoot:
   projectile is arrow
   difference between {lastshoot.%shooter%} and now < 2 ticks:
       difference between {lastfastbow.%shooter%} and now is less than 2 ticks:
           stop
       else:
           shooter's ping is less than 400:
               add 1 to {vl.FastBow.%shooter%}
           set {lastfastbow.%shooter%} to now
           Alert(shooter, "FastBow", "Delay: %difference between {lastshoot.%shooter%} and now%")
           AutoBan(shooter, "FastBow")
   set {lastshoot.%shooter%} to now



# AntiFastEat

on drop:
   delete {lasteat.%player%}

on consume:
   player's ping <= 400
   difference between {lasteat.%player%} and now < 25 ticks:
       difference between {lastfasteat.%player%} and now is less than 20 ticks:
           stop
       else:
           player's ping is less than 400:
               add 1 to {vl.FastEat.%player%}
           set {lastfasteat.%player%} to now
           Alert(player, "FastEat", "Delay: %difference between {lasteat.%player%} and now%")
           AutoBan(player, "FastEat")
   set {lasteat.%player%} to now



# AntiSpeed - Sol

on any move:
   chance of 30%
   player's walk speed is less than 0.3
   player's gamemode is survival or adventure
   player is not flying
   player is not riding
   loop 5 times:
       set {_y} to player's y-location
       set {_p} to player's location
       wait 2 ticks
       set {_y2} to player's y-location
       set {_p2} to player's location
       set {_0} to difference between {_y} and {_y2}
       if {_0} is between 0 and 1:
           set {_distance1} to distance between {_p} and {_p2}
           distance between {_p} and {_p2} is greater than 1
           add 1 to {_flags}
   if {_flags} is greater than 3:
       difference between {lastspeed.%player%} and now is less than 10 ticks:
           stop
       else:
           difference between {last.j_or_tp.%player%} and now is greater than 1 second
           player's ping is less than 600:
               add 1 to {vl.Speed.%player%}
           set {lastspeed.%player%} to now
           Alert(player, "Speed", "Distance: %({_distance1}+{_distance2})*2%")
           AutoBan(player, "Speed")

# Anti StrangeMove (HardSpeed - Blink - VanillaTP)

on jump:
   difference between {last.move.%player%} and now is less than 15 ticks
   set {_y} to y-location of player
   set {_a} to location of player
   wait 10 ticks
   distance between {_a} and location of player > 7:
       block below player is not air
       {_y} <= y-location of player
       difference between {last.move.%player%} and now is less than 15 ticks:
           stop
       else:
           difference between {last.j_or_tp.%player%} and now is greater than 1 second
           player's ping is less than 400:
               add 1 to {vl.StrangeMove.%player%}
           set {last.move.%player%} to now
           Alert(player, "StrangeMove", "Distance: %distance between {_a} and location of player% blocs")
           AutoBan(player, "StrangeMove")


#         
# Utiles (Ne pas supprimer !)
#



on teleport:
   set {last.j_or_tp.%player%} to now 
on damage of player:
   set {last.j_or_tp.%victim%} to now
on join:
   set {last.j_or_tp.%player%} to now
   set {vl.Reach.%player%} to 0
   set {vl.Fly_or_HightJump.%player%} to 0
   set {vl.FastBow.%player%} to 0
   set {vl.FastEat.%player%} to 0
   set {vl.Speed.%player%} to 0
on quit:
   set {last.j_or_tp.%player%} to now
every 30 seconds:
   loop all players:
       if {vl.Reach.%loop-player%} > 1:
           remove 1 from {vl.Reach.%loop-player%}
       if {vl.Speed.%loop-player%} > 1:
           remove 1 from {vl.Speed.%loop-player%}
       if {vl.Fly_or_HightJump.%loop-player%} > 1:
           remove 1 from {vl.Fly_or_HightJump.%loop-player%}
       if {vl.FastBow.%loop-player%} > 1:
           remove 1 from {vl.FastBow.%loop-player%}
       if {vl.FastEat.%loop-player%} > 1:
           remove 1 from {vl.FastEat.%loop-player%}

 

Or, Aucune erreurs

 

Tu as peux-être un autre skript avec la commande /gandalf ? Et sinon essaie de changer la commande en par exemple /anticheat

  • J'aime 1
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.