Skip to content
TORNLIFE More

sleek: forum

sleek [3900953] Level 35 Traveling Order 66 O66 Admin

Forum posts (Torn's count)
0 observed
Archived posts
8
Threads started (archived)
1

Boards

From the 9 newest archived posts.

Threads started

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.

Trash items abroad by spamming button · · 5 likes

Hi, this is a script developed by me, and since I don't code much in js so used AI as well to help me.

 

What does it do?

As the name suggests, it helps to trash items abroad. What to do in Mexico or Japan while waiting? Trash some items.

 

Why did I do this?

I want the trash 5k items merit. I know we can buy and trash, but I tried to do it while minimizing cost, having something to do while abroad and making use of this new Travel 2.0 feature

 

Here is the demo video of it: Google drive link

Here is the link to the script: https://greasyfork.org/en/scripts/589595-torn-trash-abroad

 

This is my first ever try to create a script for public use, so I am not sure if it will work for all. Please let me know of bugs or improvement points, and I will try my best to resolve/add them.

 

Thanks all!

The Red Ledgers Services · · 3 likes

Quick and easy services with far more reasonable prices, should be a no brainer to go to.

Recent archived posts

TOP 100 BS ACHIEVED ·

Well done Odinson!

Eco Friendly Merit: 5,000 Item Dump After the Travel Update ·

I have a script to help do it faster: https://www.torn.com/forums.php#/p=threads&f=67&t=16588672&b=0&a=0&start=0&to=27698387

The Red Ledgers Services · · 3 likes

Quick and easy services with far more reasonable prices, should be a no brainer to go to.

Trash items abroad by spamming button ·

bump

Trash items abroad by spamming button · · 5 likes

Hi, this is a script developed by me, and since I don't code much in js so used AI as well to help me.

 

What does it do?

As the name suggests, it helps to trash items abroad. What to do in Mexico or Japan while waiting? Trash some items.

 

Why did I do this?

I want the trash 5k items merit. I know we can buy and trash, but I tried to do it while minimizing cost, having something to do while abroad and making use of this new Travel 2.0 feature

 

Here is the demo video of it: Google drive link

Here is the link to the script: https://greasyfork.org/en/scripts/589595-torn-trash-abroad

 

This is my first ever try to create a script for public use, so I am not sure if it will work for all. Please let me know of bugs or improvement points, and I will try my best to resolve/add them.

 

Thanks all!

Pacca's Beginner Guide for New Players ·

bump!

[Userscript] Larger Chain Timer ·

Hi, I tried this script & it wasn't working for me. (Most probably coz Ched & team have changed the class names to various elements).

 

I tried resolving it.

Here is my bug fix for the main code:

 

// ==UserScript==
// @name         Chain Timer
// @namespace    sleek.script.chain_timer
// @version      3.2
// @description  Enlarges chain timer and colors from green to red as time runs out.
// @author       sleek
// @match        https://www.torn.com/*
// @require      https://gist.github.com/raw/2625891/waitForKeyElements.js
// @icon         https://www.google.com/s2/favicons?sz=64&domain=torn.com
// @grant        none
// ==/UserScript==

// Changelog:
// v1.0 - Initial release. Hardcoded class names for chain timer elements. (By Annosz [2896714] from Github)
// v2.0 - Added dynamic colors to better visualize the chain timer. (By Vassilios [2276659])
// v3.0 - Replaced hardcoded class names with structural DOM traversal anchored on Chain:
// v3.1 - Added check to reset elements if chain count is < 10
// v3.2 - Added cooldown detection via progress div classList and absent speed element.
//         resetStyles() now fires when chain enters cooldown state.

(function () {
    'use strict';

    let initialized = false;

    function resolveChainElements() {
        const chainLabel = [...document.querySelectorAll('p')].find(
            el => el.textContent.trim() === 'Chain:'
        );
        if (!chainLabel) return null;

        const barStats = chainLabel.parentElement;
        const allP = barStats.querySelectorAll('p');
        const barValue = allP[1];
        const timeLeft = allP[allP.length - 1];
        const chainBar = barStats.parentElement;

        const progressDiv = [...chainBar.children].find(el =>
            el !== barStats &&
            [...el.classList].some(cls => cls.toLowerCase().startsWith('progress'))
        ) ?? null;

        const speed = [...chainBar.children].find(el =>
            el !== barStats &&
            el.tagName === 'DIV' &&
            el.querySelector('span')?.textContent.trim().startsWith('x')
        ) ?? null;

        const tickList = chainBar.querySelector('ul');

        return { barStats, barValue, timeLeft, speed, progressDiv, tickList };
    }
    function getChainCount(barValue) {
        return parseInt(barValue.textContent.trim()) || 0;
    }

    function isInCooldown(els) {
        const hasCooldownClass = els.progressDiv
            ? [...els.progressDiv.classList].some(cls => cls.toLowerCase().includes('cooldown'))
            : false;
        return hasCooldownClass || els.speed === null;
    }

    function applyStyles(els) {
        const { barStats, timeLeft, speed, tickList } = els;
        barStats.style.display = 'block';
        timeLeft.style.fontSize = '60px';
        timeLeft.style.height = '62px';
        if (speed) speed.style.top = 'unset';
        if (tickList) tickList.style.height = '8px';

        const text = timeLeft.textContent.trim();
        if (!text.includes(':')) return;
        const [m, s] = text.split(':').map(Number);
        const ratio = Math.max(0, Math.min(1, ((m * 60 + s) || 0) / 300));
        timeLeft.style.color = `rgb(${Math.round(255 * (1 - ratio))},${Math.round(255 * ratio)},0)`;
    }

    function resetStyles(els) {
        const { barStats, timeLeft, speed, tickList } = els;
        barStats.style.display = '';
        timeLeft.style.fontSize = '';
        timeLeft.style.height = '';
        timeLeft.style.color = '';
        if (speed) speed.style.top = '';
        if (tickList) tickList.style.height = '';
    }

    function actionFunction(jNode) {
        if (jNode[0].textContent.trim() !== 'Chain:') return;
        if (initialized) return;
        initialized = true;

        const els = resolveChainElements();
        if (!els) return;

        const tick = () => {
            if (isInCooldown(els) || getChainCount(els.barValue) < 10) {
                resetStyles(els);
            } else {
                applyStyles(els);
            }
        };

        tick();
        setInterval(tick, 1000);
    }

    waitForKeyElements('p', actionFunction);

})();


If it's not working, please comment, I will try to resolve it.

Thanks.

Frosty's Trading Post ·

BIG BUMP!

Ideal Mission Target · · 1 like

Duke's harassing you with Thor's Hammer, this guy got ya covered. Thank you kind sir <3.