Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rvdm on github.
  • I am rvdm (https://keybase.io/rvdm) on keybase.
  • I have a public key whose fingerprint is BAD4 4DA3 EF50 4950 0C4C 7400 8B1F 9E36 4EF3 063D

To claim this, I am signing this object:

@rvdm
rvdm / minecraft_idlebot.js
Last active May 27, 2024 14:33
Simple idle bot for minecraft using mineflayer. Moves randomly every $interval, eats food when hungry.
// OSX:
// - have nodejs (default works on OSX)
// - npm install mineflayer
// - edit this script, set server, change port if not default
// - username/pass are minecraft login email address + password
//
// set moveinterval to number of seconds between movements. This is also movement duration.
//
// - Log in using normal client, empty inventory (optional), put food in first inventory slot
// - Go to a safe area (inside, well lighted)
local wifiWatcher = nil
local homeSSID = "trustedhomewifi"
local lastSSID = hs.wifi.currentNetwork()
function ssidChangedCallback()
newSSID = hs.wifi.currentNetwork()
networkconfig = hs.network.configuration.open()
if newSSID == homeSSID and lastSSID ~= homeSSID then
-- joined home wifi