Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Botre

Members
  • Joined

  • Last visited

Everything posted by Botre

  1. Welcome back
  2. Botre replied to 2007's topic in Spam/Off Topic
    2117
  3. Botre replied to 2007's topic in Spam/Off Topic
    2115
  4. Maxi, would you please consider updating your compiler to Java 8...
  5. Even the current best selling scripts make peanuts compared to last year. The reason why sales are low is because of the current market model: One time fees + slow growth of potential customers = market dries up. (OSBot is very aware of this, it's why ranks such as VIP have recurrent fees). The only thing you can do as a scripter is to create a script no-one has bought yet. Good luck with that. OSBot should have stuck with the obligatory monthly fee system, it was fair to both script providers and consumers.
  6. Botre replied to 2007's topic in Spam/Off Topic
    2111
  7. Botre replied to 2007's topic in Spam/Off Topic
    2107
  8. Botre replied to 2007's topic in Spam/Off Topic
    2107
  9. Botre replied to 2007's topic in Spam/Off Topic
    1502
  10. Botre replied to 2007's topic in Spam/Off Topic
    1500
  11. Neatski amigo.
  12. Botre replied to 2007's topic in Spam/Off Topic
    1495
  13. Quickly wrote this, feel free to improve! Precision: 45° You could probably calculate the angle much more precisely, I'll maybe give that a shot another time ^^ public static boolean isCharacterFacing(Character<?> character, Position position) { int rotation = character.getRotation(); Position charPos = character.getPosition(); int xDiff = charPos.getX() - position.getX(); int yDiff = charPos.getY() - position.getY(); // Character position equals position. if (xDiff == 0 && yDiff == 0) { return false; } // Position is east of character. if (xDiff < 0) { if (rotation < 1024) { return false; } } // Position is west of character. else if (xDiff > 0) { if (rotation > 1024) { return false; } } // Position is on the same vertical axis. else { // Position is exactly south of character. if (yDiff > 0) { return rotation < 256 || rotation > 1792; } // Position is exactly north of character. else { return rotation > 762 && rotation < 1286; } } // Position is south of character. if (yDiff > 0) { if (rotation > 512 && rotation < 1536) { return false; } } // Position is north of character. else if (yDiff < 0) { if (rotation < 512 || rotation > 1536) { return false; } } // Position is on the same horizontal axis. else { // Position is exactly east of character. if (xDiff < 0) { return rotation > 1286 && rotation < 1792; } // Position is exactly west of character. else { return rotation > 256 && rotation < 762; } } return true; } public static boolean isCharacterFacing(Character<?> character, RS2Object object) { return isCharacterFacing(character, object.getPosition()); }
  14. "Threw it away" sure m8 But forealz that suck /:
  15. Botre replied to Wishy's topic in Introductions
    Welcome
  16. Then cache the rectangle slots.
  17. l2sleep. new ConditionalSleep(5000, 100) { @Override public boolean condition() throws InterruptedException { return !getTabs().getOpen().equals(Tab.INVENTORY); } }.sleep();
  18. Sleep after you cast the spell. So the script has enough time to process which tab is open.
  19. You could use a for loop like this: package org.bjornkrols.script; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.ui.Spells.NormalSpells; import org.osbot.rs07.script.Script; public class EnchantExample extends Script { private int[] pattern = new int[] {27, 26, 25, 24, 20, 21, 22, 23, 19, 18, 17, 16, 12, 13, 14, 15, 11, 10, 9, 8, 4, 5, 6, 7, 3, 2, 1, 0}; @Override public int onLoop() throws InterruptedException { for (int i = 0; i < pattern.length; i++) { Item item = getInventory().getItemInSlot(pattern[i]); if(item.getName().equals("Sapphire ring")) { if(getMagic().castSpell(NormalSpells.LVL_1_ENCHANT)) { item.interact("Enchant"); } } } return 133 + 7; } }
  20. Yes... ...
  21. public static boolean walkExact(Script script, Position position) { WalkingEvent event = new WalkingEvent(position); event.setMinDistanceThreshold(0); return script.execute(event).hasFinished(); } ^From Xerion or Frostie if I'm not mistaken. Works like a charm
  22. You're a great not-cba
  23. Here's what I use, you won't be able to copy/paste it in your project and use it, but it should be somewhat educational nevertheless. package org.bjornkrols.inventory_patterns; import org.bjornkrols.imported.ArrayUtilities; import org.bjornkrols.imported.KnuthShuffle; /** * @author Bjorn Krols (Botre) * @version 0.1 * @since March 15, 2015 */ public final class InventoryPattern { private InventoryPattern() { // This class should never be instantiated. // Do not delete or make accessible. } private static final byte ROWS = 7; private static final byte COLUMNS = 4; private static final byte SLOTS = ROWS * COLUMNS; public static final int[] REGULAR = buildRegularPattern(); public static final int[] SNAKE = buildSnakePattern(); public static final int[] REVERSED_REGULAR = reversePattern(REGULAR); public static final int[] REVERSED_SNAKE = reversePattern(SNAKE); public static int[] getRandomizedPattern() { int[] array = REGULAR; KnuthShuffle.shuffle(array); return array; } private static int[] buildRegularPattern() { int[] array = new int[SLOTS]; for (int index = 0; index < array.length; index++) { array[index] = index; } return array; } private static int[] buildSnakePattern() { int[] array = new int[SLOTS]; byte index = 0; byte value = - COLUMNS - 1; byte row = 0; while (row < ROWS) { if (row % 2 == 0) { value += COLUMNS + 1; for (int iterator = 0; iterator < COLUMNS; iterator++) { array[index++] = value++; } } else { value += COLUMNS - 1; for (int iterator = 0; iterator < COLUMNS; iterator++) { array[index++] = value--; } } row++; } return array; } private static int[] reversePattern(int[] array) { int[] copy = array; ArrayUtilities.reverse(copy); return copy; } // REGULAR // 00 01 02 03 // 04 05 06 07 // 08 09 10 11 // 12 13 14 15 // 16 17 18 19 // 20 21 22 23 // 24 25 26 27 // SNAKE // 00 01 02 03 // 07 06 05 04 // 08 09 10 11 // 15 14 13 12 // 16 17 18 19 // 23 22 21 20 // 24 25 26 27 // M //TODO // 06 07 20 21 // 05 08 19 22 // 04 09 18 23 // 03 10 17 24 // 02 11 16 25 // 01 12 15 26 // 00 13 14 27 // W //TODO // 00 13 14 27 // 01 12 15 26 // 02 11 16 25 // 03 10 17 24 // 04 09 18 23 // 05 08 19 22 // 06 07 20 21 // REVERSED_REGULAR // 27 26 25 24 // 23 22 21 20 // 19 18 17 16 // 15 14 13 12 // 11 10 09 08 // 07 06 05 04 // 03 02 01 00 // REVERSED_SNAKE // 27 26 25 24 // 20 21 22 23 // 19 18 17 16 // 12 13 14 15 // 11 10 09 08 // 04 05 06 07 // 03 02 01 00 } package org.bjornkrols.events; import java.util.Arrays; import org.bjornkrols.inventory_patterns.InventoryPattern; import org.bjornkrols.script.ConditionalSleep; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.script.MethodProvider; import org.osbot.rs07.script.Script; /** * @author Bjorn Krols (Botre) * @version 0.6 * @since March 17, 2015 */ public abstract class DropAllEvent extends BotreEvent { private int[] pattern = InventoryPattern.REVERSED_SNAKE; private int iterator; public DropAllEvent(Script script) { super(script); setTimeout(60); } public abstract String[] itemsToDrop(); @Override public int onLoop() { Item item = script.getInventory().getItemInSlot(pattern[iterator]); if (item != null && Arrays.asList(itemsToDrop()).contains(item.getName()) && script.getInventory().interact(pattern[iterator], "Drop")) { new ConditionalSleep(100, 2000) { @Override public boolean condition() { Item item = script.getInventory().getItemInSlot(pattern[iterator]); return item != null; } }; } iterator++; return MethodProvider.random.nextInt(75) + 75; } @Override public void postLoop() { // Reset iterator. iterator = 0; super.postLoop(); } @Override public boolean isFinished() { return iterator >= pattern.length; } }
  24. ;o

    Botre replied to Orange's topic in Spam/Off Topic
    :Maldoge:

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.