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.

Getting into the magic tab?

Featured Replies

Im still a noob in writing but how do you make it click into your magic tab, im trying to make a simple curse high lvl alch script 

  • Author
1 hour ago, FrostBug said:

getTabs().open(Tab.MAGIC);

 

thanks man, how do i say like click after tab magic curse mouse position mouse x 666.0 mouse y255.0 then on like a object then to high lvl alch  mouse x 715.0 mouse y 327.0 

is it best to use mouse positions to perform magic spells or is there a better way?

13 minutes ago, kushad said:

thanks man, how do i say like click after tab magic curse mouse position mouse x 666.0 mouse y255.0 then on like a object then to high lvl alch  mouse x 715.0 mouse y 327.0 

is it best to use mouse positions to perform magic spells or is there a better way?

What you're looking for is 

    magic.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY);

this will also open the magic tab automatically

  • Author
2 minutes ago, Spider said:

What you're looking for is 


    magic.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY);

this will also open the magic tab automatically

package core;

import java.awt.Graphics2D;

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Kushad", info = "My first script", name = "CurseAlcher", version = 0, logo = "")
public class Main extends Script {

    @Override
    public void onStart() {
        log("Let's get started!");
    }

    @Override
    magic.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY);
    
    }


    @Override
    public void onExit() {
        log("Thanks for running my Curse Alcher!");
    }

    @Override
    public void onPaint(Graphics2D g) {

    }

 

comes up with red lines

11 minutes ago, kushad said:

package core;

import java.awt.Graphics2D;

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Kushad", info = "My first script", name = "CurseAlcher", version = 0, logo = "")
public class Main extends Script {

    @Override
    public void onStart() {
        log("Let's get started!");
    }

    @Override
    magic.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY);
    
    }


    @Override
    public void onExit() {
        log("Thanks for running my Curse Alcher!");
    }

    @Override
    public void onPaint(Graphics2D g) {

    }

 

comes up with red lines

That's because you need to put that code inside the onstart or onloop function 

What you want to do is this

   public void onStart() {
        
        magic.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY); 
        getInventory().getItemInSlot(0).interact("Cast"); // to alch item in slot 0 for example

    }

I also suggest learning java before trying to get into scripting it will make your life a lot easier ^_^

Edited by Spider

16 minutes ago, kushad said:

 @Override
    magic.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY);
    
    }

:???:

U need more Java

14 minutes ago, Spider said:

That's because you need to put that code inside the onstart or onloop function 

What you want to do is this


   public void onStart() {
        
        magic.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY); 
        getInventory().getItemInSlot(0).interact("Cast"); // to alch item in slot 0 for example

    }

I also suggest learning java before trying to get into scripting it will make your life a lot easier ^_^

You should not perform interactions in onStart. Set up your script in onStart, execute your script in onLoop.

  • Author
2 minutes ago, Script Kid said:

:???:

U need more Java

haha i do just read the tutorial tonight decided try a simple script

1 minute ago, FrostBug said:

You should not perform interactions in onStart. Set up your script in onStart, execute your script in onLoop.

Yeah I just saw he didn't have onloop in his methods and was using onStart so I didn't want to get into that now, thanks though :D 

Perhaps follow some basic Java tutorials on the internet and after get yourself familiar with the API (https://osbot.org/api/), there you can find the methods you can use to script basically anything.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

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.