As the title says, I m begging any of you to help me with this issue, the server had dynamic bypass meaning every time you go to alt b and back the bypass is changing.....
However I found this resource: https://adrenalinebot.com/en/api/example/work-with-dynamic-bypasses-parsing-regular-expressions
They suggest using this:
uses SysUtils, Classes, RegExpr; // plug in module RegExpr
function Bypass(dlg: string): boolean;
var
RegExp: TRegExpr;
SL: TStringList;
i: integer;
bps: string;
begin
Result:= true; // set the default result
RegExp:= TRegExpr.Create; // initialize objects for further work
SL:= TStringList.Create;
RegExp.Expression:= '(<a *(.+?)</a>)|(<button *(.+?)>)'; // set regexp to search for all possible bypasses
if RegExp.Exec(Engine.DlgText) then // if you found the desired pattern, then
repeat SL.Add(RegExp.Match[0]); // fill our list with such matches
until (not RegExp.ExecNext); // until the patterns run out
for i:= 0 to SL.Count-1 do begin // now go over our list
if (Pos(dlg, SL[ i ]) > 0) then begin // if the i-th line contains the required text, then
RegExp.Expression:= '"bypass -h *(.+?)"'; // look for a text template with bypass
if RegExp.Exec(SL[ i ]) then // and if found, then copy from it a piece of interest to us
bps:= TrimLeft(Copy(RegExp.Match[0], 12, Length(RegExp.Match[0])-12));
end;
end;
Print(bps); // print out the final bypass
if (Length(bps) > 0) then Engine.BypassToServer(bps); // if its length is > 0, then send to server
RegExp.Free; // do not forget to free up memory
SL.Free;
end;
begin
Bypass('Fighter Scheme'); // directly the function call, it will find the corresponding bypass and send it
end.
However nothing happends...also the base script is this:
uses SysUtils, Classes, RegExpr; // plug in module RegExpr
procedure PrintAllTags(); // print all designs with bypasses
var RegExp: TRegExpr;
begin
RegExp:= TRegExpr.Create;
RegExp.Expression:= '(<a *(.+?)</a>)|(<button *(.+?)>)';
if RegExp.Exec(Engine.DlgText) then
repeat Print(RegExp.Match[0]);
until (not RegExp.ExecNext);
RegExp.Free;
end;
begin
PrintAllTags();
end.
It should return bypasses right? But it doesnt for me.... ( everything works fine with other scripts btw)
Thank you for your time!