IF "<IsTokAlive>" EqualTo "yes"
JUMP #Continue
ENDIF
REQUEST GET "https://example.com/api/get-cookie"
...
SET GVAR "TOK" "<COOKIES(TOKEN)>"
SET GVAR "IsTokAlive" "yes"
#Continue
REQUEST GET "https://example.com/api/check/<DATA>/"
COOKIE "TOKEN: <TOK>"
IF "<RESPONSECODE>" EqualTo "401"
SET GVAR "IsTokAlive" "no"
SET STATUS RETRY
ENDIF
KEYCHECK
...
IF BOOLKEY @globals.IsTokAlive Is true
JUMP #Continue
END
// Request block
...
LOCK globals
globals.TOK = data.COOKIES["TOKEN"];
globals.IsTokAlive = true;
END
#Continue
// Request block here, use <globals.TOK> instead of just <TOK>
IF INTKEY @data.RESPONSECODE EqualTo 401
globals.IsTokAlive = false;
data.STATUS = "RETRY";
return;
END
// Keycheck block here
Can’t do that for real?
can’t we share a List in Globals and use that like globals.cookieslist[<BOTNUM>]
BOTNUM is for OB1, idk is there a unique thing for each bot in OB2 or not
but what is the usage?
more CPMs, less BANs, less requests, less pressure on the target, less bandwidth/traffic
Also useful for scraper or some special configs
There is not BOTNUM in OB2 because the threading works differently. In OB2 there was 1 background worker per bot which was constantly running, while here I’m using asynchronous tasks, and a new one is created for each line of the data pool.
As I said, there’s no “bots” like in OB1.
Take this example: 4 lines, 2 bots
OB1 was like
bot 1 → process line 1 → process line 3
bot 2 → process line 2 → process line 4
in OB2 it’s
task 1 → process line 1
task 2 → process line 2
task 3 → process line 3
task 4 → process line 4
The “bots” amount in OB2 just defines how many tasks can be active at the same time. The tasks are destroyed as soon as the line finishes processing so there’s no persistence from 1 line to the other, the only way is to use global variables but you can only set 1 token unless you use a queue or something, but it’s not something the average user can write.