Add AH, slab and AFK automation modules - #83
Open
mirnovec wants to merge 15 commits into
Open
Conversation
The progress check counted logs and planks in the inventory only, but the stock is already in the grid when the snapshot is taken, so no craft could ever register and every phase gave up after three rounds. Count the grid as well, then keep the inventory inside what it can finish: only convert logs while the plank pile still fits, never start a row craft without room for all six stacks it returns, and never start one this plank type cannot fill. Sell and reopen the table when the inventory fills so a batch runs to the end, and sell leftover slabs on the next cycle so a full inventory always recovers on its own. Also make the plank grid slot agnostic, since the recipe is shapeless, and key the grid tidy watchdog on the whole grid so two stuck slots cannot alternate and reset it forever.
Watches for any player entering render distance and drops the connection straight away, with a randomised reaction delay and a grace period after joining so it cannot fire on the players already around you. Friends, admins, NPCs and a user whitelist are skipped, and leaving turns the module off so it does not fight a reconnect. Arming it again is a setting, written into the saved state so a restart comes back armed.
Only arms during a raid and swings at anything hostile that comes within range, at a randomised interval with occasional longer pauses. It does not aim or pick targets, so it swings whether or not something is in front of it. Raid detection reads the boss bar where it can and falls back to counting raiders nearby, and the boss bar fields are matched by type rather than name so remapping cannot break it. When the raid ends it drinks an ominous bottle from the hotbar if there is one, holding use until the drink finishes, with a watchdog in case it never does.
Reads the last death location out of the player and prints it with the dimension, copying the coordinates to the clipboard. Says so plainly when the server never sent one rather than printing a guess.
Collaborator
|
oh damn |
Collaborator
|
ill check it later and see if i can accept |
Owner
|
Holy huge pull request. W. Someone will review soon |
The AH hands unsold ingots back as stacks, not as the singles they were listed as, so a reclaim pass left stock the sell command would have listed in one lump. Split a returned stack one ingot per empty slot before any selling, keep the source slot clear while spreading so a remainder can go back to it, and check again at the point of sending that nothing but singles can reach the command. Selling the singles makes the room for the next part of the stack, so a big return unwinds over several passes. Also make the listing limit cooldown a setting rather than a fixed wait.
Swaps the player's input for a bare ClientInput, whose tick does nothing, so movement dies at the source rather than being fought key by key. The camera is pinned where it started, queued presses on the inventory, drop, swap, chat and hotbar keys are drained, and screens are cancelled as they open. Meteor's own menu is deliberately let through, since with movement and Escape gone it is the only way left to turn the module off, and the death and disconnect screens are let through because blocking either strands you. Off by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
InvSell — sells your whole inventory through
/ah sell, not just the hotbar.IronAhRestocker — keeps single iron ingots listed under the cheapest, and reclaims the unsold ones before starting again.
AhShieldSeller — the same loop for shields.
SlabSeller — sells slabs through
/sell.SlabCrafter — crafts logs to planks to slabs at the table you are looking at.
SlabUltimate — the whole run in one module: pull logs from
/orders, craft, sell, repeat.AutoLeave — drops the connection as soon as a player loads into render distance. Friends, admins and NPCs are skipped.
AutoRaidAfk — swings at hostiles while a raid is running, then drinks an ominous bottle from the hotbar when it ends.
.deathpos— prints the last death location the server sent..removertest— runs the restocker's reclaim pass on its own, so it can be tested without waiting out a cooldown.Also fixes AH Sell selling only one item instead of the whole hotbar.
All of them are tick-driven state machines. Delays are randomised, item movement goes through normal container clicks with the screen open, and every server-specific string is a setting rather than hardcoded.