max / Torn Addiction Watch + Rehab Advisor

Install steps: Install a userscript manager, select Install, then open a website matched by the script.

Userscript Beginners HOWTO Chrome Edge Firefox

Δημοσιεύθηκε:

Έκδοση: 1.10.0.1+4032ae1 ενημερώθηκε

Περίληψη: Addiction monitor & rehab advisor for Torn: live addiction battle-stat debuff tracking with trend sparkline, education kick-risk & company addiction warnings, rehab count/cost estimates, wait-vs-rehab advice, natural decay countdown, Hot Turkey/Milk Sober book advisors, Xanax stats, always-visible drug/booster/medical cooldown timers, and a hospital med kit calculator (time left, medical effectiveness perks, cooldown room). Torn API v2 and Torn PDA compatible.

Άδεια: MIT

Αντιχαρακτηριστικό: απροσδιόριστο

Source and freshness

The following figures come from the original source and are separate from activity on this site.

Original script: Torn Addiction Watch + Rehab Advisor

Source version: 1.10.0

Last source check:

Last successful check:

Source daily installs
0
Source total installs
0
OpenUserJS install requests
0

Requests received by this site are not proof that a user completed installation.

Clicking Install records a request on this site; it does not confirm installation. Not working after install? View troubleshooting and issues

Torn Addiction Watch + Rehab Advisor

Comprehensive addiction monitoring for Torn. A compact sidebar widget shows your live drug/booster/medical cooldowns and current debuff % at a glance; one click opens a full dashboard with everything else — estimated addiction points, education kick-risk, company addiction, rehab plan with cost projections and slot advice, decay countdown, book advisors, and a stats summary — each section with a plain-English explanation of what it means and what to do about it.

The widget sits natively in the Torn sidebar — above Notes/NPCs (or above Torn Tools if installed). Supports dark and light mode automatically.

Please note, I have built this primarily for Web Browser, with an API key the script works on Torn PDA (however display & layout may not be fully optimised).

PDA compatibility with an API key:

  • Rehab count, stats, and travel detection work with any key tier (Public and up)
  • Cooldowns need at least a Minimal key; company addiction needs at least Limited; brain debuff % via the API is most reliable with Full Access
  • Sections your key's tier can't fetch (the cooldown bar, the Company Addiction card) hide themselves automatically instead of showing broken "—" values — they reappear as soon as you save a higher-tier key
  • One caveat: if your addiction is below the brain icon threshold, Torn does not expose the value anywhere in the API. The script shows 0% in this case (no visible debuff) — your true addiction may be slightly above zero. This is a Torn API limitation, not a script bug

