Giter Club home page Giter Club logo

tampermonkey's Introduction

Torn Utilities

Repository for Torn-related scripts, extensions, and more.

Installation

  1. Install Tampermonkey (Tampermonkey link)
  2. Select a script in this repo that you wish to use. The script is the link ending in .user.js. The .png file is a screenshot showing what the script does.
  3. Click the 'Install' button.
  4. Viola!

The majority of the third-party scripts are usually self-installing (just press an "install" button). They are usually hosted at either OpenUserJS or GreasyFork.

Scripting Rules

The rules for scripting, from the "Tools and Userscripts" forum (https://www.torn.com/forums.php#/p=threads&f=67&t=16037108&b=0&a=0), are as follows:

"The use of scripts, extensions, applications or any other kind of software is allowed only if it uses data from our API or a page you (or your users) have loaded manually and are currently viewing. They cannot make additional non-API requests to Torn, scrape pages that you're not currently viewing, or attempt to bypass the captcha. If the software you're using makes non-API requests that are not manually triggered by you, it is not allowed and can be tracked.

Assuming this rule is followed, go wild!"

This is somewhat vague, so I consulted with Bogie on some of the scripts I was unsure of. For instance, here is a snippet of our conversation regarding the 'Torn Get Naked' script:

Click to see conversation...

xedx: If I have a script that loads only when a user visits the page the script runs on, can the script use the Javascript click() function to click more than one button/link in succession? In particular, I 'get naked' often when wall sitting, so would like to un-equip with a single click. Is something like that legal, or illegal?

bogie: That wouldn't be legal, sorry.

xedx: Would having 5 separate buttons on the items page - one to un-equip primary, one for secondary, one melee, etc. be legit? What exactly is the rule for this situation?

bogie: thats fine

bogie: As it wouldn't be performing server side actions for you, you'd be doing the main actions

xedx: OK, thank you very much! That's a big help

bogie: But having one button do it all for you would be illegal

xedx: Got it. Thanks!

So that script has been modified to have 5 buttons, on one simple bar, to rapidly click through to equip/un-equip each category. The modified script has not yet been uploaded.

Scripts

Note that the PNG files are not part of the installation, they are simple screenshots showing what to expect when the script is run. Any bugs, broken links, or suggestions, feel free to message me on Torn: xedx [2100735]

One of these days, I'll publish to my OpenUserJS account and make them self-updateable. (done!) When I have the time and inclination to go to the effort, for now, you'd have to go look for an update, they are all versioned. Hmm - should probably put the version number in the name, as I usually do everywhere else for open source stuff. Not sure why I didn't. Probably beacuse I would then have to edit this file as well, every time I uploaded newer versions.

Torn Racing - Car Order

Images:

This script allows you to drag and drop your enlisted race cars into any order you like. Saving this order will allow them to automatically appear in this order when starting a race. Or, you can reset to the Torn default.

Torn Latest Attacks Extender

Images:

This script adds an extended 'latest attacks' screen to your home page. It is configurable and allows you to display up to 100 of the latest attacks, and adds attacking (or attacked) faction name and respect earned. Your API Key is required, as this uses the Torn API so is completely legal. You key is never shared. Before first use, the configuration dialog should appear asking for your key.

As of 03/03/2020, you can now click the attack to get the full attack log (version 0.2). This is thanks to Chedburn adding the log ID to both the 'attacks' queries under user and faction.

Torn Gym Gains

Images:

This script adds extended gym information to your Gym page. It displays the additional gains you get, depending on what perks are currently available to you - company perks, merits, fac perks, etc. These are displayed, by default, as a summary in percentage, along with the base gym gain that depends on the current gym you are in, 2.0 through 10.0. An expandle screen is available to see the breakout of the percentage gains. Your API Key is required, as this uses the Torn API so is completely legal. You key is never shared. Before first use, the configuration dialog should appear asking for your key.

Torn Fac Respect Earned

Images:

This script add a section to the Faction Stats area on your home page, listing the respect you have earned for your faction so far. It has a tool tip, so if you hover over the respect you have earned, it will tell you what medals and honors (merits) are available, and how close you are to getting them.

Torn Bounty List Extender

Images:

This script adds rank next to the level in the Bounties List. The goal was to make it easier to more quickly decide what targets for an attack, without having to inspect the user individually.

Torn Bat Stat Estimator

Images:

This script uses the method described here: https://www.torn.com/forums.php#/p=threads&f=61&t=16065473&b=0&a=0 to estimate a user's bat stats, as best as can be estimated with publicly available stats. The possible range of bat stats is displayed on the user's profile page. This is most useful for lower level players, due to the ranges involved at higher levels. Also, 'ghost' triggers can't be helped, for instance if you hit a NW trigger and then lose it. Also, level holding will also throw off the results, usually resulting in an 'N/A' result. Always check things like Xanax and refills used, and other indicators also before relying on this estimate to pick a fight!

Torn Get Naked

Note: Removed for now, see the comments in the Scripting Rules section, above.

Click to see description...
  • [Torn Get Naked.user.js]

Images:

Sneak Peak at v2, that follows the rules:

Per Bogie's reply to my questions regarding this script, it has since been modified so that there are now 5 buttons, not one, hence the following paragraph is slightly outdated.

This script adds buttons to the Items page: Re-equip, Un-equip, and Reset. Pressing the Un-equip button will un-equip all equipped weapons and armor - Primary, Secondary, Melee, Temporary and Armor. The items that were equipped are saved in local storage, so that when the Re-equip button is pressed, the same items will then be equipped. If you change your choices of weapons and/or armor, pressing the Reset button, while equipped, will erase what is saved so that the next time Un-equip is pressed, the new choices of weaponry and armor will be saved instead of using the old ones. After each action, a results summary dialog is displayed.

Click to see 'Still to be implemented/Known Issues'...
  1. Weapon mods are not saved, so those need to be manually re-added upon re-equipping. The currently equipped mods are displayed on the results summary dialog.
  2. If you decide to equip alternate weapons, such as a plastic sword after un-equipping, this is not currently honored automatically, and I haven't yet tested what happens upon re-equipping - there is normally a warning displayed telling you that your DBK will replace your plastic sword, for example.
    Added 7/16/2019, version 0.2
    After un-equipping, if you then equip another weapon, say a plastic sword, when you later re-equip using the script, it will save the plastic sword as an 'alternate' weapon, and will automatically equip that in place of your normal weapon when you next un-equip using the script. This also prevents the warning about your normal weapon replacing whatever you have equipped since the last un-equip.
  3. Only weapons are affected - if you want to equip masks or clothing such as a thong when un-equipping, this isn't supported nor is it planned to be supported, unless enough people ask for it.
  4. The 'collapse' arrow is not working.
  5. The confirmation dialogs (results summary dialogs) displayed after an action could use a 'Do not show this again' checkbox. This will likey require adding JQuery library support, which should also allow for HTML style formatting, such as bold, italics, etc.

Note: The ability to restore weapons modes may wind up being a separate script, so you'd still have to go to the mods page, but there would be a new dialog at the top with Save and Restore buttons. So one click would save the current config, and one click to restore that config. The current script does display what mods you have in place currently on un-equip, but does not yet restore them.

Torn Net Worth Display

Images:

This simple script display a user's net worth on their profile page, immediately beneath their "last action". Note that this is net worth, not cash on hand. Updated at new day.

Torn Numeric Rank Display

Images:

This simple script appends a user's rank number next to the rank in the User Information section of a user's profile. I find it easier than scrolling down to look at the rank that is also displayed in the Medals section (which is off by one from the actual titled rank).

Torn One-Click Daily Dime

Note: I've removed this for now, as I'm not sure if it breaks the rules or not (see the 'Scripting Rules' section, above). I'll have to confer with Bogie again to verify.

Click to see description...
  • [Torn One-Click Daily Dime.user.js]

Images:

  • [Torn One-Click Daily Dime.png](Coming Soon - when I have more tokens)

This script lets you click the Daily Dime 'buy' button with one click - up to the number of casino tokens you have available. I am using it to get the 'Win a lottery' merit (Lucky Break), you can easily bet 75 times, refill, and bet 75 more times quickly. Or, as many tokens as you may have.

Torn User List Extender

Images:

This script adds rank next to the level in the User List, as seen when searching for users. The goal was to make it easier to more quickly decide what targets for an attack, without having to inspect the user individually. It helps to quickly determine who may be level holding. Of course, you may want to still look at things such as Xanax or SE's used, that is up to you.

Torn Crime Tooltips

Images:

Adds Tool Tips to the Criminal Offences display on your home page. Useful for merit hunting.

Torn Drug Stats

Images:

This script adds a new section to your Home page, and display beneaths the faction perks section a new section, similar to the Crimes section, displaying your drug usage (individual and total), ODs, Rehabs and money spent on rehab in total. Can be used towards monitoring your progress towards the drug merits, comes with tool tips to display merit progress.

Torn Jail Stats

Images:

This script adds a new section to your Home page, and displays beneath the faction perks section a new section, similar to the Crimes section, displaying your bust progress - bust successes, fails, jails, and bail stats. Bounty stats have been stuck in here as well. Can be used towards monitoring your progress towards bust and bail merits, comes with tool tips to display merit progress.

Torn Jail Scores

Images:

This script adds the "score" of a user in jail, which is used to determine the difficulty (or your chance of success) of busting that user out of jail. The score is displayed as a number in parenthesis beneath the user's level. The score corresponds directly to the DocTorn 'Quick Bust/Quick Bail/Min Score/Max Score' bar scores. Some information, mostly speculative, can be found in this guide: https://www.tornstats.com/guides.php?id=22 Will also give you an idea of what to use as scores on the DocTorn bar if you'd like to use those filters.

Torn War Wall List Extender

Images:

Similar to the User List Extender, this extends the user list on the territory wall page(s) when your faction is in a war. It appends the numeric rank next to the level of all people on the wall. Note that internal caching is done to prevent too many API calls, if a user's ID has already been mapped to a rank, a new request to the Torn API is not generated.

Torn War Other Fac Extender

Images:

*** alpha - don't use yet ***

Click to see details...

Similar to the above script, this extends the user list of another faction, typically used during war. It appends the numeric rank next to the level of all fac members on their faction page. This script has a tendency to perform too many requests to the Torn api - there is a limit (100) on requests per minute, the result of which is that only the level may be displayed for certain users, and a '?' for rank. Or no rank info at all. If multiple things are running that query the Torn API, and the faction has 100 members (or more) this will most definitely be hit. This clears itself up in time. Note that internal caching is done to help alleviate this, if a user's ID has already been mapped to a rank, a new request to the Torn API is not generated. A deferred request queue is in the process of being implemented to solve this.

3rd Party Scripts

These scripts aren't mine, just here for easy access by fac mates. The links link to the respective author's repos, either GitHub, OpenUserJS, or GreasyFork.

TBD: Add Special Gym Ratios and Special Gym Reqs scripts here ...

Easter Egg Hunt: Random

To aid in just clicking around Torn, to hopefully stumble across more Easter Eggs, ths script puts an icon/link on your page that takes you to a random page in Torn. I had a small hand in it, it works very well. Not supposed to guarantee any more eggs, but easier to go around to new places you may never have been. I'd recommend using it in conjunction with DoctorN's "Alert me if there's an Easter Egg on the page" option enabled.

Greasy Fork link:

Forum link:

TORN HighLow Helper

The two following links point to the same code, no idea why named differently.

OpenUserJS link: (now an empty shell)

Alternate, GreasyFork link:

Helper to assist in getting the Hi/Lo merit. Simply picks the best choice via odds, worked for me, but not infallable. Took me about 20 minutes and maybe 100 or 120 tokens. Makes it a lot easier, though. Just click click click your way through it. Written by DeKleineKobini [2114440]

Dibs

Allows you to claim 'dibs' on wall targets during territory wars/chaining. Basically, if all parties have the script installed, the first person to attack a target will have claimed 'dibs' on it, preventing others (who are using the script as well) from attacking - this prevents unwanted assists and wasted energy. Written by sullengenie [1946152]

Stock Block Price

Displays the cost of a BB of stock on the Stock Exchange page, beneath the share price. Useful to quickly see the price of a BB without having to 'fake' buying it or use a calculator. Written by nepherius [2009878]

Note: It appears that this does not work well with the 'Stock Market Helper', below. It causes the display of the values of shares you own, on the Stock Exchange page, to appear as $NaN. Since version 1.8 of Stock Market Helper, the block price is displayed as the 'Benefist Price' on the Info page of a stock in the Stock xchange.

Note 2: I think this has subsequently been added to Torn itself, on the 'About' tab in the stock market or portfolio pages.

Stock Market Helper

  • [Stock Market Helper.user.js]

Note: the link is disabled as I do not have permission from Mafia to re-distribute. He has taken down ALL of his scripts. Kept here for legacy purposes.

Click to see description...

Torn Stock Helper that calculates your profit/loss in your portfolio, highlights forecasts that are poor, very poor, good and very good in the Stock Exchange, and lists the amount of $$ you have invested in stocks you have shares in. Also marks the stock's worth, as ($) 0 < 20b < 50b < 100b. And gets new data everytime stock profile reexpanded in Stock Exchange or your portfolio. Written by Mafia [610357]

Bazaar Scam Warning

Puts a big red warning on items that are priced way above their market value. Written by Sulsay [2173590]

Race Helper

  • [Race Helper.user.js]

Racing assistant script. Note: the link is disabled as I do not have permission from Mafia to re-distribute. He has taken down ALL of his scripts. Kept here for legacy purposes.

Click to see description...

Accurate Stats for your car Showing accurate stats number of your car with percentage on your Listed Cars and Race Events

EASY UPGRADE NOTIFICATION Got random events when your car crashed during race?

Looking, searching, finding, or... go thru part by part to make sure your car are fully upgraded ?

Don't worry, with this feature, you will notice which categories are available to upgrade (if you are not fully upgrade your car)

DOWNLOAD CSV

Also, there are feature to download all saved upgrade stats of your car into 1 CSV / Excel format. You can use it later if you need to view it at all or sorting on your pc.

Originally written by Mafia [610357], this is a slightly modified version as his was pulled. This one won't auto-update to the removed version. Kept for legacy purposes.

Extensions

Extensions allow for things that aren't neccesarily page-specific, although these are Torn specific. They can be installed in two ways. When still in testing, or I haven't yet bothered to publish to the Chrome App Store, I'll distribute as a .zip file of all the required files. From chrome://extension, enable "developer mode". You will then see an option, "Load Unpacked". Browse from there to the directory containg the files extracted from the .zip file. My extensions all have an Options page which can be accessed via the "Details" menu of the extension.

Once in the Chrome App Store, the link will point there instead, and should install from there.

Torn Loot Level Notifier

Note: Most, myself included, find it just as easy to monitor YATA's NPC loot page: https://yata.alwaysdata.net/loot/

Images:

This script displays notifications regarding NPC loot levels, health, and the time when the next loot level will be hit, as well as an option to go directly to the NPC's attack page. The notifications displayed can be configured from the Options menu. The options allow you to select which NPC's to be notified about. At present this is only Duke and Leslie. You may also select to display notifications when the player is in hospital, at Loot Level I, II, III, IV or IV, and any combination of the above. By default, the notification is displayed for 10 seconds but can be closed at any time, and there is an Attack button available to go directly to the player's Attack page.

There is also an option to automatically open the NPC's profile at level IV in a new tab - the Attack page.

This has been tested on PC's and Mac's, but since I'm using a Mac, mostly on a Mac.

This extension requires you to enter your API key in the Options dialog. If not entered, the Options dialog will open automatically when run.

There is a warning Idisplays as an error) about an synchronous call, this can be ignored. I will address this later, given time. Async is partially implemented but still in alpha, so not enabled at this time.

I have re-written this to use the YATA API, but the most recent version (1.6.3) has not been uploaded yet.

Third Party Extensions

These extensions aren't mine, just here for easy access by fac mates. The links link to the respective author's repos or the Chrome App Store.

Torn HiLo Assistant

Images:

The link above is to a forum post that explains it all. It has two links, one for the Chrome app store and one for Firefox, at mozilla.org, which both have screenshots. As of this writing, it appears to be broken. Version 0.0.2 - I have notified the author, so I hope he will fix it soon.

Google Sheets and Scripts

Torn Stock Ticker

This requires some configuation. After downloading from the above link, make a copy, renaming if you like, from Google Sheet's File->Copy menu. This will give your own, private, editable copy. Next, enter on the Options sheet your API key and optionally, an e-mail address and/or Discord webhook channel URL to receive event notifications. Finally, from the Tools->Script Editor option in Google Sheets, select the icon that looks a bit like a stopwatch to add a trigger. See the 'Trigger Options' images, below, for more details.

Images:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.