Skip 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.

[2.3.92] [Bug] Magic#canCast(MagicSpell)

Featured Replies

OSBot version: 2.3.92; although this was happening before as well, not sure how far back it dates.

 

Description of bug: When you call Magic#canCast(MagicSpell) the client will just alternate between inventory and magic tabs. 

 

Instructions of how to replicate: Use this single line of code and it will happen:

    if(this.magic.canCast(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY)){}
 
Demonstration of the above code running: (This script that is running has a single line in its loop (the above mentioned line)
As you can see it just constantly changes between tabs.
d4a23f7bdeb1e22267a30204dfd508bf.gif

No code, no output.

@Override
    public int onLoop() throws InterruptedException {
        System.out.println("Bones: "+ getMagic().canCast(Spells.NormalSpells.BIND));
        System.out.println("Home: "+ getMagic().canCast(Spells.NormalSpells.HOME_TELEPORT));
        return 1000;
    }
[iNFO][bot #1][08/02 12:41:52 PM]: Started script : Skeletor
Bones: false
Home: true

 

 

I also wouldn't use a version tag if you have never used something before. Using that version tag implies that you used canCast in a previous version, which I am willing to bet that you did not.

  • Developer

This is not a bug, however you mentioned you wanted slightly different behaviour for the method. I will not alter the method, but introduce a second method with a boolean parameter with which you can determine whether the method will move back to its previous tab after checking if a cast is possible.

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.