Without an API key (PDA or browser):

  • The panel shows an inline "Add API key" prompt in place of the cooldown bar and debuff readout
  • The natural decay countdown keeps ticking regardless (it's a pure calculation), but the debuff %, rehab plan, education/company risk, book advisors and stats panel all stay blank until a key is set
  • There is no DOM-scraping or Torn Tools fallback in this version — every reading comes from the Torn API, so a key (Public tier or higher) is required for the script to do anything beyond the decay clock

Need a script? Contact me on Torn! If you find this script useful, donations via the 🎁 button in the panel are always appreciated — Xanax, Torn$, or anything you fancy! Send a donation


Features

  • Hospital med kit calculator (time left, medical effectiveness perks, cooldown room)
  • Always-visible cooldown bar — drug, booster and medical cooldowns with live countdowns, shown above the panel header even when the panel is collapsed. Active timers in orange, "Ready" in green; hover a timer for the exact ready time
  • Monitors brain debuff % (drug addiction) with trend indicator (↑/↓/→)
  • Estimated raw addiction points (AP) behind the % debuff
  • Sparkline history chart of the last 24 readings
  • Addiction trajectory — rate of change per day based on your reading history (↑/↓/stable)
  • Education kick-risk warnings with safe Xanax dose counter — shows how many more doses before you hit the kick-risk threshold
  • Company addiction detection with director warning threshold indicator
  • Smart rehab estimation — predicted from the community-validated cost-per-AP formula from day one, refined by automatic learning from your actual rehabs
  • Rehab cost estimation based on your lifetime rehab count — auto-updated from the API
  • Slot advisor — tells you how many rehab slots to leave unused so the daily natural decay is never wasted (crucial past ~750 lifetime rehabs)
  • Faction Toleration level input (0–25) — cuts per-Xanax AP gain by 2% per level (up to 50% at level 25) in the safe-doses counter
  • Wait vs rehab advisor — tells you if natural decay will fix it for free before you spend money
  • Natural decay countdown — live countdown to the 03:30–03:35 TCT decay window (configurable)
  • Hot Turkey prep — minimum AP required before using the book safely
  • Milk Yourself Sober preview — how much AP it would remove and what % you'd land at
  • Education page warning — prominent banner on /education.php if you're at kick-risk
  • Rehab page banner — contextual summary on /rehab.php showing target, rehabs needed and cost
  • Stats summary — rehabs done, AP per rehab, Xanax taken (lifetime + last 7 days), drugs used, and overdose count
  • Traveling notice — panel indicates when data is unavailable due to travel
  • Colour-coded status indicators, native sidebar styling, dark/light mode support
  • Torn API key required for almost everything — set it under Settings → API/Data, or via the inline prompt shown in the panel until one is saved

Data Sources

Every reading comes from the Torn API v2 (api.torn.com/v2) — there is no Torn Tools integration and no DOM scraping in this version. Set your API key in Settings → API/Data (Public tier works for most data; see the note below on which tier unlocks what).

Note: The brain debuff % only appears in the API response once your addiction is high enough to show the brain icon in-game. Below that threshold the script reports 0% (no visible debuff) — so after rehabbing clean you'll see 0% rather than a blank, and the panel keeps working.

Note on API key tiers: Not all API calls need the same access level. The script splits its requests so a lower-tier key still gets what it's entitled to instead of one failed call breaking everything:

  • Public — enough for your player name, personal stats, and lifetime rehab count
  • Minimal — also unlocks the cooldown bar (drug/booster/medical timers)
  • Limited — also unlocks company addiction data
  • Full Access — recommended for the most reliable brain debuff % reading

Sections your key can't reach (the cooldown bar, the Company Addiction card) hide themselves automatically rather than showing a dead "—" — no manual configuration needed.

Note on Company Addiction: With a Limited-or-higher API key, company addiction is read directly from the API (effectiveness.addiction) and displays the same signed penalty value shown by Torn Tools (e.g. -6). Without an API key, the Company Addiction card simply stays hidden.


Reliability & Diagnostics

The script is built to cope with flaky connections (VPNs, mobile networks):

  • Request timeouts — API requests are abandoned after 10 seconds instead of hanging, so a slow connection never freezes the panel
  • Caching — user data is cached for 60 seconds, company data for 2 minutes; the panel refresh loop never generates more API traffic than that
  • Failure backoff — after a failed request the script waits 15 seconds before trying the API again, and never runs more than one request at a time
  • Stale-data cap — during an outage, cached data is served for at most 5 minutes; after that the panel stops showing outdated values and reverts to "—" until a fresh reading succeeds
  • Self-healing panel — if Torn's interface re-renders the sidebar and removes the panel, it re-injects itself within a few seconds

Diagnostics: all notable events are logged to the browser console with the [WoJ TAW] prefix — open DevTools (F12) → Console and filter on WoJ. Failed requests log the cause (timeout, network error, rate limit, invalid key) and what the script fell back to; data loss and recovery are logged as they happen. If you report a problem, please include these console lines.


Configurable Game Mechanics

All Torn game mechanics are configurable through Settings. When Torn updates mechanics (e.g., decay rates, rehab efficiency), you can update values yourself without waiting for a script update.

Configurable settings:

  • Natural decay (AP/day, timing window)
  • Rehab mechanics (slot cost, cost-of-1-AP base and scaling)
  • Drug settings (Xanax AP, overdose rate)
  • Book settings (Hot Turkey duration, Milk Sober removal rate)

Config management: Export, import, and reset configs via the Settings panel.


Installation

  1. Install Tampermonkey
  2. Install this script
  3. Reload Torn (Ctrl+F5)

The widget appears at the top of the right sidebar showing cooldowns and your current debuff. Click the header or the Open Dashboard button for the full view.


Usage

Basic Monitoring

The sidebar widget updates automatically every 5 seconds — cooldown timers, debuff % with a colour-coded status pill (OK / WARN / DANGER / CRITICAL), and a trend arrow showing whether your addiction is rising, falling, or stable. The dashboard (click the widget header or Open Dashboard) holds the detail: sparkline history, rehab plan, education and company risk, books, and stats — each card with an explanation of the mechanic underneath.

Smart Learning

Rehab estimates work immediately, predicted from the cost-per-AP formula and your lifetime rehab count. When you actually rehab, the script measures your personal drop and uses that instead for even better accuracy. If learned estimates seem off, go to Settings → General → Reset learned drop → Yes to fall back to the formula prediction.

API Key (required)

Until you set one, the panel shows an inline "Add API key" prompt in place of the cooldown bar and debuff readout — click it, or open Settings → API/Data directly. A Public key is enough for rehab count and stats; Limited also unlocks company addiction; Full Access is recommended for the most reliable brain debuff % reading. Your key is stored locally and only sent to api.torn.com. With an API key set, your lifetime rehab count, company addiction, and stats panel are all updated automatically. You can also update your key at any time under Settings → API/Data — saving a new key refreshes the panel immediately, no page reload needed.

Rehab Count

If no API key is set, enter your lifetime rehab count manually under Settings → General. With an API key it is kept up to date automatically.

Configuring Mechanics

  1. Click ⚙ in the panel footer
  2. Switch to the "Mechanics" tab
  3. Update any values Torn has changed
  4. Save (optional: export config to share with others)

Default Thresholds

Drug Debuff: Warn 5%, Danger 10%, Critical 15%
Education: Kick-risk warning at 8%, rehab target ≤ 4%
Company: Warn 5%, Danger 10%, Critical 20%

All configurable in Settings.


Troubleshooting

Panel not visible? Check Tampermonkey is enabled and reload Torn.
Panel appearing multiple times on PDA? This was fixed in v1.7.5 — make sure you are on the latest version.
Without an API key at all: The panel shows an inline "Add API key" prompt and nothing else populates — there's no DOM-scraping or Torn Tools fallback in this version. The natural decay countdown is the one exception; it's a pure calculation and keeps ticking regardless.
Cooldown bar or Company Addiction card missing? This is expected, not a bug — those two sections need at least a Minimal (cooldowns) or Limited (company) key, and hide themselves automatically rather than showing dead "—" values when your key's tier can't reach them. Save a higher-tier key under Settings → API/Data and the section reappears immediately. (The Company Addiction card also stays hidden if you're simply not currently employed in a company — that's normal too.)
Shows "0%"? With an API key, 0% means the API answered but you have no visible brain debuff — normal after rehabbing clean. (Your true addiction may be slightly above zero if it's below the brain icon threshold.)
Shows "—"? No data available — usually no API key set, traveling, or a temporary API failure. If it persists, check the browser console (F12) for [WoJ TAW] messages, which say exactly what failed and why.
Data stops updating on a VPN / flaky connection? The script times out hung requests after 10 seconds and falls back to cached data (up to 5 minutes old). Check the console for [WoJ TAW] warnings — rate limits and IP blocks are named explicitly.
Stats panel empty? Stats require an API key (Public tier is enough) — set one under Settings → API/Data.
Trajectory not showing? Needs at least 3 readings — give it a few refresh cycles.
Wrong rehab estimates? Settings → General → Reset learned drop → Yes, then do one rehab.
Cost estimates seem off? Make sure your lifetime rehab count is correct — set it manually if no API key is configured.
Xanax (7d) shows "—"? This queries your xantaken personal stat as it stood ~7 days ago via the API and diffs it against your current total. It shows "—" if that historical data point isn't available yet (e.g. your account is younger than 7 days) — no action needed, it resolves once enough time has passed.
Prompted for API key every time? The prompt only shows if no key is saved. If you've set one and it keeps appearing, check Settings → API/Data to confirm it saved correctly.
API errors? Check your key hasn't been revoked, expired, or paused. If the console shows "key lacks access level," the affected feature just needs a higher-tier key — the rest of the script keeps working.


Your API Key & Privacy

Handing over an API key to any script is a reasonable thing to be cautious about. Here's exactly what this script does — and doesn't do — with yours, and you don't need to hand over a Full Access key to get most of it working.

Your key never leaves your browser. It is stored in Tampermonkey's local GM storage on your device. The only requests made using your key go directly from your browser to api.torn.com — no third-party servers, no logging, no sharing.

You can verify every request. Open your browser DevTools (F12) → Network tab while the script is running. You will only ever see requests to api.torn.com and torn.com. Nothing else is contacted.

The Torn API is read-only. No key tier — Public through Full Access — can send items, spend money, perform actions, or change anything on your account. The worst case if a key were misused is that someone could read your account data — not act on it.

Use the lowest tier that covers what you want. A Public key is enough for rehab count and stats. Limited also unlocks company addiction. Full Access is only needed for the most reliable brain debuff % reading via the icons selection. Sections a lower-tier key can't reach hide themselves automatically instead of showing broken data.

What this script actually calls, split by the access level each part needs (Torn API v2):

  • /user/basic (Public) — player name and profile status
  • /user/personalstats?cat=drugs (Public) — drug/rehab stats
  • /user/cooldowns (Minimal) — drug/booster/medical cooldown timers
  • /user/icons (works at any tier, most reliable at Full Access) — brain debuff icon text
  • /company/employees (Limited) — your own addiction penalty from your company's employee record

That's it. No bazaar, no inventory, no money, no messages.

Revoke at any time. If you ever have concerns, delete the key in Torn → Settings → API Key in seconds. You can also audit every call made with your key under Torn's own API Key Log (api.torn.com/key/?selections=log&key=YOUR_KEY).

The script is fully open source. Every line is visible on Greasyfork before you install. No obfuscation, no minification. Read it, scrutinise it, share it.


Disclaimer

Quality-of-life tool only. Does not automate gameplay or interact with Torn's backend beyond the official public API. Use at your own discretion.

MIT Licence — Free to use, modify, and distribute.

Recommended Settings by Playstyle

Rehab target:

  • No faction / low Toleration: 4% (default) — safe for education and company
  • Full Toleration faction: 6–8% — Toleration slows AP gain and raises the education kick threshold, making 4% unnecessarily aggressive

Education kick-risk warning:

  • No faction / low Toleration: 6% (slightly below the ~6–7% kick threshold)
  • Full Toleration faction: 8% — threshold is higher with Toleration perks

Drug debuff thresholds:

  • Warn 5% / Danger 10% / Critical 15% are sensible defaults for most players
  • Full Toleration players may prefer Warn 8% / Danger 12% / Critical 18% to reduce noise at lower addiction levels

Company thresholds:

  • Default Warn 5% / Danger 10% / Critical 20% aligns with the effectiveness penalty scale
  • Directors typically flag members around -10 to -15 effectiveness penalty, so Critical at 20% is a late warning — consider dropping it to 15% if your director is strict

Mechanics Reference

These are the default values used for calculations. Update them under Settings → Mechanics if Torn changes the underlying game mechanics.

Natural Decay

  • Decay per day: 20 AP — the amount of addiction points removed at the daily decay
  • Decay window: 03:30–03:35 TCT — configurable start/end under Settings → Mechanics

Rehab Mechanics (DrVoid's community-validated formula)

  • Rehab slot cost: $250,000 — every slot costs the same flat amount
  • Cost of 1 AP: $2,857 + $12.85 × lifetime rehabs done
  • AP removed per slot: $250,000 ÷ cost of 1 AP — e.g. ~87 AP at 0 rehabs, ~47 AP at 188 rehabs, ~20 AP at 750 rehabs, ~9 AP at 2,000 rehabs
  • The slot advisor row uses this: once a slot removes less than the 20 AP daily decay, leave more than one slot unused so no free decay is wasted — and always take 1 Xanax right after rehabbing, before the next 03:30 TCT

Drugs

  • Xanax AP per dose: 35 — addiction points added per Xanax taken (as low as 17.5 at faction Toleration level 25 — set your level under Settings → General)
  • Overdose rate: 2% — probability of overdose per dose

Books

  • Hot Turkey duration: 31 days — how long the book runs
  • Hot Turkey expected overdoses: 3 — used to estimate minimum AP needed before using the book
  • Milk Yourself Sober removal: 95% — proportion of current AP the book removes

These values reflect current known Torn mechanics. If Torn updates them, adjust via Settings → Mechanics → Save, or use Export/Import to share configs with faction members. Also, let me know!

Earlier versions shipped incorrect rehab, Xanax and decay values. On first run after updating, the script automatically replaces those stored mechanics values with the corrected ones above (a one-time migration, logged to the console). Custom values you set for those specific fields are intentionally overwritten; other settings are untouched.


Credits

Thanks to Rowage [3926289] for offering to clean up the UI but more importantly make it a bit (a lot) more reliable on PDA/Mobile!

Βαθμολογία: 0