Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program FNmZ;
- {$DEFINE SMART8}
- {$I SRL-OSR/SRL.Simba}
- {$I SRL-OSR/SRL/Reflection/Reflection.simba}
- {$i SRL-OSR\SRL\misc\debug.simba}
- {$i SRL-OSR\SRL\misc\SmartGraphics.simba}
- {$I F_AntiRandoms.simba}
- var
- Str1,Att1,Def1,Hp1: integer;
- PointInsideCave: tpoint;
- CaveBottomRight, CavetopRight, Cavebottomleft, Cavetopleft: tpoint;
- const
- bankpin = '/'; // your bank pin.
- TermCheck = true; // Terminate if lost?.
- Absorbs = '36'; // How many Absorb potions to withdraw? put 0 if no absorbs.
- Overloads = '72'; // How many overloads to Draw?.
- // MeleePrayer = False; // Do you want to use Melee prayers?.
- procedure playerSetup;
- begin
- HowManyPlayers := 1;
- NumberOfPlayers(HowManyPlayers);
- CurrentPlayer := 0;
- Players[0].Name := '/';
- Players[0].Pass := '/';
- Players[0].Nick := '/';
- Players[0].Active := True;
- 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(4500, 5000));
- 451..570: Wait(RandomRange(5000, 5200));
- 571..590: Wait(RandomRange(5200, 5500));
- 591..600: Wait(RandomRange(5500, 6000));
- 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 FindALlrandoms;
- begin
- R_FindNormalRandoms;
- FindNonInventoryRandoms;
- FindNormalRandoms;
- 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 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 GraboriginalExp;
- begin
- writeln('we started the script loggedin.. Grabbing original exp for progress report!');
- Att1 := R_GetSkillExp(SKILL_ATTACK);
- Def1 := R_GetSkillExp(SKILL_DEFENCE);
- Str1 := R_GetSkillExp(SKILL_STRENGTH);
- Hp1 := R_GetSkillExp(SKILL_HITPOINTS);
- end;
- procedure ProgressReport;
- var
- timegone,Att2,Def2,Str2,Hp2,HpPerHour,DefPH,AttPh,StrPh:integer;
- begin
- if (not (loggedin)) then
- exit;
- ClearDebug;
- timegone := (GetTimeRunning/1000);
- Att2 := (R_GetSkillExp(SKILL_ATTACK) - Att1);
- Def2 := (R_GetSkillExp(SKILL_DEFENCE) - Def1);
- Str2 := (R_GetSkillExp(SKILL_STRENGTH) - str1);
- Hp2 := (R_GetSkillExp(SKILL_HITPOINTS) - Hp1);
- HpPerHour := (3600*(Hp2))/((timegone));
- AttPh := (3600*(Att2))/((timegone));
- StrPh := (3600*(STr2))/((timegone));
- DefPh := (3600*(Def2))/((timegone));
- WriteLn('* NMZ');
- WriteLn('* Runtime: ' + TimeRunning);
- Writeln('*');
- writeln('* Att EXP Gained: ' + IntToStr(Att2) + ' Att Exp P/H: ' + IntToStr(Attph));
- writeln('* Str ExP Gained: ' + IntToStr(Str2) + ' str Exp P/H: ' + IntToStr(StrPh));
- writeln('* Def ExP Gained: ' + IntToStr(Def2) + ' Def Exp P/H: ' + IntToStr(DefPh));
- writeln('* Hp ExP Gained: ' + IntToStr(Hp2) + ' Hp Exp P/H: ' + IntToStr(Hp2));
- end;
- procedure loginloop;
- 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;
- MakeCompass('n');
- setangle(0);
- exit;
- end;
- end;
- function HpLevel: integer;
- var
- s: string;
- CurrentHpLevel: integer;
- begin
- s := GetTextAtExWrap(520, 50, 540, 70, 0, 5, 1, 65280, 0, statchars07);
- CurrentHpLevel := StrToIntDef(GetNumbers(s), - 1);
- if (CurrentHpLevel > 0) then
- begin
- result := CurrentHpLevel
- end;
- end;
- function PrayerLevel: integer;
- var
- s: string;
- CurrentHpLevel: integer;
- begin
- s := GetTextAtExWrap(520, 90, 540, 115, 0, 5, 1, 65280, 0, statchars07);
- CurrentHpLevel := StrToIntDef(GetNumbers(s), - 1);
- if (CurrentHpLevel > 0) then
- begin
- result := CurrentHpLevel
- end;
- end;
- function AbsorPoints: integer;
- var
- s: string;
- CurrentHpLevel: integer;
- begin
- s := GetTextAtExWrap(20, 35, 60, 60, 0, 5, 1, 16777215, 0, NMZ);
- CurrentHpLevel := StrToIntDef(GetNumbers(s), - 1);
- if (CurrentHpLevel > 0) then
- begin
- result := CurrentHpLevel
- end;
- end;
- function FindObject(Color: TintegerArray; Tol, CTS: integer; hMoD, sMoD: extended; split, sort: integer; Uptext: array of string; WaitUptextWait, WaitUptextRandom: Integer; x, y, xs, ys: integer): boolean;
- var
- III, i, tmpcts: integer;
- TPA: tpointarray;
- TPAA: T2DPointArray;
- begin
- if (not (loggedin)) then
- exit;
- gametab(tab_inv);
- tmpcts := GetColorToleranceSpeed;
- ColorToleranceSpeed(CTS);
- SetColorSpeed2Modifiers(hMoD, SMoD);
- FindColorsSpiralTolerance(MSCX, MSCY, TPA, color[III], x, y, xs, ys, Tol) ColorToleranceSpeed(tmpCTS);
- SetColorSpeed2Modifiers(0.2, 0.2);
- SplitTPAWrap(TPA, split, TPAA);
- SortATPAFromSize(TPAA, sort, true);
- for I := 0 to High(TPAA) do
- begin
- MiddleTPAEx(TPAA[i], X, Y);
- MMouse(x, y, RandomRange( - 3, 3), RandomRange( - 3, 3));
- if WaitUpTextMulti2(uptext, WaitUptextWait + random(WaitUptextRandom)) then
- begin
- Result := True;
- break;
- end;
- break;
- end;
- end;
- function InsideCave: boolean;
- var
- TPA: TpointArray;
- begin
- if (not (loggedin)) then
- exit;
- FindColorsTolerance(TPA, 0, MMX1, MMY1, MMX2, MMY2, 0);
- if (Length(TPA) > 0) then
- begin
- result := true;
- end;
- end;
- procedure clickoverload;
- begin
- if not loggedin then
- exit;
- if not insidecave then
- exit;
- writeln('we are here1');
- gametab(tab_inv);
- if FindObject([921106], 1, 2, 0.00, 3.41, 1, 1, ['Drink', 'rink', 'verload', 'Overload'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
- clickmouse2(mouse_left);
- wait(randomrange(5000, 10000));
- end;
- procedure clickAbsorp;
- begin
- if not loggedin then
- exit;
- if not insidecave then
- exit;
- gametab(tab_inv);
- if FindObject([11248528], 15, 2, 0.05, 0.27, 1, 1, ['Drink', 'rink', 'Absoprtion', 'bsorption'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
- clickmouse2(mouse_left);
- if FindObject([11248528], 15, 2, 0.05, 0.27, 1, 1, ['Drink', 'rink', 'Absoprtion', 'bsorption'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
- clickmouse2(mouse_left);
- if FindObject([11248528], 15, 2, 0.05, 0.27, 1, 1, ['Drink', 'rink', 'Absoprtion', 'bsorption'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
- clickmouse2(mouse_left);
- end;
- function Ispraying: Boolean;
- var
- overhead: tpointarray;
- begin
- if (not (loggedin)) then
- exit;
- result := (FindColorsTolerance(Overhead, 63226, MSX1, MSY1, MSX2, MSY2, 10) or FindColorsTolerance(Overhead, 621348, MSX1, MSY1, MSX2, MSY2, 10))
- end;
- function Clickobject(Objpoint: tpoint; Uptext: TStringArray; MaxDistance,RunOffSetX,RunOffsetY:integer): Boolean;
- var
- Bp, Booth: TPoint;
- begin
- if (not LoggedIn) then
- Exit;
- if R_DistanceFromTile(Objpoint) > MaxDistance then
- begin
- Bp.x := Objpoint.x + RunOffsetX;
- Bp.Y := Objpoint.y - RunOffsetY;
- R_WalkPath([Bp]);
- waithumanclick2;
- end;
- if R_DistanceFromTile(Objpoint) < 5 then
- begin
- Booth := R_TileToMS(ObjPoint);
- MMouse(Booth.X, Booth.Y, 2, 2);
- Sleep(100 + Random(100));
- if (R_IsUpTextMulti(Uptext)) then
- begin
- result := true;
- end;
- end;
- end;
- function MMouseObject(Objpoint: tpoint; Uptext: TStringArray): Boolean;
- var
- Booth: TPoint;
- begin
- if (not LoggedIn) then
- Exit;
- Booth := R_TileToMS(ObjPoint);
- MMouse(Booth.X, Booth.Y, 2, 2);
- Sleep(100 + Random(100));
- if (R_IsUpTextMulti(Uptext)) then
- begin
- result := true;
- end;
- end;
- function LocateNPC(Name, Uptext: string): boolean;
- var
- Bp, Tp: Tpoint;
- NpcName: tnpc;
- begin
- if R_FindNpc(Name, NpcName) then
- begin
- if NpcName.InCombat then
- exit;
- Tp := NpcName.Tile;
- if R_DistanceFromTile(Tp) > 3 then
- begin
- Bp.x := Tp.x + 1;
- Bp.Y := Tp.y - 1;
- R_WalkPath([Bp]);
- waithumanclick2;
- end;
- if R_DistanceFromTile(tp) < 5 then
- begin
- Tp := R_TileToMs(Tp);
- Mmouse(Tp.x, Tp.y, 0, 0);
- if R_WaitUptext(Uptext, 200) then
- begin
- result := true;
- end;
- end;
- end;
- end;
- function ShopScreenS: Boolean;
- begin
- if not loggedin then exit;
- Result := (FindTextTPA(2070783, 10, 22, 30, 476, 52, 'Store', 'UpChars07', Nothing) or (GetColor(482, 36) = 65536));
- end;
- function PointCount(): integer;
- var
- s: string;
- Points: integer;
- begin
- if not loggedin then
- exit;
- if not shopscreens then
- exit;
- wait(randomrange(200, 400));
- s := GetTextAtExWrap(327, 55, 450, 82, 0, 5, 1, 2070783, 0, SmallChars07);
- Points := StrToIntDef(GetNumbers(s), - 1);
- if (Points > 0) then
- begin
- points := result;
- end;
- end;
- function Absorbed: boolean;
- begin
- if not loggedin then
- exit;
- if not insidecave then
- exit;
- result := FindTextTPAMulti(2070783, 0, MSX1, MSY1, MSX2, MSY2, ['Absorption'], StatChars07, nothing);
- end;
- procedure clickCoffer;
- begin
- if not loggedin then exit;
- if Clickobject(point(2607, 3114), ['Unlock'],4,1,-1) then
- begin
- writeln('clicking coffer');
- FindALlrandoms;
- waithumanclick;
- clickmouse2(mouse_left);
- waithumanclick2;
- if pinscreen then
- begin
- InPin(bankpin);
- end;
- end;
- end;
- procedure outsideloop;
- begin
- if not loggedin then
- exit;
- FindALlrandoms;
- MakeCompass('n');
- SetAngle(0);
- writeln('we are outside NMZ...');
- clickCoffer;
- writeln('going for vial..');
- if Clickobject(point(2605, 3117), ['Empty'],4,0,-1) then
- begin
- writeln(' Vial is empty');
- MakeCompass('n');
- SetAngle(0);
- writeln('going for chest to buy potions');
- if Clickobject(point(2609, 3119), ['chest'],4,-1,-2) then
- begin
- writeln(' clicking chest');
- FindALlrandoms;
- waithumanclick;
- clickmouse2(mouse_left);
- waithumanclick2;
- if pinscreen then
- begin
- writeln(' entering pin');
- InPin(bankpin);
- end;
- waithumanclick2;
- if ShopScreenS then
- begin
- mouse(250, 70, 3, 3, mouse_left);
- WaitHumanClick;
- mouse(185, 185, 3, 3, mouse_right);
- WaitHumanClick;
- WaitOptionMulti(['Buy-X'], 500);
- WaitHumanClick2;
- if FindNPCChatTextMulti(['Enter amount', 'Enter', 'nter', 'amount', 'mount'], nothing) then
- TypeSendEx(Overloads, true);
- waithumanclick;
- mouse(255, 188, 3, 3, mouse_right);
- WaitHumanClick;
- WaitOptionMulti(['Buy-X'], 500);
- WaitHumanClick2;
- if FindNPCChatTextMulti(['Enter amount', 'Enter', 'nter', 'amount', 'mount'], nothing) then
- TypeSendEx(Absorbs, true);
- if ShopScreens then
- mouse(randomrange(486, 487), randomrange(40, 41), 0, 0, mouse_left);
- FindALlrandoms;
- end;
- end;
- if (R_InvCount2 <= 28) then
- begin
- MakeCompass('w');
- writeln(' we dont have overloads');
- if Clickobject(point(2600, 3116), ['Overload'],4,1,0) then
- begin
- FindALlrandoms;
- writeln(' getting overloads');
- if FindObject([921106], 1, 2, 0.00, 3.41, 1, 1, ['Drink', 'rink', 'verload', 'Overload'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
- begin
- writeln('we have overloads in inv, storing them');
- if Clickobject(point(2600, 3116), ['Overload'],4,1,0) then
- clickmouse2(mouse_right);
- waithumanclick;
- WaitOptionMulti(['Store', 'tore'], 3000);
- waithumanclick;
- if FindNPCChatTextMulti(['please'], clickleft) then
- writeln('we clicked yes to store overloads');
- waithumanclick2;
- end;
- if Clickobject(point(2600, 3116), ['Overload'],4,1,0) then
- clickmouse2(mouse_right);
- WaitOptionMulti(['Take'], 3000);
- WaitHumanClick2;
- if FindNPCChatTextMulti(['Many', 'any'], move) then
- TypeSendEx(Overloads, true);
- WaitHumanClick2;
- end;
- end;
- if (R_InvCount2 < 28) then
- begin
- MakeCompass('w');
- writeln(' we dont have absorbs');
- if Clickobject(point(2600, 3117), ['Absorption'],4,1,0) then
- begin
- FindALlrandoms;
- writeln(' getting absorb');
- MakeCompass('w');
- if FindObject([10852996], 20, 2, 0.03, 0.35, 1, 1, ['Drink', 'rink', 'verload', 'Overload'], 300, 150, MIX1, MIY1, MIX2, MIY2) then
- begin
- writeln('we have absorbs in inv, storing them');
- if Clickobject(point(2600, 3117), ['Absorption'],4,1,0) then
- clickmouse2(mouse_right);
- WaitOptionMulti(['Store', 'tore'], 3000);
- WaitHumanClick2;
- if FindNPCChatTextMulti(['please'], clickleft) then
- writeln('we clicked yes to store absorp');
- waithumanclick2;
- end;
- if Clickobject(point(2600, 3117), ['Absorption'],4,1,0) then
- clickmouse2(mouse_right);
- WaitOptionMulti(['Take'], 3000);
- WaitHumanClick2;
- if FindNPCChatTextMulti(['Many', 'any'], move) then
- TypeSendEx(Absorbs, true);
- WaitHumanClick2;
- writeln(' failed to withdraw absorbs');
- end;
- end;
- if LocateNPC('Dominic', 'Dominic') then
- begin
- FindALlrandoms;
- writeln(' finding dominic and starting dream');
- waithumanclick;
- ClickMouse2(mouse_right);
- WaitOptionMulti(['Dream', 'ream'], 500);
- waithumanclick2;
- if FindTextTPA(ClBlack, 30, MCX1, MCY1, MCX2, MCY2, 'umble', CharsNPC07, Nothing) then
- begin
- mouse(260, 445, 2, 2, mouse_left);
- waithumanclick;
- ClickToContinue;
- waithumanclick;
- mouse(260, 402, 2, 2, mouse_left);
- waithumanclick;
- ClickToContinue;
- end;
- end;
- end;
- if Clickobject(point(2605, 3117), ['Potion'],4,0,-1) then
- begin
- FindALlrandoms;
- writeln(' our dream is ready, starting');
- clickmouse2(mouse_left);
- waithumanclick2;
- if FindObject([4027591], 25, 2, 0.04, 0.79, 1, 1, ['Continue'], 300, 150, 420, 260, 460, 380) then
- begin
- clickmouse2(mouse_left);
- writeln(' waiting 10...10 seconds');
- wait(randomrange(6000, 8000));
- writeln(' getting our position');
- PointInsideCave := R_GetTileGlobal;
- writeln(' mapping our 44X44 area');
- Cavebottomleft.x := PointInsideCave.x - 44;
- Cavebottomleft.y := PointInsideCave.y - 4;
- Cavetopleft.x := PointInsideCave.X - 44;
- Cavetopleft.y := PointInsideCave.Y + 44;
- CaveBottomRight.x := PointInsideCave.X + 44;
- CaveBottomRight.y := PointInsideCave.Y - 4;
- CavetopRight.x := PointInsideCave.X + 44;
- CavetopRight.y := PointInsideCave.y + 44;
- end;
- end;
- end;
- procedure WaitShortClick;
- begin
- if (not (loggedin)) then
- exit;
- 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 WaitShortClick2;
- begin
- if (not (loggedin)) then
- exit;
- case random(600) of
- 1..450: Wait(RandomRange(400, 450));
- 451..570: Wait(RandomRange(450, 500));
- 571..590: Wait(RandomRange(500, 550));
- 591..600: Wait(RandomRange(550, 600));
- end;
- end;
- function HoverNearbyNpc: boolean;
- var
- I: Tpointarray;
- P: Integer;
- begin
- if (not (loggedin)) then
- exit;
- I := GetMiniMapDots('npc');
- if (length(I) > 0) 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 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;
- procedure Antiban;
- begin
- if (not (loggedin)) then
- exit;
- case random(100) of
- 0..56:
- begin
- end;
- 57..100:
- begin
- case random(150) of
- 10: hoverskill(skill_magic, false);
- 15: 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: MissMouse(250, 250);
- 150: RandomMovement;
- 160: CompassMovement(240, 300, true);
- 170: AdjustMouseSpeed(3, 10, 20);
- 180: RandomFKeys(true);
- 190: RandomTab(true);
- end;
- end;
- end;
- end;
- procedure idle;
- var
- HpBarOutside, t: integer;
- begin
- writeln('entered idle mode..');
- marktime(t);
- HpBarOutside := randomrange(8000, 10000);
- repeat
- wait(400);
- if not InsideCave then
- exit;
- if not loggedin then
- exit;
- if R_InFight then
- exit;
- until (TimeFromMark(T) >= HpBarOutside) if (TimeFromMark(T) >= HpBarOutside) then
- begin
- writeln('we entered idling methhod, spinning camera and shit');
- antiban;
- end;
- end;
- procedure InsideCaveloop;
- var
- MeInCave, myposinsidecave: tpoint;
- begin
- if not loggedin then
- exit;
- if not InsideCave then
- exit;
- writeln('we are inside cave!');
- if R_inPolygon([CavetopRight, CaveBottomRight, Cavebottomleft, Cavetopleft]) then
- begin
- writeln(' our area mapped correctly, to 44x44 (i know its 40x40)');
- MeInCave := R_GetTileGlobal;
- writeln(meincave);
- if not (MeInCave.x = PointInsideCave.x + 4) then
- begin
- myposinsidecave.x := PointInsideCave.x + 5;
- myposinsidecave.y := PointInsideCave.y - 1;
- writeln(myposinsidecave) writeln(PointInsideCave);
- FindALlrandoms;
- WaitHumanClick2;
- FindALlrandoms;
- MeInCave := R_GetTileGlobal;
- r_walkpath([myposinsidecave]);
- waithumanclick2;
- MeInCave := R_GetTileGlobal;
- writeln(meincave);
- if (MeInCave.x = PointInsideCave.x + 4) then
- begin
- writeln('we got ot the good juciyt spot!');
- repeat
- WaitHumanClick;
- if not loggedin then
- exit;
- if not InsideCave then
- exit;
- progressreport;
- FindALlrandoms;
- if (HpLevel >= 49) then
- clickoverload;
- if (not Absorbed) then
- begin
- writeln('we dont have absorb colors clicking absorb!');
- ClickAbsorp;
- waithumanclick;
- ClickAbsorp;
- waithumanclick;
- end;
- if (AbsorPoints <= randomrange(500, 700)) then
- clickAbsorp;
- if not R_InFight then
- idle;
- until (not InsideCave);
- end;
- end;
- end
- else
- begin
- writeln('we have started the script while inside the cave, taking our current position as Safe spot/default area as the cave parts');
- repeat
- WaitHumanClick;
- if not loggedin then
- exit;
- if not InsideCave then
- exit;
- progressreport;
- FindALlrandoms;
- if (HpLevel >= 49) then
- clickoverload;
- if (not Absorbed) then
- begin
- writeln('we dont have absorb colors clicking absorb!');
- ClickAbsorp;
- waithumanclick;
- ClickAbsorp;
- waithumanclick;
- ClickAbsorp;
- waithumanclick;
- ClickAbsorp;
- waithumanclick;
- end;
- if (AbsorPoints <= randomrange(500, 700)) then
- clickAbsorp;
- if not R_InFight then
- idle;
- until (not InsideCave);
- if not InsideCave then
- exit;
- if not loggedin then
- exit;
- end;
- end;
- procedure Termination(const Status: string);
- begin
- if (TermCheck = false) then
- exit;
- writeln(Status);
- if loggedin then
- begin
- if WaitFunc(@ LogOut, 500, RandomRange(8000, 20000)) then
- terminatescript
- else
- terminatescript;
- end
- else
- terminatescript;
- end;
- function LogMeOut: boolean;
- begin
- writeln('Logging out..');
- if WaitFunc(@ LogOut, 500, RandomRange(8000, 20000)) then
- begin
- writeln('We have managed to log out');
- result := true;
- end
- else
- termination('We have failed to log out, ending script');
- end;
- procedure mainloop;
- var
- t: integer;
- begin
- if not loggedin then
- exit;
- FindALlrandoms;
- if (not InsideCave) and (not R_inPolygon([point(2630, 3122), point(2630, 3110), point(2598, 3110), point(2598, 3122)])) then
- begin
- writeln('we were lost, ending script');
- terminatescript;
- end;
- if R_inPolygon([point(2620, 3122), point(2620, 3110), point(2598, 3110), point(2598, 3122)]) then
- Outsideloop;
- if InsideCave then
- InsideCaveloop;
- if (not InsideCave) and loggedin then
- begin
- MarkTime(t)
- repeat
- WaitHumanClick;
- if not loggedin then exit;
- if insidecave then exit;
- FindALlrandoms;
- if (R_inPolygon([point(2630, 3122), point(2630, 3110), point(2598, 3110), point(2598, 3122)])) then
- exit;
- writeln('we are lost.. waiting a bit if still lost then ending script');
- until (TimeFromMark(T) < 15000) writeln('we were lost, ending script');
- if (timefrommark(t) > 15000) then
- begin
- if logmeout then
- terminatescript;
- end;
- end;
- end;
- procedure test1;
- begin
- if FindNPCChatTextMulti([''], move) then
- writeln('we did that');
- end;
- begin
- playerSetup;
- setupsrl;
- SetupReflection;
- SRL_CombatRandoms := False;
- R_CombatRandoms := false;
- R_Reincarnate := true;
- if loggedin then
- graboriginalexp;
- if not loggedin then
- writeln('we didnt grab original exp, please start the script while you are loggedin');
- addonterminate('progressreport');
- repeat
- if not loggedin then
- loginloop;
- wait(400);
- if loggedin then
- mainloop;
- until (false);
- end.
Advertisement
Add Comment
Please, Sign In to add comment