Hey guys, a quick guide today
Imagine the website responds with a specific string, and if that thing appeared 10 times (even when retried with multiple proxies) then you want to set the status to something custom.
You could use ban loop evasion but it wouldn’t be generic enough, because its counter increases for every type of ban, not just a specific one. With this approach, you can specify a single keyword for which to obtain such a behaviour.
// We use the same BotData because it persists when the same data line
// is retried using multiple proxies.
// Try to get the counter as object
object obj = data.TryGetObject<object>("counter");
// If we never set the counter for this data line, initialize it to 0 (boxed)
if (obj == null)
{
data.SetObject("counter", 0);
}
// Now we know the counter is initialized for sure, so get it as an int (unboxing)
int counter = (int)data.TryGetObject<object>("counter");
// If the counter is > 10 set the status to custom and quit
IF INTKEY @counter GreaterThan 10
data.STATUS = "CUSTOM";
return;
END
// Do other stuff
// Under this condition we increase the counter and return
IF STRINGKEY @data.SOURCE Contains "hello"
data.SetObject("counter", counter + 1);
data.STATUS = "BAN";
return;
END
Stay awesome,
Ruri