May 13, 20169 yr So the final puzzle to my new script. This dialogue begins with 11 "Click to Continues", followed by a option 3, followed by 7 more "Click to Continues". In the middle of the last 7 the player receives an object at which point I have it set that my player automatically uses it, cutting off the dialogue like it should. My problem is that I've only gotten him to get through it once. First I had 19 different If/then statements in order, but that didn't work. I tried throwing in some while statements but no. He goes randomly 3 or 4 continues in and then just stops. Here is my latest attempt, I've changed the names until I finish the script, its a surprise (if you guess it, shh!). I'm not sure what to do. if ((AREA.contains(myPosition())) && (!getDialogues().inDialogue())) { npcs.closest("THEDUDE").interact("Talk-to"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getDialogues().inDialogue(); } }.sleep(); if(dialogues.inDialogue()) { if (dialogues.isPendingContinuation() && (!getInventory().contains("THEITEM"))) { if(dialogues.clickContinue()) { sleep(random(100, 300)); } } else if (dialogues.isPendingOption()) { if(dialogues.selectOption(3)) { sleep(random(100, 300)); } } } Any help is appreciated! Will be back on tomorrow to fix it.
May 13, 20169 yr if ((AREA.contains(myPosition())) { if(dialogues.inDialogue()) { if (dialogues.isPendingContinuation() && (!getInventory().contains("THEITEM"))) { if(dialogues.clickContinue()) { sleep(random(100, 300)); } } else if (dialogues.isPendingOption()) { if(dialogues.selectOption(3)) { sleep(random(100, 300)); } } }else{ npcs.closest("THEDUDE").interact("Talk-to"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getDialogues().inDialogue(); } }.sleep(); } perhaps? Edited May 13, 20169 yr by Tom
May 13, 20169 yr Author if ((AREA.contains(myPosition())) && (!getDialogues().inDialogue())) { if(dialogues.inDialogue()) { if (dialogues.isPendingContinuation() && (!getInventory().contains("THEITEM"))) { if(dialogues.clickContinue()) { sleep(random(100, 300)); } } else if (dialogues.isPendingOption()) { if(dialogues.selectOption(3)) { sleep(random(100, 300)); } } }else{ npcs.closest("THEDUDE").interact("Talk-to"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getDialogues().inDialogue(); } }.sleep(); } perhaps? Hmm I tried this and now he just clicks the NPC and doesn't go through the dialogue at all. Does anyone else have any ideas? I'm stumped.
May 13, 20169 yr Hmm I tried this and now he just clicks the NPC and doesn't go through the dialogue at all. Does anyone else have any ideas? I'm stumped. It shouldn't click the NPC as long as its in a dialogue.
May 13, 20169 yr It shouldn't click the NPC as long as its in a dialogue. youre checking if its not in dialogue and its in dialogue at the same time though :E try this: if (AREA.contains(myPosition())) { if (getDialogues().inDialogue()) { if (dialogues.isPendingContinuation() && !getInventory().contains("THEITEM")) { if (dialogues.clickContinue()) { sleep(400); } } else if (dialogues.isPendingOption()) { if (dialogues.selectOption(3)) { sleep(400); } } } else { npcs.closest("THEDUDE").interact("Talk-to"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getDialogues().inDialogue(); } }.sleep(); } }
May 13, 20169 yr youre checking if its not in dialogue and its in dialogue at the same time though :E try this: if (AREA.contains(myPosition())) { if (getDialogues().inDialogue()) { if (dialogues.isPendingContinuation() && !getInventory().contains("THEITEM")) { if (dialogues.clickContinue()) { sleep(400); } } else if (dialogues.isPendingOption()) { if (dialogues.selectOption(3)) { sleep(400); } } } else { npcs.closest("THEDUDE").interact("Talk-to"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getDialogues().inDialogue(); } }.sleep(); } } I didn't even see that top line, lel
May 13, 20169 yr Author youre checking if its not in dialogue and its in dialogue at the same time though :E try this: if (AREA.contains(myPosition())) { if (getDialogues().inDialogue()) { if (dialogues.isPendingContinuation() && !getInventory().contains("THEITEM")) { if (dialogues.clickContinue()) { sleep(400); } } else if (dialogues.isPendingOption()) { if (dialogues.selectOption(3)) { sleep(400); } } } else { npcs.closest("THEDUDE").interact("Talk-to"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getDialogues().inDialogue(); } }.sleep(); } } Yess!!! perfect! my man, thanks so much. Its going! Hey, do you mind if I PM you a few questions and etc about my script. Its one I havent seen anywhere and if it runs good I wanna see what I should do with it. (never tried to release to SDN before)
May 13, 20169 yr Yess!!! perfect! my man, thanks so much. Its going! Hey, do you mind if I PM you a few questions and etc about my script. Its one I havent seen anywhere and if it runs good I wanna see what I should do with it. (never tried to release to SDN before) sure
Create an account or sign in to comment