Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.Script;
- import org.rsbot.script.wrappers.RSArea;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSPlayer;
- import org.rsbot.script.wrappers.RSTile;
- @ScriptManifest(authors = { "boyyo11" }, keywords = { "lecturn lighter pro" }, name = "Lecturn Lighter Pro", version = 1.0, description = "Allows a bot to lit your lecturn.")
- public class BurnerLighter extends Script {
- private int X1 = 0;
- private int X2 = 0;
- private int Y1 = 0;
- private int Y2 = 0;
- private int pX = 0;
- private int pY = 0;
- private RSArea LightingLocation = new RSArea(new RSTile(X1, Y1), new RSTile(X2, Y2));
- private static final int MARRENTILL_ID = 251;
- private static final int GRIMYMARRENTILL_ID = 201;
- private static final int UNLIT_ID = 13212;
- private static final int LIT_ID = 13213;
- private static final int TINDERBOX_ID = 590;
- private boolean playersinRoom = false;
- private boolean playerInRoom = false;
- private int playersInt = 0;
- public boolean onStart(){
- pX = getMyPlayer().getLocation().getX();
- pY = getMyPlayer().getLocation().getY();
- X1 = pX - 10;
- Y1 = pY - 10;
- X2 = pX + 10;
- Y2 = pY + 10;
- return true;
- }
- public int loop(){
- if(playersInt >= 1){
- playerInRoom = true;
- }
- if(inventory.contains(TINDERBOX_ID)){
- if(inventory.contains(MARRENTILL_ID)){
- RSObject Lecturn = objects.getNearest(UNLIT_ID);
- if(playersinRoom == true){
- if(playerInRoom == true){
- if(Lecturn != null){
- camera.turnTo(Lecturn);
- Lecturn.interact("Light " + Lecturn.getName());
- sleep(random(600, 700));
- }
- }
- } else {
- if(Lecturn != null){
- camera.turnTo(Lecturn);
- Lecturn.interact("Light " + Lecturn.getName());
- sleep(random(600, 700));
- }
- }
- }
- } else {
- stopScript(false);
- }
- return random(100, 200);
- }
- public void onFinish(){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement