Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Graphics;
- import org.dreambot.api.methods.Calculations;
- import org.dreambot.api.methods.dialogues.Dialogues;
- import org.dreambot.api.methods.map.Tile;
- import org.dreambot.api.methods.walking.impl.Walking;
- import org.dreambot.api.script.AbstractScript;
- import org.dreambot.api.script.ScriptManifest;
- import org.dreambot.api.script.Category;
- import org.dreambot.api.wrappers.interactive.GameObject;
- import org.dreambot.api.wrappers.interactive.NPC;
- @ScriptManifest(author = "Soapy", name = "X-mas event 2k15 enjoy m8 v2.0", version = 1.0, description = "xmas", category = Category.MONEYMAKING)
- public class main extends AbstractScript {
- // Walking walk;
- String STATE = "Setting up...";
- String prevState = "";
- boolean FourthAnti = false;
- boolean FourthGift = false;
- Tile fally, santa;
- Tile varrock, vCastle;
- Tile secondFloorDoor, secondFloorLadder;
- Tile thirdFloorDoor, thirdFloorLadder, antiSanta;
- Tile k1, k2, k3, k4;
- Tile lummy;
- GameObject door, stairs, presentTable, ladder, machine, crates;
- NPC santaNPC;
- NPC antiSantaNPC;
- NPC npcK1, npcK2, npcK3, npcK4;
- boolean search = false;
- public void onStart() {
- STATE = "Setup Tiles";
- fally = new Tile(2965, 3367);
- santa = new Tile(2974, 3342);
- varrock = new Tile(3210, 3431);
- vCastle = new Tile(3213, 3472);
- secondFloorDoor = new Tile(3218, 3472);
- secondFloorLadder = new Tile(3223, 3472);
- thirdFloorLadder = new Tile(3223, 3472);
- thirdFloorDoor = new Tile(3219, 3472);
- antiSanta = new Tile(3212, 3472);
- k1 = new Tile(3219, 3424);
- k2 = new Tile(3215, 3418);
- k3 = new Tile(3239, 3396);
- k4 = new Tile(3244, 3393);
- lummy = new Tile(3221, 3218);
- STATE = "Setup WAlking";
- getWalking().setRunThreshold(35);
- STATE = "start";
- }
- public void onExit() {
- }
- @Override
- public int onLoop() {
- // check if near lummy, check previous step and restart from before.
- if (lummy.distance(getLocalPlayer()) < 50) {
- prevState = STATE;
- // if(STATE.equals("Kid_4") || STATE.equals("Kid_3")) {
- //
- // } else if(STATE.equals("Third_child") || STATE.equals("Fourth_child")) {
- //
- // }
- STATE = "Walk_to_varrock";
- }else {
- if (getLocalPlayer().getZ() == 3) {
- stairs = getGameObjects().closest("Staircase");
- while (!stairs.exists())
- stairs = getGameObjects().closest("Staircase");
- wait(400);
- stairs.interact("Climb-down");
- wait(2000);
- }
- switch (STATE) {
- case "start":
- STATE = "Walking_to_falador";
- break;
- case "Walking_to_falador":
- walkToFalador();
- break;
- case "Walking_to_santa":
- walkToSanta();
- break;
- case "Dialogue_1":
- firstDialogueSanta();
- break;
- case "Walk_to_varrock":
- walkToVarrock();
- break;
- case "Walk_to_varrock_castle":
- walkToVarrockCastle();
- break;
- case "Walk_to_anti_santa":
- walkToAntiSanta();
- break;
- case "Dialogue_2":
- secondDialogue();
- break;
- case "Leave_anti_santa":
- leaveAntiSanta();
- break;
- case "Talk_to_first_kid":
- firstChildAntiGift();
- break;
- case "Second_child":
- secondChildAntiGift();
- break;
- case "Third_child":
- thirdChildAntiGift();
- break;
- case "Fourth_child":
- fourthChildAntiGift();
- break;
- case "Walk_to_varrock2":
- walkToVarrock2();
- break;
- case "Walk_to_varrock_castle2":
- walkToVarrockCastle2();
- break;
- case "Walk_to_anti_santa2":
- walkToAntiSanta2();
- break;
- case "Finish_anti":
- finishAntiDialogue();
- break;
- case "Leave_anti2":
- leaveAntiSanta2();
- break;
- case "Walk_to_fally":
- walkToFally();
- break;
- case "Walk_to_santa_2":
- walkToSanta();
- break;
- case "Talk_to_santa_2":
- talkToSanta2();
- break;
- case "varrock2":
- walkToVarrock();
- break;
- case "First_child_gift":
- firstChildGift();
- break;
- case "Second_child_gift":
- secondChildGift();
- break;
- case "Kid_3":
- thirdChildGift();
- break;
- case "Kid_4":
- fourthChildGift();
- break;
- case "Walk_to_falador_final":
- walkToFalador();
- break;
- case "Walk_to_santa_final":
- walkToSanta();
- break;
- case "Final_dialogue":
- lastTalk();
- break;
- }
- }
- // return Calculations.random(100, 200);
- return 0;
- }
- public void onPaint(Graphics g) {
- g.drawString("State: " + STATE, 100, 100);
- g.drawString("Search: " + search, 100, 200);
- }
- public void walkToFalador() {
- getWalking().walk(fally);
- if (fally.distance(getLocalPlayer()) < 8)
- if (STATE.equals("Walk_to_falador_final"))
- STATE = "Walk_to_santa_final";
- else if(prevState.equals("Third_child") || prevState.equals("Fourth_child"))
- STATE = "Walking_to_santa";
- else
- STATE = "Walking_to_santa";
- }
- public void walkToSanta() {
- getWalking().walkExact(santa);
- if (santa.distance(getLocalPlayer()) < 5)
- if (STATE.equals("Walk_to_santa_2"))
- STATE = "Talk_to_santa_2";
- else if (STATE.equals("Walk_to_santa_final"))
- STATE = "Final_dialogue";
- else if(prevState.equals("Third_child") || prevState.equals("Fourth_child"))
- STATE = "Talk_to_santa_2";
- else
- STATE = "Dialogue_1";
- }
- public void firstDialogueSanta() {
- walkToSanta();
- santaNPC = getNpcs().closest("Santa Claus");
- wait(600);
- santaNPC.interact("Talk-to");
- wait(1000);
- while (!getDialogues().inDialogue()) {
- santaNPC = getNpcs().closest("Santa Claus");
- wait(500);
- santaNPC.interact("Talk-to");
- wait(900);
- }
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(750);
- getDialogues().clickOption(1);
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickOption(1);
- wait(750);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- STATE = "Walk_to_varrock";
- }
- public void walkToVarrock() {
- getWalking().walk(varrock);
- if (varrock.distance(getLocalPlayer()) < 5)
- if (STATE.equals("varrock2"))
- STATE = "First_child_gift";
- else if(prevState.equals("Third_child") || prevState.equals("Fourth_child"))
- STATE = "Walking_to_falador";
- else
- STATE = "Walk_to_varrock_castle";
- }
- public void walkToVarrockCastle() {
- getWalking().walkExact(vCastle);
- if (vCastle.distance(getLocalPlayer()) < 3)
- STATE = "Walk_to_anti_santa";
- }
- public void walkToAntiSanta() {
- stairs = getGameObjects().closest("Staircase");
- while (!stairs.exists())
- stairs = getGameObjects().closest("Staircase");
- wait(400);
- stairs.interact("Climb-up");
- wait(2000);
- while (getLocalPlayer().getZ() < 1) {
- stairs = getGameObjects().closest("Staircase");
- wait(200);
- stairs.interact("Climb-up");
- wait(200);
- }
- while ((secondFloorDoor.distance(getLocalPlayer()) > 2)) {
- getWalking().walkExact(secondFloorDoor);
- wait(500);
- }
- wait(400);
- door = getGameObjects().closest("Door");
- while (!door.exists())
- door = getGameObjects().closest("Door");
- wait(100);
- door.interact("Open");
- wait(600);
- while (secondFloorLadder.distance(getLocalPlayer()) > 2) {
- wait(500);
- getWalking().walkExact(secondFloorLadder);
- }
- wait(700);
- ladder = getGameObjects().closest("Ladder");
- while (!ladder.exists())
- ladder = getGameObjects().closest("Ladder");
- wait(150);
- ladder.interact("Climb-up");
- wait(800);
- while (thirdFloorDoor.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(thirdFloorDoor);
- wait(500);
- }
- wait(1000);
- door = getGameObjects().closest("Door");
- while (!door.exists())
- door = getGameObjects().closest("Door");
- door.interact("Open");
- wait(1000);
- while (antiSanta.distance(getLocalPlayer()) > 3) {
- getWalking().walkExact(antiSanta);
- wait(500);
- }
- STATE = "Dialogue_2";
- }
- public void secondDialogue() {
- if(!FourthAnti) {
- search = true;
- antiSantaNPC = getNpcs().closest("Anti-Santa");
- wait(600);
- antiSantaNPC.interact("Talk-to");
- wait(1000);
- while (!antiSantaNPC.exists()) {
- search = true;
- antiSantaNPC = getNpcs().closest("Anti-Santa");
- wait(500);
- }
- search = false;
- antiSantaNPC.interact("Talk-to");
- // while(!getDialogues().inDialogue()) {
- // antiSantaNPC = getNpcs().closest("Anti-Santa");
- // wait(600);
- // antiSantaNPC.interact("Talk-to");
- // wait(900);
- // }
- wait(900);
- getDialogues().clickContinue();
- wait(900);
- getDialogues().clickOption(1);
- wait(900);
- getDialogues().clickContinue();
- wait(900);
- getDialogues().clickContinue();
- wait(900);
- getDialogues().clickOption(1);
- wait(900);
- getDialogues().clickContinue();
- wait(900);
- getDialogues().clickContinue();
- wait(900);
- getDialogues().clickOption(2);
- wait(900);
- getDialogues().clickContinue();
- wait(900);
- getDialogues().clickContinue();
- wait(900);
- getDialogues().clickContinue();
- wait(900);
- getDialogues().clickContinue();
- wait(900);
- if (getDialogues().inDialogue())
- getDialogues().clickContinue();
- wait(950);
- }
- presentTable = getGameObjects().closest("Table");
- while (!presentTable.exists())
- presentTable = getGameObjects().closest("Table");
- wait(500);
- presentTable.interact("Take-present");
- wait(1000);
- presentTable.interact("Take-present");
- wait(700);
- presentTable.interact("Take-present");
- wait(700);
- presentTable.interact("Take-present");
- wait(700);
- crates = getGameObjects().closest("Crate");
- while (!crates.exists())
- crates = getGameObjects().closest("Crate");
- wait(500);
- crates.interact("Search");
- wait(800);
- if(!FourthAnti) {
- antiSantaNPC = getNpcs().closest("Anti-Santa");
- antiSantaNPC.interact("Talk-to");
- wait(1000);
- while (!antiSantaNPC.exists()) {
- antiSantaNPC = getNpcs().closest("Anti-Santa");
- wait(500);
- }
- antiSantaNPC.interact("Talk-to");
- // while(!getDialogues().inDialogue()) {
- // antiSantaNPC = getNpcs().closest("Anti-Santa");
- // antiSantaNPC.interact("Talk-to");
- // wait(1000);
- // }
- wait(1000);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- }
- STATE = "Leave_anti_santa";
- }
- public void leaveAntiSanta() {
- while (thirdFloorDoor.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(thirdFloorDoor);
- wait(500);
- }
- door = getGameObjects().closest("Door");
- door.interact("Open");
- wait(600);
- while (thirdFloorLadder.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(thirdFloorLadder);
- wait(500);
- }
- ladder = getGameObjects().closest("Ladder");
- ladder.interact("Climb-down");
- wait(900);
- while (secondFloorDoor.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(secondFloorDoor);
- wait(500);
- }
- door = getGameObjects().closest("Door");
- door.interact("Open");
- wait(500);
- stairs = getGameObjects().closest("Staircase");
- stairs.interact("Climb-down");
- wait(600);
- while (varrock.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(varrock);
- wait(500);
- }
- if(FourthAnti) {
- STATE = "Fourth_child";
- FourthAnti = false;
- } else
- STATE = "Talk_to_first_kid";
- }
- public void firstChildAntiGift() {
- while (k1.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(k1);
- wait(500);
- }
- getWalking().walkExact(k1);
- npcK1 = getNpcs().closest("Happy Gnome Child");
- npcK1.interact("Talk-to");
- wait(800);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(2);
- wait(600);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(1);
- wait(600);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(1);
- wait(600);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- npcK1 = getNpcs().closest("Crying gnome child");
- wait(400);
- npcK1.interact("Collect-tears");
- wait(800);
- STATE = "Second_child";
- }
- public void secondChildAntiGift() {
- kid2Door();
- while (k2.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(k2);
- wait(500);
- }
- wait(400);
- npcK2 = getNpcs().closest("Happy child");
- npcK2.interact("Talk-to");
- wait(800);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(2);
- wait(600);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(1);
- wait(600);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(1);
- wait(600);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- npcK2 = getNpcs().closest("Crying child");
- npcK2.interact("Collect-tears");
- wait(750);
- STATE = "Third_child";
- }
- public void thirdChildAntiGift() {
- while (k3.distance(getLocalPlayer()) > 1) {
- getWalking().walkExact(k3);
- wait(500);
- }
- kid3Door();
- while (k3.distance(getLocalPlayer()) > 1) {
- getWalking().walkExact(k3);
- wait(500);
- }
- npcK3 = getNpcs().closest("Happy child");
- npcK3.interact("Talk-to");
- wait(600);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(2);
- wait(600);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(1);
- wait(650);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(1);
- wait(650);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- npcK3 = getNpcs().closest("Crying child");
- npcK3.interact("Collect-tears");
- wait(800);
- STATE = "Fourth_child";
- }
- public void fourthChildAntiGift() {
- kid4Door();
- while (k4.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(k4);
- wait(500);
- kid4Door();
- }
- npcK4 = getNpcs().closest("Happy child");
- npcK4.interact("Talk-to");
- wait(650);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(2);
- wait(650);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(1);
- wait(650);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickOption(1);
- wait(650);
- getDialogues().clickContinue();
- wait(400);
- getDialogues().clickContinue();
- wait(400);
- npcK4 = getNpcs().closest("Crying child");
- npcK4.interact("Collect-tears");
- wait(700);
- STATE = "Walk_to_varrock2";
- }
- public void walkToVarrock2() {
- getWalking().walk(varrock);
- if (varrock.distance(getLocalPlayer()) < 5)
- STATE = "Walk_to_varrock_castle2";
- }
- public void walkToVarrockCastle2() {
- getWalking().walkExact(vCastle);
- if (vCastle.distance(getLocalPlayer()) < 3)
- STATE = "Walk_to_anti_santa2";
- }
- public void walkToAntiSanta2() {
- while (getLocalPlayer().getZ() == 0) {
- stairs = getGameObjects().closest("Staircase");
- wait(400);
- stairs.interact("Climb-up");
- wait(900);
- }
- while ((secondFloorDoor.distance(getLocalPlayer()) > 2)) {
- getWalking().walkExact(secondFloorDoor);
- wait(500);
- }
- wait(400);
- door = getGameObjects().closest("Door");
- wait(250);
- door.interact("Open");
- wait(600);
- while (secondFloorLadder.distance(getLocalPlayer()) > 2) {
- wait(500);
- getWalking().walkExact(secondFloorLadder);
- }
- wait(700);
- while (getLocalPlayer().getZ() == 1) {
- ladder = getGameObjects().closest("Ladder");
- wait(150);
- ladder.interact("Climb-up");
- wait(800);
- }
- while (thirdFloorDoor.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(thirdFloorDoor);
- wait(500);
- }
- wait(1000);
- door = getGameObjects().closest("Door");
- door.interact("Open");
- wait(1000);
- while (antiSanta.distance(getLocalPlayer()) > 3) {
- getWalking().walkExact(antiSanta);
- wait(500);
- }
- STATE = "Finish_anti";
- }
- public void finishAntiDialogue() {
- antiSantaNPC = getNpcs().closest("Anti-Santa");
- while (!antiSantaNPC.exists())
- antiSantaNPC = getNpcs().closest("Anti-Santa");
- antiSantaNPC.interact("Talk-to");
- wait(800);
- while (!getDialogues().inDialogue()) {
- antiSantaNPC = getNpcs().closest("Anti-Santa");
- wait(400);
- antiSantaNPC.interact("Talk-to");
- }
- wait(800);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- machine = getGameObjects().closest("Anti-Santa's machine");
- wait(500);
- while (!machine.exists()) {
- machine = getGameObjects().closest("Anti-Santa's machine");
- wait(500);
- }
- machine.interact("Operate");
- wait(1000);
- getDialogues().clickContinue();
- wait(650);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(1000);
- antiSantaNPC.interact("Talk-to");
- wait(600);
- while (!getDialogues().inDialogue()) {
- wait(600);
- antiSantaNPC = getNpcs().closest("Anti-Santa");
- wait(500);
- antiSantaNPC.interact("Talk-to");
- }
- wait(800);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(600);
- STATE = "Leave_anti2";
- }
- public void leaveAntiSanta2() {
- while (thirdFloorDoor.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(thirdFloorDoor);
- wait(500);
- }
- door = getGameObjects().closest("Door");
- door.interact("Open");
- wait(600);
- while (thirdFloorLadder.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(thirdFloorLadder);
- wait(500);
- }
- ladder = getGameObjects().closest("Ladder");
- ladder.interact("Climb-down");
- wait(900);
- while (secondFloorDoor.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(secondFloorDoor);
- wait(500);
- }
- door = getGameObjects().closest("Door");
- door.interact("Open");
- wait(500);
- stairs = getGameObjects().closest("Staircase");
- stairs.interact("Climb-down");
- wait(600);
- while (varrock.distance(getLocalPlayer()) > 3) {
- getWalking().walkExact(varrock);
- wait(500);
- }
- STATE = "Walk_to_fally";
- }
- public void walkToFally() {
- getWalking().walk(fally);
- if (fally.distance(getLocalPlayer()) < 8)
- STATE = "Walk_to_santa_2";
- }
- public void talkToSanta2() {
- santaNPC = getNpcs().closest("Santa Claus");
- santaNPC.interact("Talk-to");
- wait(700);
- while (!getDialogues().inDialogue()) {
- santaNPC = getNpcs().closest("Santa Claus");
- wait(500);
- santaNPC.interact("Talk-to");
- wait(1000);
- }
- getDialogues().clickContinue();
- wait(600);
- getDialogues().clickContinue();
- wait(650);
- getDialogues().clickContinue();
- wait(1000);
- getDialogues().clickContinue();
- wait(1000);
- getDialogues().clickContinue();
- wait(1000);
- getDialogues().clickContinue();
- wait(1000);
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickContinue();
- wait(1000);
- getDialogues().clickContinue();
- wait(1000);
- getDialogues().clickContinue();
- wait(1000);
- getDialogues().clickContinue();
- wait(1000);
- getDialogues().clickContinue();
- wait(1000);
- Tile getPresents = new Tile(2977, 3339);
- while (getPresents.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(getPresents);
- wait(500);
- }
- wait(600);
- presentTable = getGameObjects().closest("Table");
- wait(500);
- while (!presentTable.exists()) {
- presentTable = getGameObjects().closest("Table");
- wait(500);
- }
- presentTable.interact("Take-present");
- wait(800);
- presentTable.interact("Take-present");
- wait(800);
- presentTable.interact("Take-present");
- wait(800);
- presentTable.interact("Take-present");
- wait(800);
- STATE = "varrock2";
- }
- public void firstChildGift() {
- while (k1.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(k1);
- wait(500);
- }
- npcK1 = getNpcs().closest("Crying gnome child");
- npcK1.interact("Talk-to");
- wait(1000);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickOption(1);
- wait(1000);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- STATE = "Second_child_gift";
- }
- public void secondChildGift() {
- getWalking().walkExact(k2);
- kid2Door();
- while (k2.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(k2);
- wait(500);
- }
- npcK2 = getNpcs().closest("Crying child");
- npcK2.interact("Talk-to");
- wait(1000);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickOption(1);
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- STATE = "Kid_3";
- }
- public void thirdChildGift() {
- while (k3.distance(getLocalPlayer()) > 1) {
- getWalking().walkExact(k3);
- wait(500);
- }
- kid3Door();
- while (k3.distance(getLocalPlayer()) > 1) {
- getWalking().walkExact(k3);
- wait(500);
- }
- npcK3 = getNpcs().closest("Crying child");
- npcK3.interact("Talk-to");
- wait(1000);
- while (!getDialogues().inDialogue()) {
- npcK3 = getNpcs().closest("Crying child");
- wait(500);
- npcK3.interact("Talk-to");
- wait(900);
- }
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickOption(1);
- wait(800);
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickContinue();
- wait(700);
- STATE = "Kid_4";
- }
- public void fourthChildGift() {
- while (k4.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(k4);
- }
- kid4Door();
- while (k4.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(k4);
- }
- kid4Door();
- while (k4.distance(getLocalPlayer()) > 1) {
- getWalking().walkExact(k4);
- }
- npcK4 = getNpcs().closest("Crying child");
- wait(500);
- npcK4.interact("Talk-to");
- wait(1000);
- while (!getDialogues().inDialogue()) {
- npcK4 = getNpcs().closest("Crying child");
- wait(500);
- npcK4.interact("Talk-to");
- wait(1000);
- }
- wait(1000);
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickOption(1);
- wait(800);
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickContinue();
- wait(700);
- STATE = "Walk_to_falador_final";
- }
- public void lastTalk() {
- santaNPC = getNpcs().closest("Santa Claus");
- santaNPC.interact("Talk-to");
- wait(800);
- while (!getDialogues().inDialogue()) {
- santaNPC = getNpcs().closest("Santa Claus");
- wait(500);
- santaNPC.interact("Talk-to");
- wait(500);
- }
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(3000);
- // cutscene
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickContinue();
- wait(800);
- getDialogues().clickContinue();
- wait(3000);
- // cutscene
- getDialogues().clickContinue();
- wait(3000);
- // cutscene
- getDialogues().clickContinue();
- wait(5000);
- // cs(long)
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(2000);
- // cs
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(2500);
- // cs
- santaNPC.interact("Talk-to");
- wait(800);
- while (!getDialogues().inDialogue()) {
- santaNPC = getNpcs().closest("Santa Claus");
- wait(500);
- santaNPC.interact("Talk-to");
- wait(500);
- }
- wait(200);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- getDialogues().clickContinue();
- wait(700);
- }
- public void wait(int x) {
- x = (int) ((Math.random() * ((x + (x * .1)) - (x * 9))) + (x * 9) * (1.1));
- try {
- Thread.sleep(x);
- } catch (InterruptedException e) {
- }
- }
- public void kid2Door() {
- Tile nDoor = new Tile(3217, 3420);
- while (nDoor.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(nDoor);
- wait(300);
- }
- door = getGameObjects().closest("Door");
- door.interact("Open");
- }
- public void kid3Door() {
- Tile nDoor = new Tile(3239, 3391);
- while (nDoor.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(nDoor);
- wait(300);
- }
- door = getGameObjects().closest("Door");
- door.interact("Open");
- }
- public void kid4Door() {
- Tile nDoor = new Tile(3242, 3396);
- while (nDoor.distance(getLocalPlayer()) > 2) {
- getWalking().walkExact(nDoor);
- wait(300);
- }
- door = getGameObjects().closest("Door");
- door.interact("Open");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement