Jump to content

MansNoThot

Global Moderators
  • Posts

    80
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by MansNoThot

  1. import com.epicbot.api.shared.APIContext;
    import com.epicbot.api.shared.GameType;
    import com.epicbot.api.shared.entity.Player;
    import com.epicbot.api.shared.entity.SceneObject;
    import com.epicbot.api.shared.model.Area;
    import com.epicbot.api.shared.model.Tile;
    import com.epicbot.api.shared.script.LoopScript;
    import com.epicbot.api.shared.script.ScriptManifest;
    import com.epicbot.api.shared.util.paint.frame.PaintFrame;
    import com.epicbot.api.shared.util.time.Time;
    import com.epicbot.api.shared.webwalking.model.RSBank;
    
    import java.util.List;
    
    import java.awt.*;
    
    
    @ScriptManifest(name = "Thieving test", gameType = GameType.OS)
    public class mTeas extends LoopScript {
        private int stage = 0, teas = 0, startEXP, startingLevel;
        private SceneObject start;
        private long startTime;
        private Player localPlayer;
        private Area bankArea = new Area(3257, 3419, 3250, 3422);
        private Tile stallTile =  new Tile(3268,3410,0);
        private SceneObject stall;
    
    
        private int getGainedLevels() {
            return getAPIContext().skills().thieving().getCurrentLevel() - startingLevel;
        }
        @Override
        protected void onPaint(Graphics2D g, APIContext ctx){
            PaintFrame pf = new PaintFrame();
            pf.setTitle("mTeaStealer");
            pf.addLine("Runtime: ", Time.getFormattedRuntime(startTime));
            pf.addLine("Theiving level: ", getAPIContext().skills().thieving().getCurrentLevel() + " (+"
                    + (getGainedLevels()) + ")");
            pf.draw(g, 0, 90, ctx);
        }
    
        private void walkToStall() {
            stallTile =  new Tile(3268,3410,0);
            localPlayer = getAPIContext().localPlayer().get();
            if (bankArea.contains(localPlayer) || stallTile != (localPlayer.getLocation())&& getAPIContext().inventory().isEmpty()) {
                getAPIContext().webWalking().walkTo(stallTile);
            }
        }
    
        private void bank() {
            localPlayer = getAPIContext().localPlayer().get();
    
            getAPIContext().webWalking().walkTo(RSBank.VARROCK_EAST.getTile());
            if (bankArea.contains(localPlayer)) {
                if (!getAPIContext().bank().isOpen()) {
                    getAPIContext().bank().open();
                    Time.sleep(3000, () -> getAPIContext().bank().isOpen());
                }
    
            }
            if ( getAPIContext().bank().isOpen())   {
                getAPIContext().bank().depositInventory();
            }
            if (getAPIContext().bank().isOpen() && !getAPIContext().inventory().contains("Cup of tea")) {
                getAPIContext().bank().close();
            }
            if (!getAPIContext().bank().isOpen() && getAPIContext().inventory().isEmpty()) {
                walkToStall();
            }
        }
        private SceneObject getStall() {
            return getAPIContext().objects().query().nameMatches("Tea stall").visible().results().nearest();
        }
        @Override
        protected int loop() {
            if (!getAPIContext().client().isLoggedIn()) {
                return 500;
            }
    
            if(getAPIContext().inventory().isFull()) {
                 bank();
                Time.sleep(3000,() -> getAPIContext().inventory().isEmpty());
            }else {
                if (stallTile != getAPIContext().localPlayer().getLocation()) {
                    walkToStall();
                }
                stall = getStall();
                if (stall != null && stall.interact("Steal-from")) {
                        Time.sleep(9000, () -> getAPIContext().objects().query().actions("Steal-from").results().isEmpty());
                        Time.sleep(9000, () -> !getAPIContext().objects().query().actions("Steal-from").results().isEmpty());
    
                }
    
                if(!stallTile.equals(getAPIContext().localPlayer().getLocation())) {
                    getAPIContext().webWalking().walkTo(stallTile);
                }
            }
    
    
            return 1000;
        }
    
        @Override
        public boolean onStart(String... strings) {
            startingLevel = getAPIContext().skills().thieving().getCurrentLevel();
            startTime = System.currentTimeMillis();
            return true;
        }
    }

    Enjoy! Lmk If you have any problems 🙂

    • Like 2
  2. On 12/22/2020 at 3:39 AM, TheThirdSannin said:

    im a returning member of epicbot.

    the moment i bought premium you guys shutdown and ghost everyone. currently im using the beta...

    im expecting some kind of consolation reward... 

    that being said. so far beta is pretty good. looking forward to more quests and skill training

     

    11 hours ago, poggerchampion said:

    I'm a returning member, epicbot helped me nearly max my main back in the day now I'm finally trying out old school and loving the new client!

    If both of you have purchases something with the old epicbot. Dm mint what email you used to buy the stuff and he will give you the OG member rank. 

×
×
  • Create New...