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.

Newb question

Featured Replies

Hey guys new scripter here

 

I was just wondering what is the correct command for executing a state if a player is within a certain area? hope that makes sense!

Thanks in advance!

 

 

Please move to scripting help! Sorry!

Edited by Snorunt

Area Bank = new Area(x,y, x,y):

If (Bank.contains(S.myPlayer()){

//do stuff

}

This is how I do it, sorry if syntax is off, I'm on my phone

http://pastebin.com/RjMwwdMF

 

Anybody got any ideas on whats up in this?

It would help if you also mentioned what you are expecting this piece of code to do for you. From me looking at it, it looks like it probably will activate the "Start" state, but it doesnt seem that you've defined what the start state does yet, only the conditions which initiate it. So because you haven't really made the start state anywhere the script technically won't do anything yet.

 

I recommend that you download some scripts in the downloadable section, decompile the .jar with JD GUI (http://jd.benow.ca/) and see how other people write their scripts. I personally write my scripts using nodes instead of states, I'm still new at java so I'm not so sure of the difference, other than it being a little bit more optimized because you're doing things in actual object oriented programming instead of having most of your lines of code in one .java.

 

If you want an example of a node based script you could compile and learn from, click my signature for ikkWarriors, that's decompilable :)

  • Author

I was trying to go off of that tutorial :D

Guys thanks so much for your help! Really great community!

  • Author

So its running, but it is spam clicking the npc;

I tried adding a wait but its just going far too fast, any way to make it stop clicking when a dialogue box opens?

Edited by Snorunt

you could use conditionalsleep

 

Example; This will sleep for 500 if condition is true (which is if the specific widget is not visible.)

new ConditionalSleep(500) {
 @Override
      public boolean condition() throws InterruptedException {
       return !getWidgets().isVisible(parent,child);
      }
}.sleep();

Edited by Assnerd

  • Author

Do you have Skype so you could TV me and explain? also check my code if possible.

If you dont have time its cool smile.png

 

Snoruntaioservices is my Skype if anybody wouldnt mind answering a couple of questions !

Edited by Snorunt

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.