Skip to content

Instantly share code, notes, and snippets.

@JKetelaar
Last active August 29, 2015 14:04
Show Gist options
  • Save JKetelaar/f062606ff8f3f645d0b7 to your computer and use it in GitHub Desktop.
Save JKetelaar/f062606ff8f3f645d0b7 to your computer and use it in GitHub Desktop.
import org.parabot.core.Context;
import org.parabot.environment.api.utils.Time;
import org.parabot.environment.scripts.Category;
import org.parabot.environment.scripts.Script;
import org.parabot.environment.scripts.ScriptManifest;
import org.parabot.environment.scripts.framework.LoopTask;
import org.rev317.min.accessors.Client;
import org.rev317.min.api.methods.Players;
import org.rev317.min.api.methods.SceneObjects;
import org.rev317.min.api.wrappers.SceneObject;
import org.rev317.min.api.methods.Menu;
import org.parabot.environment.input.Mouse;
/**
* @author BrandoTheGod
*/
@ScriptManifest(author = "BrandonTheGod",
category = Category.THIEVING,
description = "The Ikov Smart Thiever",
name = "IkovThiever",
servers = { "Ikov" },
version = 1.3)
public class Thiever extends Script implements LoopTask {
@Override
public boolean onExecute() {
return true;
}
@Override
public int loop() {
if (Players.getMyPlayer().getAnimation() == -1 && Players.getMyPlayer().isInCombat()) {
SceneObject[] stall = SceneObjects.getNearest(/*Stall ID*/123);
if (stall.length > 0) {
stall[0].interact(1);
}
Time.sleep(1000);
}
Client c = (Client) Context.getInstance().getClient();
if (c.getOpenInterfaceId() != -1 || c.getOpenInterfaceId() != 1){
Menu.sendAction(1107, 0, 0, 0); //exit menu
Time.sleep(200);
Menu.sendAction(315, 1517, 343, 2458); //logout
Time.sleep(10000); //wait for account to disconnect
Mouse.getInstance().click(378, 290, true);
Menu.sendAction(679, 9682944, 436, 4907);
Time.sleep(1000); //Allow for the enterance dialogue to disappear
}
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment