Union Client Scripts

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

SeptimusHEAP
Posts: 7
Joined: Sun Sep 15, 2013 7:59 pm

Re: Union Client Scripts

Post by SeptimusHEAP »

ok i found the jbot.api thing, i downloaded the scripts from that link and put into the scripts folder of the bot client, i can bring up the bot client and play but still the run scripts does not work, where do i find the file.sys thing at?
User avatar
Arcanist
Posts: 2664
Joined: Mon Mar 19, 2012 2:01 pm

Re: Union Client Scripts

Post by Arcanist »

Code: Select all

class MouseButton {
class MouseButton {
    final static int LEFT = 1
    final static int RIGHT = 3
}
}
class TileType {
    final static int DEEP_WATER = 0
    final static int SHALLOW_WATER = 1
    
    final static int BRICK_RED = 3
    final static int BRICK_YELLOW = 4
    final static int BRICK_BLACK = 5
    final static int BRICK_BLUE = 6
    final static int BRICK_WHITE = 7
    
    final static int STONE = 8
    final static int PLOWED = 9
    
    final static int FOREST_CONIFEROUS = 10
    final static int FOREST_BROADLEAF = 11
    
    final static int THICKET = 12
    final static int GRASS = 13
    final static int HEATH = 14
    final static int MOOR = 15
    
    final static int SWAMP_1 = 16
    final static int SWAMP_2 = 17
    final static int SWAMP_3 = 18
    
    final static int MUD = 19
    final static int SAND = 20
    
    final static int HOUSE_FLOOR = 21
    final static int HOUSE_CELLAR = 22
    
    final static int MINE = 24
    final static int CAVE = 25
    final static int MOUNTAIN = 26
    
    final static int VOID = 255
}

enum Cursor {
    Dig("dig"), Arrow("arw"), Harvest("harvest"), Chi("chi"), Scroll("scroll")
    Cursor(String value) { this.value = value }
    private final String value
    public String value() { return value }
}

static waitContextMenu() {
    def m = getContextMenu()
    while (m == null) {
        Thread.sleep 100
        m = getContextMenu()
    }
    return m
}

static void waitCursor(Cursor c) {
    waitCursor(c.value())
}

static void waitCursor(String curname) {
    while (!getCursor().equals(curname)) Thread.sleep 100
}

static waitInventory() {
    if (!hasInventory("Inventory"))
        openInventory()
    return waitInventory("Inventory")
}

static waitInventory(String name) {
    def inv = getInventory(name)
    while (inv == null) {
        Thread.sleep 100 
        inv = getInventory(name)
    }
    return inv
}

static void wait(predicate) {
    while(predicate()) {
        Thread.sleep 200
    }
}

static void waitDrag() { while (getDragItem() == null) Thread.sleep 100 }
static void waitDrop() { while (getDragItem() != null) Thread.sleep 100 }

static void waitHourglassOn() { while (!checkHourglass()) Thread.sleep 100 }
static void waitHourglassOff() { while (checkHourglass()) Thread.sleep 100 }

static void waitHourglass() {
   while (true) {
      waitHourglassOn();
      waitHourglassOff();
      Thread.sleep 1000
      if (!checkHourglass())
        break;
   }
}

static void waitBeginMove() { while (!isMoving()) Thread.sleep 100 }
static void waitEndMove() { while (isMoving()) Thread.sleep 100 }

static void waitMove() {
    while (true) {
        waitBeginMove()
        waitEndMove()
        Thread.sleep 500
        if (!isMoving())
            break;
   }
}

static void resetCursor() {
    if (getCursor() != "arw") {
        mapClick(0, 0, 3, 0)
        waitCursor("arw")
    }
}

static void waitHourglass(int t1, int t2) {
      int t=0;
      while (!checkHourglass()&& t<t1) {Thread.sleep 100; t=t+100;}
      t=0;
   while (checkHourglass()&& t<t2) {Thread.sleep 100; t=t+100;}
}

static boolean waitMove(int t1, int t2) {  
   int t; 
   while (true) {
      t=0;
      while (!isMoving() && t<t1) {Thread.sleep 100 ; t=t+100;}
   t=0;
   if (!isMoving()) return false;
      while (isMoving() && t<t2) {Thread.sleep 100 ; t=t+100;}
   return true;
   }
}
juchan
Posts: 15
Joined: Sun Aug 25, 2013 4:08 pm

Re: Union Client Scripts

Post by juchan »

Hi

Im looking for bot which will dig clay from river/mudflat, then puts it to kilns and when brick is finish, take this bricks to designated Brickwall signs to store bricks.

Next: (Renew question)

Im looking for farmer bot which will harvest pumpkins, plant one seed and plow, pumpkin flesh will be storaged in chest/large chest what i will show.

Problem with Bot:

What i need to do to use Susavage's Pearl bot, i stand on random tile (not in boat) then i click set coords and i get no answer.
When i start pearl bot it walk few tiles and stop, what is needed to use it? ( I mean location, inventory, river or lake..)
Baldon339
Posts: 6
Joined: Sun Sep 22, 2013 8:02 pm

Re: Union Client Scripts

Post by Baldon339 »

im having same problem as septimus: i cant figure out how to get the run script to work. yall said something about the file sys in the script folder
Baldon339
Posts: 6
Joined: Sun Sep 22, 2013 8:02 pm

Re: Union Client Scripts

Post by Baldon339 »

can someone post a link to the union client that already is fixed up all gotta do is change the run.bat to your java and the run script is working also without having to do all the extra stuff to fix it
User avatar
Arcanist
Posts: 2664
Joined: Mon Mar 19, 2012 2:01 pm

Re: Union Client Scripts

Post by Arcanist »

Don't be so lazy, the information is already there for how to easily do it.
And there's not that much 'fixing up' needed.

The file I posted above needs to be named sys.jbot
The scripts, along with sys and jbotapi are in a pack released by apexolog in his thread.
Baldon339
Posts: 6
Joined: Sun Sep 22, 2013 8:02 pm

Re: Union Client Scripts

Post by Baldon339 »

thanks got it working

is there a tree chopping script that cuts the trees down and take the logs to a spot in your camp?
Last edited by borka on Mon Sep 23, 2013 4:04 pm, edited 2 times in total.
Reason: merged posts
User avatar
NOOBY93
Posts: 6528
Joined: Tue Aug 09, 2011 1:12 pm

Re: Union Client Scripts

Post by NOOBY93 »

Baldon339 wrote:is there a tree chopping script that cuts the trees down and take the logs to a spot in your camp?
There's one that drops them at your village idol.
Jalpha wrote:I believe in my interpretation of things.
User avatar
Arcanist
Posts: 2664
Joined: Mon Mar 19, 2012 2:01 pm

Re: Union Client Scripts

Post by Arcanist »

funny you should ask that, I posted mine in the russian forums about an hour ago :lol: :lol: :lol:
mvgulik
Posts: 4101
Joined: Fri May 21, 2010 2:29 am

Re: Union Client Scripts

Post by mvgulik »

NOOBY93 wrote:
Baldon339 wrote:is there a tree chopping script that cuts the trees down and take the logs to a spot in your camp?
There's one that drops them at your village idol.
I have seen a screen shot of that one, what a mess ... A real bot would check the tree quality, and sort the logs accordingly.
Anyway, I feel a pearl-price recession in the making.

Return to “The Wizards' Tower”