// ==UserScript== // @name Torn Chest Solver (Combo Solver) // @namespace Gemini.Torn // @version 5.8 // @description 4x3 grid, "Suggested Number" title, and professional donation phrasing. // @author Gemini // @match *.torn.com/christmas_town.php* // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; let storage = JSON.parse(localStorage.getItem('tornSolverData')) || { history: [], currentInput: [], x: 20, y: 80, minimized: false }; if (storage.x < 0 || storage.x > window.innerWidth) storage.x = 20; if (storage.y < 0 || storage.y > window.innerHeight) storage.y = 80; function saveData() { localStorage.setItem('tornSolverData', JSON.stringify(storage)); } let showHelp = false; const style = document.createElement('style'); style.innerHTML = ` @keyframes blinker { 50% { opacity: 0.2; color: #fff; } } .blinking-link { animation: blinker 1.2s linear infinite; } .help-text b { color: #0f0; font-size: 12px; } .help-text p { margin: 8px 0; color: #ccc; } .num-btn { padding: 12px 0; background: #333; color: #fff; border: none; border-radius: 4px; font-weight: bold; font-size: 16px; cursor: pointer; } .num-btn:active { background: #555; } `; document.head.appendChild(style); function createUI() { if (document.getElementById("torn-solver-window")) return; const container = document.createElement('div'); container.id = "torn-solver-window"; container.style = `position: fixed; top: ${storage.y}px; left: ${storage.x}px; z-index: 999999; background: #222; color: #fff; border-radius: 10px; border: 2px solid #444; font-family: sans-serif; width: 250px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); touch-action: none; user-select: none;`; const header = document.createElement('div'); header.style = "background: #444; padding: 10px; cursor: move; border-radius: 8px 8px 0 0; display: flex; justify-content: space-between; align-items: center; touch-action: none;"; header.innerHTML = ` COMBO SOLVER `; container.appendChild(header); const contentArea = document.createElement('div'); contentArea.style = "padding: 10px; display: " + (storage.minimized ? "none" : "block"); container.appendChild(contentArea); document.body.appendChild(container); const render = () => { if (storage.minimized) { contentArea.style.display = "none"; document.getElementById('min-btn').innerText = "□"; container.style.width = "140px"; } else if (showHelp) { contentArea.style.display = "block"; container.style.width = "250px"; contentArea.innerHTML = `
At the top, this tool shows a "Suggested Number." Type those numbers into the game and into this tool's keypad.
🌟 STEP 2: COPY THE COLORSAfter you guess in the game, the game boxes will turn colors. Tap the boxes in THIS tool to match them!
🌟 STEP 3: WHAT COLORS MEAN?⬜ Gray: We haven't guessed yet.
🟥 Red: That number is NOT in the code.
🟨 Yellow: The number is correct, but in the WRONG spot.
🟩 Green: Perfect! This number is correct and in the right spot.
Once the colors in this tool match the game colors, hit OK. The tool will calculate the next best guess!