November 25, 201510 yr Good morning everyone (GMT+1). I'm currently studying program developing in The Netherlands. Which means i can just program OSbot scripts at school A classmate/friend of mine challenged me to make a tutorial island script, so he can do the tutorial that he doesn't want to do with hand. I know there are scripts for Tutorial Island, but i'm making this for my own knowledge and will not post the script on the forums.. Now my question is: MyPlayer keeps clicking the guide. Like, spam clicking. I tried a lot of things to solve this. At first i was like: I'm going to add a sleep timer. But this sleeps the whole script, and that's what we don't want. Im clueless now lol. This is my code: if (spawnArea.contains(myPlayer())) { NPC guide = npcs.closest("RuneScape Guide"); if(guide != null && !myPlayer().isInteracting(guide)){ guide.interact("Talk-To"); // Need to do something here } if(guide != null && myPlayer().isInteracting(guide)) { dialogueGuide(); } Edited November 25, 201510 yr by OSRS Sebastian
November 25, 201510 yr Author ConditionSleep? return if in dialogue Still does the same.. I have tried the conditional sleep in both statements. didn't work. if (spawnArea.contains(myPlayer())) { NPC guide = npcs.closest("RuneScape Guide"); if(guide != null && !myPlayer().isInteracting(guide)){ guide.interact("Talk-To"); dialogueGuide(); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return dialogues.inDialogue(); } }.sleep(); } if(guide != null && myPlayer().isInteracting(guide)) { dialogueGuide(); } } Edited November 25, 201510 yr by OSRS Sebastian
November 25, 201510 yr Does it click while talking or only before? If it spams before it's quite a human attribute which you should just roll with.
November 25, 201510 yr Author Does it click while talking or only before? If it spams before it's quite a human attribute which you should just roll with. When in dialogue, it clicks the Tutorial Guy again and again and again and again. So: Talking to the Tutorial Guy, open dialogue. Click next and clicks the tutorial guy again. I need to somehow script it like: Only click Talk-To when i say so. Like: First stage: Click Tutorial guy. Second stage: Click on the settings tab Third stage: Click the Tutorial guy again Fourth stage: Click on the door and walk to the other tutorial guy. Edited November 25, 201510 yr by OSRS Sebastian
November 25, 201510 yr Yeah I remember it always says in dialogue because it shows the progress. I found this in my tut script, perhaps it's helpful: if(dialogues.inDialogue() && (widgets.get(372,0) == null || !widgets.get(372,0).isVisible()) && (widgets.get(231,1) != null && widgets.get(231,1).isVisible()) || widgets.get(219,0) != null && widgets.get(219,0).isVisible()) // tutorial messages { // in dialogue } For the stages you want to use configs. configs.get(281) returns the current stage of tut island. You could then use the config debugger to determine the values. Edited November 25, 201510 yr by Flamezzz
November 25, 201510 yr Author Yeah I remember it always says in dialogue because it shows the progress. I found this in my tut script, perhaps it's helpful: if(dialogues.inDialogue() && (widgets.get(372,0) == null || !widgets.get(372,0).isVisible()) && (widgets.get(231,1) != null && widgets.get(231,1).isVisible()) || widgets.get(219,0) != null && widgets.get(219,0).isVisible()) // tutorial messages { // in dialogue } For the stages you want to use configs. configs.get(281) returns the current stage of tut island. You could then use the config debugger to determine the values. Can you explain this better? I'm very new to scripting and i'm honest if i say that i don't understand the code you just posted nor the configs thing . You can msg me if you like Edited November 25, 201510 yr by OSRS Sebastian
November 25, 201510 yr NPC#isInteracting doesn't do what you seem to think it does. It will return the NPC guide while the player is 'focusing' him. But that focus is lost as soon as you've interacted with him. Instead you should check if the current dialogue contains whatever it is the guide says. Also, to stop spam clicking, sleep for a bit after interacting. Either with a ConditionalSleep or a simple randomized sleep() Edited November 25, 201510 yr by FrostBug
November 25, 201510 yr Author NPC#isInteracting doesn't do what you seem to think it does. It will return the NPC guide while the player is 'focusing' him. But that focus is lost as soon as you've interacted with him. Instead you should check if the current dialogue contains whatever it is the guide says. Also, to stop spam clicking, sleep for a bit after interacting. Either with a ConditionalSleep or a simple randomized sleep() Thanks for the reply and information! Is there some sort of tutorial on Dialogues and configs?
November 25, 201510 yr Thanks for the reply and information! Is there some sort of tutorial on Dialogues and configs? I don't think there's any particular guide on configs. They're somewhat self explanatory though. The game has a bunch of configs. A config (also called varpbits), is an integer packed with information used by the client. Eg. a bit register where each bit may have a specific meaning. They can be debugged with the client config debugger. You can check if a dialogue with a certain text exists by getWidgets().containingText("Some dialogue text").isEmpty(), if this returned list is not empty, then the dialogue widget exists
November 25, 201510 yr Author I don't think there's any particular guide on configs. They're somewhat self explanatory though. The game has a bunch of configs. A config (also called varpbits), is an integer packed with information used by the client. Eg. a bit register where each bit may have a specific meaning. They can be debugged with the client config debugger. You can check if a dialogue with a certain text exists by getWidgets().containingText("Some dialogue text").isEmpty(), if this returned list is not empty, then the dialogue widget exists This explains a lot! I'm going to give it a try! EDIT: So just to be clear. Is the photo under this text a config? or is it when i talk to an npc? Thanks! Edited November 25, 201510 yr by OSRS Sebastian
November 25, 201510 yr Good morning everyone (GMT+1). I'm currently studying program developing in The Netherlands. Which means i can just program OSbot scripts at school A classmate/friend of mine challenged me to make a tutorial island script, so he can do the tutorial that he doesn't want to do with hand. I know there are scripts for Tutorial Island, but i'm making this for my own knowledge and will not post the script on the forums.. Now my question is: MyPlayer keeps clicking the guide. Like, spam clicking. I tried a lot of things to solve this. At first i was like: I'm going to add a sleep timer. But this sleeps the whole script, and that's what we don't want. Im clueless now lol. This is my code: if (spawnArea.contains(myPlayer())) { NPC guide = npcs.closest("RuneScape Guide"); if(guide != null && !myPlayer().isInteracting(guide)){ guide.interact("Talk-To"); // Need to do something here } if(guide != null && myPlayer().isInteracting(guide)) { dialogueGuide(); } In the case of Tutorial Island, every interaction with an NPC is followed by the user selecting continue. So you can use: final ConditionalSleep dialogSleep = new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return script.getDialogues().isPendingContinuation(); } }; Edited November 25, 201510 yr by Explv
November 26, 201510 yr Author In the case of Tutorial Island, every interaction with an NPC is followed by the user selecting continue. So you can use: final ConditionalSleep dialogSleep = new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return script.getDialogues().isPendingContinuation(); }}; Thanks bro! Will try this today when i wake up! EDIT: Didn't have time to program today. Going to give it a shot again tomorrow! Will let you guys know. Edited November 26, 201510 yr by OSRS Sebastian
December 1, 201510 yr Work backwards + conditional sleeps: IF speaking WITH Guide --DO interact WITH Guide dialogue ELSE --IF DO interact WITH Guide ----DO conditional sleep UNTIL (IF speaking WITH Guide) Edited December 1, 201510 yr by liverare
December 1, 201510 yr Work backwards + conditional sleeps: IF speaking WITH Guide --DO interact WITH Guide dialogue ELSE --IF DO interact WITH Guide ----DO conditional sleep UNTIL (IF speaking WITH Guide) Except that doesn't work in this instance hence the other answers x 2 Edited December 1, 201510 yr by Explv
Create an account or sign in to comment