Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program FHobs;
- {$DEFINE SMART8}
- {$I SRL-OSR/SRL.Simba}
- {$I SRL-OSR/SRL/misc/al_functions.simba}
- {$I SRL-OSR/SRL/core/antirandoms/C_AntiRandoms.simba}
- {$I SRL-OSR/SRL/Reflection/Reflection.simba}
- var
- myloc: tpoint;
- cx, cy: integer;
- procedure playerSetup;
- begin
- HowManyPlayers := 1;
- NumberOfPlayers(HowManyPlayers);
- CurrentPlayer := 0;
- Players[0].Name := '';
- Players[0].Pass := '';
- Players[0].Nick := '';
- Players[0].Active := True;
- end;
- procedure WaitShortClick;
- begin
- case random(600) of
- 1..450: Wait(RandomRange(100, 150));
- 451..570: Wait(RandomRange(150, 200));
- 571..590: Wait(RandomRange(200, 250));
- 591..600: Wait(RandomRange(250, 400));
- end;
- end;
- procedure Keyboards;
- begin
- case random(5) of
- 0..2:
- begin
- KeyDown(37);
- WaitShortClick KeyUp(37);
- WaitShortClick KeyDown(40);
- WaitShortClick KeyUp(40);
- end;
- 3..4:
- begin
- KeyDown(39);
- WaitShortClick KeyUp(39);
- WaitShortClick KeyDown(38);
- WaitShortClick KeyUp(38);
- end;
- 5:
- begin
- KeyDown(38);
- WaitShortClick KeyUp(38);
- WaitShortClick KeyDown(39);
- WaitShortClick KeyUp(39);
- end;
- end;
- end;
- function HoverNearbyNpc: boolean;
- var
- I: Tpointarray;
- P: Integer;
- begin
- I := GetMiniMapDots('npc');
- if (length(I) > 6) then
- begin
- SortTPAFrom(i, Point(MMCX, MMCY));
- P := random(length(I)) Mmouse(I[0].x, I[0].y, 3, 3);
- result := true;
- end;
- end;
- procedure Antiban;
- begin
- case random(140) of
- 0..2: hoverskill(skill_hitpoints, false);
- 3..7.: HoverSkill(skill_strength, False);
- 12..15: hoverskill(skill_attack, false);
- 16..19: HoverOnlineFriend;
- 20: BoredHuman;
- 30: MMouseOffClient('top');
- 40: MMouseOffClient('left');
- 50: MMouseOffClient('right');
- 60: MMouseOffClient('bottom');
- 70: SmallRandomMouse;
- 80: RandomAngle(1);
- 90: RandomAngle(2);
- 100: PickUpMouse;
- 110: CompassMovement(10, 70, true);
- 120: HoverNearbyNpc;
- 130: Keyboards;
- 140: writeln('hi');
- end;
- end;
- procedure SecondAntiban2;
- begin
- case random(20) of
- 1: PickUpMouse;
- 2: BoredHuman;
- 3: MMouseOffClient('left');
- 4: MMouseOffClient('right');
- 5: MMouseOffClient('bottom');
- 6: SmallRandomMouse;
- 7: boredhuman;
- 8: SmallRandomMouse;
- 10: keyboards;
- end;
- end;
- function OnCanoeScreen: boolean;
- var
- Monster: TpointArray;
- TmpCts: Integer;
- begin
- tmpcts := GetColorToleranceSpeed;
- ColorToleranceSpeed(2);
- SetColorSpeed2Modifiers(1.86, 0.72);
- result := FindColorsTolerance(Monster, 5263430, 275, 106, 400, 205, 3);
- ColorToleranceSpeed(tmpcts);
- SetColorSpeed2Modifiers(0.2, 0.2);
- end;
- function OnFloatScreen: boolean;
- var
- Monster: TpointArray;
- TmpCts: Integer;
- begin
- tmpcts := GetColorToleranceSpeed;
- ColorToleranceSpeed(2);
- SetColorSpeed2Modifiers(0.34, 0.32);
- result := FindColorsTolerance(Monster, 4223577, MSX1, MSY1, MSX2, MSY2, 1);
- ColorToleranceSpeed(tmpcts);
- SetColorSpeed2Modifiers(0.2, 0.2);
- end;
- procedure MMouseRandom(x, y: integer);
- var
- Cx, Cy: Integer;
- begin
- GetMousePos(Cx, Cy);
- AL_SetMouseSpeed(20);
- case Random(5) of
- 0: AL_BrakeWindMouse(Cx, Cy, x, y, 15 + Random(10), 5 + Random(15), 5, 10, 5, True);
- 1: AL_HumanWindMouse(Cx, Cy, x, y, 15 + Random(10), 5 + Random(15), 5, 10, 5);
- 2: AL_AccurateMMouse(IntToPoint(x, y), 2, 2);
- 3: AL_HumanMMouse(IntToPoint(x, y), 2, 2);
- 4: AL_ShiftWindMouse(Cx, Cy, x, y, 15 + Random(10), 5 + Random(15), 5, 10, 20, 5);
- 5: AL_MissMouse(IntToPoint(x, y), 2, 2);
- end;
- end;
- procedure WaitHumanClick3;
- begin
- case random(600) of
- 1..450: Wait(RandomRange(3000, 5000));
- 451..570: Wait(RandomRange(5000, 5500));
- 571..590: Wait(RandomRange(6000, 6500));
- 591..600: Wait(RandomRange(7000, 7500));
- end;
- end;
- procedure myvars;
- begin
- end;
- procedure DebugPosition;
- begin
- repeat
- wait(400);
- Myloc := R_GetTileGlobal;
- writeln(Myloc);
- until (false);
- end;
- function GetGreenUptext: string;
- var
- WhiteT, BlueT, YellowT, OrangeT, GreenT, FoundText: string;
- begin
- WhiteT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 14541281, 55, 'UpChars07');
- BlueT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 13423640, 65, 'UpChars07');
- YellowT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
- OrangeT := GetTextAtExWrap(35, 8, 300, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
- GreenT := GetTextAtExWrap(8, 8, 300, 21, 0, 5, 1, 120577, 65, 'UpChars07');
- FoundText := WhiteT + ' ' + BlueT + YellowT + OrangeT + GreenT;
- FoundText := ReplaceWrap(FoundText, '.', '', [rfReplaceAll]);
- FoundText := ReplaceWrap(FoundText, '/', '', [rfReplaceAll]);
- FoundText := ReplaceWrap(FoundText, '\', '', [rfReplaceAll]);
- FoundText := ReplaceWrap(FoundText, ',', '', [rfReplaceAll]);
- FoundText := ReplaceWrap(FoundText, '*', '', [rfReplaceAll]);
- FoundText := ReplaceWrap(FoundText, '^', '', [rfReplaceAll]);
- FoundText := ReplaceWrap(FoundText, '"', '', [rfReplaceAll]);
- Result := FoundText;
- end;
- function IsUpTextMultiCustom2(Text: TStringArray): Boolean;
- var
- TheText: string;
- i, n: Integer;
- begin
- TheText := GetGreenUptext;
- n := High(Text);
- for i := 0 to n do
- if (Pos(Text[i], TheText) > 0) then
- begin
- Result := True;
- Exit;
- end;
- end;
- function WaitUpTextMulti2(S: TStringArray; Time: Integer): Boolean;
- var
- T: Integer;
- begin
- Result := false;
- T := GetSystemTime + Time;
- while (GetSystemTime < T) do
- begin
- if (IsUpTextMultiCustom2(S)) then
- begin
- Result := True;
- Exit;
- end;
- Wait(20 + Random(20));
- end;
- end;
- function FindObjExX(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tol, CTS: integer; Hue, Sat: Extended; Step, xs, ys, xe, ye: Integer): Boolean;
- var
- MidX, MidY, i, j, k, x, y, width, height, HalfWidth, HalfHeight: Integer;
- ColorFound: Boolean;
- SearchBoxes: array of array of TBox;
- p: TPointArray;
- begin
- if (not (loggedin)) then
- exit;
- if R_IsAnimating then
- exit;
- Result := False;
- for i := 0 to (GetArrayLength(Color) - 1) do
- begin
- ColorToleranceSpeed(CTS);
- SetColorSpeed2Modifiers(Hue, sat);
- if (FindColorSpiralTolerance(cx, cy, Color[i], xs, ys, xe, ye, Tol)) then
- begin
- ColorToleranceSpeed(1);
- SetColorSpeed2Modifiers(0.2, 0.2);
- ColorFound := True;
- Break;
- end;
- end;
- ColorToleranceSpeed(1);
- SetColorSpeed2Modifiers(0.2, 0.2);
- if R_IsAnimating then
- exit;
- if not (ColorFound) then
- Exit;
- MidX := Round((xe - xs) / 2);
- MidY := Round((ye - ys) / 2);
- Width := Ceil(abs(xe - xs) / 2 / Step - 0.5) * 2 + 1;
- Height := Ceil(abs(ye - ys) / 2 / Step - 0.5) * 2 + 1;
- SetLength(SearchBoxes, Width);
- HalfWidth := Floor(Width / 2);
- HalfHeight := Floor(Height / 2) for x := - 1 * HalfWidth to HalfWidth do
- begin
- SetLength(SearchBoxes[x + HalfWidth], Height);
- for y := - 1 * HalfHeight to HalfHeight do
- SearchBoxes[x + HalfWidth][y + HalfHeight] := IntToBox(Max(xs, xs + Round(MidX + ((x - 0.5) * Step))), Max(ys, ys + Round(MidY + ((y - 0.5) * Step))), Min(xe, xs + Round(MidX + ((x + 0.5) * Step))), Min(ye, ys + Round(MidY + ((y + 0.5) * Step))));
- end;
- p := TPAFromBox(IntToBox(0, 0, Width - 1, Height - 1));
- SortTPAFrom(p, Point(floor(Width / 2), floor(Height / 2)));
- for k := 0 to High(Color) do
- for j := 0 to High(p) do
- begin
- ColorToleranceSpeed(CTS);
- SetColorSpeed2Modifiers(Hue, sat);
- if (FindColorTolerance(cx, cy, Color[k], SearchBoxes[p[j].x][p[j].y].x1, SearchBoxes[p[j].x][p[j].y].y1, SearchBoxes[p[j].x][p[j].y].x2, SearchBoxes[p[j].x][p[j].y].y2, Tol)) then
- begin
- ColorToleranceSpeed(1);
- SetColorSpeed2Modifiers(0.2, 0.2);
- if R_IsAnimating then
- exit;
- if OnFloatScreen or OnCanoeScreen then
- exit;
- MMouse(cx, cy, 3, 3);
- wait(randomrange(200, 300));
- if (WaitUptextMulti2(Text, 300)) then
- begin
- ColorToleranceSpeed(1);
- SetColorSpeed2Modifiers(0.2, 0.2);
- GetMousePos(cx, cy);
- Result := True;
- Exit;
- end;
- end;
- ColorToleranceSpeed(1);
- SetColorSpeed2Modifiers(0.2, 0.2);
- end;
- ColorToleranceSpeed(1);
- SetColorSpeed2Modifiers(0.2, 0.2);
- end;
- procedure WaitHumanClick;
- begin
- case random(600) of
- 1..450: Wait(RandomRange(400, 600));
- 451..570: Wait(RandomRange(400, 600));
- 571..590: Wait(RandomRange(600, 800));
- 591..600: Wait(RandomRange(800, 1000));
- end;
- end;
- procedure WaitHumanClick2;
- begin
- case random(600) of
- 1..450: Wait(RandomRange(1000, 1500));
- 451..570: Wait(RandomRange(1500, 2000));
- 571..590: Wait(RandomRange(2000, 2500));
- 591..600: Wait(RandomRange(2500, 3000));
- end;
- end;
- function OpenWScreen: Boolean;
- begin
- Result := False;
- if WorldScreen then
- exit;
- if Loggedin then
- Exit;
- if not WorldScreen then
- begin
- Mmouse(54, 475, 1, 1);
- WaitHumanClick;
- ClickMouse2(Mouse_Left);
- waithumanclick;
- Result := True;
- end;
- end;
- function whitecolor: boolean;
- var
- Monster: TpointArray;
- TmpCts: Integer;
- begin
- tmpcts := GetColorToleranceSpeed;
- ColorToleranceSpeed(2);
- SetColorSpeed2Modifiers(0.22, 1.69);
- result := FindColorsTolerance(Monster, 9163999, 192, 67, 583, 469, 4);
- ColorToleranceSpeed(tmpcts);
- SetColorSpeed2Modifiers(0.2, 0.2);
- end;
- procedure loginloop;
- begin
- case random(10) of
- 0..3:
- begin
- OpenWorldScreen;
- repeat
- if whitecolor then
- break;
- if whitecolor then
- writeln('yeaya');
- if not whitecolor then
- writeln('yea22ya');
- case random(10) of
- 0..2: mouse(randomrange(397, 554), randomrange(78, 394), 1, 1, mouse_move);
- 3..4: mouse(randomrange(298, 462), randomrange(200, 392), 1, 1, mouse_move);
- 5..6: mouse(randomrange(205, 555), randomrange(80, 154), 1, 1, mouse_move);
- 7..10: mouse(randomrange(211, 555), randomrange(246, 367), 1, 1, mouse_move);
- end;
- until (whitecolor) if whitecolor then
- begin
- clickmouse2(mouse_left);
- waithumanclick;
- currentworld;
- waithumanclick;
- if (CurrentWorldLS = 365) then
- exit;
- waithumanclick;
- loginplayer;
- exit;
- end;
- end;
- 4..10: loginplayer;
- end;
- end;
- procedure equipitems;
- var
- i, n: integer;
- begin
- for i := 0 to 5 do
- begin
- MMouseItem(i) if IsUpTextMultiCustom2(['Rune', 'une']) then
- begin
- clickmouse2(mouse_left);
- waithumanclick2;
- end;
- end;
- end;
- function InLumbridge: boolean;
- var
- tpa: tpointarray;
- begin
- result := R_inPolygon([Point(3216, 3228), Point(3226, 3228), Point(3226, 3212), Point(3217, 3209)]);
- end;
- function Atmoss: boolean;
- var
- tpa: tpointarray;
- begin
- result := R_inPolygon([Point(3136, 3787), Point(3151, 3787), Point(3155, 3804), Point(3136, 3804)]);
- end;
- procedure gohobs;
- begin
- writeln('we are going hobs!');
- R_PerfectPath([Point(3141, 3793), Point(3136, 3793), Point(3132, 3789), Point(3128, 3785), Point(3123, 3784), Point(3118, 3782), Point(3114, 3779), Point(3110, 3776), Point(3107, 3772), Point(3105, 3767), Point(3101, 3764), Point(3096, 3763), Point(3091, 3762)]);
- end;
- procedure Gocanoe;
- begin
- writeln('we are canoing');
- equipitems;
- SetFightMode(3);
- MakeCompass(randomrange(355, 35));
- setangle(0);
- R_PerfectPath([Point(3223, 3218), Point(3228, 3218), Point(3232, 3221), Point(3236, 3225), Point(3241, 3226), Point(3246, 3226), Point(3251, 3226), Point(3256, 3227), Point(3253, 3231), Point(3248, 3233)]);
- end;
- function AtCanoe: boolean;
- var
- tpa: tpointarray;
- begin
- result := R_inPolygon([Point(3255, 3225), Point(3235, 3225), Point(3225, 3241), Point(3255, 3241)]);
- end;
- procedure canoeUp;
- var
- IAm: integer;
- begin
- writeln('we are canoing up!');
- FindNormalRandoms;
- FindNonInventoryRandoms;
- if not R_IsAnimating then
- begin
- FindNormalRandoms;
- FindNonInventoryRandoms;
- if R_IsAnimating then
- exit;
- if OnCanoeScreen then
- Mouse(randomrange(185, 400), randomrange(58, 75), randomrange( - 3, 3), randomrange( - 3, 3), mouse_left);
- if OnFloatScreen then
- Mouse(randomrange(218, 225), randomrange(95, 102), randomrange( - 3, 3), randomrange( - 3, 3), mouse_left);
- if not OnCanoeScreen or not OnFloatScreen then
- begin
- FindNormalRandoms;
- FindNonInventoryRandoms;
- if R_IsAnimating then
- exit;
- if (not OnCanoeScreen or not OnFloatScreen) and FindObjExX(cx, cy, ['Station', 'tation'], [205363], 5, 2, 0.15, 2.23, 50, MSX1, MSY1, MSX2, MSY2) then
- Clickmouse2(mouse_left);
- if R_IsAnimating then
- exit;
- if (not OnCanoeScreen or not OnFloatScreen) and FindObjExX(cx, cy, ['Station', 'tation'], [205363], 5, 2, 0.15, 2.23, 50, MSX1, MSY1, MSX2, MSY2) then
- Clickmouse2(mouse_left);
- if R_IsAnimating then
- exit;
- if (not OnCanoeScreen or not OnFloatScreen) and FindObjExX(cx, cy, ['Station', 'tation'], [8503], 2, 2, 0.15, 0.00, 50, MSX1, MSY1, MSX2, MSY2) then
- Clickmouse2(mouse_left);
- end;
- if R_IsAnimating then
- exit;
- end;
- end;
- function AtHobs: boolean;
- var
- tpa: tpointarray;
- begin
- result := R_inPolygon([Point(3106, 3745), Point(3104, 3781), Point(3067, 3779), Point(3067, 3749)]);
- end;
- procedure idle;
- begin
- writeln('we are at hobs, idling');
- FindNormalRandoms FindNonInventoryRandoms;
- if not loggedin then
- exit;
- if not R_WaitForAnimation(randomrange(50000, 180000)) then
- begin
- if not loggedin then
- exit;
- case random(20) of
- 0..8: Antiban;
- 9..20: writeln('not doing antiban');
- end;
- if not loggedin then
- exit;
- case random(3) of
- 1: writeln('doing nothing');
- 2: setangle(0);
- 3: setangle(1);
- end;
- if not loggedin then
- exit;
- case random(10) of
- 1..6: writeln('doing nothingx2');
- 7: MakeCompass('n');
- 8: MakeCompass('s');
- 9: MakeCompass('w');
- 10: MakeCompass('e');
- end;
- if not loggedin then
- exit;
- case random(10) of
- 1..4: R_WebWalk(point(3049, 3764));
- 5..6: R_WebWalk(Point(3088, 3722));
- 7..8: R_WebWalk(point(3131, 3762));
- 9..10: R_WebWalk(Point(3086, 3797));
- end;
- if not loggedin then
- exit;
- r_webwalk(Point(3087, 3763));
- end;
- end;
- procedure mainloop;
- begin
- if not loggedin then
- exit;
- FindNormalRandoms;
- FindNonInventoryRandoms;
- if inLumbridge then
- GoCanoe;
- if AtCanoe then
- Canoeup;
- if AtMoss then
- Gohobs;
- if Athobs then
- idle;
- end;
- begin
- playerSetup;
- setupsrl;
- SetupReflection;
- SRL_CombatRandoms := False;
- repeat
- wait(400);
- if not loggedin then
- loginloop;
- wait(400);
- if loggedin then
- mainloop;
- until (false);
- end.
Advertisement
Add Comment
Please, Sign In to add comment