Skip to content
TORNLIFE More

[Script] Torn OC Loan Manager

Started by Allenone [2033011] on in Tools & Userscripts.

32 replies · 745 views · thread synced · 5 days ago · View on torn.com
About this thread

Posts archived: 33 / 33 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
33
Discussion span
→
Authority score
39 / 100
Historical score
34 / 100
Story score
48 / 100
Engagement score
75 / 100

People posting, likes and official posts are not counted for this thread yet: on threads longer than one page they come from a periodic pass over the archive, which has not covered it.

Allenone [2033011]

OC managers, tired of tediously loaning items one at a time? I was too.

 

 

Script showcase:

YouTube video gekeLJRmeYs

 

Features:

  1. Quickly identify and retrieve over-allocated utility items which aren't being used.
  2. Loan items easily with '1 click' without remembering names and items or having multiple tabs open.
  3. Configurable split calculator for custom chain payouts.

 

Clarification on the '1 click' loaning- It's not genuinely 1 click, and complies with all scripting rules, 1 click only does one action. The button intelligently cycles back and fourth between "Prepare Armory" and "Loan Item", which each only send 1 HTTP POST to torn.

 

Script download

Requires minimal access API key and faction API access (/faction/utilities, /faction/members, and /faction/crimes), Set API key via the GM extension.

 

Data Storage Data Sharing Purpose of Use Key Storage & Sharing Key Access Level
Will the data be stored for any purpose? Who can access the data besides the end user? What is the stored data being used for? Will the API key be stored securely and who can access it? What key access level or specific selections are required?
No Nobody

Public community tools stored locally, not shared. Minimal

 

GFOUR [3498427]

love it, just a small suggestion


can u group the same items together, the list is getting too long, and it's not even scrollable lol

Allenone [2033011]

Maybe that person shouldn't have everything in the utilities armory loaned to themself?

 

This is outside of the scope of the purpose of that feature. It's intended to to be able to retrieve items that weren't used during an OC (not reaching some checkpoints will not use the items of some roles), or to retrieve items which were loaned to someone who decided to swap to a different OC/role.

Jocko [55408]

great stuff, did some testing. works as mentioned. small idea that could enhance it if possible - specifically for the missing items:

-it prioritizes the OCs that are closest to running, so it loans out those that need it more immediate (important if factions are running lean and only want to issue items just-in time or in a 48h window or whatnot)

-ability to cycle through missing with left/right arrows or somethin' (so if we don't have inventory items of firewalks, can still process the other missing items without it being hung up)

-ability to to filter out planning vs. recruiting OCs - so if manager wants to only start loaning out gear for in-planning ocs, they can do that.

those are all fairly optional enhancements lol, but could add some QoL for folks. Apart from that, pretty nifty little tool! 

Allenone [2033011]

I'll consider some of these.

 

I have some updates and features planned, but my motivation has been low recently. I've been using this in IBB for a couple weeks and wanted to get it out publicly for a few other OC managers I know.

 

In a future update:

  • I'll likely include the item name and not just the ID when loaning items
  • add a skip button when loaning items
  • make the API key addable via popup or menu item ( right now forcing users to manually enter their API key prevents automatic script updates )
  • make the unused items list scrollable
  • add a selectable option to chose from recruiting, planning, or both (default).
  • add a small pane for missing items that need manually loaned/given (irradiated bloodbags and smokes)
Allenone [2033011]

Seems torn changed the div IDs of the armory tabs recently.

 

I'll push a patch later this evening to fix the highlighting feature for unused items.

Allenone [2033011]

v1.3.7 is out

 

  • Fixed unused items li highlighting
  • now caches itemID:itemName to display item names when loaning (cache populates after first "Load Armory")
  • Added a GM menu command for entering your API key

 

Allo [2316070]

Can you add a check for PDA to use its key manager, similar to below

// PDA check for API

    let inPDA = false;

    const PDAKey = "###PDA-APIKEY###";

    if (PDAKey.charAt(0) !== "#") {

        inPDA = true;

        apiKey = PDAKey; // Use PDA API key

    }

 

Currently using this script on PDA still requires modifying local to add the key

Allenone [2033011]

Haven't even tried it on tornPDA, but I'll give it a look at some point.

 

Figured it'd need a bunch of stuff changed to even be compatible with mobile scaling.

Allo [2316070]

I personally have been using it on PDA in desktop mode and it works great, the missing items tab is especially useful

Allenone [2033011]

I did not but it's still on my "to do" list, I still use the script daily and have some improvements to make, but IRL has been killing my desire to work on anything past the bare minimum on my free time right now.

 

Looks like I'll need to update it soon anyways now that med and consumable loaning is added. https://www.torn.com/forums.php#/p=threads&f=19&t=16508762&b=0&a=0&to=27096642 

Mentions: OC items from faction armory

RussianRob [137558]

Love this script very useful just a suggestion, why not make the unused items like missing items style so they click on retrieve and retrieves it so there isn’t a long list. 

Allenone [2033011]

Some people may have tools loaned to themself or others for use in crimes. I could see this going either way with people getting annoyed having stuff reclaimed all the time.

 

Unused items is mostly a manual cleanup process to retrieve items that weren't consumed because the OC failed before the checkpoint which triggers it's usage.