todamach Posted June 21, 2014 Posted June 21, 2014 Bot bot = getBot(); InteractionEvent IE = new InteractionEvent(bot, Mine[0], "Mine"); IE.execute(); [ERROR][Bot #1][06/21 03:43:00 AM]: Error in script executor! java.lang.NullPointerException at org.osbot.rs07.event.InteractionEvent.execute(InteractionEvent.java:264) at GameMiner.walkMine(GameMiner.java:43) at GameMiner.onLoop(GameMiner.java:72) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ScriptExecutor.java:99) at java.lang.Thread.run(Unknown Source) Hey. I'm trying to make a method that interacts with a position. What I would really want to do is create an Entity from a position. But I don't think that's possible (?). So I browsed through the API and found InteractionEvent. Now, it looks like it would do exactly what I want. The thing is, I have no idea what "bot" is. No idea how to use, or why to use it. I'm pretty sure, that's why I get error, and I'd really appreciate if someone could explain it to me.
Dreamliner Posted June 21, 2014 Posted June 21, 2014 Bot bot = getBot(); InteractionEvent IE = new InteractionEvent(bot, Mine[0], "Mine"); IE.execute(); [ERROR][Bot #1][06/21 03:43:00 AM]: Error in script executor! java.lang.NullPointerException at org.osbot.rs07.event.InteractionEvent.execute(InteractionEvent.java:264) at GameMiner.walkMine(GameMiner.java:43) at GameMiner.onLoop(GameMiner.java:72) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ScriptExecutor.java:99) at java.lang.Thread.run(Unknown Source) Hey. I'm trying to make a method that interacts with a position. What I would really want to do is create an Entity from a position. But I don't think that's possible (?). So I browsed through the API and found InteractionEvent. Now, it looks like it would do exactly what I want. The thing is, I have no idea what "bot" is. No idea how to use, or why to use it. I'm pretty sure, that's why I get error, and I'd really appreciate if someone could explain it to me. It's a problem with InteractionEvent that makes it unusable. I've already reported this issue in the developer tracker. To my knowledge, it hasn't been looked at yet
todamach Posted June 21, 2014 Author Posted June 21, 2014 Ok, thanks. Any other way to interact with a position?
Joseph Posted June 21, 2014 Posted June 21, 2014 If you go to the position class in the API, there's a interact method, why don't you use that??
Joseph Posted June 21, 2014 Posted June 21, 2014 Ok, thanks. Any other way to interact with a position?
todamach Posted June 21, 2014 Author Posted June 21, 2014 Bot bot = getBot(); Position pos = new Position(x,y,z); pos.interact(bot, "Mine"); Like this? Also since I have no clue about what Bot actually is, is that part also Ok?
Joseph Posted June 21, 2014 Posted June 21, 2014 Bot bot = getBot(); Position pos = new Position(x,y,z); pos.interact(bot, "Mine"); Like this? Also since I have no clue about what Bot actually is, is that part also Ok? yes sir :p