Jump to content

Explv

Scripter II
  • Posts

    2314
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    100%

Explv last won the day on April 3 2021

Explv had the most liked content!

About Explv

Profile Information

  • Gender
    Male

Recent Profile Visitors

25152 profile views

Explv's Achievements

Adamantite Poster

Adamantite Poster (7/10)

2.2k

Reputation

5

Community Answers

Single Status Update

See all updates by Explv

  1. Explv, 

    Being really new to scripting, I threw this together - no errors...
    but the execution is off...

    It walks from a nearby hunting ground, with a full inv, to the edgeville bank...

    dumps all loot then hangs trying to walk back.

    What I don't understand is that I am using the same walking method:

     

    getWalking().walk(BLAH)

    it behaves as if the banking position never gets flushed before going to hunting position.

     

    Would ya take a look?:facep:

    It's prolly something stupid.

    -Val

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    import java.awt.Graphics2D;

    //import org.osbot.rs07.api.map.Area;
    import org.osbot.rs07.api.map.Position;
    import org.osbot.rs07.api.model.RS2Object;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;


    @ScriptManifest(author = "Valoren", info = "", logo = "", name = "", version = 0.1)

    public class BarbFish extends Script{
        
        final Position bankpos = new Position(3094, 3489, 0);
        final Position huntpos = new Position(3109, 3432, 0);

        public int onLoop() throws InterruptedException {

            bank();
            this.bank.close();
            sleep(random(200, 300));

            hunt(); 
            return 50;
    }    

        
        public int bank() throws InterruptedException {
            getWalking().walk(bankpos);
            RS2Object bankBooth = this.objects.closest("Bank booth");
            if(bankBooth != null); {
                bankBooth.interact("Bank");
                while(!this.bank.isOpen());{
                    sleep(random(10, 15));    
                }     
            }
            this.bank.depositAll();
            return (random(300,700));
        }
        
        public int hunt() throws InterruptedException {
            getWalking().walk(huntpos);

            //do stuff
            return(random(300,700));
            }


        public void onStart() {
        }
        
        public void onExit() {
        }
        
        public void onPaint(Graphics2D g) {
        }
        
    }

×
×
  • Create New...