Looking for more active discussion? Join our Discord at https://discord.gg/x2s7fY6

Small solver script for Mudlet.

Quick little trigger and script that you can set up to move and manipulate solver pieces using your numpad or other preferred keyboard section. Doesn't include keybinds but it should be trivial to set those up yourself.

https://hastebin.com/gufuyuguba.lua

Comments

  • Hastebin expired so here is the script:

    Script:

    function selectPiece(piece) selected_piece = piece echo("\nNow moving piece " .. selected_piece .. ".") end function tryMovePiece(dir) if selected_piece ~= nil then if dir == "n" then send("solver shift " .. selected_piece .. " up") elseif dir == "s" then send("solver shift " .. selected_piece .. " down") elseif dir == "e" then send("solver shift " .. selected_piece .. " right") elseif dir == "w" then send("solver shift " .. selected_piece .. " left") elseif dir == "sw" then send("solver flip " .. selected_piece .. " horizontal") elseif dir == "se" then send("solver flip " .. selected_piece .. " vertical") elseif dir == "nw" then send("solver rotate " .. selected_piece .. " left") elseif dir == "ne" then send("solver rotate " .. selected_piece .. " right") end end end

    Trigger pattern (regex):
    <\-\- PIECE(\d) \-\->

    Trigger script:
    function selectPiece(piece) selected_piece = piece output("Now moving piece " .. selected_piece .. ".") end moveCursor(selectString("PIECE" .. matches[2], 1), getLineNumber()) local r,g,b = getFgColor() replace("") insertPopup("PIECE"..matches[2], { [[selectPiece("]] .. matches[2] .. [[")]], },{"Select"}) selectString("PIECE" .. matches[2], 1) setFgColor(r,g,b)
Sign In or Register to comment.