Skip to content
TORNLIFE More

[Script] Jail Bail Estimation

Started by Zanoab [1877054] on in Tools & Userscripts.

8 replies · 438 views · thread synced · 8 days ago · View on torn.com
About this thread

Posts archived: 9 / 9 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
9
Discussion span
→
People posting
5
Likes on archived posts
7
Authority score
36 / 100
Historical score
18 / 100
Story score
31 / 100
Engagement score
57 / 100
Zanoab [1877054]

Script is here: https://pastebin.com/raw/L9ib5yuy

The script will predict the cost to bail a player out of jail within +/- $5,000 of the actual bail. Just mouse over the bail button and the estimated cost will appear in the tooltip (tooltip positions are currently glitched on the jail page). As a bonus, the script will make all players with a bail less than $300,000 a gold color so they are immediately identifiable.

Includes support for perks that reduce bail costs. Just visit the home page and the script will automatically scan your perks and take into account all applicable perks.

Changelog:
  • 0.1.2
    • Removed unnecessary semicolons and added a missing semicolon to satisfy picky browsers.
  • 0.1..3
    • Fixed an error in the uploaded script
Xeretrax [2039020]

Trying to import this script will provide a bunch of syntax errors. Saying a semi colon is where it shouldn't be, and isn't where it should.



Tried a few things with a friend, the script works with the mile off popup on chrome, on firefox it does not work at all. might be due to doctorn not working 100% normally on firefox and interfearing.
Ahab [1735214]

Line 95 needs to be changed to
node.querySelector("span.bye-icon").setAttribute("title", ["$", player.cost.toLocaleString()].join(""));

Line 31 needs to be changed to
a = ele.title.match(/ (d+(?:.d+)?)% Bail cost/);

With those changes it seems to work.

[image: puu.sh]
Zanoab [1877054]

Thank you for showing me the error. I'm not sure how one byte got screwed up in the upload. Just uploaded and verified the working version.