faovbot Posted March 1, 2019 Share Posted March 1, 2019 Hi the goal is a very simple script. Start at GE -> teleport OUTSIDE of house with empty buckets in inventory. Fill buckets with sand and teleport back to the GE to deposit and repeat. However, there are no teleport to grand exchange or outside house options so I end up teleporting to varrock square or inside my house which is NOT what I want? Any ideas on how to solve this? My script so far: public final class FaovSand extends Script { @Override public final void onStart() { } @Override public final int onLoop() throws InterruptedException { getTabs().open(Tab.MAGIC); getBank().open(); getBank().withdrawAll("Bucket"); getBank().close(); if (getInventory().contains("Bucket")) { magic.castSpell(Spells.NormalSpells.TELEPORT_TO_HOUSE); } RS2Object sandpit = getObjects().closest("Sandpit"); getTabs().open(Tab.INVENTORY); getInventory().getItem("Bucket").interact("Use"); if (sandpit != null && sandpit.interact("Use")) { MethodProvider.sleep(5000); } long buckets = getInventory().getAmount("Bucket of sand"); log(buckets); if (getInventory().contains("Bucket of sand") && getInventory().getAmount("Bucket of sand") >= 26) { getTabs().open(Tab.MAGIC); magic.castSpell(Spells.NormalSpells.VARROCK_TELEPORT); } return 10000; } } Quote Link to comment Share on other sites More sharing options...
ez11 Posted March 1, 2019 Share Posted March 1, 2019 (edited) For spawning outside of your POH there is an option in the house menu ingame where to spawn and for GE im pretty sure you have to rightclick the spell ingame to change the location once you have the diary completed Edited March 1, 2019 by ez11 Quote Link to comment Share on other sites More sharing options...
investmentideas Posted March 1, 2019 Share Posted March 1, 2019 ring of wealth has GE teleport? Quote Link to comment Share on other sites More sharing options...
Imthabawse Posted March 1, 2019 Share Posted March 1, 2019 Like @ez11 said you can right click varrock teleport and select GE tele OR use ring of wealth. Quote Link to comment Share on other sites More sharing options...
Medusa Posted March 1, 2019 Share Posted March 1, 2019 Does that script actually work? I feel like it'd be much easier for you if you switched to task based scripts, instead of throwing it all in the onLoop method. Quote Link to comment Share on other sites More sharing options...
ProjectPact Posted March 1, 2019 Share Posted March 1, 2019 1 hour ago, Medusaa said: Does that script actually work? I feel like it'd be much easier for you if you switched to task based scripts, instead of throwing it all in the onLoop method. It’s so small it really doesn’t matter, however I recommend better checks, and adding verification to booleans to make sure they return true before proceeding Quote Link to comment Share on other sites More sharing options...
faovbot Posted March 1, 2019 Author Share Posted March 1, 2019 Sorry this is my first script I'm trying simple things for now but I definitely will implement checks for each step. I CANNOT just change my house to teleport outside because that makes the left click option Outside house and the bot just right clicks and goes inside. Seems kinda counterproductive. Same thing for the GE but I'm not too worried about the bank location, there are other cities. I don't have a ring of wealth on this acc (low level ironman). Can anyone show me example code of right clicking on the spell or clicking on a house portal to exit the house? Thank you. Quote Link to comment Share on other sites More sharing options...
Medusa Posted March 1, 2019 Share Posted March 1, 2019 4 hours ago, ProjectPact said: It’s so small it really doesn’t matter, however I recommend better checks, and adding verification to booleans to make sure they return true before proceeding Yea that's part of what I meant with my comment. Didn't express myself properly Quote Link to comment Share on other sites More sharing options...
faovbot Posted March 2, 2019 Author Share Posted March 2, 2019 Any idea on teleporting outside the house guys? Been reading through the API and I don't see any way around selecting a right click option with the spell cast function. Quote Link to comment Share on other sites More sharing options...