Skip to content
TORNLIFE More

[SCRIPT + PDA] Display Crime Chain - Finally!

Started by iron [2428902] on in Tools & Userscripts.

66 replies · 7.18k views · thread synced · 3 days ago · View on torn.com

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

iron [2428902]

Thank you. I just pushed this change now so hopefully that should come through if people update their script

Bobogoobo [2618206]

Thanks! Can you please make the following changes?

* In the fetchCrimes function, add a comment to the API call, such as &comment=CrimeChain

* Comment out or remove your testing console.log code

Pholder [3623374]

I couldn't get the script to work on my main device, but changing match to only load on the cracking page fixed it. I was getting sad because your script works much better than the old one.

https://www.torn.com/loader.php?sid=crimes#/cracking

 

Vixith [3452621]

I made a restricted custom API key creator link for people to use so you don't have to give full access

https://www.torn.com/preferences.php#tab=api?step=addNewKey&user=basic,log&logIds=219,218,217,136&title=Crime%20only%20logs 

 

This will only allow the script to use basic user info and only access logs for Crime critical failure, Crime failure, Crime success, Crimes

 

You can use the tool here to do it yourself also https://www.torn.com/api.html#  

 

Allenone [2033011]

Hey, love the script.

 

 

I've discovered a very rare self-induced edge case with this script that causes this script to go into an infinite loop and eat my entire API limit every time i visit the crimes page.

 

I sort of added ALOT of bonded paper into forgery, which cause the "Crime item add for forgery" event to be the last item in the fetch which doesn't match the regex so it keeps repeating.

 

I've manually edited my version to account for this edge case, but i'd recommend you update the script for everyone else to prevent something similar from happening.

 

 

iron [2428902]

Haha, love this.

 

can you shoot me a message with the text of the changes you made let me know what lines and I’ll get it updated

Allenone [2033011]

It's highlighted in the screenshot :)

 

just changed your regex in calcCrimeChain() to include "|item add" when matching the title.

Marcomaga [2825767]

I have installed the 1.0.6 version. I can't see the crime chain value on the crime page. I could before the last pda update. Does it not work or should I put some setting I don't know?

iron [2428902]

Yeah I’ll try fix in the next few days. Unless someone has/wants to find the issue, I just don’t have much time for scripting these days

iron [2428902]

Are you using PDA? If you are it uses your PDA api key. Otherwise you’ll have to go into the script settings on PDA and assign a custom key to it.

 

If you’re not using PDA and you’re using your browser try clearing your browser case and your local storage