dzihaad 0 Share Posted April 7, 2020 Hello. I was wondering if someone could write this easy script to avoid logging out. For example, every 4-4.5 minutes it would press random F button (F1 - F12) to avoid 5 min. log out timer. If someone would have time to do this, i would be very thankful. Link to comment Share on other sites More sharing options...
TheRevelo 7 Share Posted April 7, 2020 Sure, if i'll find the Time for it. When its finished i post the link to the Topic here Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted April 7, 2020 Timer timer = new Timer(0); int r = Random.nextInt(240000, 300000); if (timer.getElapsed() > r) { Keyboard.typeSpecialKey(KeyEvent.VK_F1); timer.reset(); } Something like that should do you. Link to comment Share on other sites More sharing options...
dzihaad 0 Author Share Posted April 9, 2020 On 4/7/2020 at 5:54 PM, Pseudo said: Timer timer = new Timer(0); int r = Random.nextInt(240000, 300000); if (timer.getElapsed() > r) { Keyboard.typeSpecialKey(KeyEvent.VK_F1); timer.reset(); } Something like that should do you. So, if i would use script template from another thread, where should I paste it? import org.dreambot.api.methods.Calculations; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.script.Category; @ScriptManifest(author = "You", name = "My First Script", version = 1.0, description = "Simple Tea Thiever", category = Category.THIEVING) public class main extends AbstractScript { public void onStart() { } public void onExit() { } @Override public int onLoop() { return Calculations.random(500, 600); } } Link to comment Share on other sites More sharing options...
TheRevelo 7 Share Posted April 9, 2020 You need to compile it via Eclipse or IntelliJ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.