todamach Posted June 21, 2014 Share 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. Link to comment Share on other sites More sharing options...
Dreamliner Posted June 21, 2014 Share 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 Link to comment Share on other sites More sharing options...
todamach Posted June 21, 2014 Author Share Posted June 21, 2014 Ok, thanks. Any other way to interact with a position? Link to comment Share on other sites More sharing options...
Joseph Posted June 21, 2014 Share 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?? Link to comment Share on other sites More sharing options...
Joseph Posted June 21, 2014 Share Posted June 21, 2014 Ok, thanks. Any other way to interact with a position? Link to comment Share on other sites More sharing options...
todamach Posted June 21, 2014 Author Share 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? Link to comment Share on other sites More sharing options...
Joseph Posted June 21, 2014 Share 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 Link to comment Share on other sites More sharing options...