- Joined
- Oct 12, 2015
- Messages
- 3,760
- Thread Author
- #1
Similar to thread by @qverkk.
Very basic script to steal nature runes from a chest in OSRS, no JavaFX or Swing used.
Exception:
From above exception:
at com.pBots.bots.Nature.tasks.TaskSteal.validate(TaskSteal.java:42)
Line 42 of that class and called like so:
LocatableEntityQueryResults<GameObject> chest = GameObjects.newQuery().actions("Search for traps").results();
@Cloud
Very basic script to steal nature runes from a chest in OSRS, no JavaFX or Swing used.
Exception:
Code:
java.lang.NullPointerException
at nul.IiiiiiiiII.do(Unknown Source)
at nul.IiiiiiiiII.special_uids(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
at com.sun.proxy.$Proxy8.special_uids(Unknown Source)
at nul.IiiiIIiIIIii.new(epb:12)
at nul.IiiiIIiIIIii.new(epb:15)
at com.runemate.game.api.hybrid.region.GameObjects.getLoaded(obc:4)
at com.runemate.game.api.hybrid.region.GameObjects.getLoaded(obc:198)
at com.runemate.game.api.hybrid.queries.GameObjectQueryBuilder.initialDataSet(ryb:237)
at com.runemate.game.api.hybrid.queries.QueryBuilder.results(bob:248)
at com.pBots.bots.Nature.tasks.TaskSteal.validate(TaskSteal.java:42)
at com.runemate.game.api.script.framework.task.TaskScript.onLoop(lrb:147)
at com.runemate.game.api.script.framework.LoopingScript.run(brb:234)
at com.runemate.game.api.script.framework.AbstractScript.start(exb:174)
at nul.iIiiiIiiIiiI.run(aic:232)
From above exception:
at com.pBots.bots.Nature.tasks.TaskSteal.validate(TaskSteal.java:42)
Line 42 of that class and called like so:
LocatableEntityQueryResults<GameObject> chest = GameObjects.newQuery().actions("Search for traps").results();
Code:
@Override
public boolean validate() {
Player player = Players.getLocal();
LocatableEntityQueryResults<GameObject> chest = GameObjects.newQuery().actions("Search for traps").results();
return player != null
&& chest != null
&& !chest.isEmpty()
&& !Inventory.isFull()
&& chest.nearest().distanceTo(player.getPosition()) < 5
&& player.getAnimationId() == -1;
}
@Cloud