can we get api to show how much each player spend energy? no we can see only how much total we get, and see alll data in faction how much total each spend... to check it my manual is pain (maybe we want to run contest like who wil spend most e in moth and yto check it my manual is pain)
gazaras: forum
gazaras [1673083] Level 100 Sport Club SC Leader
- Forum posts (Torn's count)
- 458 observed
- Archived posts
- 386
- Threads started (archived)
- 14
Boards
From the 386 newest archived posts.
- Faction Recruitment
- Company Recruitment
- API Development
- General Discussion
- Faction Discussion
- Bugs & Issues
- Suggestions
- Community Events
Threads started
- is any way in api get status of shoplift crimes?
- 33% plunder if interested put your offer
- make chess game in casino :)
- [Buying] losses 275k each :)
- [RW] Sport Club and The Quidnunks HQ
- [RW] sport club vs nuclear blast
- Sport Club vs Vulpes Vulpes ranked
- Show event after someone adjust your money in fc
- api how to get all factions id and names
- api fail? failed to open stream: HTTP request fail
- api suggestion gym
- tonr api (faction>attacks)
- if someone can help :) faction api data to mysql
- mission mexico to hospital id:1669696
Most-liked posts
Likes as archived at fetch time, adjusted for how long each post had been up. Scored posts only; the full score pass runs after the import.
can we get api to show how much each player spend energy? no we can see only how much total we get, and see alll data in faction how much total each spend... to check it my manual is pain (maybe we want to run contest like who wil spend most e in moth and yto check it my manual is pain)
- Manual labor 132,012
- Intelligence 91,473
- Endurance 151,452
https://prnt.sc/10bgr2f
- Manual labor 136,497
- Intelligence 92,904
- Endurance 154,490
- Addiction Mitigation max merit
- Employee Effectiveness max merit
Recent archived posts
+
up
+
+
up
boom
up
booo
up.
boom
up
b o o m
boom up
+
+
up
+
$url = "https://api.torn.com/torn/?key=APIKEY&comment=TornAPI&selections=shoplifting"; //apikey your api// API URL
// Discord Webhook and Role ID
$webhookurl = ""; //put your discord
$id_role = ; //discord role to tag
// Get JSON from API
$jsonData = file_get_contents($url);
if ($jsonData === false) {
die("Error: Could not fetch data from API.");
}
// Decode JSON
$data = json_decode($jsonData, true);
if ($data === null) {
die("Error: Could not decode JSON.");
}
// Extract jewelry_store data
$jewelryStore = $data['shoplifting']['jewelry_store'] ?? [];
// Check if all disabled = false
$allEnabled = true;
foreach ($jewelryStore as $item) {
if ($item['disabled']) {
$allEnabled = false;
break;
}
}
// If all enabled, store in $juve and send to Discord
if ($allEnabled && !empty($jewelryStore)) {
$juve = $jewelryStore;
// Prepare message
$message = "<@&$id_role> Jewelry Store is clear!n";
foreach ($juve as $item) {
$message .= "- " . $item['title'] . "n";
}
// Send to Discord
$payload = json_encode([
"content" => $message
]);
$ch = curl_init($webhookurl);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-type: application/json']);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
echo "✅ Message sent to Discord.n";
} else {
echo "❌ Jewelry Store not all clear.n";
}
if anyone want to use
+
join and grow :)