All scripts

Mr Shafter

by ArcaneOxbow ·Woodcutting

Will make shafts

3

Installed

1.0.1

Version

19 Aug 2026

Updated

About this script

Will cut normal trees, wait till inventory is full and shaft them buggers.

Will sleep too

Builds

VersionKindPublishedSizeWhat changed
1.0.1 current text script 19 Aug 2026 2 KB First upload.

Source of 1.0.1

Published by the author. This is the current build, exactly as it will be delivered.

script "Arrow Shaft Fletcher"
author "Mark"
version "1.0.1"
every 600

# false = chopping logs, true = cutting them into arrow shafts
var shafting = false

on loop {
    print(dialogueOpen())
        # Asleep - wait it out, showing how much fatigue is left to clear.
    if isSleeping() {
        print("Sleeping - fatigue left", sleepFatigue())
        return 2000
    }
    # Fatigue high - sleep it off before it caps XP at 100.
    if fatigue() >= 91 {
        let bag = invItem(1263)
        if bag == none {
            print("No sleeping bag (1263) in inventory")
            return 1000
        }
        interact(bag, "Sleep")
        return random(600, 900)
    }
    if shafting {
        # Out of logs - back to the trees.
        if not invContains(14) {
            shafting = false
            return 600
        }
        # A batch is running - let it finish.
        if batchActive() {
            return 600
        }
        # The "what would you like to make" menu is up - choose shafts.
        if dialogueOpen() {
            answer("Make arrow shafts")
            return 600
        }
        # Otherwise start it: use the knife on the logs (Use on both).
        let knife = invItem(13)
        let logs = invItem(14)
        if knife == none {
            print("No knife (13) in inventory")
            return 1000
        }
        if logs != none {
            interact(knife, "Use")
            interact(logs, "Use")
            return 1800
        }
        return 600
    }

    # Chopping.
    if invIsFull() {
        shafting = true
        return 100
    }
    for tree in objectsByDistance(within: 15) {
        if tree.id == 0 or tree.id == 1 {
            if reach(tree) == "DRAWN" {
                interact(tree, "Chop")
                wait until batchActive() timeout 4000 else { return 1000 }
                wait until not batchActive() timeout 90000 else { return 600 }
                return random(600, 1000)
            }
            return 800
        }
    }
    print("No tree (id 0 or 1) nearby")
    return 1000
}