Skip to content
TORNLIFE More

Script writing

Started by Static1589 [2693019] on in Tools & Userscripts.

11 replies · 76 views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 12 / 12 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
12
Discussion span
→
People posting
6
Likes on archived posts
6
Authority score
36 / 100
Historical score
17 / 100
Story score
33 / 100
Engagement score
58 / 100
Static1589 [2693019]

So, with the huge influx of all these lookalike scripts and websites, clearly written by AI, what AI is everyone using to write these scripts?

 

I tried Gemini to make a simple one showing my Company Value below the company details, but struggle to make it work in PDA. But I know nothing about coding in the first place, so that doesn't help a lot.

Makkhoi [3652991]

Just be careful about vibe coding something that breaks the rules. Quite a few people have been banned for illegal scripts recently because they don't understand how the script should work.

Static1589 [2693019]

Yeah I'll make sure to read up on the rules again. With the company value script I at least made sure it only updates when the window actually is in focus

BritishBenji [2257611]

A lot of LLM's have a habit of assuming rules, functions, and API endpoints for Torn. You'd probably be best feeding it the OpenAPI JSON file for V2 of the API
You'll also have to hand-feed it a fair few response examples as the API doesn't detail all possible outputs

(for example, User Verification with Discord. The spec doesn't mention that the Discord endpoint accepts DiscordID's as well as TornID's)

 

For simple scripts, Gemini has been enough. Any larger projects, I've used Claude. 

 

I always make sure I understand the code and what it's doing before running it. You're responsible for the code you run and deliver to others, make sure it doesn't break any rules, and won't obliterate your request limits

Zonure [3787510]

Claude is pretty good for scripting. On the free tier you'll hit usage limits fast, sometimes a single prompt is enough to cap you, so patience is key and you'll need to pick your moments.

 

It also needs a lot of hand-holding upfront. The more context you give it about your project the better the output. Things like API endpoints, response schemas, DOM structure, WebSocket info, and platform-specific quirks (e.g. TornPDA uses custom GM_ handlers that differ from standard Tampermonkey) all matter. Don't assume it knows your environment.

 

Direction matters too. Claude will constantly make its own assumptions about how things should work, so you need to actively steer it and correct it when it drifts. Think of it less like delegating and more like pair programming where you're the one who knows the Torn rules.

 

When something breaks, don't just say "it doesn't work, fix it." That tells it nothing. Give it the actual error message, console output, or a screenshot of what's happening. The more specific you are about what went wrong, the better chance it has of actually fixing it instead of guessing.

 

Being able to read code yourself is a big plus, but not required. You can always ask it to explain what a block of code does or walk through the logic flow before applying changes. That way you can catch it before it does something that breaks Torn rules or goes against how you want things to work.

Static1589 [2693019]

Thanks. There's lot of useful info.

 

I had Claude write a script to simply show today's change in cash on hand. It does work on PDA as well, although after it's done loading, it freezes PDA's browser part completely. I have to disable the script, close PDA and restart it so it becomes responsive again.

(Edit: Chrome has the same issue)