st3ealth 1 Share Posted October 11, 2019 I think it has something to do with getDialogues().inDialogue() but I can't figure it out how to implement it in this code. Thanks in advance (sorry for my unorganised and bad code, I just started a few days ago) import org.dreambot.api.methods.container.impl.bank.BankLocation; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.map.Tile; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.wrappers.interactive.GameObject; import org.dreambot.api.wrappers.widgets.WidgetChild; @ScriptManifest( author = "Stealth", description = "stuff", category = Category.CRAFTING, version = 0.01, name = "Crafter Script" ) public class Main extends AbstractScript { public static final int RING_MOULD = 1592; public static final int GOLD_BAR = 2357; public static final int FURNACE = 16469; private static final Tile FURNACE_TILE = new Tile(3108, 3499); @Override public int onLoop() { if (getInventory().contains(GOLD_BAR)) { if (FURNACE_TILE.distance() > 1) { getWalking().walk(FURNACE_TILE); } else if (getInventory().contains(GOLD_BAR)) { WidgetChild makeAllWidg = getWidgets().getWidgetChild(446, 7); getInventory().get(GOLD_BAR).useOn(getGameObjects().closest(FURNACE)); if (makeAllWidg.isVisible()){ makeAllWidg.interact("Make Gold ring"); sleepUntil(()->!getInventory().contains(GOLD_BAR),50000); // script needs to stop sleeping if you level up } } } else if (!getInventory().contains(RING_MOULD)){ getBank().open(BankLocation.EDGEVILLE); getBank().withdraw(RING_MOULD); } else if (!getInventory().contains(GOLD_BAR)){ getBank().open(BankLocation.EDGEVILLE); if (getBank().isOpen()){ getBank().depositAllExcept(RING_MOULD); getBank().withdrawAll(GOLD_BAR); } } return 1000; } } Link to comment Share on other sites More sharing options...
st3ealth 1 Author Share Posted October 11, 2019 just realised that this is the wrong section of the forum... soz Link to comment Share on other sites More sharing options...
Nuclear Nezz 2055 Share Posted October 11, 2019 if(getDialogues().canContinue()){ getDialogues().continue(); } Link to comment Share on other sites More sharing options...
TuzasLT 12 Share Posted October 11, 2019 1 hour ago, Nuclear Nezz said: if(getDialogues().canContinue()){ getDialogues().continue(); } does this work if there will be more lines of dialogue for example 5-6 or do i need to define it somehow that there will be more lines Link to comment Share on other sites More sharing options...
Hashtag 8693 Share Posted October 11, 2019 36 minutes ago, TuzasLT said: does this work if there will be more lines of dialogue for example 5-6 or do i need to define it somehow that there will be more lines What Nezz posted works if you're in a dialogue with the only option to continue the dialogue. The amount of text in the dialogue doesn't matter. However, if you're referring to the options you can choose, the code doesn't work with that. Link to comment Share on other sites More sharing options...
TuzasLT 12 Share Posted October 11, 2019 6 minutes ago, Hashtag said: What Nezz posted works if you're in a dialogue with the only option to continue the dialogue. The amount of text in the dialogue doesn't matter. However, if you're referring to the options you can choose, the code doesn't work with that. yeah i get i need to getLength and then choose which option thanks alot for clarifying Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.