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.

PTY Botting

Members
  • Joined

  • Last visited

Everything posted by PTY Botting

  1. Incase someone else looking at this later
  2. I would use Intellij as its alot more modern and frankly better than Eclipse. Although if your attached to eclipse I can find some more things ^ More up to date
  3. If you are using a class that extends methodprovider make sure you exchangecontext with it.
  4. So much duplicated code, I think you need to try break it down more. There are 3 states Alching Buying Exiting There are X Number of items which you are iterating in order Rune2h -> Rune Plate -> Rune Legs Heres is what I would try to do Create an array which which holds the data for the item I wish to alch(Only name right now, but could hold things such as Times alched etc) The initial state would be alching until no items buy items (Trigger a flag saying bought items for current item once done) alch until done Switch the reference to the index of the array(Reset bought flag etc) continue until x number of items done reset index to 0, repeat. Using this way of having the current item stored in an array you can reduce duplicated code y taking a parameter into the method EG public void alchRpl8() throws InterruptedException { if (getInventory().contains("Rune platebody")) { if (!getPlayers().myPlayer().isAnimating()) { magic.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY); Sleep.sleepUntil(() -> magic.isSpellSelected(), 5000); getInventory().interact("cast", "Rune platebody"); runepl8 =+ 1; } } } could become public void alchItem(String itemName) throws InterruptedException { if (getInventory().contains(itemName)) { if (!getPlayers().myPlayer().isAnimating()) { magic.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY); Sleep.sleepUntil(() -> magic.isSpellSelected(), 5000); getInventory().interact("cast", itemName); } } } That way you don't need a separate method for each item you wish to alch
  5. You could simplify it to something like this (Although didn't test it), another step would be changing the traintype to an enum but yeah. public void setAttackStyle(String trainType) { int style = script.getConfigs().get(43); switch (trainType) { case "DEFENCE": if (style != 3) { selectAttackStyle(17, 4); } break; case "ATTACK": if (style != 0) { selectAttackStyle(5, 4); } break; case "STRENGTH": if (style != 1) { selectAttackStyle(9, 4); } break; } } private void selectAttackStyle(int childId, int subChildId) { if (!script.getTabs().open(Tab.ATTACK)) { return; } RS2Widget widget = script.widgets.get(593, childId, subChildId); if (widget != null && widget.isVisible()) { widget.interact(); } }

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.