Search: Home | Atlas | Guides | Tests | Research | Index | Recent Changes | Preferences | Login

Users > Beren > Macros

XAutomation Macros

How to Use

Pin the windows, launch a script from a command line and move your mouse over the starting possition. e.g. pin the hackling rake window, launch the flax script and move your mouse over "Seperate Rotten Flax".

Flax Process

#!/bin/bash
sleep 2 # pause to move mouse into possition
while [ 1 -lt 2 ] ; do
        sleep 1; 
        xte 'mouseclick 1'; # Seperate Rotten Flax (Step 1, Remove Straw)
        xte 'mousermove 0 20'; # Move down
        sleep 65; # END timer
        xte 'mouseclick 1'; # Continue processing Rotten Flax (Step 2, Seperate Tow)
        sleep 65; # END timer
        xte 'mouseclick 1'; # Continue processing Rotten Flax (Step 3, Refine the Lint)
        xte 'mousermove 0 -20';
        sleep 65; # END timer
        xte 'mouseclick 1'; # Clean the Hackling Rake
done

Harvest Trees

Pin tree menus in a horizontal line. You have to be able to reach each tree from the one before and the first tree from the last one so a loop or close packed trees is needed.

#!/bin/bash
TREES=4 # Change to the number of trees in your cycle
sleep 5 # Pause to move mouse into possition
while [ 1 -lt 2 ] ; do
        LOOP=1
        while [ $LOOP -lt $TREES ] ; do
                xte 'mouseclick 1'; # Harvest Wood
                xte 'mousermove 300 0'; # Move to next pinned window
                sleep 1; # Pause briefly for legal reasons
                let "LOOP += 1"
        done
        xte 'mouseclick 1'; # Harvest last tree
        let "MOVEBACK=($TREES-1) * -300"
        xte "mousermove $MOVEBACK 0"; # Move back to start
        sleep 120; # Tree recovery
done

Charcoal

Start with 2 wood bonfires, pin menus in a grid, don't have any limestone, fish, dried papy, veg or water in jugs in your inventory when you open them. Change the values of ROWS and COLS to suit the number of bonfires you're using. Using 20 fires this yielded 42 charcoal per fire, could use some tweaking of the sleeps to get it up to 100 stokes, as it is the 50 stoke cycle ends on temp 5.

#!/bin/bash
ROWS=4
COLS=5

LIT=0
STOKES=0
sleep 5 # Pause to move mouse into possition
while [ "$STOKES" -lt 50 ] ; do
        LOOP2=0
        while [ $LOOP2 -lt $ROWS ] ; do
                LOOP=0
                let "LOOP2 += 1"
                while [ $LOOP -lt $COLS ] ; do
                        xte 'mouseclick 1'; # Light fire/Add wood
                        sleep 0.3;
                        if [ "$LIT" = 1 ]; then
                                xte "key Return"; # Hit enter
                        fi
                        let "LOOP += 1"
                        if [ "$LOOP" = "$COLS" ]; then
                                let "MOVEBACK=($COLS-1) * -200"
                                if [ "$LOOP2" = "$ROWS" ]; then
                                        let "MOVEDOWN=(ROWS-1) * -160"
                                else
                                        MOVEDOWN=160
                                fi
                        else
                                MOVEBACK=200
                                MOVEDOWN=0
                        fi
                        xte "mousermove $MOVEBACK $MOVEDOWN"; # Move to next pinned window
                        sleep 0.2; # Pause briefly for legal reasons
                done
        done
        if [ "$LIT" = "0" ]; then
                xte "mousermove 0 -17";
                sleep 4; # Make sure we hit the right tick
                LIT=1
        else
                let "STOKES += 1"
        fi
        echo $STOKES
        let "SLEEP = 12 - ($ROWS*$COLS/2)";
        if [ "$STOKES" -lt 8 ]; then
                sleep $SLEEP;
        else
                let "SLEEP += 10";
                sleep $SLEEP;
        fi
done

Plane Boards

Cartographers cam, minimize chat. You may have to tweak the zoom to hit the carp shops right. Also when a blade breaks you'll have to wrestle the mouse to kill the process.

#!/bin/bash
ROWS=5
COLS=4

sleep 5 # Pause to move mouse into possition
while [ 1 -lt 50 ] ; do
        LOOP2=0
        while [ $LOOP2 -lt $ROWS ] ; do
                LOOP=0
                let "LOOP2 += 1"
                while [ $LOOP -lt $COLS ] ; do
                        xte 'key P'; # Plane board
                        let "LOOP += 1"
                        if [ "$LOOP" = "$COLS" ]; then
                                let "MOVEBACK=($COLS-1) * -100"
                                if [ "$LOOP2" = "$ROWS" ]; then
                                        let "MOVEDOWN=(ROWS-1) * -100"
                                else
                                        MOVEDOWN=100
                                fi
                        else
                                MOVEBACK=100
                                MOVEDOWN=0
                        fi
                        xte "mousermove $MOVEBACK $MOVEDOWN"; # Move to next carp shop
                        sleep 0.2; # Pause briefly for legal reasons
                done
        done
done

Home | Atlas | Guides | Tests | Research | Index | Recent Changes | Preferences | Login
You must log in to edit pages. | View other revisions
Last edited May 23, 2005 9:26 pm by Beren (diff)
Search: