TAntiban is just the beginning. You can extend it and add your own flavors.
But do no forget from whence thou are fallen. Understand the srl.GaussRand. And other
methods to increase your Antiban flavor potential dependent on what tendencies u want to create.
Basic Example (Custom task):
Simba Code:
procedure TAntiban.CombatTab();
begin
Gametabs.Open(tabCombat);
end;
Here we open the Combat Game Tab in OSRS. Utilizing the Global Variable Gametabs.
Then we add the task to execute every 10 minutes.
Simba Code:
Antiban.AddTask([@Antiban.CombatTab, ONE_MINUTE * 10]);
Advanced Example (Work in progress)(Custom task):
Simba Code:
procedure TMouse.WindMouse2(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: Double; Scrolls: Int32);
var
veloX, veloY, windX, windY, veloMag, dist, randomDist, step, maxStepStart: Double;
lastX, lastY: Int32;
sqrt2, sqrt3, sqrt5: Double;
T: UInt64;
Done: Boolean;
begin
maxStepStart := maxStep;
sqrt2 := sqrt(2);
sqrt3 := sqrt(3);
sqrt5 := sqrt(5);
T := GetTickCount() + 15000;
while Hypot(xs - xe, ys - ye) > 1 do
begin
if Random(2) = 1 then // Added
Self.Scroll(Random(9), false); // Added, 50% chance to execute because of if Random(2) = 1
if (GetTickCount() > T) then
RaiseException('Mouse timed out');
if (@OnMoving <> nil) then
begin
OnMoving(@Self, xe, ye, Done);
if Done then
Exit;
dist := Hypot(xs - xe, ys - ye);
if (dist <= 1) then
Break;
if (dist > maxStepStart / 2) then
maxStep := maxStepStart;
end else
dist := Hypot(xs - xe, ys - ye);
wind := MinE(wind, dist);
if dist >= targetArea then
begin
windX := windX / sqrt3 + (Random(Round(wind) * 2 + 1) - wind) / sqrt5;
windY := windY / sqrt3 + (Random(Round(wind) * 2 + 1) - wind) / sqrt5;
end else
begin
windX := windX / sqrt2;
windY := windY / sqrt2;
if (maxStep < 3) then
maxStep := Random(3) + 3.0
else
maxStep := maxStep / sqrt5;
end;
veloX := veloX + windX;
veloY := veloY + windY;
veloX := veloX + gravity * (xe - xs) / dist;
veloY := veloY + gravity * (ye - ys) / dist;
if (Hypot(veloX, veloY) > maxStep) then
begin
randomDist := maxStep / 2.0 + Random(round(maxStep) div 2);
veloMag := sqrt(veloX * veloX + veloY * veloY);
veloX := (veloX / veloMag) * randomDist;
veloY := (veloY / veloMag) * randomDist;
end;
lastX := Round(xs);
lastY := Round(ys);
xs := xs + veloX;
ys := ys + veloY;
if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
Self.SetPosition(Point(Round(xs), Round(ys)));
step := Hypot(xs - lastX, ys - lastY);
Wait(Round((maxWait - minWait) * (step / maxStep) + minWait));
if Random(4) = 1 then // Added
Self.Scroll(Random(5), true); // Added, 25% chance to execute
end;
Self.SetPosition(Point(Round(xe), Round(ye)));
end;
procedure TMouse.Move2(P: TPoint);
var
randSpeed: Double;
begin
randSpeed := (Random(Self.Speed) / 2.0 + Self.Speed) / 10.0;
Self.WindMouse2(Self.GetPosition().X, Self.GetPosition().Y, P.X, P.Y, Self.Gravity, Self.Wind,
10.0 / randSpeed, 15.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed, 25);
end;
procedure TAntiban.RandomZoom();
var
P: TPoint;
B: TBox;
begin
B := MainScreen.GetBounds();
P.X := Trunc(srl.TruncatedGauss(Double(B.X1),Double(B.X2)));
P.Y := Trunc(srl.TruncatedGauss(Double(B.Y1),Double(B.Y2)));
Mouse.Move2(P);
P.X := Trunc(srl.TruncatedGauss(Double(B.X1),Double(B.X2)));
P.Y := Trunc(srl.TruncatedGauss(Double(B.Y1),Double(B.Y2)));
Mouse.Move2(P);
wait(0, srl.TruncatedGauss(1000,5000));
Mouse.Scroll(20, true);
end;
TAntiban.RandomZoom(); This is just a random custom advanced procedure i created. I don't know
if i like it and consider it random and what a player might do. But that's the whole point of anti ban.
Just adding random things like this and tons of them. Increases our entropy and chances of getting banned
go down and down if we are all using our own custom stuff.
This does 2 MouseMoves which uses WindMouse. I copied WindMouse so that it has random chances to Scroll in
and out with the Mouse wheel (Zoom). But at the end it scrolls all the way out to max zoon after a random 1-5 seconds.
What Antibans can you create? Cheers.
Some stuff I'm currently working on. Feel free to steal it. - LordJashin
Simba Code:
procedure TAntiban.RandomTab();
var
i: Byte;
begin
DebugNote('[RND] Clicking Random Gametab');
i := Byte(Random(14));
if Gametabs.IsOpen(EGametab(i)) then
begin
i := i + 1;
if i = 14 then
i := 0;
end;
Gametabs.Open(EGametab(i));
end;
procedure TAntiban.CombatTab();
begin
DebugNote('[RND] Clicking Combat Tab');
Gametabs.Open(tabCombat);
end;
procedure TAntiban.SkillsTab();
begin
DebugNote('[RND] Clicking Skills Tab');
Gametabs.Open(tabStats);
end;
procedure TAntiban.QuestsTab();
begin
DebugNote('[RND] Clicking Quests Tab');
Gametabs.Open(tabQuests);
end;
procedure TAntiban.InventTab();
begin
DebugNote('[RND] Clicking Inventory Tab');
Gametabs.Open(tabInventory);
end;
procedure TAntiban.EquipTab();
begin
DebugNote('[RND] Clicking Equipment Tab');
Gametabs.Open(tabEquipment);
end;
procedure TAntiban.PrayerTab();
begin
DebugNote('[RND] Clicking Prayer Tab');
Gametabs.Open(tabPrayer);
end;
procedure TAntiban.MagicTab();
begin
DebugNote('[RND] Clicking Magic Tab');
Gametabs.Open(tabMagic);
end;
procedure TAntiban.ClanTab();
begin
DebugNote('[RND] Clicking Clan Tab');
Gametabs.Open(tabClan);
end;
procedure TAntiban.FriendsTab();
begin
DebugNote('[RND] Clicking Friends Tab');
Gametabs.Open(tabFriends);
end;
procedure TAntiban.IgnoresTab();
begin
DebugNote('[RND] Clicking Ignores Tab');
Gametabs.Open(tabIgnores);
end;
procedure TAntiban.LogoutTab();
begin
DebugNote('[RND] Clicking Logout Tab');
Gametabs.Open(tabLogout);
end;
procedure TAntiban.OptionsTab();
begin
DebugNote('[RND] Clicking Options Tab');
Gametabs.Open(tabOptions);
end;
procedure TAntiban.EmotesTab();
begin
DebugNote('[RND] Clicking Emotes Tab');
Gametabs.Open(tabEmotes);
end;
procedure TAntiban.MusicTab();
begin
DebugNote('[RND] Clicking Music Tab');
Gametabs.Open(tabMusic);
end;
procedure TAntiban.ToggleWorldMap();
begin
DebugNote('[RND] Toggling World Map');
Mouse.Click(Point(727,131), 9, mouse_Left);
wait(3000,6000);
Mouse.Click(IntToBox(481, 15, 503, 34), mouse_Left)
end;
procedure TAntiban.ToggleXPBar();
begin
DebugNote('[RND] Toggling XP Bar');
if XPBar.IsOpen then
XPBar.Toggle(false)
else
XPBar.Toggle(true);
Wait(1000,2500);
if XPBar.IsOpen then
XPBar.Toggle(false);
end;
procedure TAntiban.ToggleRun();
begin
DebugNote('[RND] Toggling Run');
if Minimap.isRunEnabled() then
begin
Minimap.ToggleRun(false);
Wait(1000,2500);
Minimap.ToggleRun(true);
end
else
begin
Minimap.ToggleRun(true);
Wait(1000,2500);
Minimap.ToggleRun(false);
end;
end;
procedure TAntiban.ToggleAcceptAid();
var
button:TBox = [555,425,590,464];
begin
DebugNote('[RND] Toggling Accept Aid');
if not Options.isOpen() then
Options.Open();
if GtButton(button).IsEnabled() then
Options.ToggleAcceptAid(false)
else
Options.ToggleAcceptAid(true);
end;
procedure TAntiban.ChatAllTab();
begin
DebugNote('[RND] Clicking Chat All Tab');
Chatbox.ClickTab(ctAll);
end;
procedure TAntiban.ChatGameTab();
begin
DebugNote('[RND] Clicking Chat Game Tab');
Chatbox.ClickTab(ctGame);
end;
procedure TAntiban.ChatPublicTab();
begin
DebugNote('[RND] Clicking Chat Public Tab');
Chatbox.ClickTab(ctPublic);
end;
procedure TAntiban.ChatPrivateTab();
begin
DebugNote('[RND] Clicking Chat Private Tab');
Chatbox.ClickTab(ctPrivate);
end;
procedure TAntiban.ChatClanTab();
begin
DebugNote('[RND] Clicking Chat Clan Tab');
Chatbox.ClickTab(ctClan);
end;
procedure TAntiban.ChatTradeTab();
begin
DebugNote('[RND] Clicking Chat Trade Tab');
Chatbox.ClickTab(ctTrade);
end;
procedure TAntiban.CycleTopTabs();
begin
DebugNote('[RND] Cycling Top Tabs');
Gametabs.Open(tabCombat);
Wait(1000,2500);
Gametabs.Open(tabStats);
Wait(1000,2500);
Gametabs.Open(tabQuests);
Wait(1000,2500);
Gametabs.Open(tabInventory);
Wait(1000,2500);
Gametabs.Open(tabEquipment);
Wait(1000,2500);
Gametabs.Open(tabPrayer);
Wait(1000,2500);
Gametabs.Open(tabMagic);
end;
procedure TAntiban.CycleBottomTabs();
begin
DebugNote('[RND] Cycling Bottom Tabs');
Gametabs.Open(tabClan);
Wait(1000,2500);
Gametabs.Open(tabFriends);
Wait(1000,2500);
Gametabs.Open(tabLogout);
Wait(1000,2500);
Gametabs.Open(tabOptions);
Wait(1000,2500);
Gametabs.Open(tabEmotes);
Wait(1000,2500);
Gametabs.Open(tabMusic);
end;
procedure TAntiban.CycleChats();
begin
DebugNote('[RND] Cycling Chats');
Chatbox.ClickTab(ctAll);
Wait(1000,2500);
Chatbox.ClickTab(ctGame);
Wait(1000,2500);
Chatbox.ClickTab(ctPublic);
Wait(1000,2500);
Chatbox.ClickTab(ctPrivate);
Wait(1000,2500);
Chatbox.ClickTab(ctClan);
Wait(1000,2500);
Chatbox.ClickTab(ctTrade);
end;
procedure TAntiban.OptionsDisplayTab();
begin
DebugNote('[RND] Clicking Options Display Tab');
if not Gametabs.IsOpen(tabOptions) then
begin
Gametabs.Open(tabOptions);
Wait(2000,4500);
end;
Options.SetCurrentTab(optDisplay);
end;
procedure TAntiban.OptionsAudioTab();
begin
DebugNote('[RND] Clicking Options Audio Tab');
if not Gametabs.IsOpen(tabOptions) then
begin
Gametabs.Open(tabOptions);
Wait(2000,4500);
end;
Options.SetCurrentTab(optAudio);
end;
procedure TAntiban.OptionsChatTab();
begin
DebugNote('[RND] Clicking Options Chat Tab');
if not Gametabs.IsOpen(tabOptions) then
begin
Gametabs.Open(tabOptions);
Wait(2000,4500);
end;
Options.SetCurrentTab(optChat);
end;
procedure TAntiban.OptionsControlsTab();
begin
DebugNote('[RND] Clicking Options Controls Tab');
if not Gametabs.IsOpen(tabOptions) then
begin
Gametabs.Open(tabOptions);
Wait(2000,4500);
end;
Options.SetCurrentTab(optControls);
end;
procedure TAntiban.MouseOffLeft();
begin
DebugNote('[RND] Mouse Off Client Left');
srl.MouseOffClient(2);
end;
procedure TAntiban.MouseOffRight();
begin
DebugNote('[RND] Mouse Off Client Right');
srl.MouseOffClient(3);
end;
procedure TAntiban.MouseOffDown();
begin
DebugNote('[RND] Mouse Off Client Down');
srl.MouseOffClient(1);
end;
procedure TAntiban.MouseOffUp();
begin
DebugNote('[RND] Mouse Off Client Up');
srl.MouseOffClient(0);
end;
procedure TMouse.WindMouse2(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: Double; Scrolls: Int32);
var
veloX, veloY, windX, windY, veloMag, dist, randomDist, step, maxStepStart: Double;
lastX, lastY: Int32;
sqrt2, sqrt3, sqrt5: Double;
T: UInt64;
Done: Boolean;
begin
maxStepStart := maxStep;
sqrt2 := sqrt(2);
sqrt3 := sqrt(3);
sqrt5 := sqrt(5);
T := GetTickCount() + 15000;
while Hypot(xs - xe, ys - ye) > 1 do
begin
if Random(2) = 1 then
Self.Scroll(Scrolls, false);
if (GetTickCount() > T) then
RaiseException('Mouse timed out');
if (@OnMoving <> nil) then
begin
OnMoving(@Self, xe, ye, Done);
if Done then
Exit;
dist := Hypot(xs - xe, ys - ye);
if (dist <= 1) then
Break;
if (dist > maxStepStart / 2) then
maxStep := maxStepStart;
end else
dist := Hypot(xs - xe, ys - ye);
wind := MinE(wind, dist);
if dist >= targetArea then
begin
windX := windX / sqrt3 + (Random(Round(wind) * 2 + 1) - wind) / sqrt5;
windY := windY / sqrt3 + (Random(Round(wind) * 2 + 1) - wind) / sqrt5;
end else
begin
windX := windX / sqrt2;
windY := windY / sqrt2;
if (maxStep < 3) then
maxStep := Random(3) + 3.0
else
maxStep := maxStep / sqrt5;
end;
veloX := veloX + windX;
veloY := veloY + windY;
veloX := veloX + gravity * (xe - xs) / dist;
veloY := veloY + gravity * (ye - ys) / dist;
if (Hypot(veloX, veloY) > maxStep) then
begin
randomDist := maxStep / 2.0 + Random(round(maxStep) div 2);
veloMag := sqrt(veloX * veloX + veloY * veloY);
veloX := (veloX / veloMag) * randomDist;
veloY := (veloY / veloMag) * randomDist;
end;
lastX := Round(xs);
lastY := Round(ys);
xs := xs + veloX;
ys := ys + veloY;
if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
Self.SetPosition(Point(Round(xs), Round(ys)));
step := Hypot(xs - lastX, ys - lastY);
Wait(Round((maxWait - minWait) * (step / maxStep) + minWait));
if Random(4) = 1 then
Self.Scroll(Scrolls, true);
end;
Self.SetPosition(Point(Round(xe), Round(ye)));
end;
procedure TMouse.Move2(P: TPoint);
var
randSpeed: Double;
begin
randSpeed := (Random(Self.Speed) / 2.0 + Self.Speed) / 10.0;
Self.WindMouse2(Self.GetPosition().X, Self.GetPosition().Y, P.X, P.Y, Self.Gravity, Self.Wind,
10.0 / randSpeed, 15.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed, Random(10));
end;
procedure TAntiban.RandomZoom();
var
P: TPoint;
B: TBox;
begin
DebugNote('[RND] Random Zoom');
B := MainScreen.GetBounds();
P.X := RandomRange(B.X1, B.X2);
P.Y := RandomRange(B.Y1, B.Y2);
Mouse.Move2(P);
P.X := RandomRange(B.X1, B.X2);
P.Y := RandomRange(B.Y1, B.Y2);
Mouse.Move2(P);
Wait(1000,5000);
Mouse.Scroll(20, true);
end;