Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. ScriptAPI
  3. How to create a custom AntiBot

How to create a custom AntiBot

Scheduled Pinned Locked Moved ScriptAPI
19 Posts 8 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NoobDev638
    wrote on last edited by NoobDev638
    #1

    Hello Community

    How can I code my own AntiBot with custom rules for the killaura? Could you please post an example of a simple AntiBot witch e.g checks if a player holds a sword, so that I can implement my own rules.

    Thank you

    A 1 Reply Last reply
    0
    • I Offline
      I Offline
      idk my name
      wrote on last edited by idk my name
      #2

      @NoobDev638
      i dont fucking care if for-cycle is wrong or entityplayer getter is wrong smh

      boolean isBot;
      
      for(Entity o : mc.theWorld.getLoadedEntityList[o]) {
          final EntityPlayer retard = (EntityPlayer) o;
          if (retard.getInventory().getHeldItem().getItem() instanceof ItemSword) { 
              isBot = true; 
          }
      }
      
      N 1 Reply Last reply
      0
      • N NoobDev638

        Hello Community

        How can I code my own AntiBot with custom rules for the killaura? Could you please post an example of a simple AntiBot witch e.g checks if a player holds a sword, so that I can implement my own rules.

        Thank you

        A Offline
        A Offline
        Aftery
        wrote on last edited by
        #3

        @noobdev638

        		for (var i = 0; i < mc.theWorld.getLoadedEntityList().length; i++) {
        			var ent = mc.theWorld.getLoadedEntityList()[i];
        			if (!(ent instanceof EntityPlayer)) continue;
        			if (ent.getHeldItem() != null && ent.getHeldItem().getItem() instanceof cool item); //no more cool items bro thats illegal
        		}
        
        I 1 Reply Last reply
        0
        • A Aftery

          @noobdev638

          		for (var i = 0; i < mc.theWorld.getLoadedEntityList().length; i++) {
          			var ent = mc.theWorld.getLoadedEntityList()[i];
          			if (!(ent instanceof EntityPlayer)) continue;
          			if (ent.getHeldItem() != null && ent.getHeldItem().getItem() instanceof cool item); //no more cool items bro thats illegal
          		}
          
          I Offline
          I Offline
          idk my name
          wrote on last edited by
          #4
          This post is deleted!
          yorik100Y 1 Reply Last reply
          0
          • I idk my name

            This post is deleted!

            yorik100Y Offline
            yorik100Y Offline
            yorik100
            wrote on last edited by
            #5

            @idk-my-name said in How to create a custom AntiBot:

            @aftery what retard did make ++ when ++ is -

            f03ad94d-e262-4ea1-82c3-488cec287543-image.png

            O 1 Reply Last reply
            0
            • yorik100Y yorik100

              @idk-my-name said in How to create a custom AntiBot:

              @aftery what retard did make ++ when ++ is -

              f03ad94d-e262-4ea1-82c3-488cec287543-image.png

              O Offline
              O Offline
              ohno
              wrote on last edited by ohno
              #6

              @yorik100 ++ in java is -
              I think, he meant, this:

              float mario = 0F;
              
              if (mario == 0.0F) {
                  ++mario; 
                  // ++ is -, then ++mario is -mario
              }
              
              yorik100Y 1 Reply Last reply
              0
              • O ohno

                @yorik100 ++ in java is -
                I think, he meant, this:

                float mario = 0F;
                
                if (mario == 0.0F) {
                    ++mario; 
                    // ++ is -, then ++mario is -mario
                }
                
                yorik100Y Offline
                yorik100Y Offline
                yorik100
                wrote on last edited by
                #7

                @ohno said in How to create a custom AntiBot:

                @yorik100 ++ in java is -
                I think, he meant, this:

                float mario = 0F;
                
                if (mario == 0.0F) {
                    ++mario; 
                    // ++ is -, then ++mario is -mario
                }
                

                i++ is like i = i + 1 actually bruh

                exit scammedE A 2 Replies Last reply
                0
                • yorik100Y yorik100

                  @ohno said in How to create a custom AntiBot:

                  @yorik100 ++ in java is -
                  I think, he meant, this:

                  float mario = 0F;
                  
                  if (mario == 0.0F) {
                      ++mario; 
                      // ++ is -, then ++mario is -mario
                  }
                  

                  i++ is like i = i + 1 actually bruh

                  exit scammedE Offline
                  exit scammedE Offline
                  exit scammed
                  wrote on last edited by exit scammed
                  #8

                  @yorik100 ye (or it just i += 1)

                  1 Reply Last reply
                  0
                  • yorik100Y yorik100

                    @ohno said in How to create a custom AntiBot:

                    @yorik100 ++ in java is -
                    I think, he meant, this:

                    float mario = 0F;
                    
                    if (mario == 0.0F) {
                        ++mario; 
                        // ++ is -, then ++mario is -mario
                    }
                    

                    i++ is like i = i + 1 actually bruh

                    A Offline
                    A Offline
                    Aftery
                    wrote on last edited by
                    #9

                    @yorik100 rookie mistake

                    yorik100Y 1 Reply Last reply
                    0
                    • A Aftery

                      @yorik100 rookie mistake

                      yorik100Y Offline
                      yorik100Y Offline
                      yorik100
                      wrote on last edited by yorik100
                      #10

                      @aftery said in How to create a custom AntiBot:

                      @yorik100 rookie mistake

                      It reads the value and then adds + 1 duh, makes sense to me

                      1 Reply Last reply
                      0
                      • I idk my name

                        @NoobDev638
                        i dont fucking care if for-cycle is wrong or entityplayer getter is wrong smh

                        boolean isBot;
                        
                        for(Entity o : mc.theWorld.getLoadedEntityList[o]) {
                            final EntityPlayer retard = (EntityPlayer) o;
                            if (retard.getInventory().getHeldItem().getItem() instanceof ItemSword) { 
                                isBot = true; 
                            }
                        }
                        
                        N Offline
                        N Offline
                        NoobDev638
                        wrote on last edited by NoobDev638
                        #11

                        @idk-my-name said in How to create a custom AntiBot:

                        @NoobDev638
                        i dont fucking care if for-cycle is wrong or entityplayer getter is wrong smh

                        boolean isBot;
                        
                        for(Entity o : mc.theWorld.getLoadedEntityList[o]) {
                            final EntityPlayer retard = (EntityPlayer) o;
                            if (retard.getInventory().getHeldItem().getItem() instanceof ItemSword) { 
                                isBot = true; 
                            }
                        }
                        

                        Thank you for your answer!
                        But how do I make it so that the killaura is not attacking the player anymore?
                        I mean just because isBot is true for a player doesent mean he is flagged as a bot by the killaura and aimbot etc.
                        Also I'm european so sorry for the late answers but I was asleep.

                        CzechHekC I 2 Replies Last reply
                        0
                        • N NoobDev638

                          @idk-my-name said in How to create a custom AntiBot:

                          @NoobDev638
                          i dont fucking care if for-cycle is wrong or entityplayer getter is wrong smh

                          boolean isBot;
                          
                          for(Entity o : mc.theWorld.getLoadedEntityList[o]) {
                              final EntityPlayer retard = (EntityPlayer) o;
                              if (retard.getInventory().getHeldItem().getItem() instanceof ItemSword) { 
                                  isBot = true; 
                              }
                          }
                          

                          Thank you for your answer!
                          But how do I make it so that the killaura is not attacking the player anymore?
                          I mean just because isBot is true for a player doesent mean he is flagged as a bot by the killaura and aimbot etc.
                          Also I'm european so sorry for the late answers but I was asleep.

                          CzechHekC Offline
                          CzechHekC Offline
                          CzechHek
                          wrote on last edited by CzechHek
                          #12

                          @noobdev638 The best way to prevent KillAura from attacking it is just by removing the entity from world. There are other ways, such as adding the target as a friend or somehow spamming KillAura.target to null or smth like that, those ways aren't ideal, at all.

                          N 1 Reply Last reply
                          0
                          • N NoobDev638

                            @idk-my-name said in How to create a custom AntiBot:

                            @NoobDev638
                            i dont fucking care if for-cycle is wrong or entityplayer getter is wrong smh

                            boolean isBot;
                            
                            for(Entity o : mc.theWorld.getLoadedEntityList[o]) {
                                final EntityPlayer retard = (EntityPlayer) o;
                                if (retard.getInventory().getHeldItem().getItem() instanceof ItemSword) { 
                                    isBot = true; 
                                }
                            }
                            

                            Thank you for your answer!
                            But how do I make it so that the killaura is not attacking the player anymore?
                            I mean just because isBot is true for a player doesent mean he is flagged as a bot by the killaura and aimbot etc.
                            Also I'm european so sorry for the late answers but I was asleep.

                            I Offline
                            I Offline
                            idk my name
                            wrote on last edited by
                            #13

                            @noobdev638 Smth like

                            if (isBot) {
                                mc.theWorld.removeEntityFromWorld(retard);
                            }
                            
                            1 Reply Last reply
                            0
                            • CzechHekC CzechHek

                              @noobdev638 The best way to prevent KillAura from attacking it is just by removing the entity from world. There are other ways, such as adding the target as a friend or somehow spamming KillAura.target to null or smth like that, those ways aren't ideal, at all.

                              N Offline
                              N Offline
                              NoobDev638
                              wrote on last edited by NoobDev638
                              #14

                              @czechhek @idk-my-name
                              Thank you for your suggestions!
                              Removing the entity from the world seems like a pretty good way to do it.

                              1 Reply Last reply
                              0
                              • ForeheadchanF Offline
                                ForeheadchanF Offline
                                Foreheadchan
                                wrote on last edited by
                                #15

                                why does everyone have such retarded ways to get entities bruhhhh, as most bots are player entities just do this (please don't use Object to get entities if not needed, because that's just not logical even tough it works)

                                for(EntityPlayer entity : mc.theWorld.playerEntities) {
                                    if(!(entity instanceof EntityPlayerSP)) {
                                        [C O D E]
                                    }
                                }
                                
                                CzechHekC 1 Reply Last reply
                                0
                                • ForeheadchanF Foreheadchan

                                  why does everyone have such retarded ways to get entities bruhhhh, as most bots are player entities just do this (please don't use Object to get entities if not needed, because that's just not logical even tough it works)

                                  for(EntityPlayer entity : mc.theWorld.playerEntities) {
                                      if(!(entity instanceof EntityPlayerSP)) {
                                          [C O D E]
                                      }
                                  }
                                  
                                  CzechHekC Offline
                                  CzechHekC Offline
                                  CzechHek
                                  wrote on last edited by
                                  #16

                                  @foreheadchan wdym if(!(entity instanceof EntityPlayerSP))

                                  for each (entity in mc.theWorld.playerEntities) print(entity);
                                  
                                  or
                                  
                                  for (i in mc.theWorld.playerEntities) print(mc.theWorld.playerEntities[i]);
                                  
                                  or
                                  
                                  mc.theWorld.playerEntities.forEach(function (entity) print(entity));
                                  
                                  
                                  ForeheadchanF 1 Reply Last reply
                                  0
                                  • CzechHekC CzechHek

                                    @foreheadchan wdym if(!(entity instanceof EntityPlayerSP))

                                    for each (entity in mc.theWorld.playerEntities) print(entity);
                                    
                                    or
                                    
                                    for (i in mc.theWorld.playerEntities) print(mc.theWorld.playerEntities[i]);
                                    
                                    or
                                    
                                    mc.theWorld.playerEntities.forEach(function (entity) print(entity));
                                    
                                    
                                    ForeheadchanF Offline
                                    ForeheadchanF Offline
                                    Foreheadchan
                                    wrote on last edited by
                                    #17

                                    @czechhek to not check for mc.thePlayer

                                    CzechHekC 1 Reply Last reply
                                    0
                                    • ForeheadchanF Foreheadchan

                                      @czechhek to not check for mc.thePlayer

                                      CzechHekC Offline
                                      CzechHekC Offline
                                      CzechHek
                                      wrote on last edited by
                                      #18

                                      @foreheadchan oh yeah makes sense
                                      entity != mc.thePlayer is straight-forwarder (tf is that word)

                                      ForeheadchanF 1 Reply Last reply
                                      0
                                      • CzechHekC CzechHek

                                        @foreheadchan oh yeah makes sense
                                        entity != mc.thePlayer is straight-forwarder (tf is that word)

                                        ForeheadchanF Offline
                                        ForeheadchanF Offline
                                        Foreheadchan
                                        wrote on last edited by
                                        #19

                                        @czechhek yeah that works too, either check not instanceof or not equal to

                                        1 Reply Last reply
                                        0
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        About
                                        • Terms of Service
                                        • Privacy Policy
                                        • Status
                                        • Contact Us
                                        Downloads
                                        • Releases
                                        • Source code
                                        • License
                                        Docs
                                        • Tutorials
                                        • CustomHUD
                                        • AutoSettings
                                        • ScriptAPI
                                        Community
                                        • Forum
                                        • Guilded
                                        • YouTube
                                        • Twitter
                                        • D.Tube
                                        • Login

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Users
                                        • Groups