Since Novak is a lazy bum I made a banking enum. I needed this for my web walker anyway.
Banking enum (with areas):
Useful methods inside of a banking class that use the enum:
You can use the methods in something like this:
/**
* Created by zach on 1/5/15.
*/
@ScriptManifest(name = "Test", author = "Mysteryy", info = "Testing", version = 1.0, logo = "none")
public class Test extends Script {
Banking banking = new Banking();
@Override
public void onStart(){
Player player = myPlayer();
if(player != null){
this.log(banking.getNearestBankArea(player.getPosition()).getMinX() + ", " + banking.getNearestBankArea(player.getPosition()).getMaxY());
this.log(banking.getNearestBankCentralPosition(player.getPosition()).getX() + ", " + banking.getNearestBankCentralPosition(player.getPosition()).getY());
this.log(BankAreas.DRAYNOR.getCentralPosition().getX() + ", " + BankAreas.DRAYNOR.getCentralPosition().getY());
this.log(BankAreas.DRAYNOR.areaContainsPosition(player.getPosition()));
}
}
@Override
public int onLoop() throws InterruptedException {
return 50;
}
}
which would output
[iNFO][bot #1][01/14 10:35:12 PM]: 3092, 3246
[iNFO][bot #1][01/14 10:35:12 PM]: 3093, 3243
[iNFO][bot #1][01/14 10:35:12 PM]: 3093, 3243
[iNFO][bot #1][01/14 10:35:12 PM]: true
Let me know if you have any questions or suggestions.