top | item 34567584

(no title)

EvilTerran | 3 years ago

Back when I played Minecraft, I wrote one I was pretty pleased with:

If you have a stack of items, you can pick up half of them by right-clicking on it, which is very convenient when you're dividing out a stack on the crafting grid to make many copies of a recipe that needs that item in 2 or 4 slots; but for some recipes, you need to put the same item in 3 or 6 slots, and there's no built-in way to divide a stack into thirds.

So I made an AHK script that, when I held down a key, would

- pick up half of the items in the stack I'm pointing at (right-click) - move the mouse one inventory space to the right - put them down (left-click) - pick up half of them again - move back one inventory space left - put them down, adding them back to the original stack - and repeat

and it would only stop after one of the "pick up" steps; so, after a few iterations, you'd be left with the stack divided into equal thirds, two in your inventory & one on the mouse.

Eg, starting with a stack of 60, it goes 30/30, 45/15, 22/38, 41/19, 20/40, 40/20, 20/40, 40/20... then release the key, and you've got three stacks of 20.

discuss

order

Moru|3 years ago

If I remember right: Last time I played Minecraft you took the whole stack of materials and painted (left drag) over the grid where you want the items. It would share up the stack evenly over all the grid items no matter how many you painted. Very easy to make stairs for example. I think there is an even easier way now but haven't played for a couple of versions.

LecroJS|3 years ago

I have an adjacent, simple scripting story.

Battlefield 2042 recently had an XP glitch where you could go into a server with BF3 settings, throw ammo to a teammate and get XP for the resupply. Naturally there were several servers dedicated to this with 128/128 players and everyone on one team all standing at one objective.

Rather than actually play the game to level up and get the weapons/gadgets I wanted or even play this accelerated XP mini game, I wrote an ahk script to automate the equipping and dropping of the ammo crate so that I could do other things.

I only had to let it run for a few hours before I was max level, and the 10 minutes of scripting gave me the benefit for something I wouldn’t otherwise subject myself to.