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.RSObject;
- import org.rsbot.script.wrappers.RSTile;
- import org.rsbot.script.wrappers.RSArea;
- import org.rsbot.script.wrappers.RSTilePath;
- import org.rsbot.event.listeners.PaintListener;
- import java.awt.*;
- import org.rsbot.script.wrappers.RSNPC;
- import org.rsbot.script.wrappers.RSComponent;
- import org.rsbot.script.wrappers.RSInterface;
- @ScriptManifest(authors = { "boyyo11" }, keywords = { "the blood pact" }, name = "The Blood Pact", version = 1.0, description = "This bot does the quest: The Blood Pact, for you.")
- public class thebloodpact extends Script implements PaintListener {
- private RSArea lumbridgeTombs = new RSArea(new RSTile(3238, 3193), new RSTile(3248, 3202));
- private RSArea lumbridge = new RSArea(new RSTile(3215, 3200), new RSTile(3238, 3233)); //Lumbridge area we might have to be walking
- private RSArea lumbyCastle = new RSArea(new RSTile(3216, 3209),new RSTile(3226, 3228));
- //if(interfaces.canContinue()){
- // interfaces.clickContinue();
- // sleep(random(1000, 1500));
- //}
- public boolean onStart(){
- log("Script starting");
- return true;
- }
- public int loop(){
- RSNPC xeniaNPC = npcs.getNearest(9633);
- RSInterface whatdoyou = interfaces.get(232);
- RSInterface clicktocontinue1 = interfaces.get(242);
- RSInterface clicktocontinue2 = interfaces.get(243);
- RSInterface clicktocontinue3 = interfaces.get(64);
- RSInterface illhelp = interfaces.get(234);
- if(lumbyCastle.contains(getMyPlayer().getLocation())){
- walking.walkTo(new RSTile(3242, 3198));
- } else if(lumbridge.contains(getMyPlayer().getLocation())){
- walking.walkTo(new RSTile(3242, 3198));
- } else if(lumbridgeTombs.contains(getMyPlayer().getLocation())){
- if(clicktocontinue1.isValid()){
- clicktocontinue1.getComponent(6).doClick();
- sleep(random(2000, 2500));
- if(whatdoyou.isValid()){
- whatdoyou.getComponent(2).doClick();
- sleep(random(1000, 1500));
- if(clicktocontinue3.isValid()){
- clicktocontinue3.getComponent(5).doClick();
- sleep(random(2000, 2500));
- if(clicktocontinue2.isValid()){
- clicktocontinue2.getComponent(7).doClick();
- sleep(random(2000, 2500));
- if(interfaces.canContinue()){
- interfaces.clickContinue();
- sleep(random(2000, 2500));
- if(illhelp.isValid()){
- illhelp.getComponent(2).doClick();
- sleep(random(2000, 2500));
- mouse.click(170, 307, 4, 3, true);
- sleep(random(5000, 6500));
- if(interfaces.canContinue()){
- interfaces.clickContinue();
- sleep(random(2000, 2500));
- if(interfaces.canContinue()){
- interfaces.clickContinue();
- sleep(random(2000, 2500));
- if(interfaces.canContinue()){
- interfaces.clickContinue();
- sleep(random(2000, 2500));
- }
- }
- }
- }
- }
- }
- }
- }
- }
- else {
- xeniaNPC.doAction("Talk-to");
- }
- /*
- if(interfaces.canContinue()){
- interfaces.clickContinue();
- sleep(random(1000, 1500));
- }
- else{
- xeniaNPC.doAction("Talk-to");
- sleep(600,900);
- }
- }
- */
- }
- return random(100, 200);
- }
- public void onFinish(){
- }
- @Override
- public void onRepaint(Graphics render) {
- // TODO Auto-generated method stub
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement