Aller au contenu

Messages recommandés

Posté(e)

Skript d'anti-cheat : Il ne marche pas parfaitement quelqu’un peut m'aider a le perfectionner ?

 

Anti Speed hack (A ameilliorer)

Anti auto click

Anti forcefield (Des beugs ...)

Anti fast bow

Anti anti kb (Marche pas)

Anti fly (Marche pas)

 

 

options:
   CancelCheat : false
   Permission : anticheat.admin

on load:
   set {Status} to {@CancelCheat}

on join:
   if {Points.%player%} is not set:
       set {Points.%player%} to 0

   if {AutoClick.%player%} is not set:
       set {AutoClick.%player%} to now

   if {bow.%player%} is not set:
       set {bow.%player%} to now  

   if {Move.%player%} is not set:
       set {Move.%player%} to false

sub "Sanction":
   set {_Player} to parameter 1

   if {Points.%{_Player}%} is 0:
       add 1 to {Points.%{_Player}%}
       kick {_Player} due to "&7[&cAnti-Cheat&7] &aLe cheat est interdit .. Vous ètes averti  &7(&6%{Points.%{_Player}%}% &7/ &6 2&7)"

   else if {Points.%{_Player}%} is 1:
       add 1 to {Points.%{_Player}%}
       kick {_Player} due to "&7[&cAnti-Cheat&7] &aLe cheat est interdit .. Vous ètes averti  &7(&6%{Points.%{_Player}%}% &7/ &6 2&7)"

       set {_Reason} to "&7[&cAnti-Cheat&7] &aBanni pour cheat .. &7(&6 5 jours &7)"

       make console execute command "/tempban %{_Player}% 5d %{_Reason}%"
       wait 1 tick
       remove 1 from {Points.%{_Player}%}


# Anti Speed Hack :

on any move:
   if {Move.%player%} is false:
       set {Move.%player%} to true
       set {_X} to rounded x-coordinate of player
       set {_Y} to rounded y-coordinate of player
       set {_Z} to rounded z-coordinate of player

       set {_x.1} to {_X} + 10
       set {_x.2} to {_X} - 10

       set {_y.1} to {_Y} + 10
       set {_y.2} to {_Y} - 10

       set {_z.1} to {_Z} + 10
       set {_z.2} to {_Z} - 10

       wait 1 second

       set {_X2} to rounded x-coordinate of player
       set {_Z2} to rounded z-coordinate of player

       if {_X2} >= {_x.1}:
           invoke "SpeedHack" from player

       else if {_X2} <= {_x.2}:
           invoke "SpeedHack" from player

       else if {_Z2} >= {_z.1}:
           invoke "SpeedHack" from player

       else if {_Z2} <= {_z.2}:
           invoke "SpeedHack" from player              

       else:
           set {Move.%player%} to false


sub "SpeedHack":
   set {_Player} to parameter 1
   if {Status} is true:
       apply slowness 10 to {_Player} for 15 seconds
       send "&7[&cAnti-Cheat&7] &4Vous cheatez ?!" to {_Player}  
       log "%{_Player}% utilise un SpeedHack !" to "AntiCheat/CheatLog.log"
       loop all players:
           loop-player has permission "{@Permission}":
               send "&7[&cAnti-Cheat&7] &4%{_Player}% est en train d'utiliser un SpeedHack !" to loop-player      
   else:
       log "%{_Player}% utilise un SpeedHack !" to "AntiCheat/CheatLog.log"
       loop all players:
           loop-player has permission "{@Permission}":
               send "&7[&cAnti-Cheat&7] &4%{_Player}% est en train d'utiliser un SpeedHack !" to loop-player      
               invoke "Sanction" from {_Player}      

# Anti Auto-Click :

on damage:
   attacker is a player
   attacker is holding a sword
   if difference between {AutoClick.%attacker%} and now is less than 0.1 ticks:
       if {Status} is true:
           cancel event
           log "%attacker% utilise un auto-click !" to "AntiCheat/CheatLog.log"
           loop all players:
               loop-player has permission "{@Permission}":
                   send "&7[&cAnti-Cheat&7] &4%attacker% est en train d'auto-click !" to loop-player

       else:
           log "%attacker% utilise un auto-click !" to "AntiCheat/CheatLog.log"
           loop all players:
               if loop-player has permission "{@Permission}":
                   send "&7[&cAnti-Cheat&7] &4%attacker% est en train d'auto-click !" to loop-player
                   invoke "Sanction" from attacker  

   set {AutoClick.%attacker%} to now


# Anti Forcefield :

on damage:
   attacker is a player
   projectile doesn't exist
   if the targeted entity of the attacker is the victim:
       stop
   else:
       if {Status} is true:
           cancel event
           log "%attacker% utilise un forcefield !" to "AntiCheat/CheatLog.log"
           loop all players:
               loop-player has permission "{@Permission}":
                   send "&7[&cAnti-Cheat&7] &4%attacker% est en train de Forcefield !" to loop-player

       else:
           log "%attacker% utilise un forcefield !" to "AntiCheat/CheatLog.log"
           loop all players:
               loop-player has permission "{@Permission}":
                   send "&7[&cAnti-Cheat&7] &4%attacker% est en train de Forcefield !" to loop-player
                   invoke "Sanction" from attacker  


# Anti Fast Bow :
on shoot:
   if projectile is an arrow:
       if difference between {bow.%shooter%} and now is less than 2 ticks:
           if {Status} is true:
               cancel event
               set {bow.%shooter%} to now
               log "%shooter% utilise un fastbow !" to "AntiCheat/CheatLog.log"
               loop all players:
                   loop-player has permission "{@Permission}":
                       send "&7[&cAnti-Cheat&7] &4%shooter% est en train d'utiliser un fastbow !" to loop-player      
           else:
               set {bow.%shooter%} to now
               log "%shooter% utilise un fastbow !" to "AntiCheat/CheatLog.log"
               loop all players:
                   loop-player has permission "{@Permission}":
                       send "&7[&cAnti-Cheat&7] &4%shooter% est en train d'utiliser un fastbow !" to loop-player
                       invoke "Sanction" from shooter
       else:
           set {bow.%shooter%} to now          



# Anti Anti KB :

on damage of a player:
   attacker is a player:
       projectile doesn't exist:
           set {_y} to y-coordinate of victim
           wait 5 ticks
           set {_y2} to y-coordinate of victim
           if {_y} <= {_y2}:  
               if {Status} is true:
                   damage victim by 2 heart
                   log "%victim% utilise un anti kb !" to "AntiCheat/CheatLog.log"
                   loop all players:
                       loop-player has permission "{@Permission}":
                           send "&7[&cAnti-Cheat&7] &4%victim% est en train d'utiliser un anti kb !" to loop-player      
               else:
                   log "%victim% utilise un anti kb !" to "AntiCheat/CheatLog.log"
                   loop all players:
                       loop-player has permission "{@Permission}":
                           send "&7[&cAnti-Cheat&7] &4%victim% est en train d'utiliser un anti kb !" to loop-player
                           invoke "Sanction" from victim


# Anti Fly :

every 10 seconds:
   loop all players:
       if loop-player-1 has permission "{@Permission}":
           stop
       else:
           loop-player-1's gamemode is not creative
           block under the loop-player-1 is air

           if {Status} is true:
               damage loop-player-1 by 2 heart
               log "%loop-player-1% utilise un fly !" to "AntiCheat/CheatLog.log"

               loop all players:
                   loop-player-2 has permission "{@Permission}":
                       send "&7[&cAnti-Cheat&7] &4%loop-player-1% utilise un fly !" to loop-player-2

           else:
               log "%loop-player-1% utilise un fly !" to "AntiCheat/CheatLog.log"

               loop all players:
                   loop-player-2 has permission "{@Permission}":
                       send "&7[&cAnti-Cheat&7] &4%loop-player-1% utilise un fly !" to loop-player-2
                       invoke "Sanction" from loop-player-1  







  • J'aime 1
Posté(e)
Très bon skript, comme le dit @Izychiel, c'est pas opti mais c'est déjà excellent pour du Skript, par contre je n'ai pas compris l'Anti ForceField, avec le if projectile doesn't exists :/

 

Dans un forcefield ya pas de projectile

c'est quand tu tape tout autour de toi

Posté(e)
On a essayé de faire un skript d'anti cheat avec @quentinwagu mais c'était galère on arrivait pas certaines choses...

Du coup GG !

Il marche pas je demande de l'aide mais une partie est operationelle

Posté(e)
Bonne chance !

Par contre ton truc n'est vraiment pas du tout optimise :eek:

Et si tu pouvais quand meme decrire les fonctionnalites de ton skript :p

Comment il est mal optimise propose des idees ... Stp

Posté(e)

Il parle du any move, et aussi, pour le fly, j'ai une solution qui prends 4 lignes...

on flight toggle:
   if player's gamemode is not creative:
       kick player due to "Fly non autorisé"

  • J'aime 2
Posté(e)
Il parle du any move, et aussi, pour le fly, j'ai une solution qui prends 4 lignes...

on flight toggle:
   if player's gamemode is not creative:
       kick player due to "Fly non autorisé"

 

L'event "on fly toggle" c'est quand tu apuit 2 fois sur espace

meme si tu est en survie

Posté(e)
on flight toggle:
   if player's gamemode is not creative:
       if player is flying:
           kick player due to "Fly non autorisé"

Yep ça, ça marchait. On s'est tapés des barres car c'était eZ en fait.

  • J'aime 2
Posté(e)
Oui, j'ai oubliez de dire qu'il bugé par rapport a ce petit point la :X

Heureusement que j'y est pensé , même si quelqu'un l'aurai dit un moment ou un autre ou tu aurez y penser

Posté(e)

J'ai testé hier et c'était bugué. L'antiKB ça faisait rien. Pas de ban ou je ne sais quoi. Du cou j'ai testé le fly et c'était chelou je crois qu'il m'a kick pour fly (serveur) puis ça ma kick avec Sanction (1/2) ou un truc comme ça x)

Posté(e)
J'ai testé hier et c'était bugué. L'antiKB ça faisait rien. Pas de ban ou je ne sais quoi. Du cou j'ai testé le fly et c'était chelou je crois qu'il m'a kick pour fly (serveur) puis ça ma kick avec Sanction (1/2) ou un truc comme ça x)

Oh mais ces que tu cheat ! :D

×
×
  • 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.