Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.scripts;
- import com.kbot2.scriptable.Script;
- import com.kbot2.scriptable.*;
- import com.kbot2.scriptable.methods.*;
- import com.kbot2.scriptable.methods.data.*;
- import com.kbot2.scriptable.methods.wrappers.GroundItem;
- import com.kbot2.scriptable.methods.data.GroundItems;
- import com.kbot2.scriptable.methods.data.Objects;
- import com.kbot2.scriptable.methods.wrappers.Obj;
- import com.kbot2.scriptable.Script;
- import com.kbot2.scriptable.methods.wrappers.Tile;
- import com.kbot2.scriptable.methods.data.Walking;
- import com.kbot2.scriptable.methods.Calculations;
- import com.kbot2.scriptable.methods.data.Bank;
- import java.awt.*;
- import java.awt.event.KeyEvent;
- public class PartyRoom2 extends Script {
- public Tile[] PartyToBank = new Tile[]{new Tile(3046,3376), new Tile(3046,3371), new Tile(3041,3368), new Tile(3036,3368), new Tile(3033,3364), new Tile(3030,3360), new Tile(3025,3357), new Tile(3020,3358), };
- public Tile[] BankToParty = walking.reversePath(PartyToBank);
- public Tile PartyTile = new Tile(3046,3077);
- public Tile BankTile = new Tile(3013,3356);
- int balloons[] = {115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 126, 127};
- public boolean active() {
- return true;
- }
- public int loop() {
- if(getMyPlayer().getLocation().distanceTo(PartyTile)>8)
- {
- walking.walkPath(walking.randomizePath(BankToParty,2,2));
- }
- if(walking.setRunning(false))
- {
- walking.setRunning(true);
- }
- if (inventory.isFull())
- {
- log("Spot To Guild");
- walking.walkPath(walking.randomizePath(PartyToBank,2,2));
- sleep(1000,2000);
- return 500;
- if(getMyPlayer().getLocation().distanceTo(BankTile)>8)
- {
- Obj booth = getClosestObject(5, 11758);
- sleep(300, 600);
- booth.doAction("Use-quickly");
- return random(400, 800);
- }
- sleep(200, 300);
- if (!bank.isOpen())
- {
- return 100;
- }
- while (inventory.getCount() > 1)
- {
- bank.depositInventory();
- sleep(500, 600);
- }
- bank.close();
- if (bank.isOpen())
- bank.close();
- return random(150, 300);
- Obj balloon = getClosestObject(10, balloons);
- if(balloon != null) {
- balloon.doAction("Burst");
- return random(100, 200);
- }
- GroundItem[] loot = groundItems.getAllItems(12);
- for(int i = 0; i < loot.length; i++) {
- GroundItem item = loot[i];
- if(item != null) {
- if(Calculations.onScreen(item.getScreenPos()))
- item.doAction("Take");
- return random(100, 200);
- }
- }
- return random(100,200);
- }
- return random(100,200);
- }
- public String getName() {
- return "Party Room";
- }
- public String getAuthor() {
- return "Blacksimon";
- }
- public String getDescription() {
- return "Parties";
- }
- }
Add Comment
Please, Sign In to add comment