Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package scripts;
- import java.util.Random;
- import org.tribot.api.Banking;
- import org.tribot.api.Clicking;
- import org.tribot.api.Game;
- import org.tribot.api.Inventory;
- import org.tribot.api.ScreenModels;
- import org.tribot.api.Textures;
- import org.tribot.api.Timing;
- import org.tribot.api.input.Mouse;
- import org.tribot.api.types.InventoryItem;
- import org.tribot.api.types.ScreenModel;
- import org.tribot.api.types.Texture;
- import org.tribot.script.Script;
- import org.tribot.script.ScriptManifest;
- @ScriptManifest(authors = { "iRoc" }, category = "Herblore", name = "Iroc's Herblore")
- public class iRocHerblore extends Script {
- int grimyHerb = 628267;
- int cleanHerb = 656168;
- // int spirit = 434763;
- // int unfPot = 428282;
- // int vialWater = 428867;
- final Random random = new Random();
- int randomize = 5;
- int[] row = { 580, 625, 665, 705 };
- int[] coll = { 278, 315, 350, 385, 425, 460, 495 };
- int herbCleaned;
- int depositAllTextureId = 39493;
- long cwBank = 2550191772L;
- String grimyGuam = "Grimy guam";
- String grimyMarrantill = "Grimy marrentill";
- String grimyTarromin = "Grimy tarromin";
- String grimyHarralander = "Grimy Harralander";
- String grimyRanarr = "Grimy ranarr";
- String grimyToadflax = "Grimy toadflax";
- String grimySpiritweed = "Grimy spirit weed";
- String grimyIrit = "Grimy irit";
- String grimyWergali = "Grimy wegali";
- String grimyAvantoe = "Grimy avantoe";
- String grimyKwuarm = "Grimy kwuarm";
- String grimySnapdragon = "Grimy snapdragon";
- String grimyCadantine = "Grimy cadantine";
- String grimyLantadyme = "Grimy lantadyme";
- String grimyDwarfweed = "grimy dwarf weed";
- String grimyTorstol = "Grimy torstol";
- String herb = grimyTarromin;
- public int random(int r) {
- int rn = random.nextInt(r);
- return rn;
- }
- public void run() {
- for (;;) {
- if (Inventory.find(cleanHerb).length > 0
- || Inventory.getAll().length >= 0) {
- bank();
- }
- if (Inventory.find(grimyHerb).length > 0) {
- cleanReverse();
- println(herbCleaned);
- }
- }
- }
- public void bank() {
- ScreenModel[] bankSM = ScreenModels.find(cwBank);
- if (bankSM != null) {
- Clicking.click("Bank", bankSM);
- sleep(1500, 2000);
- if (Inventory.getAll().length > 0) {
- Texture[] text = Textures.find(depositAllTextureId);
- Clicking.click(text);
- sleep(1000, 1200);
- }
- if (Inventory.getAll().length == 0) {
- Mouse.move(55 + random(5), 160 + random(5));
- while (!Game.isUptext(herb)) {
- sleep(250, 300);
- }
- if (Game.isUptext(herb)) {
- Mouse.click(3);
- Timing.waitChooseOption("Withdraw-All", 1000);
- sleep(500, 600);
- }
- }
- Banking.closeBankScreen();
- sleep(500, 600);
- }
- }
- public void cleanForward() {
- clickRow(row[0], row[1], row[2], row[3], coll[0]);
- clickRow(row[3], row[2], row[1], row[0], coll[1]);
- clickRow(row[0], row[1], row[2], row[3], coll[2]);
- clickRow(row[3], row[2], row[1], row[0], coll[3]);
- clickRow(row[0], row[1], row[2], row[3], coll[4]);
- clickRow(row[3], row[2], row[1], row[0], coll[5]);
- clickRow(row[0], row[1], row[2], row[3], coll[6]);
- InventoryItem[] herb = Inventory.find(cleanHerb);
- herbCleaned = herbCleaned + herb.length;
- }
- public void cleanReverse() {
- clickRow(row[3], row[2], row[1], row[0], coll[6]);
- clickRow(row[0], row[1], row[2], row[3], coll[5]);
- clickRow(row[3], row[2], row[1], row[0], coll[4]);
- clickRow(row[0], row[1], row[2], row[3], coll[3]);
- clickRow(row[3], row[2], row[1], row[0], coll[2]);
- clickRow(row[0], row[1], row[2], row[3], coll[1]);
- clickRow(row[3], row[2], row[1], row[0], coll[0]);
- InventoryItem[] herb = Inventory.find(cleanHerb);
- herbCleaned = herbCleaned + herb.length;
- }
- public void cleanSnake() {
- clickColumn(row[3], coll[0], coll[1], coll[2], coll[3], coll[4],
- coll[5], coll[6]);
- clickColumn(row[2], coll[6], coll[5], coll[4], coll[3], coll[2],
- coll[1], coll[0]);
- clickColumn(row[1], coll[0], coll[1], coll[2], coll[3], coll[4],
- coll[5], coll[6]);
- clickColumn(row[0], coll[6], coll[5], coll[4], coll[3], coll[2],
- coll[1], coll[0]);
- InventoryItem[] herb = Inventory.find(cleanHerb);
- herbCleaned = herbCleaned + herb.length;
- }
- public void cleanSnakeReverse() {
- clickColumn(row[0], coll[0], coll[1], coll[2], coll[3], coll[4],
- coll[5], coll[6]);
- clickColumn(row[1], coll[6], coll[5], coll[4], coll[3], coll[2],
- coll[1], coll[0]);
- clickColumn(row[2], coll[0], coll[1], coll[2], coll[3], coll[4],
- coll[5], coll[6]);
- clickColumn(row[3], coll[6], coll[5], coll[4], coll[3], coll[2],
- coll[1], coll[0]);
- InventoryItem[] herb = Inventory.find(cleanHerb);
- herbCleaned = herbCleaned + herb.length;
- }
- public void clickSlot(int x, int y) {
- Mouse.move(x - random(randomize), y - random(randomize));
- Mouse.click(1);
- }
- public void clickColumn(int x, int ay, int by, int cy, int dy, int ey,
- int fy, int gy) {
- Mouse.move(x + random(randomize), ay + random(randomize));
- Mouse.click(1);
- Mouse.move(x + random(randomize), by + random(randomize));
- Mouse.click(1);
- Mouse.move(x + random(randomize), cy + random(randomize));
- Mouse.click(1);
- Mouse.move(x + random(randomize), dy + random(randomize));
- Mouse.click(1);
- Mouse.move(x + random(randomize), ey + random(randomize));
- Mouse.click(1);
- Mouse.move(x + random(randomize), fy + random(randomize));
- Mouse.click(1);
- Mouse.move(x + random(randomize), gy + random(randomize));
- Mouse.click(1);
- }
- public void clickRow(int ax, int bx, int cx, int dx, int y) {
- Mouse.move(ax + random(randomize), y + random(randomize));
- Mouse.click(1);
- Mouse.move(bx + random(randomize), y + random(randomize));
- Mouse.click(1);
- Mouse.move(cx + random(randomize), y + random(randomize));
- Mouse.click(1);
- Mouse.move(dx + random(randomize), y + random(randomize));
- Mouse.click(1);
- }
- }
Add Comment
Please, Sign In to add comment