Everything posted by Explv
-
[VIDEO] OSBOT'S THE PLACE TO BE!
Beautiful
- Let's play a game
- Let's play a game
-
Explv's AIO [13 skill AIO in 1 script]
I don't seem to be able to reproduce this. In what location were you firemaking? These issues should now be fixed. Thanks
-
Explv's OSBot Manager
Yes I could do something like that, maybe default settings with optional overrides.
-
Explv's OSBot Manager
To help me improve this application please answer the following polls: Should proxies be tied to accounts instead of configurations? Should options be set on all configurations, or individually?
-
GE Data (get price etc. by item name) no external libraries required
Ah noted id, that makes sense
-
GE Data (get price etc. by item name) no external libraries required
The item IDs are different to on rsbuddy (where I am getting the data from) On rsbuddy Mithril platebody(t) is 12287 for example. You should make use of the RSExchange class I wrote on the first page, passing the names of the items, to ensure that the correct IDs are used.
-
Explv's OSBot Manager
I do plan on adding this, haven't had time to get around to it just yet
-
Explv's AIO [13 skill AIO in 1 script]
Thanks for the report, I'll take a look
-
Accessing onPaint method from other class
You could either have a single paint and update the information you want to be displayed when you change tasks, or if you REALLY want a new onPaint method for each task you could make your Task class implement Painter: import org.osbot.rs07.canvas.paint.Painter; import java.awt.*; public class Example implements Painter { @Override public void onPaint(Graphics2D graphics2D) { } } And then when you change the current Task that is executing: getBot().removePainter(previousTask); getBot().addPainter(newTask);
-
Explv's AIO [13 skill AIO in 1 script]
Pushed a fix for this, will be available when the SDN is next updated
-
Explv's AIO [13 skill AIO in 1 script]
I have pushed a fix for this, it will be available when the SDN is next updated
-
Reading text file to List
You are only allowed to read and write files in the OSBot data directory. You can retrieve that directory using the getDirectoryData() method in the Script class
-
Accessing method from another class
Yes but there is a method exchangeContext(Bot bot) which in simple terms basically copies all the variables from the bot instance to your class. Which would fix your Null pointer exception. Fletch fletch = new Fletch(); fletch.exchangeContext(getBot());
-
Accessing method from another class
Or just pass a MethodProvider reference to the constructor of your class (your main class extends MethodProvider) so that you can access the API methods Another alternative is to extend MethodProvider and call exchangeContext(Bot bot)
-
Accessing method from another class
It's because you're extending your class called main. Consider reading up on inheritance
-
How to trade other players
No that is not close. You have to create a new instance of MessageListener, how could a null MessageListener be of any use? You also only want to add a message listener once, not every time canProcess() is called. I understand you may have bad dyslexia, I am not trying to be rude, I am just saying that you may want to follow some Java tutorials before trying to write scripts, because it seems like you don't understand the fundamentals just yet.
-
Closest attackable npc
Not too sure what everyone else in this thread is smoking, all you need is: NPC cow = getNpcs().closest(npc -> npc.getName().startsWith("Cow") && npc.isAttackable()); The isAttackable() method in the Character class returns true if: It is multiway combat and the character has health > 0 OR The character has health > 0 and is not under attack OR The character is interacting with your player
-
How to trade other players
I suspect you may need to spend some more time learning Java, before writing scripts
-
How to trade other players
You need to use a MessageListener You can add one by calling api.getBot().addMessageListener(messageListener); Check that the message received is of type Message.MessageType.RECEIEVE_TRADE Then set a global boolean variable inside your Task class to true And return that boolean variable from your canProcess method
-
How to trade other players
Use a message listener to check for trade messages. If it receives one set some boolean to true indicating that the script should begin the trading task. Also store the username of the player trading with you. Then interact with that player to commence trading. There are methods for interacting with the trade window in the API.
-
Not an advocate of rap, but...
- Scripting assistance needed
https://osbot.org/forum/topic/115124-explvs-scripting-101/- Beginner to OsBot api but familiar with java need help for knowing which methods to use
Consider reading my tutorial: https://osbot.org/forum/topic/115124-explvs-scripting-101/ - Scripting assistance needed