Ales 2 Share Posted October 23, 2015 I want to change from inventory to magic tab and cast teleport to house. here is my code, which doesn't do anything. public void teleport(){ if(!getTabs().isOpen(Tab.MAGIC)){ //openwithFkey optional later getTabs().open(Tab.MAGIC); } Magic teleport = new Magic(null); teleport.castSpell(Normal.TELEPORT_TO_HOUSE); } any help appreciated Link to comment Share on other sites More sharing options...
Volta 183 Share Posted October 23, 2015 Is your teleport() even being called? Check debug console for any errors Link to comment Share on other sites More sharing options...
Ales 2 Author Share Posted October 23, 2015 Is your teleport() even being called? Check debug console for any errors yeh in debugger it sais [ERROR]01:51:56: Exception has occurred while running! Please report error to developer if problem persists: java.lang.NullPointerException at org.dreambot.api.methods.magic.Magic.castSpell(Magic.java:30) at ayMain.Main.teleporttohouse(Main.java:177) at ayMain.Main.onLoop(Main.java:266) at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:223) at java.lang.Thread.run(Unknown Source) Link to comment Share on other sites More sharing options...
Pandemic 2802 Share Posted October 24, 2015 Should be fixed, restart your client and try again. Link to comment Share on other sites More sharing options...
Ales 2 Author Share Posted October 24, 2015 Should be fixed, restart your client and try again. didn't work. just tried with Teleport to house tabs and it works. But i'd like it to change tabs and cast teleport to house spell Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.