Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Buy OSRS Gold

CompileTime

Basic Antiban

Recommended Posts

This is a quick anti ban I made. You could use this if you're too lazy to implement your own anti-ban.

import java.awt.Point;import org.tribot.api.General;import org.tribot.api.input.Mouse;import org.tribot.api.types.generic.Filter;import org.tribot.api2007.Camera;import org.tribot.api2007.GameTab;import org.tribot.api2007.GameTab.TABS;import org.tribot.api2007.Inventory;import org.tribot.api2007.NPCs;import org.tribot.api2007.Objects;import org.tribot.api2007.types.RSItem;import org.tribot.api2007.types.RSNPC;import org.tribot.api2007.types.RSObject;public class AntiBan {		public static boolean active = false;        public static int mouseSpeed = 100;		public static void invoke() {		if(chance(0.5f)) {			active = true;			goAFK();		} else if(chance(8)) {			active = true;			adjustMouseSpeed();		} else if(chance(9)) {			active = true;			checkStats();		} else if(chance(15)) {			active = true;			randomlyMoveCamera();		} else if(chance(1)) {			active = true;			randomlyMoveMouse();		} else if(chance(2)) {			active = true;			openFriendsList();		} else if(chance(4)) {			active = true;			ExamineRandomObject();		} else if(chance(3)) {			active = true;			ExamineRandomNPC();		}  else if(chance(5)) {			ExamineRandomInventoryItem();		}		if(active)			Mouse.setSpeed(mouseSpeed + General.randInt(-5, 5));				active = false;	}		private static void randomlyMoveMouse() {		Mouse.setSpeed(Mouse.getSpeed() + General.random(-15, 15));		Mouse.move(new Point(General.random(0, 500), General.random(0, 300)));	}		private static void adjustMouseSpeed() {		Mouse.setSpeed(General.random(115, 132));	}	private static void goAFK() {		General.sleep(General.random(1000, 25000));	}	private static void randomlyMoveCamera() {		Camera.setCameraRotation(Camera.getCameraRotation() + General.random(40, 150));		Camera.setCameraAngle(Camera.getCameraAngle() + General.random(40, 100));	}	private static void checkStats() {		General.sleep(300);		Mouse.moveBox(680, 385, 725, 365);		General.sleep(1000, 1500);		GameTab.open(TABS.INVENTORY);	}	private static void openFriendsList() {		GameTab.open(TABS.FRIENDS);		General.sleep(1750, 2500);		GameTab.open(TABS.INVENTORY);	}		private static void ExamineRandomNPC() {		RSNPC[] npcs = NPCs.find(NPCs.generateFilterGroup(new Filter<RSNPC>() {			public boolean accept(RSNPC npc) {				if (npc != null && npc.getName() != null && npc.getModel() != null && npc.getActions() != null)					return npc.isOnScreen();				return false;			}		}));		if (npcs != null && npcs.length > 0) {			Camera.turnToTile(npcs[0]);			if (npcs[0].isValid()) {				npcs[0].click("Examine");			}		}	}		private static void ExamineRandomInventoryItem() {		RSItem[] items = Inventory.getAll();		RSItem item = (items.length > 0) ? items[CTMiner.randInt(0, items.length-1)] : null;		if(item != null) {			item.click("Examine");		}	}	private static void ExamineRandomObject() {		RSObject[] objects = Objects.findNearest(10, new Filter<RSObject>() {			public boolean accept(RSObject object) {				if (object != null && object.getDefinition() != null && object.getModel() != null)					return object.isOnScreen();				return false;			}		});		if (objects != null && objects.length > 0) {			Camera.turnToTile(objects[0]);			objects[0].click("Examine");		}	}		public static boolean chance(float percent) {		return General.randInt(0, 1000) < percent;	}	}
Edited by CompileTime

Share this post


Link to post
Share on other sites

Pretty static antiban. 

 

It should work, except the check stats. However, I'd use more advanced antiban + ABC for the best results.

 

A good example would be that normal players don't always move the mouse just once, or adjust the camera one way. Also, the amount of time between moving the rotation of the camera and move the angle is the exact same every time it's called.

 

Run any of these a few hundred times and it shows repetitiveness. 

 

Overall, it's solid code, just not of premium quality.

Share this post


Link to post
Share on other sites

Pretty static antiban. 

 

It should work, except the check stats. However, I'd use more advanced antiban + ABC for the best results.

 

A good example would be that normal players don't always move the mouse just once, or adjust the camera one way. Also, the amount of time between moving the rotation of the camera and move the angle is the exact same every time it's called.

 

Run any of these a few hundred times and it shows repetitiveness. 

 

Overall, it's solid code, just not of premium quality.

Yep, I agree with you 100%. That's why I titled this basic antiban, it's just for lazy people who want to quickly test their script without creating any antiban. Normally I would code an antiban directly into the script for the best performance and most human-like feel. Thanks for your input :)

Edited by CompileTime

