Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.kbotpro.scriptsystem.runnable.Script;
- import com.kbotpro.scriptsystem.events.PaintEventListener;
- import com.kbotpro.scriptsystem.interfaces.Looped;
- import java.awt.*;
- /**
- * Created by Adam using IntelliJ IDEA.
- * Date: Nov 30, 2009
- * All code below is free for use in:
- * Personal or private work
- * Open source projects
- * Free programs
- * *Kbot
- */
- public class StayLoggedIn extends Script implements PaintEventListener {
- public Looped mainLoop;
- public int x;
- public int y;
- public int gamble;
- public int gambleTop;
- public int gambleLow;
- public int selectTab = 0;
- public boolean canStart() {
- if (game.isLoggedIn()) {
- return true;
- } else {
- return false;
- }
- }
- public String getName() {
- return "Stay Logged In";
- }
- public String getAuthor() {
- return "ToshiXZ";
- }
- public void onRepaint(Graphics g) {
- }
- public void stop() {
- }
- public void onStart() {
- }
- public void pause() {
- }
- public void registerWorkers() {
- createWorker(mainLoop = new Looped() {
- public int loop() {
- gambleTop = random(10,50);
- gambleLow = random(0, gambleTop);
- gamble = random(0, gambleTop + (gambleTop - gambleLow));
- if (gamble <= gambleLow) {
- x = random(0, botEnv.appletWidth);
- y = random(7, botEnv.appletHeight);
- mouse.moveMouse(x, y);
- } else if (gamble >= gambleTop) {
- while(selectTab != game.getCurrentTab()) {
- selectTab = random(1, 28);
- }
- game.openTab(selectTab);
- } else {
- // Rotate Screen code here maybe.. rofl
- }
- return random(71, 23415);
- }
- });
- }
- }
Add Comment
Please, Sign In to add comment