Jump to content

Search the Community

Showing results for tags 'check wc xp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OSBot
    • News & Announcements
    • Community Discussion
    • Bot Manager
    • Support Section
    • Mirror Client VIP
    • Script Factory
  • Scripts
    • Official OSBot Scripts
    • Script Factory
    • Unofficial Scripts & Applications
    • Script Requests
  • Market
    • OSBot Official Voucher Shop
    • Currency
    • Accounts
    • Services
    • Other & Membership Codes
    • Disputes
  • Graphics
    • Graphics
  • Archive

Product Groups

  • Premium Scripts
    • Combat & Slayer
    • Money Making
    • Minigames
    • Others
    • Plugins
    • Agility
    • Mining & Smithing
    • Woodcutting & Firemaking
    • Fishing & Cooking
    • Fletching & Crafting
    • Farming & Herblore
    • Magic & Prayer
    • Hunter
    • Thieving
    • Construction
    • Runecrafting
  • Donations
  • OSBot Membership
  • Backup

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location:


Interests

Found 1 result

  1. I haven't been able to test anything, as I wrote this while the client is currently down. It works based on a weight system. Each action has a specific weight. The higher the weight, the more likely that action is to be performed. I only made 3 actions, but it's very simple to implement your own. Feedback is welcome. Adding your own action: Say you want to add an action to...check your woodcutting exp. You would add to the Action enum constants the name of the action and the default weight, like such: public enum Action { MOVE_MOUSE(3), ROTATE_CAMERA(7), RIGHT_CLICK_RANDOM_OBJECT(1), CHECK_WC_EXP(60); // <--------- int weight; Action(int weight) { this.weight = weight; } public int getWeight() { return weight; } public void setWeight(int weight) { this.weight = weight; } } Then you would add your method that performs the action to the switch statement in the execute() method, like so: switch (action) { case MOVE_MOUSE: script.log("[ANTI BAN:] Moving mouse."); moveMouseRandomly(); break; case ROTATE_CAMERA: script.log("[ANTI BAN:] Rotating camera."); rotateCameraRandomly(); break; case RIGHT_CLICK_RANDOM_OBJECT: script.log("[ANTI BAN:] Right-clicking an object"); rightClickRandomObject(); break; case CHECK_WC_EXP: script.log("[ANTI BAN:] Good luck JAGEX"); checkWcExp(); break; } Basic usage: import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "", info = "", logo = "", name = "Test", version = 0.1) public class Test extends Script { AntiBan antiban = new AntiBan(this, 30000, 180000); @Override public int onLoop() throws InterruptedException { if (antiban.shouldExecute()) { antiban.execute(); } return 500; } } Using a custom action list: import java.util.ArrayList; import java.util.List; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import test.AntiBan.Action; @ScriptManifest(author = "", info = "", logo = "", name = "Test", version = 0.1) public class Test extends Script { AntiBan antiban; @Override public void onStart() { List<Action> actionList = new ArrayList<>(); // create an action with default weight Action action1 = Action.MOVE_MOUSE; // create an action and change its weight Action action2 = Action.ROTATE_CAMERA; action2.setWeight(20); // add actions to list actionList.add(action1); actionList.add(action2); // create antiban object with custom action list antiban = new AntiBan(this, 30000, 180000, actionList); } @Override public int onLoop() throws InterruptedException { if (antiban.shouldExecute()) { antiban.execute(); } return 500; } } Source:
×
×
  • Create New...