////////////////////////////////////////////////////////////////////////////// // Runescape Scripting Community Include // // RSCi.txt // ////////////////////////////////////////////////////////////////////////////// // .:Instructions:. // // >Copy and Paste into Includes Folder // ////////////////////////////////////////////////////////////////////////////// // .:Features:. // // >Most Complete Anti-Random's Around // // >Edited Fully Working BoxBreaker // // >The ONLY Chat On Talking Anti-Randoms // // >The ONLY Dungeon Runner Around // // >Complete Anti-Ban Scheduler For 3 Meals and Sleeping // // >GhostSpeak Random Phrase Ability // // >Constant UpKeep and New Functions / Procedures // ////////////////////////////////////////////////////////////////////////////// // .:Special Thanks:. // // >Kaitnieks, Ghost, RSN, Gussy, Chriz, Taminoo, jdumber2k, Serial_KillaZ // // >Helix, Kanel, Renagade, Pop, Benleegt, Stealth955, Tabarrow, Jaculop // // >The list Continues on of Course but most of thanks go to RuneSC // ////////////////////////////////////////////////////////////////////////////// var Head,Lamp,Talkers,RandomBox,Up,AntiUse: Integer; UpChars,CharsChat,Fontsmall,Font2: Integer; RHour,RMin,RSec,St,Us: Integer; BoxFound, UseScheduler: Boolean; User, Pass: Array[1..5] of String; Say : array[1..30] of string; Last, Line1, Line2, Line3, Line4, Line5, RPM,PM:string; //////////////////////////////////////////////////// // > Returns Distance between Points //////////////////////////////////////////////////// function Distance(x1,y1,x2,y2:Integer):Integer; begin result:=Trunc(Sqrt(Sqr(x1-x2)+ Sqr(y1-y2))+0.999999); end; //////////////////////////////////////////////////// // > Waits while Flag is on MM //////////////////////////////////////////////////// Function Flag:boolean; var x, y: Integer; begin If(Not(FindColor(x,y,255,559,0,735,166)))Then Result:=False; if(FindColor(x,y,255,559,0,735,166))then begin Result:=True; repeat wait(250); until(not(FindColor(x,y,255,559,0,735,166))); Wait(250+random(250)); end; end; //////////////////////////////////////////////////// // > Returns Distance From Flag //////////////////////////////////////////////////// Function FlagDist: Integer; var x, y: Integer; begin if(FindColor(x,y,255,559,0,735,166))then Result:= Distance(x + 2, y + 2, 648, 84) end; //////////////////////////////////////////////////// // > Waits until FlagDis is reached //////////////////////////////////////////////////// Function HumanFlag(flagdis:Integer):boolean; Var x, y: Integer; begin If(Not(FindColor(x,y,255,559,0,735,166)))Then Result:=False; If(FindColor(x,y,255,559,0,735,166))Then begin Result:=True; repeat wait(150); until(FlagDist<=flagdis) end; end; //////////////////////////////////////////////////// // > Moves Mouse to specified location //////////////////////////////////////////////////// procedure MMouse(dx,dy,rx,ry:Integer); var xx, yy, x, y, math: Integer; Step:Extended; begin step:=4; xx:=random(rx);yy:=random(ry); math:=Random(4)+1; case math of 1: begin dx:=dx+xx; dy:=dy+yy; end; 2: begin dx:=dx-xx; dy:=dy+yy; end; 3: begin dx:=dx+xx; dy:=dy-yy; end; 4: begin dx:=dx-xx; dy:=dy-yy; end; end; GetMousePos(x,y); repeat if(Distance(x,y,dx,dy)<100)then if(not(Distance(x,y,dx,dy)=0))then step:=step-(10/Distance(x,y,dx,dy)); if(step<1)then step:=1; x:=x+Round((dx-x)/step); y:=y+Round((dy-y)/step); MoveMouse(x,y); Wait(10); until(Distance(x,y,dx,dy)=0); end; //////////////////////////////////////////////////// // > Clicks Mouse on Specified Location //////////////////////////////////////////////////// procedure Mouse(x,y,rx,ry:Integer; left:Boolean); var a:Integer; begin MMouse(x,y,rx,ry); Wait(10); GetMousePos(x,y); Wait(50+random(25)); HoldMouse(x,y,left); repeat Wait(10+Random(1)); a:=a+1; until(a>4); GetMousePos(x,y); ReleaseMouse(x,y,left); Wait(100+random(50)); end; //////////////////////////////////////////////////// // > Mouse and Flag in 1 procedure //////////////////////////////////////////////////// procedure MouseFlag(cx,cy,rx,ry:Integer); begin Mouse(cx,cy,rx,ry,true); Flag; Wait(Random(250)+250); end; //////////////////////////////////////////////////// // > Clicks According to Minimap Angle Until Color Found // > Based off AWalk but for RS2 //////////////////////////////////////////////////// procedure WalkMap(var x, y:integer; Angle, Distance: Integer); var boool: boolean; Tempx, Tempy, TempAngle, TempDegree: Extended; begin Angle:= Angle + 90; if(Angle < 0)then Angle:= 360 - Angle; if(Angle > 360)then Angle:= Angle - 360; TempAngle:= DetectRS2MinimapAngle(boool) * 56; TempDegree:= Angle - TempAngle; TempDegree:= TempDegree * -1; Tempx:= Distance * Cos(TempDegree * Pi / 180); Tempy:= Distance * Sin(TempDegree * Pi / 180); x:=Round(Tempx + 648) y:=Round(Tempy + 83) end; //////////////////////////////////////////////////// // > Clicks According to Minimap Angle Until Color Found // > Based off AWalk but for RS2 //////////////////////////////////////////////////// Function WalkMapColor(WalkAng, WalkDist, Ranx, Rany, Color, MaxMoves: Integer):boolean; var x, y, ax, ay, Count: Integer; begin Repeat WalkMap(x, y, WalkAng, WalkDist); Mouse(x, y, Random(Ranx), Random(Rany),True); Flag; Count:=Count+1; Until(FindColorSpiral(ax,ay,Color,565,7,724,162))Or(Count>MaxMoves) If(FindColorSpiral(ax,ay,Color,565,7,724,162))Then Result:=True; If(Count>MaxMoves)Then Result:=False; end; //////////////////////////////////////////////////// // > Clicks According to Minimap Angle Until Color Found // > Based off AWalk but for RS2 //////////////////////////////////////////////////// Function WalkMapColorArea(WalkAng, WalkDist, Ranx, Rany, Color, MaxMoves, x1, y1, x2, y2: Integer):boolean; var x, y, ax, ay, Count: Integer; begin Repeat WalkMap(x, y, WalkAng, WalkDist); Mouse(x, y, Random(Ranx), Random(Rany),True); Flag; Count:=Count+1; Until(FindColorSpiral(ax,ay,Color,x1, y1, x2, y2))Or(Count>MaxMoves) If(FindColorSpiral(ax,ay,Color,x1, y1, x2, y2))Then Result:=True; If(Count>MaxMoves)Then Result:=False; end; //////////////////////////////////////////////////// // > Sends text humanlike //////////////////////////////////////////////////// procedure TypeSend(text:string); var i: Integer; begin for i := 1 to Length(Text) do begin SendKeys(Text[i]); Wait(100+random(100)); end; SendKeys(chr(13)); end; //////////////////////////////////////////////////// // > Tries to Get Flag to Appear //////////////////////////////////////////////////// procedure MouseFindFlag(ax,ay,xmod,ymod:Integer); var xx,yy:Integer; begin if(not(Flag))then begin xx:=ax; yy:=ay; repeat xx:=xx+xmod; yy:=yy+ymod; Mouse(xx,yy,3,3,true); until(Flag)or(xx<570)or(xx>725)or(yy<5)or(yy>160) end; end; //////////////////////////////////////////////////// // > Opens specified GameTab //////////////////////////////////////////////////// procedure GameTab(tabnumber:Integer); var bool: Boolean; begin case tabnumber of 1:if(GetColor(559,179)=5531511)then begin Mouse(559,186,5,5,true) bool := true end; 2:if(GetColor(591,176)=5531511)then begin Mouse(585,186,5,5,true) bool := true end; 3:if(GetColor(618,176)=5531511)then begin Mouse(614,186,5,5,true) bool := true end; 4:if(GetColor(645,180)<>5531511)then if(GetColor(636,174)=5531511)then begin Mouse(650,186,5,5,true) bool := true end; 5:if(GetColor(682,174)=5531511)then begin Mouse(683,186,5,5,true) bool := true end; 6:if(GetColor(683,175)=5531511)then begin Mouse(711,186,5,5,true) bool := true end; 7:if(GetColor(734,177)=5531511)then begin Mouse(738,186,5,5,true) bool := true end; 8:if(GetColor(705,495)=5531511)then begin Mouse(710,480,5,5,true) bool := true end; end; if(bool)then Wait(450); end; //////////////////////////////////////////////////// // > Returns coords of specified Item //////////////////////////////////////////////////// function ItemCoords(i: Integer): TPoint; var row, col: Integer; begin row := i div 4; col := i - (row*4) - 1; if(col<0)then begin col := 3; row := row-1; end; result.x := 536 + ((col+1) * 42) + random(7); result.y := 184 + ((row+1) * 36) + random(7); end; //////////////////////////////////////////////////// // > Clicks Item //////////////////////////////////////////////////// procedure MouseItem(i: Integer; left: Boolean); var Point: TPoint; begin Point := ItemCoords(i); GameTab(4); Mouse(Point.X, Point.Y, 0, 0, left); end; //////////////////////////////////////////////////// // > Hoves Over Item //////////////////////////////////////////////////// procedure MouseHover(Var x, y : Integer; i: Integer); var Point: TPoint; begin Point := ItemCoords(i); GameTab(4); MMouse(Point.X, Point.Y, 0, 0); x:=Point.x; y:=Point.y; end; //////////////////////////////////////////////////// // > Left clicks an Item //////////////////////////////////////////////////// procedure UseItem(invin: Integer); begin MouseItem(invin, true); end; //////////////////////////////////////////////////// // > Returns Equipment Coords //////////////////////////////////////////////////// function EquipmentCoords(i: Integer): TPoint; begin case i of 1: begin Result.x := 650; Result.y := 215; end; 2: begin Result.x := 610; Result.y := 280; end; 3: begin Result.x := 655; Result.y := 265; end; 4: begin Result.x := 695; Result.y := 260; end; 5: begin Result.x := 600; Result.y := 315; end; 6: begin Result.x := 655; Result.y := 305; end; 7: begin Result.x := 705; Result.y := 305; end; 8: begin Result.x := 650; Result.y := 340; end; 9: begin Result.x := 600; Result.y := 380; end; 10:begin Result.x := 645; Result.y := 375; end; 11:begin Result.x := 700; Result.y := 380; end; end; end; //////////////////////////////////////////////////// // > Returns True if Wearing Item //////////////////////////////////////////////////// function WearingItem(i: Integer): Boolean; var T: TPoint; begin GameTab(5); T := EquipmentCoords(i); Result := (GetColor(T.x, T.y)<>2304814); end; //////////////////////////////////////////////////// // > Takes Off Item //////////////////////////////////////////////////// procedure TakeOff(i: Integer); var T: TPoint; begin GameTab(5); T := EquipmentCoords(i); if(WearingItem(i))then Mouse(T.x, T.y, 5, 5, true); end; //////////////////////////////////////////////////// // > Takes Screenshot //////////////////////////////////////////////////// procedure TakeScreen(reason: string; event: Integer); begin SaveScreenshot(ScriptPath + reason + inttostr(event) + '.bmp'); Writeln('Screenshot of: ' + reason + ' #' + inttostr(event)); end; //////////////////////////////////////////////////// // > Returns true item exists //////////////////////////////////////////////////// function ExistsItem(i: Integer): Boolean; var xx, yy, f, row, col: Integer; Points: TPointArray; begin row := i div 4; col := i - (row*4) - 1; if(col<0)then begin col := 3; row := row-1; end; FindColorsTolerance(Points, 3885652, 569 + col * 42, 228 + row * 36, 569 + col * 42 + 20, 228 + row * 36 + 15, 70) Result := False; xx := 0; yy := 0; for f := 0 to getarraylength(Points) - 1 do begin if(569 + col * 42 + xx <> Points[f].X)or(228 + row * 36 + yy <> Points[f].Y)then begin Result := True; Exit; end; yy := yy + 1; if(yy = 16)then begin xx := xx + 1; yy := 0; end; end; end; //////////////////////////////////////////////////// // > Returns Inventory Count //////////////////////////////////////////////////// function InvCount: Integer; var i: Integer; begin GameTab(4); for i:= 1 to 28 do if(ExistsItem(i))then Result := Result + 1 end; //////////////////////////////////////////////////// // > Returns Coords on Empty Item //////////////////////////////////////////////////// procedure GetEmptyItemPosition(var x, y: Integer); var Pr: TPoint; i: Integer; begin for i:=1 to 28 do if(not ExistsItem(i))then begin Pr:= ItemCoords(i); x:= Pr.x; y:= Pr.y; Break; end; end; //////////////////////////////////////////////////// // > Clicks an Option (1 Main, 2 Inv, 3 Chatbox) //////////////////////////////////////////////////// function ClickOption(s: string; i: Integer): Boolean; var x, y, tmpMask: Integer; begin tmpMask := CreateBitmapMaskFromText(s, UpChars); case i of 1: begin if(FindBitmapMaskTolerance(tmpMask, x, y, 0, 0, 520, 340, 10, 50))then begin Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, true) Result:= True; Wait(250) end; end; 2: begin if(FindBitmapMaskTolerance(tmpMask, x, y, 550, 200, 750, 470, 10, 50))then begin Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, true) Result:= True; Wait(250) end; end; 3: begin if(FindBitmapMaskTolerance(tmpMask, x, y, 0, 340, 500, 460, 10, 50))then begin Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, true) Result:= True; Wait(250) end; end; end; FreeBitmap(tmpMask); end; //////////////////////////////////////////////////// // > Checks Upper Text //////////////////////////////////////////////////// function IsUpText(s: string):Boolean; begin Result:= IsTextAtEx(7, 7, s, 100, UpChars, True, False, 0, 2, -1); end; //////////////////////////////////////////////////// // > Checks Upper Text Settable Tolerance //////////////////////////////////////////////////// function IsUpTextTol(s: string; TextTol: Integer):Boolean; begin Result:= IsTextAtEx(7, 7, s, TextTol, UpChars, True, False, 0, 2, -1); end; //////////////////////////////////////////////////// // > Checks if BankOpen //////////////////////////////////////////////////// function BankScreen:Boolean; begin result:=IsTextAtEx(185,34,'The Bank of',30,UpChars,True,False,0,0,-1) end; //////////////////////////////////////////////////// // > Searches for Text //////////////////////////////////////////////////// Function SearchForText(var xx,xy:integer; x1,y1,x2,y2:Integer; Text:string; Chars:Integer):boolean; var Image, x, y: Integer; begin Image:=CreateBitmapMaskFromText(Text,Chars) Result := FindBitmapMaskTolerance(Image,x,y,x1,y1,x2,y2,10,85) FreeBitmap(Image); If(Result)Then begin xx:=x; xy:=y; end; end; //////////////////////////////////////////////////// // > Clicks Text on Specified Box //////////////////////////////////////////////////// function ClickTextArea(x1,y1,x2,y2:Integer; text:string; font:Integer):boolean; var x, y: Integer; begin Result:= SearchForText(x,y,x1,y1,x2,y2,Text,Font) if(Result)then Mouse(x + ((Length(Text) * 6) div 2), y + 3 + Random(3), 2 , 0, True); end; //////////////////////////////////////////////////// // > Click's Text looking through whole screen //////////////////////////////////////////////////// function ClickText(s:string):boolean; begin Wait(300); Result:=ClickTextArea(4,4,755,488,s,Font2) end; //////////////////////////////////////////////////// // > Closes window //////////////////////////////////////////////////// Function CloseWindow: Boolean; var dtmClose, x, y: Integer; begin dtmClose:= DTMFromstring('78DA635CC5C8C010C780021A1A1AC0342394C' + 'FB89108357B80AC58026ACE00598904D4DC03B26208A8794CD81C' + '00EADB0FEE'); if(FindDTM(dtmClose, x, y, 290, 1, 515, 170))then begin Mouse(x+5, y+2, 1,1, true); Wait(800); Result := true; end; FreeDTM(dtmClose); end; //////////////////////////////////////////////////// // > Logs In //////////////////////////////////////////////////// procedure Login; begin if(GetColor(312,249)=65535)and(GetColor(419,291)=16777215)then begin ClickOption('xist', 1) if(ClickOption('ser', 1))then begin Mouse(323, 258,3,3,True); TypeSend(User[Us]); TypeSend(Pass[Us]); end; if(ClickOption('Login', 1))then begin; repeat Mouse(494, 334, 20, 20, True); wait(100+random(100)); until(GetColor(494, 334)=16777215) end; end; end; //////////////////////////////////////////////////// // > Logs you out //////////////////////////////////////////////////// procedure Logout; begin if(GetColor(630,495)=5531511)then begin Mouse(645, 485, 4, 4, true) Wait(450); end; ClickOption('here', 2); end; //////////////////////////////////////////////////// // > Sets Run to Specified //////////////////////////////////////////////////// procedure Run(which:boolean); begin GameTab(8); case which of True: if(GetColor(640,275)=5334129)then Mouse(620,265,5,5,true); False:if(GetColor(581,250)=5334129)then Mouse(580,265,5,5,true); end; end; //////////////////////////////////////////////////// // > Sets Chat to Specified State //////////////////////////////////////////////////// procedure SetChat(state: string; chat: Integer); var x, y, setx, sety, c: Integer; begin repeat c:= c+1; setx := 55 + ((chat - 1)*135); sety := 490; if(not (LowerCase(state)='on'))then while(FindColor(x,y,65280,setx-10,sety-10,setx+10,sety+10))do Mouse(x,y,5,5,true) if(not (LowerCase(state)='friends'))then while(FindColor(x,y,65535,setx-10,sety-10,setx+10,sety+10))do Mouse(x,y,5,5,true) if(not (LowerCase(state)='off'))then while(FindColor(x,y,255,setx-10,sety-10,setx+10,sety+10))do Mouse(x,y,5,5,true) if(not (LowerCase(state)='hide'))then while(FindColor(x,y,16776960,setx-10,sety-10,setx+10,sety+10))do Mouse(x,y,5,5,true) until(c=2); end; //////////////////////////////////////////////////// // > Sets Chats Off //////////////////////////////////////////////////// procedure ChatsOff; begin SetChat('off', 1); SetChat('off', 2); SetChat('off', 3); end; //////////////////////////////////////////////////// // > Turns Compass //////////////////////////////////////////////////// procedure MakeCompass(direction: string); var fAngle, myAngle, sAngle: Integer; begin ActivateClient; case LowerCase(direction) of 'n': begin fAngle:= 355; SAngle:=360; end; 'e': begin fAngle:= 265; SAngle:=270; end; 's': begin fAngle:= 185; SAngle:=190; end; 'w': begin fAngle:= 95; SAngle:=100; end; end; myAngle:= Trunc((DetectRS2MinimapCompassAngle / Pi)* 180); if(MyAngle>180)then begin repeat myAngle:= Trunc((DetectRS2MinimapCompassAngle / Pi)* 180); SendArrowSilentWait(ar_right,1); until(MyAngle>=FAngle)And(MyAngle<=SAngle) end; if(MyAngle<180)then begin repeat myAngle:= Trunc((DetectRS2MinimapCompassAngle / Pi)* 180); SendArrowSilentWait(ar_left,1); until(MyAngle>=FAngle)And(MyAngle<=SAngle) end; end; //////////////////////////////////////////////////// // > Sets Fight Mode //////////////////////////////////////////////////// procedure SetFightMode(i: Integer); var TP:TPointArray; pc, ti, xp, yp: Integer; begin GameTab(1); Wait(450); FindColorsTolerance(TP, 5334130, 555, 260, 670, 435, 0) pc:= GetArrayLength(TP) if(pc < 580) and (pc > 480)then ti:= 1; if(pc < 460) and (pc > 350)then ti:= 2; if(pc < 480) and (pc > 380)then ti:= 3; case ti of 1:begin xp:= 597; case i of 1: yp:= 282; 2: yp:= 325; 3: yp:= 364; 4: yp:= 406; end; end; 2:begin xp:= 594; case i of 1: yp:= 287; 2: yp:= 333; 3: yp:= 379; 4: Exit; end; end; 3:begin xp:= 597; case i of 1: yp:= 279; 2: yp:= 325; 3: yp:= 370; 4: yp:= 437; end; end; end; if(not(FindColorTolerance(pc, ti, 1974408, xp, yp, xp, yp, 10)))then Mouse(xp, yp, 5, 5, true); end; //////////////////////////////////////////////////// // > Drops Inventory Position //////////////////////////////////////////////////// function DropInvPosition(i: Integer): Boolean; var x, y: Integer; Pr: TPoint; begin Result:= False; if(ExistsItem(i))then begin Pr:= ItemCoords(i) x:= Pr.x; y:= Pr.y; Mouse(x, y, 5, 5, False) Wait(250 + Random(250)) if(ClickOption('Drop',2))then Result:= True; end; end; //////////////////////////////////////////////////// // > Drops Until hits Position //////////////////////////////////////////////////// procedure DropToPosition(StartPosition, EndPosition: Integer); var i: Integer; begin for i:= StartPosition to EndPosition do DropInvPosition(i) end; //////////////////////////////////////////////////// // > Sets Scar Title to specified //////////////////////////////////////////////////// procedure DisguiseScar(disguise:string); begin if(Disguise<>'')then begin GetApplication.Title:= disguise; GetSelf.Caption:= disguise; end; end; //////////////////////////////////////////////////// // > Finds Object from Screen Center //////////////////////////////////////////////////// function FindObjCenter(var x, y : integer; ObjectText : string; ObjectColor, ObjectTolerance : Integer): Boolean; var Point : TPointArray; Num : integer; LastPoint : TPoint; begin Num:= 0; FindColorsSpiralTolerance(257, 168, Point, ObjectColor, 1, 1, 515, 336, ObjectTolerance) if(GetArrayLength(Point) <> 0)then begin repeat MMouse(Point[Num].x, Point[Num].y,0,0); wait(450 + random(50)); if(IsUpText(ObjectText))then begin Result:= True; x:= Point[Num].x; y:= Point[Num].y; end else begin LastPoint.x := x; LastPoint.y := y; Num := Num + 1; end; until(Num = GetArrayLength(Point))or(Result) end; end; //////////////////////////////////////////////////// // > Finds Object from Screen Center //////////////////////////////////////////////////// function FindObjCenter2(var x, y : integer; ObjectText : string; ObjectColor, ObjectTolerance, MinYValue, MinXValue : Integer): Boolean; var Point : TPointArray; Num : integer; LastPoint : TPoint; begin Num:= 0; FindColorsSpiralTolerance(257, 168, Point, ObjectColor, 1, 1, 515, 336, ObjectTolerance) if(GetArrayLength(Point) <> 0)then begin repeat if(Point[Num].x < LastPoint.x + MinxValue)and(Point[Num].x > LastPoint.x - MinxValue)or (Point[Num].y < LastPoint.y + MinyValue)and(Point[Num].y > LastPoint.y - MinyValue)then begin Num:= Num + 1; end else begin MMouse(Point[Num].x, Point[Num].y,0,0); wait(600 + random(50)); if(IsUpText(ObjectText))then begin Result:= True; x:= Point[Num].x; y:= Point[Num].y; end else begin LastPoint.x := Point[Num].x; LastPoint.y := Point[Num].y; Num := Num + 1; end; end; until(Num = GetArrayLength(Point))or(Result) end; end; //////////////////////////////////////////////////// // > Finds Object on the screen //////////////////////////////////////////////////// function FindObj(var x, y : integer; ObjectText : string; ObjectColor, ObjectTolerance, MinYValue, MinXValue : Integer): Boolean; var Point : TPointArray; Num : integer; LastPoint : TPoint; begin Num:= 0; FindColorsTolerance(Point, ObjectColor, 1, 1, 515, 336, ObjectTolerance); if(GetArrayLength(Point) <> 0)then begin repeat if(Point[Num].x < LastPoint.x + MinxValue)and(Point[Num].x > LastPoint.x - MinxValue)or (Point[Num].y < LastPoint.y + MinyValue)and(Point[Num].y > LastPoint.y - MinyValue)then begin Num:= Num + 1; end else begin MMouse(Point[Num].x, Point[Num].y,0,0); wait(600 + random(50)); if(IsUpText(ObjectText))then begin Result:= True; x:= Point[Num].x; y:= Point[Num].y; end else begin LastPoint.x := Point[Num].x; LastPoint.y := Point[Num].y; Num := Num + 1; end; end; until(Num = GetArrayLength(Point))or(Result) end; end; //////////////////////////////////////////////////// // > Finds Object on the screen //////////////////////////////////////////////////// function FindObj2(var x, y : integer; ObjectText : string; ObjectColor, ObjectTolerance : Integer): Boolean; var Point : TPointArray; Num : integer; LastPoint : TPoint; begin Num:= 0; FindColorsTolerance(Point, ObjectColor, 1, 1, 515, 336, ObjectTolerance); if(GetArrayLength(Point) <> 0)then begin repeat if(Point[Num].x < LastPoint.x + 5)and(Point[Num].x > LastPoint.x - 5)or (Point[Num].y < LastPoint.y + 5)and(Point[Num].y > LastPoint.y - 5)then begin Num:= Num + 1; end else begin MMouse(Point[Num].x, Point[Num].y,0,0); wait(450 + random(50)); if(IsUpText(ObjectText))then begin Result:= True; x:= Point[Num].x; y:= Point[Num].y; end else begin LastPoint.x := Point[Num].x; LastPoint.y := Point[Num].y; Num := Num + 1; end; end; until(Num = GetArrayLength(Point))or(Result) end; end; //////////////////////////////////////////////////////////////////////// // > FindColor4Point //////////////////////////////////////////////////////////////////////// // // Finds color but instead of using 2 points like in normal color // Finding this uses 4 and has some math for that to work .. since // all the sides doesn't need to be straight //////////////////////////////////////////////////////////////////////// function FindColor4Point(ix, iy, color, tolerance, x1, y1, x2, y2, x3, y3, x4, y4: Integer): Boolean; var AB, BC, CD, DA, WestPoint, EastPoint: array of Integer; ii, ii2, CheckX, CheckY, HeighestPoint, LowestPoint: Integer; TempAngle, MiddlePoint: Extended; begin TempAngle:= (y2 - y1) / (x2 - x1); MiddlePoint:= y1 - (TempAngle * x1); HeighestPoint:= y1; LowestPoint:= y1; CheckX:= -1; CheckY:= -1; if(x2 > x1)then CheckX:= CheckX * -1; if(y2 > y1)then CheckY:= CheckY * -1; if(not(y2 = y1))or (not(x2 = x1))then begin repeat AB[ii]:= Round((TempAngle * x1) + MiddlePoint); if(AB[ii] > HeighestPoint)then HeighestPoint:= AB[ii]; if(AB[ii] < LowestPoint)then LowestPoint:= AB[ii]; if((ii * CheckX) + x1 < WestPoint[AB[ii]])or (WestPoint[AB[ii]] = 0)then WestPoint[AB[ii]]:= (ii * CheckX) + x1; if((ii * CheckX) + x1 > EastPoint[AB[ii]])or (EastPoint[AB[ii]] = 0)then EastPoint[AB[ii]]:= (ii * CheckX) + x1; ii:= ii + 1; until((ii * CheckX) + x1 = x2); end else begin if(x1 = x2)and (y1 <> y2)then begin ii:= 0; repeat if(x1 < WestPoint[y1 + (ii * CheckY)])or (WestPoint[y1 + (ii * CheckY)] = 0)then WestPoint[y1 + (ii * CheckY)]:= x1; if(x1 > EastPoint[y1 + (ii * CheckY)])or (EastPoint[y1 + (ii * CheckY)] = 0)then EastPoint[y1 + (ii * CheckY)]:= x1; if(HeighestPoint < y1 + (ii * CheckY))then HeighestPoint:= y1 + (ii * CheckY); if(LowestPoint > y1 + (ii * CheckY))then LowestPoint:= y1 + (ii * CheckY); ii:= ii + 1; until(y1 + (ii * CheckY) = y2); end; if(x1 <> x2)and (y1 = y2)then begin ii:= 0; repeat if(x1 + (ii * CheckX) < WestPoint[y1])or (WestPoint[y1] = 0)then WestPoint[y1]:= x1 + (ii * CheckX); if(x1 + (ii * CheckX) > EastPoint[y1])or (EastPoint[y1] = 0)then EastPoint[y1]:= x1 + (ii * CheckX); ii:= ii + 1; until(x1 + (ii * CheckX) = x2); end; if(x1 = x2)and (y1 = y2)then begin if(WestPoint[y1] > x1)then WestPoint[y1]:= x1; if(EastPoint[y1] < x1)then EastPoint[y1]:= x1; if(HeighestPoint > y1)then HeighestPoint:= y1; if(LowestPoint < y1)then LowestPoint:= y1; end; end; ii:= 0; TempAngle:= (y3 - y2) / (x3 - x2); MiddlePoint:= y2 - (TempAngle * x2); CheckX:= -1; CheckY:= -1; if(x3 > x2)then CheckX:= CheckX * -1; if(y3 > y2)then CheckY:= CheckY * -1; if(not(y3 = y2))or (not(x3 = x2))then begin repeat BC[ii]:= Round((TempAngle * x2) + MiddlePoint); if(BC[ii] > HeighestPoint)then HeighestPoint:= BC[ii]; if(BC[ii] < LowestPoint)then LowestPoint:= BC[ii]; if((ii * CheckX) + x2 < WestPoint[BC[ii]])or (WestPoint[BC[ii]] = 0)then WestPoint[BC[ii]]:= (ii * CheckX) + x2; if((ii * CheckX) + x2 > EastPoint[BC[ii]])or (EastPoint[BC[ii]] = 0)then EastPoint[BC[ii]]:= (ii * CheckX) + x2; ii:= ii + 1; until((ii * CheckX) + x2 = x3); end else begin if(x3 = x2)and (y3 <> y2)then begin ii:= 0; repeat if(x2 < WestPoint[y2 + (ii * CheckY)])or (WestPoint[y2 + (ii * CheckY)] = 0)then WestPoint[y2 + (ii * CheckY)]:= x2; if(x2 > EastPoint[y2 + (ii * CheckY)])or (EastPoint[y2 + (ii * CheckY)] = 0)then EastPoint[y2 + (ii * CheckY)]:= x2; if(HeighestPoint < y2 + (ii * CheckY))then HeighestPoint:= y2 + (ii * CheckY); if(LowestPoint > y2 + (ii * CheckY))then LowestPoint:= y2 + (ii * CheckY); ii:= ii + 1; until(y2 + (ii * CheckY) = y3); end; if(x3 <> x2)and (y3 = y2)then begin ii:= 0; repeat if(x2 + (ii * CheckX) < WestPoint[y2])or (WestPoint[y2] = 0)then WestPoint[y2]:= x2 + (ii * CheckX); if(x2 + (ii * CheckX) > EastPoint[y2])or (EastPoint[y2] = 0)then EastPoint[y2]:= x2 + (ii * CheckX); ii:= ii + 1; until(x2 + (ii * CheckX) = x3); end; if(x3 = x2)and (y3 = y2)then begin if(WestPoint[y2] > x2)then WestPoint[y2]:= x2; if(EastPoint[y2] < x2)then EastPoint[y2]:= x2; if(HeighestPoint > y2)then HeighestPoint:= y2; if(LowestPoint < y2)then LowestPoint:= y2; end; end; ii:= 0; TempAngle:= (y4 - y3) / (x4 - x3); MiddlePoint:= y3 - (TempAngle * x3); CheckX:= -1; CheckY:= -1; if(x4 > x3)then CheckX:= CheckX * -1; if(y4 > y3)then CheckY:= CheckY * -1; if(not(y4 = y3))or (not(x4 = x3))then begin repeat CD[ii]:= Round((TempAngle * x3) + MiddlePoint); if(CD[ii] > HeighestPoint)then HeighestPoint:= CD[ii]; if(CD[ii] < LowestPoint)then LowestPoint:= CD[ii]; if((ii * CheckX) + x3 < WestPoint[CD[ii]])or (WestPoint[CD[ii]] = 0)then WestPoint[CD[ii]]:= (ii * CheckX) + x3; if((ii * CheckX) + x3 > EastPoint[CD[ii]])or (EastPoint[CD[ii]] = 0)then EastPoint[CD[ii]]:= (ii * CheckX) + x3; ii:= ii + 1; until((ii * CheckX) + x3 = x4); end else begin if(x3 = x4)and (y3 <> y4)then begin ii:= 0; repeat if(x3 < WestPoint[y3 + (ii * CheckY)])or (WestPoint[y3 + (ii * CheckY)] = 0)then WestPoint[y3 + (ii * CheckY)]:= x3; if(x3 > EastPoint[y3 + (ii * CheckY)])or (EastPoint[y3 + (ii * CheckY)] = 0)then EastPoint[y3 + (ii * CheckY)]:= x3; if(HeighestPoint < y3 + (ii * CheckY))then HeighestPoint:= y3 + (ii * CheckY); if(LowestPoint > y3 + (ii * CheckY))then LowestPoint:= y3 + (ii * CheckY); ii:= ii + 1; until(y3 + (ii * CheckY) = y4); end; if(x3 <> x4)and (y3 = y4)then begin ii:= 0; repeat if(x3 + (ii * CheckX) < WestPoint[y3])or (WestPoint[y3] = 0)then WestPoint[y3]:= x3 + (ii * CheckX); if(x3 + (ii * CheckX) > EastPoint[y3])or (EastPoint[y3] = 0)then EastPoint[y3]:= x3 + (ii * CheckX); ii:= ii + 1; until(x3 + (ii * CheckX) = x4); end; if(x3 = x4)and (y3 = y4)then begin if(WestPoint[y3] > x3)then WestPoint[y3]:= x3; if(EastPoint[y3] < x3)then EastPoint[y3]:= x3; if(HeighestPoint > y3)then HeighestPoint:= y3; if(LowestPoint < y3)then LowestPoint:= y3; end; end; ii:= 0; TempAngle:= (y1 - y4) / (x1 - x4); MiddlePoint:= y4 - (TempAngle * x4); CheckX:= -1; CheckY:= -1; if(x1 > x4)then CheckX:= CheckX * -1; if(y1 > y4)then CheckY:= CheckY * -1; if(not(y1 = y4))or (not(x1 = x4))then begin repeat DA[ii]:= Round((TempAngle * x4) + MiddlePoint); if(DA[ii] > HeighestPoint)then HeighestPoint:= DA[ii]; if(DA[ii] < LowestPoint)then LowestPoint:= DA[ii]; if((ii * CheckX) + x4 < WestPoint[DA[ii]])or (WestPoint[DA[ii]] = 0)then WestPoint[DA[ii]]:= (ii * CheckX) + x4; if((ii * CheckX) + x4 > EastPoint[DA[ii]])or (EastPoint[DA[ii]] = 0)then EastPoint[DA[ii]]:= (ii * CheckX) + x4; ii:= ii + 1; until((ii * CheckX) + x4 = x1); end else begin if(x1 = x4)and (y1 <> y4)then begin ii:= 0; repeat if(x4 < WestPoint[y4 + (ii * CheckY)])or (WestPoint[y4 + (ii * CheckY)] = 0)then WestPoint[y4 + (ii * CheckY)]:= x4; if(x4 > EastPoint[y4 + (ii * CheckY)])or (EastPoint[y4 + (ii * CheckY)] = 0)then EastPoint[y4 + (ii * CheckY)]:= x4; if(HeighestPoint < y4 + (ii * CheckY))then HeighestPoint:= y4 + (ii * CheckY); if(LowestPoint > y4 + (ii * CheckY))then LowestPoint:= y4 + (ii * CheckY); ii:= ii + 1; until(y4 + (ii * CheckY) = y1); end; if(x1 <> x4)and (y1 = y4)then begin ii:= 0; repeat if(x4 + (ii * CheckX) < WestPoint[y4])or (WestPoint[y4] = 0)then WestPoint[y4]:= x4 + (ii * CheckX); if(x4 + (ii * CheckX) > EastPoint[y4])or (EastPoint[y4] = 0)then EastPoint[y4]:= x4 + (ii * CheckX); ii:= ii + 1; until(x4 + (ii * CheckX) = x1); end; if(x1 = x4)and (y1 = y4)then begin if(WestPoint[y4] > x4)then WestPoint[y4]:= x4; if(EastPoint[y4] < x4)then EastPoint[y4]:= x4; if(HeighestPoint > y4)then HeighestPoint:= y4; if(LowestPoint < y4)then LowestPoint:= y4; end; end; ii:= 0; repeat repeat if(GetColor(WestPoint[ii2 + HeighestPoint] + ii, HeighestPoint + ii2) = Color)then begin Result:= True; ix:= WestPoint[ii2 + HeighestPoint] + ii; iy:= HeighestPoint + ii2; Exit; end; ii:= ii + 1; until(WestPoint[ii2 + HeighestPoint] + ii = EastPoint[ii2 + HeighestPoint])or (Result); ii2:= ii2 + 1; until(HeighestPoint + ii2 = LowestPoint)or (Result); end; //////////////////////////////////////////////////////////////////////// // > FindObjTolRiser // //////////////////////////////////////////////////////////////////////// // // This trys to find an object on the game screen starting with a // tolerance of 0. If nothing is found on tolerence of 0, it will // try a tolerence of 1, if nothing found, 2, and so on. // Kind of like FindObj //////////////////////////////////////////////////////////////////////// function FindObjTolRiser(var ix, iy: integer; ObjectText: string; ObjectColor, MinxValue, MinyValue, MaxTol: Integer): Boolean; var Tol: Integer; begin repeat if(FindObj(ix, iy, ObjectText, ObjectColor, Tol, MinxValue, MinyValue))then begin Result:=true; end else Tol:= Tol + 1; until(Result=true)or (tol >= MaxTol); end; //////////////////////////////////////////////////// // > Finds Items with color and up text //////////////////////////////////////////////////// function FindItems(color, tol: Integer; text: string; num: Integer): TPointArray; var xi,yi,tx,ty,Used: Integer; x, y: Integer; begin GameTab(4); SetArrayLength(Result, 0); if(num = 0)then num := -1; ty := 190; tx := 548; repeat yi := yi+1; ty := ty+37; xi := 0; repeat xi := xi+1; tx := tx+41; if(FindColorTolerance(x,y,color,tx-13,ty-13,tx+13,ty+13,tol))then begin MMouse(tx,ty,2,2); Wait(250); if(IsUpText(text))then begin Used := Used+1; setarraylength(result, Used); GetMousePos(Result[Used-1].x, Result[Used-1].y) Wait(150); end; end; until((xi=4) or (Used=num)); tx := 544; until((yi=7) or (Used=num)); end; //////////////////////////////////////////////////// // > Deposit specified Item //////////////////////////////////////////////////// procedure Deposit(i, amount: Integer); begin if(BankScreen) and (ExistsItem(i)) then begin if(amount=0)then begin MouseItem(i, false); Wait(800); ClickOption('All', 2); end else if(amount=10)then begin MouseItem(i, false); Wait(800); ClickOption('10', 2); end else if(amount=5)then begin MouseItem(i, false); Wait(800); ClickOption('5', 2); end else if(amount=1)then begin MouseItem(i, false); Wait(800); end else begin MouseItem(i, false); Wait(800); if ClickOption('X', 2) then repeat Wait(150); until(GetColor(255,410)=8388608); TypeSend(inttostr(amount)); Wait(random(300)); TypeSend(chr(13)); Wait(800); end; ClickOption('Cancel', 2); end; end; //////////////////////////////////////////////////// // > Deposits all Items in specified area //////////////////////////////////////////////////// procedure DepositArea(sx,sy,ex,ey: Integer); var x, y: Integer; begin if(BankScreen)then begin while(FindColor(x,y,65536,sx,sy,ex,ey))do begin Mouse(x+4,y+4,3,3,false); Wait(800); ClickOption('All', 2); end; end; end; //////////////////////////////////////////////////// // > Deposits All Items //////////////////////////////////////////////////// procedure DepositAll; var i: Integer; begin if(BankScreen)then begin for i:= 1 to 28 do if(ExistsItem(i))then begin Deposit(i, 0); Wait(850); end; end; end; //////////////////////////////////////////////////// // > Clicks Mouse on Specified Bank Slot //////////////////////////////////////////////////// procedure BankMouse(i: Integer; left: Boolean); var row, col, x, y: Integer; begin row := i div 8; col := i - (row*8) - 1; if(col<0)then begin col := 7; row := row-1; end; x:= 87 + (47 * col) + random(7); y:= 72 + (38 * row) + random(7); Mouse(x, y, 3, 3, left); end; //////////////////////////////////////////////////// // > Withdraws amount of item //////////////////////////////////////////////////// procedure Withdraw(i, amount: Integer); begin if(BankScreen)then begin if(amount=0)then begin BankMouse(i, false); Wait(800); ClickOption('All', 1); end else if(amount=10)then begin BankMouse(i, false); Wait(800); ClickOption('10', 1); end else if(amount=5)then begin BankMouse(i, false); Wait(800); ClickOption('5', 1); end else if(amount=1)then begin BankMouse(i, true); Wait(800); end else begin BankMouse(i, false); Wait(450); if(ClickOption('X', 1))then begin repeat Wait(150); until(GetColor(255,410)=8388608); TypeSend(inttostr(amount)); Wait(random(300)); TypeSend(chr(13)); Wait(800); end; end; end; end; //////////////////////////////////////////////////// // > Opens BankScreen //////////////////////////////////////////////////// function OpenBank:boolean; var x, y: Integer; begin FindObjCenter(x,y,'Use Bank booth',2842230,9) Mouse(x,y,0,0,False) wait(500+Random(500)) ClickOption('quickly',1) wait(1000+Random(200)) result:=BankScreen; end; //////////////////////////////////////////////////// // > Drops All Items Specified //////////////////////////////////////////////////// procedure DropItems(Color, Tol, Num: Integer; Text: string); var TP: TPointArray; i: Integer; begin TP := FindItems(Color, Tol, Text, Num); for i:=0 to GetArrayLength(TP)-1 do begin Mouse(TP[i].x, TP[i].y, 2, 2, false); ClickText('Drop'); end; end; //////////////////////////////////////////////////// // > Picks up specified Object //////////////////////////////////////////////////// function PickUpObject(color, tol: Integer; name: string): Boolean; var x, y: Integer; begin if(FindObj(x, y, 'Take '+name, color, tol, 7, 10))then begin if(ClickOption(name, 1))then Result := true; end; end; //////////////////////////////////////////////////// // > Loads words for GhostSpeak //////////////////////////////////////////////////// procedure LoadWords(ActionType:String); begin if(ActionType='Fighting')then begin Say[1]:='str lvls'; //Fighting Say[2]:='def lvls'; Say[3]:='att lvls'; Say[4]:='take that'; Say[5]:='crazy'; Say[6]:='cant handle this'; Say[7]:='super'; Say[8]:='pretty fly'; Say[9]:='ooog'; Say[10]:='arg'; Say[11]:='doh'; Say[12]:='doof'; Say[13]:='ai karumba'; Say[14]:='ugg'; Say[15]:='man this is insane'; Say[16]:='booya'; Say[17]:='owning these beasts'; Say[18]:='owned'; Say[19]:='watch and learn'; Say[20]:='oh yeah'; Say[21]:='uh huh'; Say[22]:='victory dance'; Say[23]:='we are the champions'; Say[24]:='no time to sleep'; Say[25]:='perfect'; Say[26]:='captain insano'; Say[27]:='excellent'; Say[28]:='yay almost lvled up'; Say[29]:='keep it up'; Say[30]:='bring it on'; end; if(ActionType='Mining')then begin Say[1]:='Mining lvls'; //Mining Say[2]:='smithing lvls'; Say[3]:='stop stealin my ores'; Say[4]:='i love this pick'; Say[5]:='mining is boring'; Say[6]:='haha'; Say[7]:='lol'; Say[8]:='oh yeah'; Say[9]:='u like to mine'; Say[10]:='go away'; Say[11]:='let me mine in peace'; Say[12]:='bahaha'; Say[13]:='freakin rocks'; Say[14]:='how many ores u got in bank'; Say[15]:='ive got ores'; Say[16]:='my mining owns yours'; Say[17]:='ill give you my pick, not'; Say[18]:='noob'; Say[19]:='minin lvl'; Say[20]:='mining level'; Say[21]:='give me a rune pick'; Say[22]:='are rune picks the best'; Say[23]:='be quiet'; Say[24]:='your annoying'; Say[25]:='buzz off'; Say[26]:='go take a dump'; Say[27]:='mining takes too long'; Say[28]:='yay almost lvl up'; Say[29]:='my mining is about to lvl up'; Say[30]:='w00t'; end; if(ActionType='Woodcutting')then begin Say[1]:='Cutting lvls'; //Woodcutting Say[2]:='wood level'; Say[3]:='woodcutting levels'; Say[4]:='Taste my axe'; Say[5]:='poison ivy oh no'; Say[6]:='chop away'; Say[7]:='the bark is worse than the bite'; Say[8]:='whats the best tree'; Say[9]:='these trees grow fast'; Say[10]:='look at all these logs'; Say[11]:='haha'; Say[12]:='lol'; Say[13]:='owned'; Say[14]:='like my axe'; Say[15]:='my wc is about to lvl'; Say[16]:='yay woodcutting is almost lvled'; Say[17]:='bout to lvl up'; Say[18]:='w00t'; Say[19]:='are rune axes the best'; Say[20]:='i found an owl'; Say[21]:='noob'; Say[22]:='my woodcutting is better than yours'; Say[23]:='axes are cool'; Say[24]:='wow'; Say[25]:='crazy'; Say[26]:='insane'; Say[27]:='cant handle this'; Say[28]:='stupid tree'; Say[29]:='why are leaves green'; Say[30]:='whats your wc lvl'; end; if(ActionType='Cooking')then begin Say[1]:='Cooking lvls'; //Cooking Say[2]:='cooking level'; Say[3]:='cooking levels'; Say[4]:='Taste my pie'; Say[5]:='rofl'; Say[6]:='cook away'; Say[7]:='mmm biscuits'; Say[8]:='whats the best food'; Say[9]:='wanna see my cherry pie'; Say[10]:='look at all these cakes'; Say[11]:='haha'; Say[12]:='lol'; Say[13]:='owned'; Say[14]:='like my spatula'; Say[15]:='my cooking is about to lvl'; Say[16]:='yay cooking is almost lvled'; Say[17]:='bout to lvl up'; Say[18]:='w00t'; Say[19]:='im a chef'; Say[20]:='i found a cookie'; Say[21]:='noob'; Say[22]:='my cooking is better than yours'; Say[23]:='pies are cool'; Say[24]:='wow'; Say[25]:='crazy'; Say[26]:='insane'; Say[27]:='cant handle this'; Say[28]:='stupid oven'; Say[29]:='too much wine'; Say[30]:='whats your cooking lvl'; end; if(ActionType='Fletching')then begin Say[1]:='Fletching lvls'; //Fletching Say[2]:='Fletching level'; Say[3]:='fletchin levels'; Say[4]:='Taste my arrow'; Say[5]:='rofl'; Say[6]:='shoot away'; Say[7]:='my arrow has cool feathers'; Say[8]:='whats the best arrow'; Say[9]:='these arrows are crooked'; Say[10]:='look at all these arrows'; Say[11]:='haha'; Say[12]:='lol'; Say[13]:='owned'; Say[14]:='like my arrow'; Say[15]:='my fletching is about to lvl'; Say[16]:='yay fletching is almost lvled'; Say[17]:='bout to lvl up'; Say[18]:='w00t'; Say[19]:='are rune arrows the best'; Say[20]:='i dont have the skills'; Say[21]:='noob'; Say[22]:='my fletching is better than yours'; Say[23]:='arrows are cool'; Say[24]:='wow'; Say[25]:='crazy'; Say[26]:='insane'; Say[27]:='cant handle this'; Say[28]:='stupid arrow'; Say[29]:='freakin idiot'; Say[30]:='whats your fletching lvl'; end; if(ActionType='Smelting')then begin Say[1]:='smelting lvls'; //Smelting Say[2]:='Smelting level'; Say[3]:='smelting levels'; Say[4]:='Taste my iron bar'; Say[5]:='rofl'; Say[6]:='smelt away'; Say[7]:='how about steel'; Say[8]:='whats the best bar'; Say[9]:='these bars smelt fast'; Say[10]:='this iron keeps melting'; Say[11]:='haha'; Say[12]:='lol'; Say[13]:='owned'; Say[14]:='like my skillz'; Say[15]:='my smelting is about to lvl'; Say[16]:='yay smelting is almost lvled'; Say[17]:='bout to lvl up'; Say[18]:='w00t'; Say[19]:='are rune bars the best'; Say[20]:='i found a rune bar'; Say[21]:='noob'; Say[22]:='my smelting is better than yours'; Say[23]:='bars are cool'; Say[24]:='wow'; Say[25]:='crazy'; Say[26]:='insane'; Say[27]:='cant handle this'; Say[28]:='stupid iron'; Say[29]:='im gonna sell this and get rich'; Say[30]:='whats your smelting lvl'; end; end; //////////////////////////////////////////////////// // > GhostSpeak :D //////////////////////////////////////////////////// procedure GhostSpeak(Action:string); var rn:Integer; begin LoadWords(Action) if(random(25)=1)then begin rn:=random(30)+1; typesend(Say[rn]) Wait(100+random(100)); end; end; //////////////////////////////////////////////////// // > Gets Stat //////////////////////////////////////////////////// function GetStatFor(stat:string; bottom:Integer):Integer; var ox, oy, Count:Integer; begin GameTab(2); If(Bottom=0)Then begin case LowerCase(stat) of 'attack', 'strength','defence','range','prayer', 'magic', 'rc': ox:=587 'hp','agility','herblore','thieve','crafting','fletching','slayer': ox:=651 'mining','smithing','fishing','cooking','fire','wc','farming': ox:=715 end; case LowerCase(stat) of 'attack','hp','mining': oy:=210 'strength','agility','smithing': oy:=241 'defence','herblore','fishing': oy:=272 'range','thieve','cooking': oy:=303 'prayer','crafting','fire': oy:=334 'magic','fletching','wc': oy:=365 'rc','slayer','farming': oy:=396 end; end; if(bottom=1)then begin case LowerCase(stat) of 'attack', 'strength','defence','range','prayer', 'magic', 'rc': ox:=599 'hp','agility','herblore','thieve','crafting','fletching','slayer': ox:=663 'mining','smithing','fishing','cooking','fire','wc','farming': ox:=727 end; case LowerCase(stat) of 'attack','hp','mining': oy:=222 'strength','agility','smithing': oy:=253 'defence','herblore','fishing': oy:=284 'range','thieve','cooking': oy:=315 'prayer','crafting','fire': oy:=346 'magic','fletching','wc': oy:=377 'rc','slayer','farming': oy:=408 end; end; Repeat Count:=Count+1; Result:=StrToInt(GetTextAtEx(ox, oy, 45, Fontsmall, False, False, 0, 2, -1, 2, True, tr_AllChars)); Until(Result>0)or(Count=10) end; //////////////////////////////////////////////////// // > Gets HP Percentage //////////////////////////////////////////////////// function GetHp:Integer; var Hp1,Hp2:Integer; begin Hp1:=(GetStatFor('hp',0)) Hp2:=(GetStatFor('hp',1)) if(Hp1>0)and(Hp2>0)then Result:=Round((Hp1/Hp2)*100); end; //////////////////////////////////////////////////// // > Looks DTM on specified inv (redoing) //////////////////////////////////////////////////// function InventorySlotDTM(i, DTM:Integer):Boolean; var x, y: Integer; row, col: Integer; begin row := i div 4; col := i - (row*4) - 1; if(col<0)then begin col := 3; row := row-1; end; Result:= FindDtm(DTM, x, y, (col*45)+525, (col*45)+560, (row*30)+180, (row*30)+210); end; //////////////////////////////////////////////////// // > Drops DTM In Inventory //////////////////////////////////////////////////// procedure DropInvenDTM(DTM:Integer); var i: Integer; x, y: Integer; begin for i:= 1 to 28 do if(InventorySlotDTM(i, DTM))then begin Mouse(x,y,0,0,False); wait(300); if(not ClickOption('Drop', 2))then ClickOption('Cancel', 2); end; end; //////////////////////////////////////////////////// // > RANDOMS //////////////////////////////////////////////////// // > RANDOMS //////////////////////////////////////////////////// // > RANDOMS //////////////////////////////////////////////////// //////////////////////////////////////////////////// // > Looks For Mysterious Box //////////////////////////////////////////////////// Function LookForBox(clickit:boolean):boolean; var x, y: Integer; begin if(FindBitmapSpiralTolerance(RandomBox,x,y,565,205,730,460,30))then begin Result:=True; BoxFound:=true; if(clickit)then begin Mouse(x,y,10,10,true); wait(3000+random(1000)); end; end; end; //////////////////////////////////////////////////// // > BoxBreaker (soon to be improved) //////////////////////////////////////////////////// var bluecircle,redcircle,yellowcircle,bluecircle2,redcircle2,yellowcircle2,bluecircle3,redcircle3,yellowcircle3, bluehalfmoon,redhalfmoon,yellowhalfmoon,bluetriangle,redtriangle,yellowtriangle, bluesquare,redsquare,yellowsquare,bluesquare2,redsquare2,yellowsquare2,bluestar, redstar,yellowstar,bluestar2,redstar2,yellowstar2,boxes,i: Integer; text,answer,question: string; done,LoadedBoxBmp: Boolean; procedure getquestion; var x, y: Integer; begin status('Finding Question') done:=false; for i:=0 to 8 do begin case i of 0:text:='Bl'; //Blue 1:text:='R'; //Red 2:text:='Ye'; //Yellow 3:text:='Ci'; //Circle 4:text:='Ha'; //Halfmoon 5:text:='Tri'; //Triangle 6:text:='Sq';//Square 7:text:='St';//Star end; if(SearchForText(x,y,285,256,340,275,Text,UpChars))then begin answer:=text; break; end; end; end; procedure getanswer; var c:Integer; x, y: Integer; begin status('Solving Box...') answer:=''; case i of 0:question:='Blue Shape'; 1:question:='Red Shape'; 2:question:='Yellow Shape'; 3:question:='Color of the Circle'; 4:question:='Color of the Halfmoon'; 5:question:='Color of the Triangle'; 6:question:='Color of the Square'; 7:question:='Color of the Star'; end; writeln('Searching for the '+question+'...') case i of 0:begin repeat wait(10); if(findbitmaptolerancein(bluecircle,x,y,245,129,271,143,30))then answer:='Circle'; if(findbitmaptolerancein(bluecircle2,x,y,250,131,284,146,30))then answer:='Circle'; if(findbitmaptolerancein(bluecircle3,x,y,233,118,267,132,30))then answer:='Circle'; if(findbitmaptolerancein(bluehalfmoon,x,y,238,117,265,135,30))then answer:='Halfmoon'; if(findbitmaptolerancein(bluetriangle,x,y,244,103,273,150,30))then answer:='Triangle'; if(findbitmaptolerancein(bluesquare,x,y,239,133,265,153,30))then answer:='Square'; if(findbitmaptolerancein(bluesquare2,x,y,249,117,272,138,30))then answer:='Square'; if(findbitmaptolerancein(bluestar,x,y,263,119,290,139,30))then answer:='Star'; if(findbitmaptolerancein(bluestar2,x,y,237,129,262,148,30))then answer:='Star'; c:=c+1; until(answer<>'')or(c>=500); end; 1:begin repeat wait(10); if(findbitmaptolerancein(redcircle,x,y,245,129,277,145,30))then answer:='Circle'; if(findbitmaptolerancein(redcircle2,x,y,247,118,280,132,30))then answer:='Circle'; if(findbitmaptolerancein(redcircle3,x,y,247,132,284,148,30))then answer:='Circle'; if(findbitmaptolerancein(redhalfmoon,x,y,238,117,265,135,30))then answer:='Halfmoon'; if(findbitmaptolerancein(redtriangle,x,y,246,103,271,119,30))then answer:='Triangle'; if(findbitmaptolerancein(redsquare,x,y,255,134,279,153,30))then answer:='Square'; if(findbitmaptolerancein(redsquare2,x,y,237,118,260,138,30))then answer:='Square'; if(findbitmaptolerancein(redstar,x,y,249,121,276,140,30))then answer:='Star'; if(findbitmaptolerancein(redstar2,x,y,238,132,261,149,30))then answer:='Star'; c:=c+1; until(answer<>'')or(c>=500); end; 2:begin repeat wait(20); if(findbitmaptolerancein(yellowcircle,x,y,246,128,278,144,30))then answer:='Circle'; if(findbitmaptolerancein(yellowcircle2,x,y,233,117,267,132,30))then answer:='Circle'; if(findbitmaptolerancein(yellowcircle3,x,y,250,131,284,146,30))then answer:='Circle'; if(findbitmaptolerancein(yellowhalfmoon,x,y,238,117,265,135,30))then answer:='Halfmoon'; if(findbitmaptolerancein(yellowtriangle,x,y,245,104,272,119,30))then answer:='Triangle'; if(findbitmaptolerancein(yellowsquare,x,y,255,134,280,153,30))then answer:='Square'; if(findbitmaptolerancein(yellowsquare2,x,y,236,119,260,138,30))then answer:='Square'; if(findbitmaptolerancein(yellowstar,x,y,240,137,260,150,30))then answer:='Star'; if(findbitmaptolerancein(yellowstar2,x,y,264,121,290,139,30))then answer:='Star'; c:=c+1; until(answer<>'')or(c>=500); end; 3:begin repeat wait(20); if(findbitmaptolerancein(bluecircle,x,y,245,129,271,143,30))then answer:='Blue'; if(findbitmaptolerancein(bluecircle2,x,y,250,131,284,146,30))then answer:='Blue'; if(findbitmaptolerancein(bluecircle3,x,y,233,118,267,132,30))then answer:='Blue'; if(findbitmaptolerancein(redcircle,x,y,245,129,277,145,30))then answer:='Red'; if(findbitmaptolerancein(redcircle2,x,y,247,118,280,132,30))then answer:='Red'; if(findbitmaptolerancein(redcircle3,x,y,247,132,284,148,30))then answer:='Red'; if(findbitmaptolerancein(yellowcircle,x,y,246,128,278,144,30))then answer:='Yellow'; if(findbitmaptolerancein(yellowcircle2,x,y,233,117,267,132,30))then answer:='Yellow'; if(findbitmaptolerancein(yellowcircle3,x,y,250,131,284,146,30))then answer:='Yellow'; c:=c+1; until(answer<>'')or(c>=500); end; 4:begin repeat wait(20); if(findbitmaptolerancein(bluehalfmoon,x,y,238,117,265,135,30))then answer:='Blue'; if(findbitmaptolerancein(redhalfmoon,x,y,238,117,265,135,30))then answer:='Red'; if(findbitmaptolerancein(yellowhalfmoon,x,y,238,117,265,135,30))then answer:='Yellow'; c:=c+1; until(answer<>'')or(c>=500); end; 5:begin repeat wait(20); if(findbitmaptolerancein(bluetriangle,x,y,244,103,273,120,30))then answer:='Blue'; if(findbitmaptolerancein(redtriangle,x,y,246,103,271,119,30))then answer:='Red'; if(findbitmaptolerancein(yellowtriangle,x,y,45,104,272,119,30))then answer:='Yellow'; c:=c+1; until(answer<>'')or(c>=500); end; 6:begin repeat wait(20); if(findbitmaptolerancein(bluesquare,x,y,239,133,265,153,30))then answer:='Blue'; if(findbitmaptolerancein(bluesquare2,x,y,249,117,272,138,30))then answer:='Blue'; if(findbitmaptolerancein(redsquare,x,y,255,134,279,153,30))then answer:='Red'; if(findbitmaptolerancein(redsquare2,x,y,237,118,260,138,30))then answer:='Red'; if(findbitmaptolerancein(yellowsquare,x,y,255,134,280,153,30))then answer:='Yellow'; if(findbitmaptolerancein(yellowsquare2,x,y,236,119,260,138,30))then answer:='Yellow'; c:=c+1; until(answer<>'')or(c>=500); end; 7:begin repeat wait(20); if(findbitmaptolerancein(yellowstar,x,y,240,137,260,150,30))then answer:='Yellow'; if(findbitmaptolerancein(yellowstar2,x,y,264,121,290,139,30))then answer:='Yellow'; if(findbitmaptolerancein(bluestar,x,y,263,119,290,139,30))then answer:='Blue'; if(findbitmaptolerancein(bluestar2,x,y,237,129,262,148,30))then answer:='Blue'; if(findbitmaptolerancein(redstar,x,y,249,121,276,140,30))then answer:='Red'; if(findbitmaptolerancein(redstar2,x,y,238,132,261,149,30))then answer:='Red'; c:=c+1; until(answer<>'')or(c>=500); end; end; end; procedure AnswerQuestion; var y: Integer; begin writeln('Clicking The Answer '+answer); ClickOption(answer,2); writeln('Clicked...'); wait(100+random(50)); if(answer<>'')and(y>275)then BoxFound:=false; end; procedure loadboxbmps; begin bluecircle := BitmapFromString(25, 13, 'z78DADDD3CB0A80201085E157' + 'B29C333AEB2EEFFF48056D06441D292D22F897F1A1476608662EF' + '6FC7C5C47960DAAF1C256D518E77D5517A70789EB61BB1A269E20' + 'ADBD54BAEF7AB4EA0B12DDF4CFB4D11E45D7B2C6A73CA98A16DA2' + '2A7AD2C130802DDF2422CCD9E58AB9000F196DDDA55395BEBCDF6' + '50A5B6CA4B71707129ABFED4032A2F99F6'); bluecircle2 := BitmapFromString(33, 14, 'z78DAD5954B0A80300C05AFE4' + '27AF9AADA8F73F92C57651E887404D319B4114CA0CD8042B88279' + '8E236BB199CD2BA7FACB8B0D0E19C7F5A2CFA0706FF9C56FCDB15' + '23BB249ED57FE93D415ED1CF1EDBF68DB6E85F984B04F01AA9D0F' + '581A164C6A6152FC7FB7FB02F041585D3FCBBFD4C29F7D79809ED' + '8AFC6B645651235D74EF1CA8B167259316C0C628B07672B348E38' + 'EF7EC0EEDF933B2E53FCE0F2EA13D2F'); bluecircle3 := BitmapFromString(33, 13, 'z78DAD5944B0E80200C44AF44' + '6C476069FCDCFF489AC8A20988154571F3D8D179810E0C2D64210' + '9588F0419F0D41A7B03E619B1C591516B16033B9A03F3166FBE91' + 'BC5326D4506F51C6AB79CA58DBE21D970EE4A6C03FBAECBF515A7' + 'C6B54B6D747167296E6CEFB2E77DA29B688A73CD53F79977A4DDB' + '427EC55E58EA19E3CE072CB6D39B04ABF580CC7FE2F22DD5C9FF6' + '2944FBB02A4F426F5'); bluehalfmoon := BitmapFromString(26, 17, 'z78DAEDD1D10A80200C05D05F' + '0ADC1D3E07F9FF9F54580FC272ACD494F0E5FA3276CF109EE056C' + '4A480C50F94385EF2694EE19F84D23685BA644CA1DEDB57A8F7E6' + '6CDF382D5DBD84F62E39C30E4C41666B9B2ECCA9EA3ADFFD97DD5' + '6A2E50D01ACDBE4CE129B5D7BDAA4D0B2A7AEF02613DB950F2F1D' + 'CDD65C18253BFF4750FD'); bluesquare := BitmapFromString(25, 19, 'z78DACDD4B10E84300C03D05F' + '62C0A1AC77C7FFFF120296A2922A175B158BC7E8B54D6D1FFC007' + '3120BCA5A986C672E30C3D64FEBAA185BCE7325264CE5ABB5519E' + '6BCEA952D9729E8769958AB1C93CD5B49CCD4BC6D39E91B7F11EE' + 'F0FE66C2A4FBF19E236AD27D257ADAD161E5BBFDE32DE007C8B3E' + '681B8FD6A6928CB7B95B31C4E609231B1B4995F0DFDF345292B37' + '1EF65B3CD2A9B6E8B0E559D23EF3CAE7A836D07827F71BB'); bluesquare2 := BitmapFromString(22, 20, 'z78DAC5D3411283200C05D02B' + '61936F61D9517AFF2375465CC0449C40C06EFE4EFE23448E14893' + '84B7CD8533CF305F2FBEC6461B890CCF31C27D70C1327236EA731' + '0C93C8D9361A3A3D955E79C21489A63DA583F39B4552DD61C5DDF' + '3DE5C326C328AF6DA3E4C9174FD1776893C67EC7FA16FD7BCD180' + '3B1EBB6479A9E65E02075764DA6783648DF8C2ABBE62205C65972' + '1CF646890DCCEA14F921BF49E62DB85A1555233A824E6099C0620' + '62BF97E85FCA64F893E4BDAC0B426178D093DA53FE00734549CD'); bluestar := BitmapFromString(26, 19, 'z78DAE5D3310E80200C05D02B' + '61A488A3C6DEFF4A1A71D09412282D8BCB1F14FD2FA1F5082EEEE' + '0608A8745861982C7864440084FBE9E8FB765CE33360B61BDEDA3' + 'BA93FB83A190B4976DD642DADB6FD312CA6C9EECA985B06CE3DEB' + '6EEF878DB756A59B79416422D5B95904C8BF59D56098BF36C3D6F' + '1921F7AD92B0791752A3AA50C1461B9584425B4D63B7B0D9264A9' + '9708C4D261C69FB739E0BDD90BC'); bluestar2 := BitmapFromString(24, 18, 'z78DACDD44B0E80200C04D033' + '09147009F1FE6772A18B1A421DCA276CBA1ADB97D14886DC69499' + 'C21F9E80F0292C8F49112193E3F998B0E97910DD3253B7B44D5CF' + '0695A79A5CE2419A09C65BCADC235F5CE9411AD07970C933CB7CE' + 'D29DD5B933773C97A8FDC8CEC2937B47A78FEFD3644C91A0F2E41' + '3C3A1597ECE029AF2012DCC3AFB77A70C90C4F4F333A15FE3FD14' + '97A54A3EEF6DBC6F6C0E70DB805229A'); bluetriangle := BitmapFromString(28, 16, 'z78DAEDD53D0E80200C80D12B' + '096D4D1D25C1FB1F49A32E447E2D44892EDFC0D21712282E34B0C' + '1BF1F2B318EE0B41767410901E6E26E9391E3ADEC94CB33CCA7DC' + 'A2E529DE379845CE81345B4F35C1A49C5E543973EF55E4BCDC730' + '7CEE35729351830A09CE66B9F75C6E5FB49422B70865E629633DA' + '8430E02C6D35674858492B777AE475774733670BED0A5AFC4FF5'); redcircle := BitmapFromString(31, 15, 'z78DAEDD34D0A80201080D12B' + 'A5F323B334A9FB1FA9C01613522A514DD0E65B09BDB19199843C9' + 'F367A9C215A2B37C86D4ED12BB733CB75F9BBB3DCE1CF0D8E1DC9' + '1DDDFC4803A45CFB662DFF8A56B7FCBA244C20BA2DDBF5A4B9944' + 'BC471D516ADBC94480093EEEE9FAA3DBCDEA69BEF9D2290DF9B9F' + '911FF97BB7E82D79E93F3F29334E35F9DFBF16BA00860F55B7'); redcircle2 := BitmapFromString(33, 14, 'z78DAD5D44B0A80300C04D02B' + '994FFD2C2BD4FB1F49312E0A92925A0D76331B05E7953A9C28114' + '5E48D628F1952405EF954E4D941F3C83325E9AF29FE29BA9A2B59' + '56788ACA3DDF5248D28000A3E5CD96565F2B6AD347B16CC7D7A26' + '48F22B98DB9C247A49D61396B15CFFEEB5A8BBDBFC56239FFB756' + 'A85DA1593C37D6AEC01909417B7A5FE60946088BA4A7A27D07F2E' + '6F7FC7AA9DA97ADDCFFFF22ADE70E427E7341'); redcircle3 := BitmapFromString(36, 15, 'z78DAD5D6C10E83200C06E057' + '9A94623832E6DEFF9146C403A6A9296B17BBCB7FD1847E427EC40' + 'D437CE29025E203AA2A437C43314E66AD75490B669A485C3D536A' + 'CF820BD7A4887375114D3FAE6B117571A269A9DA22999CCB63861' + '5036CB322ABD4CCCF8A06D798FF2892B84EB9BFE341246F0F91CB' + '7407F50AB9EE68804997A42BE422831BF3B22739E349C47D0171D' + '7E51A2BE49EB62E898EEDF682D01434BFEAFC5FB48724FD74DDBD' + '3A473363FBD778E98DEEF6627769743ECFD80766BCB3E7'); redhalfmoon := BitmapFromString(26, 17, 'z78DAEDD14D0A80201086E12B' + '05F383DB8CBCFF91026B514C0E536A4AB87957E2F788E490C053E' + 'C3CE102AE9F92C780970EE19F84D23684BAA44FA1BEDB56A8EFA6' + '6CDF382D5BAD84F62D79868118836C6D9B2E4CA9CA3ADFFD97DD9' + '6A3E59502B16E9377E6D8ECDADD2685967BCA0A6F7AB21D7DF8D2' + 'DE6CD58551B201AAD14AD9'); redsquare := BitmapFromString(23, 18, 'z78DAC5D4C10EC0100C06E05