Share this post


Link to post
Share on other sites

No point in this, it negatively affects your users.

The point wasn't to implement this class exactly into any scripts code. This is a class I quickly made with the intention of serving as a template to create a better anti ban. Notice the "Basic antiban" title. You could take a few methods that you found useful change them to your liking and use them in your script. This wasn't intended to be a stand-alone anti-ban.  

Edited by CompileTime

Share this post


Link to post
Share on other sites

You've got a few references to CTMiner..so it won't even compile for anyone else. Other things I have in mind have already been said above.

Right my bad, the only things that I called from CTMiner were methods that generated random integers so I'm sure anyone who wanted to use this could just use java.util.Random or the random generator in the tribot API.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Our picks

    • Gradle is a build tool used to accelerate developer productivity.

      We recently setup a Maven repository (TRiBot Central) to make it easier for scripters to create scripts. Check it out here: https://gitlab.com/trilez-software/tribot/tribot-central/-/packages

      Furthermore, we've released a simple Gradle project to make it easy to run TRiBot and develop scripts for it. Check it out here: https://gitlab.com/trilez-software/tribot/tribot-gradle-launcher

      The goals of TRiBot Central are to:

      Deliver updates to TRiBot faster


      Better organize TRiBot's dependencies (AKA dependancies)


      Make it easier to develop scripts for TRiBot


      Make it easier to use and run TRiBot


      Note: TRiBot won't be able to run scripts from within this project until TRiBot's next release.
        • Like
      • 8 replies
    • Hi everyone,

      I'd like to thank everyone for their patience in this transition period. Since last week, we've worked out the remaining bugs with this integration.

      Some users have still been having issues with connecting their forums account to their Auth0 account. To resolve this, we've imported all forums accounts into Auth0.

      Unfortunately, the accounts which were imported today were using an unsupported password hashing algorithm. Hence, random passwords were set during the import.

      What does this mean for me?

      If you've previously linked your forums account to your Auth0 account, you don't have to do anything. Nothing changes for you.


      If you haven't logged in via our new login yet,

      Try logging in with your forums email address and the last password you used


      If you are unable to login, please use the "Forgot password" tool on the login page:
      Follow the instructions to reset your password
       
        • thonking
        • Like
      • 13 replies
    • Hello everyone,

      Last week we tried to roll out Auth0 Login, but we lost that battle. Now it's time to win the war!

      Important changes

      When logging into the client, you'll now have to enter your Auth0 account credentials instead of your forums credentials

      Note: 2FA is still handled through your forums account (for the time being)



      Changes for existing users

      You'll have to link your Auth0 account to your forums account here: https://tribot.org/forums/settings/login/?service=11


      Auth0 accounts have been created for most existing users. Please use your forums email address and password to login.



      Important notes

      Make sure to verify your email address upon creating a new Auth0 account


      When we mention your Auth0 account, we mean your account used for auth.tribot.org as displayed below
      • 81 replies
    • To better support the upcoming changes (TRiBot X, new repository), we're switching our login handler to Auth0. Instead of logging in with the standard form, you'll now be required to login through our Auth0 application.

      All existing accounts which have been used within approximately the past year have been imported into Auth0 using the same email and password combination which has been stored on the forums.

      What does this mean for users?

      Your account credentials are now even more securely stored


      You'll be able to login via Facebook, Google, and others in the future


      Is there anything users have to do differently now?

      Existing users: You'll have to login with the standard login, open your Account Settings, then link your Auth0 account


      New users: You'll be redirected to our Auth0 app (auth.tribot.org) where you'll be able to create an account


      Why was this change made?

      The new apps we are creating (such as the new repository) aren't able to use the forums to handle user logins


      To centralize all user accounts in one area


      To ensure that the client login doesn't go down when the forums are having problems


      To speed up our development


      Other considerations

      There's no documentation or official support for using Invision Community combined with Auth0, so there are still a few kinks we're working out


      We're in the works of creating an account management panel specifically for Auth0 accounts (ETA August)


      It's not possible to change email addresses for the time being (this will be resolved this August)


      Changing passwords is a weird process for the time being. To change your password, you'll have to use the "Don't remember your password" tool on the Auth0 login page
        • Like
      • 11 replies
    • Over the past month, we've been working hard on TRiBot's new repository - a much needed update. This change has been deemed necessary for TRiBot X, and will allow us to really speed up development of all aspects of TRiBot.

      Today we are going to share what we've been working on!


      Now you must be wondering what kind of features the new repository will have.... well, you'll have to be patient for a little while longer. We're still figuring out various technical aspects so we can't provide answers to all possible questions. We're also focusing on development rather than writing about it so that everyone can get access to our latest developments at lightning speed. I will however answer a few users' questions.

      We're planning on a release of this early to mid August, giving users some goodies before TRiBot X's release.

      Thank you all for being patient. I hope everyone is excited as much as I am!
        • Like
      • 17 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...