Jump to content

why wont it open the bank??


mousbros

Recommended Posts

package begin;

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

@ScriptManifest(author = "Mousbros", info = "", logo = "", name = "EZBEGIN", version = 0) 

public class Begin extends Script {

    final Area BEGIN_AREA = new Area (3233,3218,3237,3226);
    final Area BANK_AREA = new Area(3092,3240,3095,3246);
    
        
    
    public void onExit() {
            
    }
        
        public void onStart() {
            
            
        }    
        
        
        @Override
        public int onLoop() throws InterruptedException {
            
        
        if(!getInventory().isEmpty()) {
            if (BEGIN_AREA.contains(myPlayer())) {    
                log("not empty");
                getWalking().webWalk(BANK_AREA);
                
            }
            
        }else {
            if(!getInventory().isEmpty()) {
            if (BANK_AREA.contains(myPlayer())) {
                RS2Object banker = getObjects().closest(10355);
                
                if (bank.getBank().isOpen()) {
                    bank.depositAll();
            } else {
                
                if (banker != null) {
                    if (banker.isVisible()) {
                        banker.interact("Bank");
                        sleep(random(998, 7896));
                    }
                    }
                }
                
            }else {
                getWalking().webWalk(BANK_AREA);
            }
        }
                 
        }    
                
                
                

                
            
            
            
            
            
            
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        return 50;
    }
    
        }

Link to comment
Share on other sites

how do I remove a topic??

2 minutes ago, Gunman said:

@mousbros Don't use id's if you can use the String name for starters as ids change more often than Strings. Also just use the bank API method to open it.
getBank().open

Also look into conditional sleep so you can sleep until the bank is open.

i found the problem tho yaaay it was a syntax error.... 

thank you for the answer much love!

Edited by mousbros
Link to comment
Share on other sites

2 minutes ago, mousbros said:

how do I remove a topic??

i found the problem tho yaaay it was a syntax error.... 

thank you for the answer much love!

Idk if you can. You might be able to hide the thread in moderation actions at the top of the thread. Also put that shit in here https://pastebin.com/ so it's easier to read please 😄

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...