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.

How do I make a loot counter?

Featured Replies

I made a simple Kebab Buying script, but how would I keep track of how many are bought? I've tried having it get the amount of the inventory but I can't seem to figure out how to keep it adding onto a number. I tried to do a KebabCount = KebabCount + 1 after the dialogue where the Kebab is bought but nope.

 

ALSO, if you're reading this, what would be my best way of walking my player from Al Kharid to the GE so he can sell the Kebabs. Not planning on adding this yet but just wondering.

Tping with Varrock teleport and using Home tele to get back would be the best way?

  • Author

Tping with Varrock teleport and using Home tele to get back would be the best way?

 

Sorry for that question I meant more of walking-wise. Would webWalk work or should I split it up to go to the gate then to GE. I've never scripted such long distances.

I made a simple Kebab Buying script, but how would I keep track of how many are bought? I've tried having it get the amount of the inventory but I can't seem to figure out how to keep it adding onto a number. I tried to do a KebabCount = KebabCount + 1 after the dialogue where the Kebab is bought but nope.

 

ALSO, if you're reading this, what would be my best way of walking my player from Al Kharid to the GE so he can sell the Kebabs. Not planning on adding this yet but just wondering.

int kebabCount;

//After you get a full inventory and head to the bank.
//before you open the bank
kebabCount += getInventory().getAmount("name of item");

for walking

 

grab a position near the GE

WebWalkEvent toGE = new WebWalkEvent(INodeRouteFinder.createAdvanced(), new Position(0,0,0));
context.execute(toGE);

hope this helps

Edited by Sinatra

Does it say in chat when you buy a kebab? You could use the message listener in that case and just +1 everytime it pops up in chat, you could alternatively create your own inventory listener kind of thing, but its pretty unnecessary for this.

  • Author

Does it say in chat when you buy a kebab? You could use the message listener in that case and just +1 everytime it pops up in chat, you could alternatively create your own inventory listener kind of thing, but its pretty unnecessary for this.

 

It does! How would I do this message listener? Never heard of it tbh.

It does! How would I do this message listener? Never heard of it tbh.

 

 

I'm on my at the moment so i'm not going to dig through the API

 

But its an interface called MessageListener that you implement, and it will give you  a method like

 

public void onMessage(Message m)

 

e.g.

 

public class Test implements MessageListener

is tom a pornstar?

Yes

It does! How would I do this message listener? Never heard of it tbh.

 

Should implement it like this

 

huQ3cP9.png

 

then you should have a method

    @Override
    public void onMessage(Message m) {
        if(m.getMessage().contains("Blah")) {
            kebabCounter++;
        }
       
    }
  • Author

 

Yes

 

Should implement it like this

 

huQ3cP9.png

 

then you should have a method

    @Override
    public void onMessage(Message m) {
        if(m.getMessage().contains("Blah")) {
            kebabCounter++;
        }
       
    }

 

Sweet! Thanks a ton. What exactly is the 'MetalDragonsMain'? Do I put whatever I like there or?

 

is tom a pornstar?

Yes i am apart of the industry

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.