Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program ScriptSkeleton;
- {$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}
- var
- BankCord, shopcord: tpointarray;
- cx, cy, pizzasbought, potatobought, WorldsHopped: integer;
- Myloc: tpoint;
- Messedup,Failcast,Timer,cast,CaveEntrances: integer;
- TimeTillBreak:string;
- const
- hopworlds = false;
- bankpin = '1345';
- BuysPizza = false;
- BuysPotato = true;
- Breakhandler = true; // Would you want to take breaks?
- BreakTime1 = 45; // Minimum Gameplay time before breaks.
- BreakTime2 = 120; // Maximum Gameplay Time before breaks.
- // Time is in Minutes, not MS.
- BreakWait1 = 15; // For how long to take a break?
- BreakWait2 = 30; // Example 15, 30 will take a break for 15-30 minutes.
- CorkCol = 3831684;
- CorkTol = 16;
- CorkCTS = 2;
- CorkHue = 0.03;
- CorkSat = 0.18;
- MainMouseSpeed = 11;
- procedure playerSetup;
- begin
- HowManyPlayers := 1;
- NumberOfPlayers(HowManyPlayers);
- CurrentPlayer := 0;
- Players[0].Name := '@gmail.com';
- 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(3000, 3500));
- 451..570: Wait(RandomRange(3500, 4000));
- 571..590: Wait(RandomRange(4000, 4500));
- 591..600: Wait(RandomRange(4500, 5000));
- end;
- end;
- procedure StartTime;
- begin
- Timer := GetTimeRunning + RandomRange(BreakTime1 * 60000, BreakTime2 * 60000);
- end;
- procedure takebreaks;
- var
- T,BreakTimer:integer;
- Times:string;
- begin
- if (Breakhandler = false) then exit;
- if (GetTimeRunning >= Timer) then
- begin
- writeln('its time to take a break....');
- BreakTimer := Randomrange(BreakWait1 * 60000, BreakWait2 * 60000);
- Times := (MsToTime(BreakTimer, Time_Formal));
- writeln('Breaking for: ' + Times);
- marktime(t);
- repeat
- findnormalrandoms;
- if srl_infight then
- exit;
- wait(400);
- logout;
- until (not(loggedin));
- if (not(loggedin)) then
- begin
- repeat
- wait(2000);
- until(TimeFromMark(t) >= BreakTimer);
- if (TimeFromMark(T) >= BreakTimer) then
- begin
- StartTime;
- writeln('break time is over, back to the script');
- exit;
- end;
- end;
- 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;
- var
- ResetLoc: tpoint;
- begin
- writeln(myloc);
- ResetLoc := Point(0,0);
- myloc := ResetLoc;
- 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;
- procedure Hi;
- begin
- writeln('hi!');
- 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 ProgressReport;
- var
- Timeleft,XpPerhour,Casts,CastsPH: Integer;
- begin
- if (not(loggedin)) then exit;
- ClearDebug;
- XpPerhour := (3600*(Cast) /((GetTimeRunning/1000)));
- Casts := ((Cast) / (29));
- CastsPH := (3600*(Casts) / ((GetTimeRunning/1000)));
- timeleft := ((Timer) - (GetTimeRunning));
- TimeTillBreak := (MsToTime(timeleft, Time_Formal));
- WriteLn('* HouseCurser v.1.0');
- WriteLn('* Runtime: ' + TimeRunning);
- Writeln('*');
- writeln('* Experience Gained: ' + IntToStr(Cast) + ' Exp P/H: ' + IntToStr(XpPerhour));
- writeln('* Curse Used : ' + IntToStr(Casts) + ' Casts P/h: ' + IntTostr(CastsPH));
- Writeln('* No. Of Times : ' + 'Failed Casting: ' + intTostr(failcast) + ' Messed up: ' + inttostr(messedup) + ' Entered Cave: ' + IntToStr(CaveEntrances));
- Writeln('* Time till break : ' + (TimeTillBreak)) ;
- Writeln('* Post all Bugs/proggies/errors on this topic: http://villavu.com/forum/showthread.php?t=103236');
- 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;
- 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 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);
- 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 TeleportToHouse;
- begin
- if not loggedin then exit;
- gametab(tab_magic);
- waithumanclick;
- MouseBox(610,305,624,313,mouse_left);
- wait(randomrange(10000,15000));
- Myloc := R_GetTileGlobal;
- end;
- procedure loginloop;
- begin
- if (hopworlds = true) then
- 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;
- myvars;
- loginplayer;
- exit;
- end;
- end
- else
- begin
- myvars;
- loginplayer;
- waithumanclick;
- end;
- end;
- function GetHp(): integer;
- var
- s: string;
- PizzaCount: integer;
- begin
- wait(randomrange(200, 400));
- s := GetTextAtExWrap(160, 60, 200, 82, 0, 5, 1, 65535, 0, statchars07);
- PizzaCount := StrToIntDef(GetNumbers(s), - 1);
- writeln(PizzaCount);
- if (PizzaCount > 0) then
- begin
- IncEx(pizzasbought, pizzacount);
- wait(randomrange(200, 300));
- waithumanclick;
- end;
- end;
- Function FindMiniGame:boolean;
- var
- x,y:integer;
- begin
- result := FindSymbol(x, y, 'minigame');
- end;
- function ColorLocate(Var Name: string; Color, Tol, CTS: integer; Hue, Sat: Extended; xs, ys, xe, ye: Integer): boolean;
- var
- Monster: TpointArray;
- TmpCts: Integer;
- begin
- tmpcts := GetColorToleranceSpeed;
- ColorToleranceSpeed(cts);
- SetColorSpeed2Modifiers(Hue, sat);
- result := FindColorsTolerance(Monster, color, xs, ys, xe, ye, Tol);
- ColorToleranceSpeed(tmpcts);
- SetColorSpeed2Modifiers(0.2, 0.2);
- 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); // Object Finder.
- 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 Clickobject(Objpoint: tpoint; Uptext: TStringArray): Boolean;
- var
- Bp, Booth: TPoint;
- begin
- if (not LoggedIn) then
- Exit;
- if (R_DistanceFromTile(Objpoint) > 3) and (R_DistanceFromTile(Objpoint) < 15) then
- begin
- Bp.x := Objpoint.x + 1;
- Bp.Y := Objpoint.y - 1;
- R_WalkPath([Bp]);
- //R_WalkPath([objpoint]);
- 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) and (R_DistanceFromTile(tp) < 15) 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;
- // House spot 7827, 2773
- // 1 step south of orb 7827, 2780
- // orb // orb 7827, 2781 - Activate Elemental balance
- procedure domagics;
- begin
- end;
- function OnRangeScreen:boolean;
- var
- CTS:Integer;
- TPA:Tpointarray;
- begin
- if (not(loggedin)) then exit;
- cts := GetColorToleranceSpeed;
- ColorToleranceSpeed(2);
- SetColorSpeed2Modifiers(0.05, 0.41);
- result:= FindColorsTolerance(TPA,5334901 , 482, 36, 492, 45, 12);
- ColorToleranceSpeed(CTS);
- SetColorSpeed2Modifiers(0.02, 0.2);
- end;
- Procedure closerangescreen;
- begin
- if (not(loggedin)) then exit;
- writeln('we are on skill screen, closing');
- mousebox(482, 36, 492, 45,1);
- end;
- function OnskillScreen:boolean;
- var
- CTS:Integer;
- TPA:Tpointarray;
- begin
- if (not(loggedin)) then exit;
- cts := GetColorToleranceSpeed;
- ColorToleranceSpeed(2);
- SetColorSpeed2Modifiers(0.02, 1.48);
- result:= FindColorsTolerance(TPA,8042720 , 480, 5, 513, 35, 4);
- ColorToleranceSpeed(CTS);
- SetColorSpeed2Modifiers(0.02, 0.2);
- end;
- Procedure CloseSkillScreen;
- begin
- if (not(loggedin)) then exit;
- writeln('we are on skill screen, closing');
- mousebox(494,17,500,22,1);
- end;
- function OnmageTab:boolean;
- var
- Monster:TpointArray;
- TmpCts:Integer;
- Melee:Boolean;
- begin
- if (not(loggedin)) then
- exit;
- tmpCTS := GetColorToleranceSpeed;
- ColorToleranceSpeed(2);
- SetColorSpeed2Modifiers(0.06, 0.24);
- result := FindColorsTolerance(Monster, 1382991, 730, 170, 754, 195, 11)
- melee:= result;
- ColorToleranceSpeed(0);
- SetColorSpeed2Modifiers(0.2, 0.2);
- end;
- function OutofRunes:boolean;
- Begin
- if (not(loggedin)) then exit;
- result := FindTextTPA(clBlack , 0, MCX1, MCY1, MCX2, MCY2, 'ody', smallChars07, Nothing);
- end;
- procedure Termination;
- begin
- if (loggedin) then
- begin
- Writeln('we ran out of runes, or something really went wrong?, terminating script');
- repeat
- if (not(loggedin)) then break;
- logout;
- waithumanclick;
- if (not(loggedin)) then break;
- until (not(loggedin));
- if (not(loggedin)) then
- begin
- terminatescript;
- end;
- end;
- end;
- function NotchatTabAll:boolean;
- var
- Monster:TpointArray;
- TmpCts:Integer;
- begin
- if (not(loggedin)) then exit;
- tmpCTS := GetColorToleranceSpeed;
- ColorToleranceSpeed(2);
- SetColorSpeed2Modifiers(0.10, 0.34);
- result := FindColorsTolerance(Monster, 4213586, 6,482,60,497, 11);
- ColorToleranceSpeed(0);
- SetColorSpeed2Modifiers(0.2, 0.2);
- end;
- procedure MakeMyChatTabAll;
- begin
- if (not(loggedin)) then exit;
- writeln('Our chat Tab is not set to all, making chat tab to all');
- mousebox(12,485,45,497,1);
- end;
- procedure WaitAfterCast;
- begin
- if (not(loggedin)) then exit;
- case random(600) of
- 1..450: Wait(RandomRange(100, 300));
- 451..570: Wait(RandomRange(300, 400)); //this is rarely used.
- 571..590: Wait(RandomRange(400, 600));
- 591..600: Wait(RandomRange(600, 1000));
- 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)); //this is rarely used.
- 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)); //this is rarely used.
- 571..590: Wait(RandomRange(500, 550));
- 591..600: Wait(RandomRange(550, 600));
- end;
- end;
- procedure MouseSpeedz;
- begin
- if (not(loggedin)) then exit;
- case random(600) of
- 1..450: MouseSpeed := MainMouseSpeed;
- 451..570: MouseSpeed := MainMouseSpeed + randomrange(-1,1);
- 571..590: MouseSpeed := MainMouseSpeed + randomrange(-1,2);
- 591..600: MouseSpeed := MainMouseSpeed + randomrange(-1,3);
- end;
- end;
- procedure FindIfonMagetab;
- begin
- if (not(loggedin)) then exit;
- if (not(OnmageTab)) then
- begin
- gametab(tab_magic);
- waitshortclick2;
- end
- else
- begin
- if (OnmageTab) then
- exit;
- 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);
- // Mouse(I[0].x, I[0].y, RandomRange(-2, 2), RandomRange(-2, 2), true); // you can take this command and change npc to whatever dot you want and use it however you want, great for auto fighters.
- 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; // See its an antiban, even though it sucks haha. .. Yeah..
- 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;
- Function LocateMonster1(Color:TintegerArray; Tol,CTS:integer; hMoD,sMoD:Extended; Uptext: Array of String): Boolean;
- var
- R,ii,X,y,i,tmpcts:integer;
- bp,orb: tpoint;
- TPA:Tpointarray;
- ATPA:T2DPointArray;
- Boxm :tbox;
- begin
- if (not(Loggedin)) then exit;
- orb.x := myloc.x;
- orb.y := myloc.y +8;
- if R_DistanceFromTile(oRB) > 15 then exit;
- if (R_DistanceFromTile(oRB) > 3) and (R_DistanceFromTile(oRB) < 15) then
- begin
- Bp.x := orb.x;
- Bp.Y := orb.y - 1;
- R_WebWalk(bp);
- waithumanclick2;
- end;
- MouseSpeedz;
- FindIfonMagetab;
- case random (10) of
- 0..7: Mouse(RandomRange(668, 669),RandomRange(263, 264), random(3),random(3),mouse_move);
- 8..10: Mouse(RandomRange(663, 670),RandomRange(260, 265), random(1),random(1),mouse_move);
- end;
- if WaitUpTextMulti2(['Curse'],300) then
- begin
- clickmouse2(mouse_left);
- waitshortclick;
- case random (30) of
- 0..27: Clickobject(orb,['Curse']);
- 28..30: FindObjExX(cx,cy,['Curse'],[7571064],21,2,0.59,0.07,50,msx1,msy1,msx2,msy2);
- end;
- wait(randomrange(90,120));
- if WaitUpTextMulti2(['Curse'],300) then
- begin
- clickmouse2(mouse_left);
- if Didclick(true,1000) then
- begin
- IncEx(cast,29);
- progressreport;
- case random (100) of
- 1: begin
- case random (100) of
- 0..80: begin
- end;
- 81..100:Antiban;
- end;
- case random (50) of
- 0..42: waitafterCast;
- 43..48: waithumanclick2;
- 49..50: Wait(randomrange(15000,25000));
- end;
- end;
- 2: begin
- end;
- end;
- result := true;
- exit;
- end
- else
- begin
- inc(Failcast);
- exit;
- end;
- end
- else
- begin
- inc(failcast);
- exit;
- end;
- end
- else
- begin
- inc(failcast);
- exit;
- end;
- end;
- procedure Inhouseloop;
- var
- bp,Orb:tpoint;
- begin
- MakeCompass('w');
- setangle(1);
- orb.x := myloc.x;
- orb.y := myloc.y +8;
- if (R_DistanceFromTile(oRB) > 3) and (R_DistanceFromTile(oRB) < 15) then
- begin
- Bp.x := orb.x;
- Bp.Y := orb.y - 1;
- R_WebWalk(bp);
- waithumanclick2;
- end;
- if Clickobject(orb, ['Activate', 'ctivate']) then
- begin
- clickmouse2(mouse_left);
- waithumanclick2;
- end;
- waithumanclick2;
- if Clickobject(orb, ['Banish','anish']) then
- begin
- repeat
- WaitHumanClick;
- if not loggedin then exit;
- if R_DistanceFromTile(oRB) > 5 then exit;
- if OnskillScreen then
- CloseSkillScreen;
- if (onrangescreen) then
- closerangescreen;
- if OutofRunes then
- Termination;
- if (NotchatTabAll) then
- MakeMyChatTabAll;
- takebreaks;
- LocateMonster1([7571064],21,2,0.59,0.07,['Curse']);
- until (not loggedin);
- end;
- end;
- procedure mainloop;
- begin
- if not loggedin then
- exit;
- if srl_InFight then
- TeleportToHouse;
- if (not R_inPolygon([point(2957,3220), point(2957,3228), point(2950,3228), point(2950,3220)]) and FindObjExX(cx,cY,['Portal'],[5774918],5,2,0.15,4.50,50,msx1,msy1,msx2,msy2)) or FindObjExX(cx,cy,['Activate','ctivate','Banish','anish'],[6982271],22,2,0.30,0.25,50,msx1,msy1,msx2,msy2) then
- begin
- writeln('yes');
- Inhouseloop;
- end;
- if R_inPolygon([point(2957,3220), point(2957,3228), point(2950,3228), point(2950,3220)]) and FindObjExX(cx,cY,['Enter','nter','ortal','Portal'],[5774918],5,2,0.15,4.50,50,msx1,msy1,msx2,msy2) then // and ColorLocate('Porta',5774918, 5, 2, 0.15,4.50, msx1,msy1,msx2,msy2) then
- begin
- writeln('yess');
- if FindObject([5774918], 5, 2, 0.15,4.50,20,20,['Enter','nter','ortal','Portal'],300,250,msx1,msy1,msx2,msy2) then
- begin
- writeln('yess2');
- if srl_InFight then
- TeleportToHouse;
- clickmouse2(mouse_left);
- wait(randomrange(2000,3000));
- mousebox(180,375,325,390,mouse_left);
- wait(randomrange(10000,15000));
- Myloc := R_GetTileGlobal;
- end;
- end;
- if (not R_inPolygon([point(2957,3220), point(2957,3228), point(2950,3228), point(2950,3220)])) and not FindObjExX(cx,cY,['Portal'],[5774918],5,2,0.15,4.50,50,msx1,msy1,msx2,msy2) then
- begin
- writeln('yes2');
- if srl_InFight then
- TeleportToHouse;
- TeleportToHouse;
- end;
- end;
- begin
- playerSetup;
- setupsrl;
- SetupReflection;
- addonterminate('progressreport');
- StartTime;
- myvars;
- 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
Advertisement