Skip to content
TORNLIFE More

Ranked war hits

Started by Warriordud [3177526] on in API Development.

11 replies · 154 views · thread synced · 7 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
5
Likes on archived posts
1
Authority score
52 / 100
Historical score
19 / 100
Story score
29 / 100
Engagement score
54 / 100
Warriordud [3177526]

I'm developing a command for my discord bot to keep track of ranked wars, and I want it to be able to see how many hits have been made in a ranked war. I don't see anything in the API response for ranked wars, and I'm not sure if this is possible. If anyone knows how I could do this, help would be appreciated.

Titanic_ [2968477]

Would recommend you to learn how to code the bot yourself and use free hosting on Render, Vercel etc where you can save to file. Gives you a lot more freedom to do what you want.

 

Sign up with a virtual card (Revolut, Monese, Privacy etc) and delete it to be sure you'll never have to pay a penny.

Omanpx [1906686]

Worst case - you can store the attacks in a variable and have a way to reset / wipe it. Wouldn't recommend it for multiple reasons, but it would work for what you are trying to do.

tiksan [2383326]

Yeah the API returns the 100 most recent attacks. Just query and store all the attacks since the RW started on the heap when the command is run.

Taxxon [882264]

Its better to pull this information after the war. You dont need to track each attack individually, just rhe hit count at the end of the report.

tiksan [2383326]

Why not? Storing attack IDs in a hashset would require almost no memory (relatively). You could store the attack IDs from a 100k chain in less than 5 megabytes of memory in C++ iirc.

Warriordud [3177526]

the idea behind it was to make it average out the respect per hit to give a rough estimate of how many more hits would be needed to finish the war