{.Script Info: # ScriptName = Squig 4.04 # Author = Squigglyo # Description = Include Created by Squigglyo # Version = 4.04 # Date = 26 / 09 / 05 # Comments = Created To handle random eventsCheckSkill(Skill : String); also does alot Of other things. Check the manual out. Any questions pm me, me user is Squigglyo at www.kaitnieks.com/scr /Script Info} {= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ] Squig Version 4.04 by Squigglyo [= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ] Huge thanks To Benland100 who has contributed his password saver And FindTextArcSpiral among other things Special Thanks: poppa68 = > Huge help getting bitmaps And broken picks And axes For V2 Odie5583 = > Some Of my original procedures are based loosly on his in Osi Akumara = > My box solver is based loosly on his BoxBreaker2 just reprogrammed piv = > Contributed his gas finder pups = > Contributed his maze detector Stupid3ooo = > Allowed me To use his Frog Solver Zup = > Helped update MouseC KnightStreak = > Allowed me to use his Dr. Ford Solver VG_Kobra = > Got me pictures of the Evil Bob random event jiakhang = > Helped fix up the GasFinding procedures Driger1592 = > Updated SetChat for me among other various things. Goldec = > Looked thru Squig for me People who suggested things And got them put into Squig. JayJay = > Bank/Drop Item Color SilentWolf = > Faster FindObject Procedure Qwerty = > Easy Map Walking, Random Talker, Faster DropAll Monkie = > Drop Item by Name The Saint = > FindObjectIn Abyssal = > WorkedFor, ClearDebug Moparisthebest = > DepositAll2 Theino = > MapFlaggingH Freddy1990 = > MouseR, MouseBox, DragFromTo Smitty = > MapCompass('R'); Version 2 Testers: BrokenSkateboard Version 3 Testers: Sdouble Philodespotos = >Special thanks To Phil, he has helped test alot Mysteryman Milk JayJay Seifer225 Quilto33 Hemnet Abyssal Deadlydragon Version 4 Testers/ProofReaders: Idiota MoparistheBest Bebemycat2 Pwnd xxKanexx Abyssal = > Returning Tester, Yay for Abyssal Driger1592 [= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = } {Squig should only be downloaded on Kaitnieks' forum Or using Scar} {No other site has my permission To have it on their site} {But since i cannot patrol the internet, If you Do download Squig from somewhere Else, by careful.} {To learn how To use it, use the guide that is found here http://www.kaitnieks.com/scr/showthread.php?p=31137#post31137} {You are not allowed To edit And/Or change this in any way. You are not allowed To take any piece(s) from/out Of Squig, all parts must be left in And the only way To use it's procedures is To include Squig in your script(s). All procedures And/Or functions in Squig were created by Squigglyo. All items in this script are Copyrighted To Squigglyo. This script may not be sold, traded, exchanged, And / Or distributed unless you have been given direct written consent To Do so by me And me only.} {= = = = = = = = = = = = = = = = = = = = = = = = = = = = = Versions Version 1.0, First Release Version 1.1, Bank Opener Version 2.0, Alot Of new procedures, including a Box opener Also updated alot Of things including Global variables And a Lamp Decider. Version 2.1, Added a ScreenShot Taker, And all random events will be screenshotted And placed in the script folder. Version 2.2, Updated the Coding, Updated MouseC, Added ClickHuman Added BuyItemColor And SellItemColor Version 2.2.1, Updated some things Version 2.2.2, Updated the Find Text random event finder Procedure And the login Procedure. Version 2.3, Updated all text finding procedures And the MapFlagging Procedure Version 2.4, Updated the Mapflagging Procedure again Version 2.4.1, Updated all procedures that look For text. Version 2.4.2, Updated the random event talked a little bit. Version 3.0, Fixed the random event talker, added all the other random events i missed, updated the sendkeyshuman2 Procedure, added the GetStat Procedure, added the randomtalk Procedure, added a disease, poison And fight checker, updated the fightfound Procedure, slotfilled Function added, itemcount Function added, fullbag Function added, dropitemcolor Procedure added, bankitemcolor Procedure added, Death checker, Axefound added, pickfound added, findgas added, findnets added, mapcolor Function added, mapwalk Procedure added, dropitemname added, emote Procedure updated. FindObjectIn Added, DragItem Added And alot Of other things updated. Version 3.1, Fixed a little bug in FindObject where it didnt wait long enough To check the text. Fixed a little bug in the FindFight Procedure, fixed a bug where the dropitem Procedure would drink beer, And, fixed a bug in the FullBag Function. Version 3.2, Added documentation, Updated some stuff, Added Dist, FlagPresent Added, GetHp Added, DropItem2 Added, MapFlaggingR Added, FlagPresent Added, MapCompass Added, ClickText Added Version 3.3, Updated procedures that use Istextat2 To IsTextAtEx, Added MapFlaggingH, Added MapFlaggingHR, Added WorkedFor, Added DepositAll2, Added FindGasArea, Added ClearDebug, Updated the RandomTalk Procedure To include 2 things about Farming. Version 4.0, IsTextUp Updated, MouseC Updated, WorkedFor Fixed, OpenBag Updated, OpenCombat Updated, OpenQuests Updated, OpenStats Updated, OpenEquip Updated, OpenPrayer Updated, OpenMagic Updated, OpenFriends Updated, OpenIgnore Updated, Logout Updated, OpenOptions Updated, OpenControls Updated, OpenMusic Updated, SetChat Updated, LogIn Updated, IsTextAt3 Added, IsTextIn3 Added, KillScript Added, LogOutFor Added, FindDtmIn Added, IDHerbs Added, UseItemWith Added, Enchant Added, LowAlch Added, HighAlch Added, FletchAll Added, ThieveNPC Added, WaitR Added, FindColorM Added, Smelt Added, CannonBalls Added, UseSpecial Added, Smith Added, FindFish Added, FindTree Added, EntFound Altered, FindRange Added, IsTextInString Added, RandomLogout Added, DropAllRow Added, DropAllCol Added, DepositAllRow Added, DepositAllCol, MineRock Added, OpenChest Added, FindTextArcSpiral Added, PassSaver Added, Enter Added, CheckSkill Added, BankTop Added, BankBottom Added, Updated all bitmaps LampPresent Added, BoxPresent Added, FindBob Added, FindForester Added, SolveFord Added, FindQuiz Added, SolveFrog Added, FindCerters Added, IsBank Added Version 4.01, Updated the MineRock procedure to handle the new rocks out at the time. Version 4.02, Fixed a small big in DropItem Version 4.03, Small update in GetStat, and bug fix in IsBank Version 4.04, Fixed a small problem with the MineRock and FindObjectIn procedures Added 'R' to Mapcompass = = = = = = = = = = = = = = = = = = = = = = = = = = = = = } Var //Variables used for character sets and times chrChatChars, chrCharsNormal, GSquigTime, gSquigTime2 : Integer; //Variables left unchanged For functionality For older scripts YellowTextTotal, AttacksTotal, TotalBoxes, FordTotal, TotalFrogs : Integer; TotalLamps, TotalEnts, AxeTotal, PickTotal, PlantTotal, GasTotal : Integer; BankID : Integer; User, Pass, Direction, LampSkill : String; randomtalked, fightfound, tradeb, screenshots, checkford, CheckForester : Boolean; checktext, checkfights, checkboxes, checklamps, checkmods, CheckCerters : Boolean; checkplant, checkmime, checkmaze, runback, checkquiz, CheckFrog : Boolean; CheckBob : Boolean; //Variables For the pass saver AccessCode, CName, CPass: String; User2, Pass2: Array Of String; UID: Integer; V: TVariantArray; Main: TForm; Label1: TLabel; Names: TComboBox; Button1, Button2, Delete: TButton; Const {S1, S2, S3 And S4 are the size Of the actual game, Starting at the top right And finishing in the bottom left before they reach the inventory Or chat} S1 = 5; S2 = 5; S3 = 515; S4 = 340; {M1, M2, M3 And M4 are the minimap} M1 = 565; M2 = 5; M3 = 725; M4 = 160; {I1, I2, I3 And I4 are the inventory} I1 = 560; I2 = 210; I3 = 740; I4 = 460; {C1, C2, C3 And C4 are the chat log} c1 = 1; c2 = 340; c3 = 495; c4 = 455; {GameCenterA And GameCenterB are the middle Of the game} GameCenterA = 257; GameCenterB = 168; {MapCenterA And MapCenterB are the middle Of the minimap} MapCenterA = 647; MapCenterB = 83; gSquigMessage = 'Squig 4.04 - Created by Squigglyo'; {^^^^^^^^^^^^^^^^^ CLEARDEBUG ^^^^^^^^^^^^^^^^^^} {This will clear the area where text appears in scar} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure ClearDebug; Var i : Integer; Begin i:= 0; Repeat writeln(''); i:= i + 1; Until(i= 15); End; {^^^^^^^^^^^^^^^^^ FLAGPRESENT ^^^^^^^^^^^^^^^^} {Returns true If the flag is in the minimap And false If it isnt} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function FlagPresent : Boolean; Var a, b, runescapeflag, runescapeflag2 : Integer; Begin result:= false; runescapeflag := BitmapFromstring(7, 7, '000000000000000000000000000000000000FF0000000000000000' + '000000000000000000FF0000FF0000000000000000000000000000' + 'FF0000FF0000FF0000000000000000000000FF0000FF0000FF0000' + 'FF0000000000000000FF0000FF0000FF0000FF0000FF0000000000' + 'FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000' + 'FF0000FF0000FF0000FF0000'); runescapeflag2 := BitmapFromstring(2, 4, 'C656045D3311C656045D3311C656045D3311C656045D3311'); If(findbitmapin(runescapeflag, a, b, 555, 5, 735, 160)) Or(findbitmapin(runescapeflag2, a, b, 555, 5, 735, 160))Then Begin wait(50); If(findbitmapin(runescapeflag, a, b, 555, 5, 735, 160)) Or(findbitmapin(runescapeflag2, a, b, 555, 5, 735, 160))Then result:=true; End; FreeBitmap(runescapeflag); FreeBitmap(runescapeflag2); End; {^^^^^^^^^^^^^^^^^ MAPFLAGGING ^^^^^^^^^^^^^^^^^} {Waits Until the Runescape Flag is not in the minimap} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure MapFlagging; Var color1, color2, color3, x1 : Integer; Begin x1:= 0; If(flagpresent=false)Then exit; Repeat wait(100); x1:= x1 + 1; If(FlagPresent=False)Then wait(1000); If(FlagPresent=False)Then Begin color1:= getcolor(70, 185); color2:= getcolor(436, 68); color3:= getcolor(45, 52); wait(500); If(getcolor(45, 52) = color3)Or(getcolor(70, 185) = color1) Or(getcolor(436, 68) = color2)Then If(flagPresent=False)Then break; End; Until(x1= 150); End; {^^^^^^^^^^^^^^^^^ MAPCOMPASS ^^^^^^^^^^^^^^^^^} {Moves the minimap compass To the desired Direction (N, E, S, W)} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure MapCompass(Compass : String); Var a : Extended; Begin Compass:= Uppercase(Compass); If(Compass = 'R')Or(Compass = 'RANDOM')Then begin SendArrowSilentWait(3, random(5500) + 500); exit; End; Case Compass Of 'N', 'NORTH' : a:= 6.283185307180; 'E', 'EAST' : a:= 4.909784540235; 'S', 'SOUTH' : a:= 3.338988213440; 'W', 'WEST' : a:= 1.570796326795; Else exit; End; While(DetectRS2MinimapCompassAngle<(a - 0.001)) Or(DetectRS2MinimapCompassAngle>(a + 0.001))Do SendArrowSilentWait(3, random(25) + 5); End; {^^^^^^^^^^^^^^^^^ ISTEXTAT3 ^^^^^^^^^^^^^^^^^^} {Works just like Istextat3 but is more acurate, and uses IsTextAtEx} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function IsTextAt3(x, y : Integer; S : String; Tolerance : Integer) : Boolean; Begin result:= IsTextAtEx(x, y, S, Tolerance, ChrCharsNormal, True, False, 0, 1, -1); If(result=False)Then result:= IsTextAtEx(x - 2, y - 2, S, Tolerance, ChrCharsNormal, True, False, 0, 1, -1); If(Result=false)Then result:= IsTextAtEx(x, y - 2, S, Tolerance, ChrCharsNormal, True, False, 0, 1, -1); If(Result=False)Then result:= IsTextAtEx(x - 2, y, S, Tolerance, ChrCharsNormal, True, False, 0, 1, -1); End; {^^^^^^^^^^^^^^^^^ CHECKCHATMSG ^^^^^^^^^^^^^^^} {Checks the last sentence in the chat box and returns true if it matchets the one its looking for} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function CheckChatMsg(Text: String) : Boolean; Begin Result:= IsTextAtEx(20, 415, Text, 40, ChrChatChars, False, True, 0, 1, 0); End; {^^^^^^^^^^^^^^^^^ ISTEXTIN3 ^^^^^^^^^^^^^^^^^^} {Works just like IsTextInArea but is more acurate, and uses IsTextinAreaEx} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function IsTextIn3(x1, y1, x2, y2 : Integer; Var x, y : integer; S : String) : Boolean; Begin result:= IsTextInAreaEx(x1 , y1, x2, y2, x, y, S, 100, ChrCharsNormal, True, True, 0, 1, -1); End; {^^^^^^^^^^^^^^^^^ ISTEXTUP ^^^^^^^^^^^^^^^^^^^} {Returns true If the text is found at 9, 9} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function IsTextUp(text : String) : Boolean; Begin If(IsTextAt3(9, 9, text, 100))Then result:= true Else result:= false; End; {^^^^^^^^^^^^^^^^^ CLICKHUMAN ^^^^^^^^^^^^^^^^^} {Clicks the mouse like a human would} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure ClickHuman(x, y : Integer; left : Boolean); Begin holdmouse(x, y, left); wait(random(20) + 15); releasemouse(x, y, left); End; {^^^^^^^^^^^^^^^^^^ DIST ^^^^^^^^^^^^^^^^^} {Returns the amount Of pixels between a1, b1 And a2, b2} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function Dist(a1, b1, a2, b2 : Integer) : Integer; Var aa, bb : Extended; Begin If(a1>a2)Then aa:= (a1 - a2) * (a1 - a2) Else aa:= (a2 - a1) * (a2 - a1); If(b1>b2)Then bb:= (b1 - b2) * (b1 - b2) Else bb:= (b2 - b1) * (b2 - b1); result:= trunc(Sqrt(aa + bb)) + 1; End; {^^^^^^^^^^^^^^^^^ MOUSEC ^^^^^^^^^^^^^^^^^} {Moves the mouse To the location given by x And y Left clicks If click is 1, right clicks If its 2, 0 For no click.} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure MouseC(x, y, click : Integer); // New MouseC with the help of Zup Var a, b : Integer; step : Extended; Begin step:= 5; GetMousePos(a, b); Repeat If(Dist(a, b, x, y)<100)Then Begin If(not(Dist(a, b, x, y)= 1))Then step:= step - (10 / Dist(a, b, x, y)); End; If(step<1)Then step:= 1; a:= a + Round((x - a) / step); b:= b + Round((y - b) / step); MoveMouseSmoothEx(a, b, 1, 6, 15, 20, 20); wait(9 + random(4)); Until(Dist(a, b, x, y)= 1); wait(random(19) + 7); Case click Of 1 : Clickhuman(a, b, true); 2 : Clickhuman(a, b, false); End; End; {^^^^^^^^^^^^^^^^^ MOUSER ^^^^^^^^^^^^^^^^^} {Moves the mouse To the location given by x + random(x2) And y + random(y2). Left clicks If click is 1, right clicks If its 2, 0 For no click.} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure MouseR(x, y, xx, yy, click : Integer); Begin MouseC(x + random(xx), y + random(yy), click); End; {^^^^^^^^^^^^^^^^^ MOUSEBOX ^^^^^^^^^^^^^^^} {Moves the mouse inside the location given by x1, y1, x2, y2 Left clicks If click is 1, right clicks If its 2, 0 For no click.} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure MouseBox(x1, y1, x2, y2, click : Integer); Var xx, yy : Integer; Begin if(x1 < x2)then xx:= x1 + random(x2 - x1) else xx:= x1 - random(x1 - x2); if(y1 < y2)then yy:= y1 + random(y2 - y1) else yy:= y1 - random(y1 - y2); MouseC(xx, yy, click); End; {^^^^^^^^^^^^^^^^^ CLICKTEXT ^^^^^^^^^^^^^^^^^^} {Looks For text inside the given area And If found, clicks on it} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function ClickText(text : String; x1, y1, x2, y2 : Integer; left : Boolean) : Boolean; Var a, b : Integer; Begin result:= false; If(IsTextIn3(x1, y1, x2, y2, a, b, Text))Then Begin If(left= true)Then MouseC(a + random(3), b + random(2) + 4, 1) Else MouseC(a + random(3), b + random(2) + 4, 2); result:= true; End; End; {^^^^^^^^^^^^^^^^^ TIMERUNNINGMILI ^^^^^^^^^^^^^^^^^} {Returns the number Of miliseconds the script has been running} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function TimeRunningMili : Integer; Begin result:= GetSystemtime - GSquigTime; End; {^^^^^^^^^^^^^^^^^ TIMERUNNINGSEC ^^^^^^^^^^^^^^^^^} {Returns the number Of seconds the script has been running} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function TimeRunningSec : Integer; Begin result:= (GetSystemtime - GSquigTime) / 1000; End; {^^^^^^^^^^^^^^^^^ TIMERUNNINGMIN ^^^^^^^^^^^^^^^^^} {Returns the number Of minits the script has been running} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function TimeRunningMin : Integer; Begin result:= ((GetSystemtime - GSquigTime) / 1000) / 60; End; {^^^^^^^^^^^^^^^^^ TIMERUNNINGHOUR ^^^^^^^^^^^^^^^^^} {Returns the number Of hours the script has been running} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function TimeRunningHour : Integer; Begin result:= (((GetSystemTime - GSquigTime) / 1000) / 60) / 60; End; {^^^^^^^^^^^^^^^^^ WORKEDFOR ^^^^^^^^^^^^^^^^^^^} {Returns the amount Of time the script has been running For} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function WorkedFor : String; Var int1, int2, int3 : Integer; str1, str2, str3 : String; Begin int1:= TimeRunningHour; int2:= TimeRunningMin; int3:= TimeRunningSec; While(int2>59)Do int2:= int2 - 60; While(int3>59)Do int3:= int3 - 60; If(int1<10)Then str1:= '0' + inttostr(int1 ) Else str1:= inttostr(int1); If(int2<10)Then str2:= '0' + inttostr(int2) Else str2:= inttostr(int2); If(int3<10)Then str3:= '0' + inttostr(int3) Else str3:= inttostr(int3); result:= ('Worked For: ' + str1 + ':' + str2 + ':' + str3); End; {^^^^^^^^^^^^^^^^^ SELLITEMCOLOR ^^^^^^^^^^^^^^^^^^^} {Sells an item that has the color in it defined by ItemColor, Sells the amount defined by Ammount (1, 5, 10 Or 0 For all), And the item name needs To match the variable defined as Name} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure SellItemColor(ItemColor, Ammount : Integer; name : String); Var a, b, x1, y1, x2, y2, txt1, col : Integer; Begin x1:= 570; y1:= 210; x2:= 610; y2:= 245; col:= 1; If(findcolor(a, b, ItemColor, 555, 200, 735, 465))Then Repeat txt1:= 40; If(findcolor(a, b, ItemColor, x1, y1, x2, y2))Then Begin MouseC(a + random(3), b + random(3), 0); While(IsTextAt3(9, 9, 'Value', 100))Do Begin txt1:= txt1 + 1; If(istextat3(txt1, 7, name, 100)) Or(txt1= 130)Then break; End; If(txt1<>130)Then Begin MouseC(a, b, 2); wait(random(300) + 600); If(ammount= 1)Then ClickText('1', I1, I2, I3, I4, true); If(ammount= 5)Then ClickText('5', I1, I2, I3, I4, true); If(ammount<>1)And(ammount<>5)Then ClickText('10', I1, I2, I3, I4, true); Exit; End; End; If(col= 1)Or(col= 3)Or(col= 7)Or(col= 4)Or(col= 5)Then Begin y1:= y1 + 35; y2:= y2 + 35; End Else If(col= 6)Then Begin y1:= y1 + 45; y2:= y2 + 45; End Else If(col= 2)Then Begin y1:= y1 + 40; y2:= y2 + 40; End; col:= col + 1; wait(random(100) + 50); If(col= 8)Then Begin x1:= x1 + 40; x2:= x2 + 40; y1:= 210; y2:= 245; col:= 1; End; wait(random(100) + 100); Until(x1>720); End; {^^^^^^^^^^^^^^^^^ BUYITEMCOLOR ^^^^^^^^^^^^^^^^^^^^} {Buys an item that has the color in it defined by ItemColor, Buys the amount defined by Ammount (1, 5, 10 Or 0 For all), And the item name needs To match the variable defined as Name} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure BuyItemColor(ItemColor, ammount : Integer; name : String); Var a, b, x1, y1, x2, y2, txt1 : Integer; Begin x1:= 75; y1:= 60; x2:= 110; y2:= 100; If(findcolor(a, b, ItemColor, 75, 60, 475, 290))Then Repeat txt1:= 40 If(findcolor(a, b, ItemColor, x1, y1, x2, y2))Then Begin MouseC(a + random(3), b + random(3), 0); While(istextat3(9, 9, 'Value', 100))Do Begin txt1:= txt1 + 1; If(istextat3(txt1, 9, name, 100)) Or(txt1= 130)Then break; End; If(txt1<>130)Then Begin MouseC(a, b, 2); wait(random(300) + 600); If(ammount= 1)Then ClickText('1', I1, I2, I3, I4, true); If(ammount= 5)Then ClickText('5', I1, I2, I3, I4, true); If(ammount<>1)And(ammount<>5)Then ClickText('10', I1, I2, I3, I4, true); Exit; End; End; x1:= x1 + 50; x2:= x2 + 50; wait(random(100) + 50); If(x1>445)Then Begin x1:= 75; x2:= 110; y1:= y1 + 55; y2:= y2 + 55; End; Until(y1>290) End; {^^^^^^^^^^^^^^^^^ LAMPPRESENT ^^^^^^^^^^^^^^^^^} {Returns true if you have a lamp in your bag} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} function LampPresent : Boolean; Var bmpTheLamp, a, b : Integer; begin bmpTheLamp := BitmapFromstring(29, 8, '000000000000000000000000000000000000000000000000000000' + '000000000000000000000000000000939212A7A516000000000000' + '000000000000000000000000000000000000000000000000000000' + '000000000000000000000000000000D4D21C000000000000000000' + '000000000000000000000000000000000000B9B716C0BF19B3B116' + 'A7A5169D9C12939212000000000000000000000000000000000000' + '000000000000000000000000000000000000D1CF19C0BF19C0BF19' + 'C0BF19C0BF19000000000000000000000000000000BBB916B3B116' + 'B0AE16ACAB169D9C129392128D8B1276750E000000000000000000' + '000000000000000000000000000000000000000000D1CF19C0BF19' + 'B0AE16B6B416BEBC19C6C519C6C519D1CF19CCCA19C9C719C6C519' + 'C6C519C0BF19BBB916B6B416ACAB16A4A2129A981293921286840E' + '7A790E6B6A095D5C09A7A516000000000000000000000000000000' + '000000000000000000000000000000CCCA19CCCA19CECC19C6C519' + 'C3C219C0BF19BEBC19BBB916B9B716B6B416B3B116A9A816A4A212' + '9D9C12979612908F1282810E9A9812B0AE1689880E000000000000' + '000000000000000000000000000000000000000000000000D4D21C' + 'CECC19CCCA19C0BF19BEBC19BBB916B6B416B3B116B0AE16A9A816' + 'A4A212A19F129A981289880E86840E8D8B129392129D9C12B9B716' + '666509000000000000000000000000000000000000000000000000' + '000000000000000000CCCA19CCCA19BBB916B9B716B6B416B3B116' + 'B0AE16A9A816A4A2129D9C1297961282810E7A790E86840E000000' + '000000000000C3C219A9A816000000000000000000000000000000' + '000000000000000000000000000000CCCA19CCCA19C0BF19B9B716' + 'B3B116B0AE16ACAB16A7A516A19F129A98128D8B127A790E76750E' + '000000000000C3C219B6B416A7A516000000000000'); If(FindBitmaptolerancein(bmpTheLamp, a, b, 560, 215, 730, 455, 20))Or FindBitmaptolerancein(bmpTheLamp, a, b, 95, 65, 440, 255, 20)Then Result:= true; FreeBitmap(bmpTheLamp); end; {^^^^^^^^^^^^^^^^^ TAKESCREENSHOT ^^^^^^^^^^^^^^^^^^} {Takes a screenshot Of the runescape client And saves it in the script folder, the name Of the file is defined in the reason variable And the number variable} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeScreenShot(reason:String; number:Integer); Begin If(screenshots= true)Then Begin SaveScreenshot(apppath + 'scripts\' + reason + inttostr(number) + '.bmp'); writeln('Screenshot taken: ' + reason + ' #' + inttostr(number)); End; End; {^^^^^^^^^^^^^^^^^ OPENEQUIP ^^^^^^^^^^^^^^^^^^^^^^^} {Opens the Equipment tab} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure OpenEquip; Begin If(getcolor(680, 173) = 5531511)Then MouseC(random(10) + 675, random(10) + 175, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFSWORD ^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your weapon} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffSword; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 580, random(10) + 300, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFHELM ^^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your helmet} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffHelm; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 640, random(10) + 215, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFCAPE ^^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your cape} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffCape; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 595, random(10) + 255, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFNECKLACE ^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your necklace} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffNecklace; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 640, random(10) + 255, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFARROWS ^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your arrows} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffArrows; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 680, random(10) + 255, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFBODY ^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your body armor} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffBody; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 650, random(10) + 300, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFSHIELD ^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your shield} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffShield; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 695, random(10) + 300, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFLEGS ^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your leg armor} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffLegs; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 635, random(10) + 335, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFGLOVES ^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your gloves} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffGloves; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 580, random(10) + 375, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFBOOTS ^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your boots} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffBoots; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 640, random(10) + 375, 1); End; {^^^^^^^^^^^^^^^^^ TAKEOFFRING ^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And unequips your ring} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TakeOffRing; Begin OpenEquip; wait(random(300) + 300); MouseC(random(10) + 695, random(10) + 375, 1); End; {^^^^^^^^^^^^^^^^^ WEARINGRING ^^^^^^^^^^^^^^^^^^^^} {Opens the equipment tab If needed And returns true If your wearing a ring And false If your not} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function WearingRing : Boolean; Begin OpenEquip; wait(random(300) + 300); If(getcolor(705, 384)<>2304814)Then Result:= true Else result:= false; End; {^^^^^^^^^^^^^^^^^ SENDKEYSHUMAN ^^^^^^^^^^^^^^^^^^} {Types in whatever is in the variable text at the speed a human does} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure SendKeysHuman(text:String); Var a1 : Integer; Begin a1:= 1; Repeat wait(random(220) + 15); sendkeys(copy(text, a1, 1)); a1:= a1 + 1; Until a1 > length(text); End; {^^^^^^^^^^^^^^^^^ SENDKEYSHUMAN2 ^^^^^^^^^^^^^^^^^} {Types whatever is in the vaariable text at the speed a human does And also has the chance To make human-like mistakes} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure SendKeysHuman2(text:String); Var a1, a2, a3 : Integer; char1, char2 : String; mistake : Boolean; Begin a1:= 1; a3:= random(4) + 1 mistake:= false; Repeat a2:= random(50); If(a2<>5)Or(mistake= true)Then Begin wait(random(220) + 15); sendkeys(copy(text, a1, 1)); End Else Begin mistake:= true; char1:= (copy(text, a1, 1)); char1:= Lowercase(char1); char2:= char1; a2:= random(2); If(a2= 0)Then Case char1 Of '`' : char2:= '`'; '1' : char2:= '`'; '2' : char2:= '1'; '3' : char2:= '2'; '4' : char2:= '3'; '5' : char2:= '4'; '6' : char2:= '5'; '7' : char2:= '6'; '8' : char2:= '7'; '9' : char2:= '8'; '0' : char2:= '9'; '-' : char2:= '0'; '=' : char2:= '-'; '~' : char2:= '~'; '!' : char2:= '~'; '@' : char2:= '!'; '#' : char2:= '@'; '$' : char2:= '#'; '%' : char2:= '$'; '^' : char2:= '%'; '&' : char2:= '^'; '*' : char2:= '&'; '(' : char2:= '*'; ')' : char2:= '('; '_' : char2:= ')'; '+' : char2:= '_'; 'q' : char2:= 'q'; 'w' : char2:= 'q'; 'e' : char2:= 'w'; 'r' : char2:= 'e'; 't' : char2:= 'r'; 'y' : char2:= 't'; 'u' : char2:= 'y'; 'i' : char2:= 'u'; 'o' : char2:= 'i'; 'p' : char2:= 'o'; '[' : char2:= 'p'; '{' : char2:= 'P'; ']' : char2:= '['; '}' : char2:= '{'; '\' : char2:= ']'; '|' : char2:= '}'; 'a' : char2:= 'a'; 's' : char2:= 'a'; 'd' : char2:= 's'; 'f' : char2:= 'd'; 'g' : char2:= 'f'; 'h' : char2:= 'g'; 'j' : char2:= 'h'; 'k' : char2:= 'j'; 'l' : char2:= 'k'; ';' : char2:= 'l'; ':' : char2:= 'L'; chr(39) : char2:= ';'; '"' : char2:= ':'; 'z' : char2:= 'z'; 'x' : char2:= 'z'; 'c' : char2:= 'x'; 'v' : char2:= 'c'; 'b' : char2:= 'v'; 'n' : char2:= 'b'; 'm' : char2:= 'n'; ',' : char2:= 'm'; '<' : char2:= 'M'; '.' : char2:= ','; '>' : char2:= '<'; ' / ' : char2:= '.'; '?' : char2:= '>'; End; If(a2= 1)Then Case char1 Of '`' : char2:= '1'; '1' : char2:= '2'; '2' : char2:= '3'; '3' : char2:= '4'; '4' : char2:= '5'; '5' : char2:= '6'; '6' : char2:= '7'; '7' : char2:= '8'; '8' : char2:= '9'; '9' : char2:= '0'; '0' : char2:= '-'; '-' : char2:= '='; '=' : char2:= '='; '~' : char2:= '!'; '!' : char2:= '@'; '@' : char2:= '#'; '#' : char2:= '$'; '$' : char2:= '%'; '%' : char2:= '^'; '^' : char2:= '&'; '&' : char2:= '*'; '*' : char2:= '('; '(' : char2:= ')'; ')' : char2:= '_'; '_' : char2:= '+'; '+' : char2:= '+'; 'q' : char2:= 'w'; 'w' : char2:= 'e'; 'e' : char2:= 'r'; 'r' : char2:= 't'; 't' : char2:= 'y'; 'y' : char2:= 'u'; 'u' : char2:= 'i'; 'i' : char2:= 'o'; 'o' : char2:= 'p'; 'p' : char2:= '['; '[' : char2:= ']'; '{' : char2:= '}'; ']' : char2:= '\'; '}' : char2:= '|'; '\' : char2:= '\'; '|' : char2:= '|'; 'a' : char2:= 's'; 's' : char2:= 'd'; 'd' : char2:= 'f'; 'f' : char2:= 'g'; 'g' : char2:= 'h'; 'h' : char2:= 'j'; 'j' : char2:= 'k'; 'k' : char2:= 'l'; 'l' : char2:= ';'; ';' : char2:= chr(39); ':' : char2:= '"'; chr(39) : char2:= chr(39); '"' : char2:= '"'; 'z' : char2:= 'x'; 'x' : char2:= 'c'; 'c' : char2:= 'v'; 'v' : char2:= 'b'; 'b' : char2:= 'n'; 'n' : char2:= 'm'; 'm' : char2:= ','; ', ' : char2:= '.'; '<' : char2:= '>'; '.' : char2:= '/'; '>' : char2:= '?'; '/' : char2:= '/'; '?' : char2:= '?'; End; sendkeys(char2); End; a1:= a1 + 1; Until a1 > length(text); End; {^^^^^^^^^^^^^^^^^ RANDOM1 ^^^^^^^^^^^^^^^^^^^^^^^^} {Used in the random talking Procedure} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function Random1 : String; Var a : Integer; Begin a:= random(4) + 1; Case a Of 1 : result:= 'man,'; 2 : result:= 'jeez,'; 3 : result:= 'woo,'; 4 : result:= 'cmon,'; End; End; {^^^^^^^^^^^^^^^^^ RANDOMARMOR ^^^^^^^^^^^^^^^^^^^^} {Used in the random talking Procedure, returns a random piece Of armor Or a weapon} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function RandomArmor : String; Var a : Integer; Begin a:= random(77) + 1; Case a Of 1 : result:= 'bronze armor'; 2 : result:= 'iron armor'; 3 : result:= 'steel armor'; 4 : result:= 'mithril armor'; 5 : result:= 'adamite armor'; 6 : result:= 'adam armor'; 7 : result:= 'adamantite armor'; 8 : result:= 'rune armor'; 9 : result:= 'dragon armor'; 10 : result:= 'drag armor'; 11 : result:= 'barrow armor'; 12 : result:= 'green dragon'; 13 : result:= 'green drag'; 14 : result:= 'green ranger'; 15 : result:= 'blue dragon'; 16 : result:= 'blue drag'; 17 : result:= 'blue ranger'; 18 : result:= 'red dragon'; 19 : result:= 'red drag'; 20 : result:= 'red ranger'; 21 : result:= 'black dragon'; 22 : result:= 'black drag'; 23 : result:= 'black ranger'; 24 : result:= 'splitbark armor'; 25 : result:= 'trimmed armor'; 26 : result:= 'god armor'; 27 : result:= 'guthix armor'; 28 : result:= 'sara armor'; 29 : result:= 'saradomin armor'; 30 : result:= 'zammy armor'; 31 : result:= 'zamarok armor'; 32 : result:= 'black trimmed armor'; 33 : result:= 'adam trimmed armor'; 34 : result:= 'rune trimmed armor'; 35 : result:= 'gold trimmed armor'; 36 : result:= 'mystic robes'; 37 : result:= 'ahrim armor'; 38 : result:= 'dharok armor'; 39 : result:= 'guthan armor'; 40 : result:= 'karil armor'; 41 : result:= 'torag armor'; 42 : result:= 'verac armor'; 43 : result:= 'bronze weapons'; 44 : result:= 'iron weapons'; 45 : result:= 'steel weapons'; 46 : result:= 'mithril weapons'; 47 : result:= 'mith weapons'; 48 : result:= 'adam weapons'; 49 : result:= 'adamantite weapons'; 50 : result:= 'rune weapons'; 51 : result:= 'dragon weapons'; 52 : result:= 'crystal shields'; 53 : result:= 'crystal bows'; 54 : result:= 'longbows'; 55 : result:= 'shortbows'; 56 : result:= 'oak longbows'; 57 : result:= 'oak shortbows'; 58 : result:= 'willow shortbows'; 59 : result:= 'willow longbows'; 60 : result:= 'maple longbows'; 61 : result:= 'maple shortbows'; 62 : result:= 'yew longbows'; 63 : result:= 'yew shortbows'; 64 : result:= 'magic longbows'; 65 : result:= 'magic shortbows'; 66 : result:= 'staffs'; 67 : result:= 'battlestaffs'; 68 : result:= 'mystic staffs'; 69 : result:= 'cannons'; 70 : result:= 'ahrims staff'; 71 : result:= 'dharoks greataxe'; 72 : result:= 'guthans warspear'; 73 : result:= 'crossbows'; 74 : result:= 'karils crossbows'; 75 : result:= 'torags hammers'; 76 : result:= 'veracs flail'; 77 : result:= 'gilded armor'; End; End; {^^^^^^^^^^^^^^^^^ RANDOMRARE ^^^^^^^^^^^^^^^^^^^^^} {Used in the random talking Procedure, returns a random rare item} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function RandomRare : String; Var a : Integer; Begin a:= random(56) + 1; Case a Of 1 : result:= 'pumpkins'; 2 : result:= 'christmas crackers'; 3 : result:= 'crackers'; 4 : result:= 'phats'; 5 : result:= 'party hats'; 6 : result:= 'red phats'; 7 : result:= 'red partyhats'; 8 : result:= 'yellow phats'; 9 : result:= 'yellow partyhats'; 10 : result:= 'white phats'; 11 : result:= 'white partyhats'; 12 : result:= 'green phats'; 13 : result:= 'green partyhats'; 14 : result:= 'blue phats'; 15 : result:= 'blue partyhats'; 16 : result:= 'purple partyhats'; 17 : result:= 'purple phats'; 18 : result:= 'easter eggs'; 19 : result:= 'red masks'; 20 : result:= 'blue masks'; 21 : result:= 'green masks'; 22 : result:= 'santa hats'; 23 : result:= 'santas'; 24 : result:= 'dragon spears'; 25 : result:= 'dragon meduim helmets'; 26 : result:= 'dragon meds'; 27 : result:= 'dragon helms'; 28 : result:= 'dragon shields'; 29 : result:= 'dragon squares'; 30 : result:= 'dragon chains'; 31 : result:= 'dragon chainbodys'; 32 : result:= 'dragon legs'; 33 : result:= 'dragon platelegs'; 34 : result:= 'white berets'; 35 : result:= 'blue berets'; 36 : result:= 'black berets'; 37 : result:= 'highwayman masks'; 38 : result:= 'red headbands'; 39 : result:= 'black headbands'; 40 : result:= 'brown headbands'; 41 : result:= 'dragon items'; 42 : result:= 'masks'; 43 : result:= 'berets'; 44 : result:= 'headbands'; 45 : result:= 'cavaliers'; 46 : result:= 'brown cavaliers'; 47 : result:= 'black cavaliers'; 48 : result:= 'tan cavaliers'; 49 : result:= 'pirate hats'; 50 : result:= 'robins'; 51 : result:= 'robin hood hats'; 52 : result:= 'mage boots'; 53 : result:= 'ranger boots'; 54 : result:= 'disk Of returnings'; 55 : result:= 'disks'; 56 : result:= 'half wines'; 57 : result:= 'magic seeds'; End; End; {^^^^^^^^^^^^^^^^^ RANDOMSKILL ^^^^^^^^^^^^^^^^^^^^} {Used in the random talking Procedure, returns a random skill along with some other words that work create a sentence} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function RandomSkill : String; Var a, b : Integer; Begin b:= random(35) + 1; Case b Of 1 : result:= 'attack'; 2 : result:= 'strength'; 3 : result:= 'defense'; 4 : result:= 'range'; 5 : result:= 'prayer'; 6 : result:= 'magic'; 7 : result:= 'runecrafting'; 8 : result:= 'hitpoint'; 9 : result:= 'agility'; 10 : result:= 'herblore'; 11 : result:= 'thieving'; 12 : result:= 'crafting'; 13 : result:= 'fletching'; 14 : result:= 'slayer'; 15 : result:= 'mining'; 16 : result:= 'smithing'; 17 : result:= 'fishing'; 18 : result:= 'cooking'; 19 : result:= 'firemaking'; 20 : result:= 'woodcutting'; 21 : result:= 'atk'; 22 : result:= 'str'; 23 : result:= 'def'; 24 : result:= 'mage'; 25 : result:= 'rc'; 26 : result:= 'hp'; 27 : result:= 'herb'; 28 : result:= 'thiev'; 29 : result:= 'craft'; 30 : result:= 'fletch'; 31 : result:= 'smith'; 32 : result:= 'fish'; 33 : result:= 'cook'; 34 : result:= 'fire'; 35 : result:= 'wc'; 36 : result:= 'farming'; End; Case b Of 5, 8, 9, 26 : a:= random(2) + 1; Else a:= random(3) + 1; End; Case a Of 1 : result:= result + ' levels?'; 2 : result:= result + ' lvs?'; 3 : result:= random1 + ' ' + result; End; If(a= 3)Then Begin a:= random(7) + 1; Case a Of 1 : result:= result + ' is boring!'; 2 : result:= result + ' is the best'; 3 : result:= result + ' is my favourite skill'; 4 : result:= result + ' takes ages To train'; 5 : result:= result + ' makes me so much money'; 6 : result:= result + ' needs an update'; 7 : result:= result + ' is too easy'; End; End; End; {^^^^^^^^^^^^^^^^^ RANDOMMONSTER ^^^^^^^^^^^^^^^^^^} {Used in the random talking Procedure, returns a random monster} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function RandomMonster : String; Var a : Integer; Begin a:= random(30) + 1; Case a Of 1 : result:= 'chickens'; 2 : result:= 'green dragons'; 3 : result:= 'blue dragons'; 4 : result:= 'red dragons'; 5 : result:= 'black dragons'; 6 : result:= 'king black dragons'; 7 : result:= 'kalphites'; 8 : result:= 'kalphite queens'; 9 : result:= 'demons'; 10 : result:= 'dragons'; 11 : result:= 'metal dragons'; 12 : result:= 'bronze dragons'; 13 : result:= 'iron dragons'; 14 : result:= 'steel dragons'; 15 : result:= 'black demons'; 16 : result:= 'greater demons'; 17 : result:= 'lesser demons'; 18 : result:= 'golems'; 19 : result:= 'tree spirits'; 20 : result:= 'shades'; 21 : result:= 'moss giants'; 22 : result:= 'giants'; 23 : result:= 'hill giants'; 24 : result:= 'wolfs'; 25 : result:= 'baby dragons'; 26 : result:= 'spiders'; 27 : result:= 'rats'; 28 : result:= 'zombies'; 29 : result:= 'goblins'; 30 : result:= 'scorpions'; End; End; {^^^^^^^^^^^^^^^^^ RANDOMTALK ^^^^^^^^^^^^^^^^^^^^^} {Returns a random sentence} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function RandomTalk: String; Var a, b : Integer; Begin b:= random(5) + 1; If(b= 1)Then result:= randomskill; If(b= 2)Then Begin a:= random(10) + 1; Case a Of 1 : result:= 'I love ' + randomarmor; 2 : result:= 'I hate ' + randomarmor; 3 : result:= randomarmor + ' are so cool'; 4 : result:= randomarmor + ' are stupid'; 5 : result:= 'I have tons Of ' + randomarmor; 6 : result:= 'I think ' + randomarmor + ' look the best'; 7 : result:= 'I think ' + randomarmor + ' look the worst'; 8 : result:= randomarmor + ' costs too much'; 9 : result:= randomarmor + ' is too cheap'; 10 : result:= 'I can afford tons Of ' + randomarmor; End; End; If(b= 3)Then Begin a:= random(10) + 1; Case a Of 1 : result:= 'I love ' + randomrare; 2 : result:= 'I hate ' + randomrare; 3 : result:= randomrare + ' look the coolest'; 4 : result:= randomrare + ' look the worst'; 5 : result:= randomrare + ' are hard To find'; 6 : result:= randomrare + ' are way too expensive'; 7 : result:= randomrare + ' are too cheap'; 8 : result:= 'I wonder how much ' + randomrare + ' alch For'; 9 : result:= 'I wonder how many ' + randomrare + ' there are'; 10 : result:= 'i wish i had tons Of ' + randomrare; End; End; If(b= 4)Then Begin a:= random(8) + 1; Case a Of 1 : result:= randommonster + ' look cool'; 2 : result:= randommonster + ' look weak'; 3 : result:= randommonster + ' are easy'; 4 : result:= randommonster + ' are a good way To make money'; 5 : result:= randommonster + ' should be harder'; 6 : result:= randommonster + ' need To be easier'; 7 : result:= randommonster + ' are the best To train on'; 8 : result:= randommonster + ' are the worst To train on'; End; End; If(b= 5)Then Begin a:= random(6) + 1; Case a Of 1 : result:= ':)'; 2 : result:= ':('; 3 : result:= '=)'; 4 : result:= '=('; 5 : result:= ';)'; 6 : result:= ';('; End; End; End; {^^^^^^^^^^^^^^^^^ WAITR ^^^^^^^^^^^^^^^^^^^^^^^^^^} {This Procedure will wait a random number Of miliseconds seconds} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure WaitR(number, RandomNumber : Integer); Begin wait(number + random(RandomNumber) + 1); End; {^^^^^^^^^^^^^^^^^ SETCHAT ^^^^^^^^^^^^^^^^^^^^^^^^} {If applicable, turns off the Public chat, private chat And trade options} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure SetChat; Var x, y : integer; Begin If(GetColor(46, 488)<>255)then Begin repeat MouseC(random(15)+20, random(10)+480, 1); WaitR(150,100); until(FindColor(x,y,255,45,487,47,489)) end; If(GetColor(175, 486)<>255)then Begin repeat MouseC(random(15)+150, random(10)+480, 1); WaitR(150,100); until(FindColor(x,y,255,174,485,176,487)) end; If(GetColor(315, 488)<>255)then Begin repeat MouseC(random(15)+290, random(10)+480, 1); WaitR(150,100); until(FindColor(x,y,255,314,487,316,489)) end; End; {^^^^^^^^^^^^^^^^^ LOGOUT ^^^^^^^^^^^^^^^^^^^^^^^^^} {Logs your character out} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure LogOut; Begin If(getcolor( 632, 483) = 4543586)Then MouseC(random(10) + 635, random(10) + 475, 1); wait(random(300) + 300); MouseC(random(30) + 600, random(5) + 370, 1); End; {^^^^^^^^^^^^^^^^^ OPENBAG ^^^^^^^^^^^^^^^^^^^^^^^^} {Opens your inventory} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure OpenBag; Begin If(getcolor(634, 174) = 5531511)Then MouseC(random(10) + 635, random(10) + 175, 1); End; {^^^^^^^^^^^^^^^^^ OPENCONTROLS ^^^^^^^^^^^^^^^^^^^} {Opens the controls panel} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure OpenControls; Begin If(getcolor(704, 483) = 4543586)Then MouseC(random(10) + 700, random(10) + 470, 1); End; {^^^^^^^^^^^^^^^^^ SETRUNON ^^^^^^^^^^^^^^^^^^^^^^^} {Turns run on} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure SetRunOn; Begin OpenControls; MouseC(random(10) + 615, random(10) + 275, 1); wait(random(200) + 200); End; {^^^^^^^^^^^^^^^^^ SETRUNOFF ^^^^^^^^^^^^^^^^^^^^^^} {Turns run off} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure SetRunOff; Begin OpenControls; MouseC(random(10) + 565, random(10) + 275, 1); wait(random(100) + 250); End; {^^^^^^^^^^^^^^^^^ TALKTORAND ^^^^^^^^^^^^^^^^^^^^^} {Handles Talking To a random event} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure TalkToRand; Var c : Integer; Begin Repeat wait(1); Until(getcolor(234, 441)= 16711680); YellowTextTotal:= YellowTextTotal + 1; TakeScreenShot('Talked To Random', YellowTextTotal); Status('Talking To Random Event'); Repeat If(getcolor(232, 443)= 16711680)Then Begin MouseC(253 + random(20), 442 + random(3), 1); wait(2000 + random(1000)); randomtalked:= true; End; wait(1); c:= c + 1; If(c= 5000)Then exit; Until(GetColor(240, 434)= 0); End; {^^^^^^^^^^^^^^^^^ DISEASED ^^^^^^^^^^^^^^^^^^^^^^^} {Returns true If your character is diseased And false is it isnt} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function Diseased : Boolean; Var a, b : Integer; Begin result:= false; wait(1); If(findcolorspiral(a, b, 1226748, 215, 115, 330, 185))Then result:= true; End; {^^^^^^^^^^^^^^^^^ POISONED ^^^^^^^^^^^^^^^^^^^^^^^} {Returns true If your character is poisoned And false is it isnt} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function Poisoned : Boolean; Var a, b : Integer; Begin result:= false; wait(1); If(findcolorspiral(a, b, 49152, 215, 115, 330, 185))Then result:= true; End; {^^^^^^^^^^^^^^^^^ INFIGHT ^^^^^^^^^^^^^^^^^^^^^^^^} {Returns true If your character is in a fight And false is it isnt} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function InFight : Boolean; Var a, b : Integer; Begin result:= false; wait(1); If(findcolorspiral(a, b, 16728128, 215, 115, 330, 185)) Or(findcolorspiral(a, b, 192, 215, 115, 330, 185))Then If(Poisoned= false)And(diseased= false)Then result:= true; End; {^^^^^^^^^^^^^^^^^ FINDFIGHT ^^^^^^^^^^^^^^^^^^^^^^} {Checks To see If you are in a fight, And If so you will run away} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure FindFight; Var leaveloop, placecheck, a, b, d, c : Integer; Begin d:= 0; c:= 0; If(Findcolorspiral(a, b, 65280, 215, 115, 330, 185))Then wait(1000); If(FindColorSpiral(a, b, 65280, 215, 115, 330, 185))Then Begin Repeat If(c= 100)Then Begin wait(1); c:= 0; End; c:= c + 1; d:= d + 1; If(diseased= true)Or(Poisoned= true)Then exit; Until(d= 4000)Or(InFight= true); AttacksTotal:= AttacksTotal + 1; TakeScreenShot('Fight Found', AttacksTotal); SetRunon; wait(random(10) + 50); a:= 0; Case Direction Of 'NE','' : Repeat a:= a + 3; MouseC(random(5) + 680 - a, random(5) + 35 + a, 1); wait(random(200) + 300); Until(flagpresent=true); 'N' : Repeat a:= a + 3; MouseC(random(5) + 640, random(5) + 20 + a, 1); wait(random(200) + 300); Until(flagpresent=true); 'NW' : Repeat a:= a + 3; MouseC(random(5) + 620 + a, random(5) + 25 + a, 1); wait(random(200) + 300); Until(flagpresent=true); 'W' : Repeat a:= a + 3; MouseC(random(5) + 600 + a, random(5) + 85, 1); wait(random(200) + 300); Until(flagpresent=true); 'SW' : Repeat a:= a + 3; MouseC(random(5) + 620 + a, random(5) + 130 - a, 1); wait(random(200) + 300); Until(flagpresent=true); 'S' : Repeat a:= a + 3; MouseC(random(5) + 645, random(5) + 145 - a, 1); wait(random(200) + 300); Until(flagpresent=true); 'SE' : Repeat a:= a + 3; MouseC(random(5) + 688 - a, random(5) + 124 - a, 1); wait(random(200) + 300); Until(flagpresent=true); 'E' : Repeat a:= a + 3; MouseC(random(5) + 703 - a, random(5) + 74, 1); wait(random(200) + 300); Until(flagpresent=true); End; wait(100); MapFlagging; wait(random(1000) + 1000); If(RunBack=true)Then Case Direction Of 'NE' : Repeat a:= a + 3; MouseC(random(5) + 620 + a, random(5) + 130 - a, 1); wait(random(200) + 300); Until(FlagPresent); 'E' : Repeat a:= a + 3; MouseC(random(5) + 600 + a, random(5) + 85, 1); wait(random(200) + 300); Until(FlagPresent); 'SE' : Repeat a:= a + 3; MouseC(random(5) + 620 + a, random(5) + 25 + a, 1); wait(random(200) + 300); Until(FlagPresent); 'S' : Repeat a:= a + 3; MouseC(random(5) + 640, random(5) + 20 + a, 1); wait(random(200) + 300); Until(FlagPresent); 'SW' : Repeat a:= a + 3; MouseC(random(5) + 680 - a, random(5) + 35 + a, 1); wait(random(200) + 300); Until(FlagPresent); 'W' : Repeat a:= a + 3; MouseC(random(5) + 703 - a, random(5) + 74, 1); wait(random(200) + 300); Until(FlagPresent); 'NW' : Repeat a:= a + 3; MouseC(random(5) + 688 - a, random(5) + 124 - a, 1); wait(random(200) + 300); Until(FlagPresent); 'N' : Repeat a:= a + 3; MouseC(random(5) + 645, random(5) + 145 - a, 1); wait(random(200) + 300); Until(FlagPresent); End; SetRunOff; wait(random(200)+300); OpenBag; leaveloop:= 0; fightfound:= true; Repeat placecheck:= getcolor(27, 36); wait(100); If(getcolor(27, 36) = placecheck)Then Leaveloop:= 1; Until(Leaveloop= 1); End; End; {^^^^^^^^^^^^^^^^^ FINDTEXT ^^^^^^^^^^^^^^^^^^^^^^^} {Checks For Yellow text, And If some are found it will look For a random event To talk too} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure FindText; Var counter, a, b, a1, b1, c, d : Integer; Begin counter:= 0 If(findcolor(a, b, 65535, 10, 20, 515, 338)) Or(Istextat3(185, 36, 'The Bank', 100))Then wait(200) If(findcolor(a, b, 65535, 10, 20, 515, 338)) And(Istextat3(185, 36, 'The Bank', 100)= false)Then Begin Repeat counter:= counter + 2 + random(1); MoveMouseSmoothEx(a + counter, b + 15 + random(3), 1, 6, 15, 20, 20); wait(1) If(istextat3(9, 9, 'Talk', 100))Then Begin getmousepos(a1, b1); MouseC(a1, b1, 2); Repeat wait(random(100) + 200); Until(findcolor(a, b, 0, a1 - 30, b1 - 30, a1 + 30, b1 + 30)); If(IsTextIn3(S1, S2, S3, S4, c, d, 'Talk'))Then Begin MouseC(c + random(10), d + random(3), 1); TalkToRand; MapFlagging; exit; End; End; Until(counter>= 150); End; End; {^^^^^^^^^^^^^^^^^ LOGGEDIN ^^^^^^^^^^^^^^^^^^^^^^^} {Returns true If you are logged in And false If your not} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function LoggedIn:Boolean; Begin result:= true; If(getcolor(249, 99)= 2071708)And (getcolor(637,50)=4872025)And (getcolor(547,383)=4212289)And (getcolor(356,47)=6115406)And (IsTextUp('Walk')=false)Then result:= false; End; {^^^^^^^^^^^^^^^^^ CHECKINTRO ^^^^^^^^^^^^^^^^^^^^^} {Checks For the intro screen And closes it If it finds it} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure CheckIntro; Begin If(Getcolor(595, 25) <> 8239317)Then exit; MouseBox(435, 307, 590, 360, 1); repeat wait(random(300) + 500); until(getcolor(648, 83) = 16777215); End; {^^^^^^^^^^^^^^^^^ KILLSCRIPT ^^^^^^^^^^^^^^^^^^^^^} {This Procedure will enter a continues loop, making the script which is running stop} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure KillScript; Begin Repeat Status('Script Killed, please restart'); wait(500); Status('Script Killed, please restart.'); wait(500); Status('Script Killed, please restart..'); wait(500); Status('Script Killed, please restart...'); wait(500); Until(false); End; {^^^^^^^^^^^^^^^^^ LOGIN ^^^^^^^^^^^^^^^^^^^^^^^} {Logs your character in If your logged out} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure LogIn; var x : integer; Begin If(loggedin= false)Then Begin if(Istextat3(309, 241, 'Welcome',100))then begin MouseC(random(5) + 465, random(5) + 275, 1); wait(random(500) + 1000); end; MouseC(random(20) + 370, random(3) + 251, 1); wait(random(100) + 100); sendkeyshuman(User); wait(random(30)+120); sendkeyshuman(chr(13)); wait(random(100) + 100); sendkeyshuman(Pass); MouseC(random(10) + 255, random(20) + 305, 1); Repeat wait(100); x:= x + 1; if(x = 100)Then begin writeln('Error logging in'); KillScript; end; Until(getcolor(602, 20)= 8041938); End; wait(random(300) + 500); CheckIntro; End; {^^^^^^^^^^^^^^^^^ LOGOUTFOR ^^^^^^^^^^^^^^^^^^^^^^} {This procedure will log you out for the amount of minits given} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure LogOutFor(Minutes : Integer); Var x : integer; Begin Logout; Minutes:= Minutes + random(Minutes / 10); writeln('Logging out for ' + inttostr(Minutes) + ' minuets'); Minutes:= (Minutes * 60) * 1000; repeat x:= x + random(300) + 1000; wait(x); until(x > Minutes); writeln('Logging back in'); Login; End; {^^^^^^^^^^^^^^^^^ CHECKFORMODS ^^^^^^^^^^^^^^^^^^^} {Looks For a mod Or admin And If it finds one, you will get logged out} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure CheckForMods; Var a, b, bmpModCrown, bmpStaffCrown : Integer; Begin bmpModcrown := BitmapFromstring(13, 11, '979797000000000000000000000000000000979797000000000000' + '000000000000000000979797E0E0E0979797000000000000000000' + 'E0E0E0A2A2A2979797000000000000000000E0E0E0979797E0E0E0' + '979797000000000000000000E0E0E0A2A2A2979797000000000000' + '000000E0E0E0979797E0E0E0A2A2A2979797000000E0E0E0A2A2A2' + 'A2A2A2A2A2A2979797000000E0E0E0A2A2A2979797E0E0E0A2A2A2' + '979797000000E0E0E0A2A2A2A2A2A2A2A2A2979797000000E0E0E0' + 'A2A2A2979797000000E0E0E0A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2' + 'A2A2A2A2A2A2A2A2A2A2A2A2979797000000000000E0E0E0A2A2A2' + 'A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2979797' + '000000000000000000E0E0E0sA2A2A2000000000000A2A2A2000000' + '000000A2A2A2979797000000000000000000000000E0E0E0A2A2A2' + '000000A2A2A2000000A2A2A2000000A2A2A2979797000000000000' + '000000000000E0E0E0A2A2A2000000A2A2A2000000A2A2A2000000' + 'A2A2A2979797000000000000000000000000979797979797979797' + '979797979797979797979797979797979797000000000000'); bmpStaffcrown := BitmapFromstring(13, 11, 'D69E21000000000000000000000000000000D69E21000000000000' + '000000000000000000D69E21FFFF84D69E21000000000000000000' + 'FFFF84F7FF08D69E21000000000000000000FFFF84D69E21FFFF84' + 'D69E21000000000000000000FFFF84F7FF08D69E21000000000000' + '000000FFFF84D69E21FFFF84F7FF08D69E21000000FFFF84F7FF08' + 'F7FF08F7FF08D69E21000000FFFF84F7FF08D69E21FFFF84F7FF08' + 'D69E21000000FFFF84F7FF08F7FF08F7FF08D69E21000000FFFF84' + 'F7FF08D69E21000000FFFF84F7FF08F7FF08F7FF08F7FF08F7FF08' + 'F7FF08F7FF08F7FF08F7FF08D69E21000000000000FFFF84F7FF08' + 'F7FF08F7FF08F7FF08F7FF08F7FF08F7FF08F7FF08F7FF08D69E21' + '000000000000000000FFFF84F7FF08000000000000F7FF08000000' + '000000F7FF08D69E21000000000000000000000000FFFF84F7FF08' + '000000F7FF08000000F7FF08000000F7FF08D69E21000000000000' + '000000000000FFFF84F7FF08000000F7FF08000000F7FF08000000' + 'F7FF08D69E21000000000000000000000000D69E21D69E21D69E21' + 'D69E21D69E21D69E21D69E21D69E21D69E21000000000000'); If (findbitmaptolerancein(bmpStaffcrown, a, b, 1, 345, 110, 430, 50)) Or(findbitmaptolerancein(bmpModcrown, a, b, 1, 345, 110, 430, 50))Then Begin TakeScreenShot('Staff Found', 1); writeln('Staff / Mod Found, logged out And will log in later'); a:= 0; LogOutFor(15); End; FreeBitmap(bmpStaffCrown); FreeBitmap(bmpModCrown); End; {^^^^^^^^^^^^^^^^^ GETQUESTION ^^^^^^^^^^^^^^^^^^^^} {Used with the box breaker} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function GetQuestion : Integer; Begin result:= 0 ; If(istextat3(194, 260, 'Which shape is Y', 100))Then result:= 1; // Color Yellow If(istextat3(200, 260, 'Which shape is B', 100))Then result:= 2; // Color Blue If(istextat3(202, 260, 'Which shape is R', 100))Then result:= 3; // Color Red If(istextat3(185, 260, 'What colour is the C', 100))Then result:= 4; // Shape Cirlce If(istextat3(180, 260, 'What colour is the Sq', 100))Then result:= 5; // Shape square If(istextat3(173, 260, 'What colour is the H', 100))Then result:= 6; // Shape Halfmoon If(istextat3(178, 260, 'What colour is the T', 100))Then result:= 7; // Shape Triangle If(istextat3(189, 260, 'What colour is the St', 100))Then result:= 8; // Shape Star End; {^^^^^^^^^^^^^^^^^ OPENBOX ^^^^^^^^^^^^^^^^^^^^^^^^} {Solves the strange box} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure OpenBox(z1, z2:Integer); Var a1, c, a2, a3, a4, a5, a6, a7, a8, a, b, qw, switch, totala : Integer; bmpHalfMoon, bmpStar, bmpTriangle, bmpSquare, bmpCircle : Integer; bmpRedText, bmpBlueText, bmpYellowText : Integer; Star1, Circle1, Halfmoon1, square1, Triangle1, answer : String; Begin Answer:= 'Error'; Star1:= '0'; Circle1:= '0'; Halfmoon1:= '0'; square1:= '0'; Triangle1:= '0'; z1:= z1 + random(10); z2:= z2 + random(5); MouseC(z1, z2, 1); wait(random(500) + 500); totala:= 0; c:= random(3); MouseC(random(10) + 145 + (c * 120), 290 + random(10), 0); Repeat wait(100); c:= c + 1; If(c= 25)Then exit; Until(istextat3(9, 9, 'Ok', 100)); bmpHalfmoon := BitmapFromstring(18, 10, 'BBB949BBB949000000000000BBB949BBB949000000000000000000' + '000000000000000000000000000000000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000000000' + '000000000000000000000000000000000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000000000' + '000000000000000000000000000000000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000000000' + '000000000000000000000000000000000000000000BBB949BBB949' + 'BBB949BBB949BBB949BBB949BBB949BBB949000000000000000000' + 'BBB949BBB949BBB949BBB949000000000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000000000' + 'BBB949BBB949BBB949BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000000000' + 'BBB949BBB949BBB949BBB949BBB949000000000000BBB949BBB949' + ''); bmpStar := BitmapFromstring(12, 10, '000000000000BBB949BBB949BBB949000000000000000000000000' + '000000000000000000000000BBB949BBB949000000BBB949BBB949' + '000000000000BBB949BBB949000000000000BBB949BBB949000000' + '000000000000000000000000000000BBB949BBB949000000000000' + '000000BBB949BBB949000000000000000000000000000000BBB949' + 'BBB949000000000000000000000000BBB949BBB949000000000000' + '000000000000BBB949BBB949BBB949BBB949000000000000000000' + 'BBB949BBB949000000000000000000BBB949BBB949000000000000' + '000000000000000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000000000000000000000000000BBB949BBB949' + '000000000000BBB949BBB949000000000000BBB949BBB949000000' + 'BBB949BBB949000000000000000000BBB949BBB949000000000000' + '000000BBB949BBB949BBB949000000000000000000000000000000' + 'BBB949BBB949BBB949'); bmpTriangle := BitmapFromstring(16, 7, '000000000000000000000000000000000000BBB949BBB949000000' + '000000000000000000000000000000000000000000BBB949BBB949' + 'BBB949BBB949000000000000000000000000000000000000000000' + 'BBB949BBB949BBB949BBB949000000BBB949BBB949BBB949000000' + '000000000000BBB949BBB949000000000000BBB949BBB949000000' + '000000BBB949BBB949BBB949BBB949000000000000000000000000' + 'BBB949BBB949000000000000000000BBB949BBB949BBB949BBB949' + 'BBB949BBB949BBB949000000000000000000000000BBB949BBB949' + '000000000000BBB949BBB949000000000000BBB949BBB949BBB949' + 'BBB949000000000000000000000000BBB949BBB949000000000000' + 'BBB949BBB949000000000000BBB949BBB949BBB949BBB949000000' + '000000000000000000BBB949BBB949000000000000000000BBB949' + 'BBB949BBB949BBB949BBB949'); bmpsquare := BitmapFromstring(14, 14, '000000000000BBB949BBB949BBB949000000000000000000000000' + '000000000000000000000000000000000000BBB949BBB949000000' + 'BBB949BBB949000000000000000000000000000000000000000000' + '000000BBB949BBB949000000000000000000000000000000000000' + '000000000000000000000000000000000000000000BBB949BBB949' + '000000000000000000000000000000000000000000000000000000' + '000000000000000000000000BBB949BBB949000000000000000000' + '000000000000000000BBB949BBB949BBB949000000000000000000' + '000000BBB949BBB949000000000000000000000000BBB949BBB949' + '000000BBB949BBB949000000000000000000000000BBB949BBB949' + '000000000000BBB949BBB949000000000000BBB949BBB949000000' + '000000000000000000BBB949BBB949000000000000BBB949BBB949' + '000000000000BBB949BBB949BBB949BBB949000000BBB949BBB949' + '000000000000000000000000BBB949BBB949000000BBB949BBB949' + '000000BBB949BBB949BBB949000000000000000000000000000000' + '000000BBB949BBB949BBB949BBB949000000000000000000000000' + '000000000000000000000000000000000000000000000000BBB949' + 'BBB949000000000000000000000000000000000000000000000000' + '000000000000000000000000BBB949BBB949000000000000000000' + '000000000000000000000000000000000000000000000000000000' + 'BBB949BBB949000000000000000000000000000000000000000000' + '000000000000000000000000000000BBB949BBB949'); BmpCircle := BitmapFromstring(10, 10, '000000000000BBB949BBB949BBB949000000000000000000000000' + '000000000000BBB949BBB949000000BBB949BBB949000000000000' + '000000000000BBB949BBB949000000000000000000000000000000' + '000000000000000000BBB949BBB949000000000000000000000000' + '000000000000BBB949BBB949BBB949BBB949000000000000000000' + '000000000000000000000000000000BBB949BBB949000000000000' + '000000000000000000000000BBB949BBB949BBB949BBB949000000' + '000000000000000000000000000000BBB949BBB949BBB949BBB949' + '000000000000000000000000000000000000BBB949BBB949000000' + 'BBB949BBB949000000BBB949BBB949000000000000BBB949BBB949' + '000000000000BBB949BBB949BBB949000000000000000000BBB949' + 'BBB949'); bmpRedText := BitmapFromstring(6, 10, 'BBB949BBB949BBB949BBB949BBB949000000BBB949BBB949000000' + '000000BBB949BBB949BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949BBB949BBB949000000' + 'BBB949BBB949000000BBB949BBB949BBB949BBB949000000000000' + 'BBB949BBB949BBB949BBB949000000000000BBB949BBB949000000' + 'BBB949BBB949000000BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949'); bmpBlueText := BitmapFromstring(18, 10, 'BBB949BBB949BBB949BBB949BBB949000000000000000000BBB949' + 'BBB949000000000000000000000000000000000000000000000000' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000000000000000000000000000000000000000' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000000000000000000000000000000000000000' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000000000000000000000000000000000000000' + 'BBB949BBB949BBB949BBB949BBB949000000000000000000BBB949' + 'BBB949000000000000BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949000000000000BBB949BBB949000000000000BBB949' + 'BBB949000000000000BBB949BBB949000000000000BBB949BBB949' + 'BBB949BBB949BBB949BBB949BBB949000000000000000000BBB949' + 'BBB949000000000000000000BBB949BBB949BBB949BBB949000000' + ''); bmpYellowText := BitmapFromstring(6, 10, 'BBB949BBB949000000000000BBB949BBB949BBB949BBB949000000' + '000000BBB949BBB949BBB949BBB949000000000000BBB949BBB949' + '000000BBB949BBB949BBB949BBB949000000000000000000BBB949' + 'BBB949000000000000000000000000BBB949BBB949000000000000' + '000000000000BBB949BBB949000000000000000000000000BBB949' + 'BBB949000000000000000000000000BBB949BBB949000000000000' + '000000000000BBB949BBB949000000000000'); TotalBoxes:= TotalBoxes + 1; TakeScreenShot('Strange Box Found', TotalBoxes); status('Solving Box, please wait For 5 To 15 seconds'); wait(random(220) + 220); switch:= 0; Repeat // Find Star wait(1); switch:= switch + 1; a1:= GetColor(233, 119); a2:= GetColor(263, 142); a3:= GetColor(243, 125); a4:= GetColor(275, 82); a5:= GetColor(277, 96); a6:= GetColor(263, 143); a7:= GetColor(279, 131); a8:= GetColor(274, 87); switch:= switch + 1; If(a3= a4)Then Begin a1:= a3; a2:= a4; End; If(a5= a6)Then Begin a1:= a5; a2:= a6; End; If(a7= a8)Then Begin a1:= a7; a2:= a8; End; Until(a1= a2)And((similarcolors(a1, 4084651, 22))Or(similarcolors(a1, 5613239, 22)) Or(similarcolors(a1, 9524307, 22)))Or(switch= 2000); If(a1= a2)And(similarcolors(a1, 5613239, 22))Then Star1:= 'Yellow'; If(a1= a2)And(similarcolors(a1, 4084651, 22))Then Star1:= 'Red'; If(a1= a2)And(similarcolors(a1, 9524307, 22))Then Star1:= 'Blue'; If(Star1= 'Yellow')Or(Star1= 'Red')Or(Star1= 'Blue')Then Totala:= totala + 1; switch:= 0; getmousepos(a, b); MouseC(a + random(5) - random(5), b + random(5) - random(5), 0); Repeat // Finding The Circle wait(1); a1:= GetColor(286, 113); a2:= GetColor(228, 88); a3:= GetColor(271, 132); // Blue Circle a4:= GetColor(275, 140); a5:= GetColor(258, 128); // Red Circle a6:= GetColor(294, 110); a7:= GetColor(281, 134); // Red Circle 2 a8:= GetColor(262, 90); switch:= switch + 1; If(a3= a4)Then Begin a1:= a3; a2:= a4; End; If(a5= a6)Then Begin a1:= a5; a2:= a6; End; Until(a1= a2)And((similarcolors(a1, 4084651, 22))Or(similarcolors(a1, 5613239, 22)) Or(similarcolors(a1, 9524307, 22)))Or(switch= 2000); If(a1= a2)And(similarcolors(a1, 5613239, 22))Then Circle1:= 'Yellow'; If(a1= a2)And(similarcolors(a1, 4084651, 22))Then Circle1:= 'Red'; If(a1= a2)And(similarcolors(a1, 9524307, 22))Then Circle1:= 'Blue'; If(Circle1= 'Yellow')Or(Circle1= 'Red')Or(Circle1= 'Blue')Then Totala:= totala + 1; switch:= 0; getmousepos(a, b); MouseC(a + random(5) - random(5), b + random(5) - random(5), 0); Repeat // Finding The square wait(1) a1:= GetColor(215, 104); a2:= GetColor(291, 103); a3:= GetColor(304, 110); a4:= GetColor(236, 112); switch:= switch + 1 If(a3= a4)Then Begin a1:= a3; a2:= a4; End; Until(a1= a2)And((similarcolors(a1, 4084651, 22))Or(similarcolors(a1, 5613239, 22)) Or(similarcolors(a1, 9524307, 22)))Or(switch= 2000); If(a1= a2)And(similarcolors(a1, 5613239, 22))Then square1:= 'Yellow'; If(a1= a2)And(similarcolors(a1, 4084651, 22))Then square1:= 'Red'; If(a1= a2)And(similarcolors(a1, 9524307, 22))Then square1:= 'Blue'; If(square1= 'Yellow')Or(square1= 'Red')Or(square1= 'Blue')Then Totala:= totala + 1; switch:= 0; getmousepos(a, b); MouseC(a + random(5) - random(5), b + random(5) - random(5), 0); If(totala<3)Then Repeat // Finding The Half Moon wait(1); a1:= GetColor(312, 115); a2:= GetColor(302, 120); switch:= switch + 1; Until(a1= a2)And((similarcolors(a1, 4084651, 22))Or(similarcolors(a1, 5613239, 22)) Or(similarcolors(a1, 9524307, 22)))Or(switch= 2000); If(a1= a2)And(similarcolors(a1, 5613239, 22))Then Halfmoon1:= 'Yellow'; If(a1= a2)And(similarcolors(a1, 4084651, 22))Then Halfmoon1:= 'Red'; If(a1= a2)And(similarcolors(a1, 9524307, 22))Then Halfmoon1:= 'Blue'; If(Halfmoon1= 'Yellow')Or(Halfmoon1= 'Red')Or(Halfmoon1= 'Blue')Then Totala:= totala + 1; switch:= 0; getmousepos(a, b); MouseC(a + random(5) - random(5), b + random(5) - random(5), 0); If(totala<3)Then Repeat // Finding The Triangle wait(1) a1:= GetColor(258, 72); a2:= GetColor(275, 106); switch:= switch + 1; Until(a1= a2)And((similarcolors(a1, 4084651, 22))Or(similarcolors(a1, 5613239, 22)) Or(similarcolors(a1, 9524307, 22)))Or(switch= 2000); If(a1= a2)And(similarcolors(a1, 5613239, 22))Then Triangle1:= 'Yellow'; If(a1= a2)And(similarcolors(a1, 4084651, 22))Then Triangle1:= 'Red'; If(a1= a2)And(similarcolors(a1, 9524307, 22))Then Triangle1:= 'Blue'; switch:= 0; qw:= getquestion; If(qw= 1)Then If(square1= 'Yellow')Then Answer:= 'square' Else If (Circle1= 'Yellow')Then Answer:= 'Circle' Else If (Star1= 'Yellow')Then Answer:= 'Star' Else If (Halfmoon1= 'Yellow')Then Answer:= 'Halfmoon' Else If (Triangle1= 'Yellow')Then Answer:= 'Triangle' Else Answer:= 'Error'; If(qw= 2)Then If(square1= 'Blue')Then Answer:= 'square' Else If (Circle1= 'Blue')Then Answer:= 'Circle' Else If (Star1= 'Blue')Then Answer:= 'Star' Else If (Halfmoon1= 'Blue')Then Answer:= 'Halfmoon' Else If (Triangle1= 'Blue')Then Answer:= 'Triangle' Else Answer:= 'Error'; If(qw= 3)Then If(square1= 'Red')Then Answer:= 'square' Else If (Circle1= 'Red')Then Answer:= 'Circle' Else If (Star1= 'Red')Then Answer:= 'Star' Else If (Halfmoon1= 'Red')Then Answer:= 'Halfmoon' Else If (Triangle1= 'Red')Then Answer:= 'Triangle' Else Answer:= 'Error'; If(qw= 4)Then If (Circle1<>'0')Then Answer:= Circle1 Else Answer:= 'Error'; If(qw= 5)Then If (square1<>'0')Then Answer:= square1 Else Answer:= 'Error'; If(qw= 6)Then If (Halfmoon1<>'0')Then Answer:= Halfmoon1 Else Answer:= 'Error' If(qw= 7)Then If (Triangle1<>'0')Then Answer:= Triangle1 Else Answer:= 'Error'; If(qw= 8)Then If (Star1<>'0')Then Answer:= Star1 Else Answer:= 'Error'; If(answer= 'Error')Then If(qw = 1)Then Answer:= 'Star' Else If(qw = 3)Then Answer:= 'Circle' Else If(qw = 4)Then Answer:= 'Red' Else If(qw = 8)Then Answer:= 'Yellow'; If(answer= 'Red')Then If(findbitmaptolerancein(BmpRedText, a, b, 120, 285, 178, 306, 100))OR (findbitmaptolerancein(bmpredtext, a, b, 239, 286, 298, 309, 100))OR (findbitmaptolerancein(bmpredtext, a, b, 354, 287, 413, 310, 100))Then MouseC(a + random(15), b + random(5), 1) Else answer:= 'Error'; If(answer= 'Blue')Then If(findbitmaptolerancein(BmpBlueText, a, b, 120, 285, 178, 306, 100))OR (findbitmaptolerancein(BmpBlueText, a, b, 239, 286, 298, 309, 100))OR (findbitmaptolerancein(BmpBlueText, a, b, 354, 287, 413, 310, 100))Then MouseC(a + random(15), b + random(5), 1) Else answer:= 'Error'; If (answer= 'Yellow')Then If(findbitmaptolerancein(BmpYellowText, a, b, 120, 285, 178, 306, 100))OR (findbitmaptolerancein(BmpYellowText, a, b, 239, 286, 298, 309, 100))OR (findbitmaptolerancein(BmpYellowText, a, b, 354, 287, 413, 310, 100))Then MouseC(a + random(15), b + random(5), 1) Else answer:= 'Error'; If (answer= 'Circle')Then If(findbitmaptolerancein(bmpCircle, a, b, 120, 285, 178, 306, 100))OR (findbitmaptolerancein(bmpCircle, a, b, 239, 286, 298, 309, 100))OR (findbitmaptolerancein(bmpCircle, a, b, 354, 287, 413, 310, 100))Then MouseC(a + random(15), b + random(5), 1) Else answer:= 'Error'; If (answer= 'Triangle')Then If(findbitmaptolerancein(bmpTriangle, a, b, 120, 285, 178, 306, 100))OR (findbitmaptolerancein(bmpTriangle, a, b, 239, 286, 298, 309, 100))OR (findbitmaptolerancein(bmpTriangle, a, b, 354, 287, 413, 310, 100))Then MouseC(a + random(15), b + random(5), 1) Else answer:= 'Error'; If (answer= 'square')Then If(findbitmaptolerancein(bmpSquare, a, b, 120, 285, 178, 306, 100))OR (findbitmaptolerancein(bmpSquare, a, b, 239, 286, 298, 309, 100))OR (findbitmaptolerancein(bmpSquare, a, b, 354, 287, 413, 310, 100))Then MouseC(a + random(15), b + random(5), 1) Else answer:= 'Error'; If (answer= 'Halfmoon')Then If(findbitmaptolerancein(bmpHalfmoon, a, b, 120, 285, 178, 306, 100))OR (findbitmaptolerancein(bmpHalfmoon, a, b, 239, 286, 298, 309, 100))OR (findbitmaptolerancein(bmpHalfmoon, a, b, 354, 287, 413, 310, 100))Then MouseC(a + random(15), b + random(5), 1) Else answer:= 'Error'; If (answer= 'Star')Then If(findbitmaptolerancein(bmpStar, a, b, 120, 285, 178, 306, 100))OR (findbitmaptolerancein(bmpStar, a, b, 239, 286, 298, 309, 100))OR (findbitmaptolerancein(bmpStar, a, b, 354, 287, 413, 310, 100))Then MouseC(a + random(15), b + random(5), 1) Else answer:= 'Error'; If (answer= 'Error')Then begin getmousepos(a, b); MouseC(a, b, 1); end; writeln(answer); wait(random(400) + 800); FreeBitmap(bmpHalfMoon); FreeBitmap(bmpStar); FreeBitmap(bmpTriangle); FreeBitmap(bmpSquare); FreeBitmap(bmpCircle) FreeBitmap(bmpRedText); FreeBitmap(bmpBlueText); FreeBitmap(bmpYellowText); End; {^^^^^^^^^^^^^^^^^ BOXPRESENT ^^^^^^^^^^^^^^^^^^^^^} {Returns true if you have a box in your inventory} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function BoxPresent : Boolean; Var bmpStrangeBox, a, b : Integer; Begin bmpStrangeBox := BitmapFromstring(7, 8, '908686908686908686908686575ABC908686908686575ABC908686' + '908686575ABC575ABC908686908686908686575ABC575ABC575ABC' + '575ABC908686908686575ABC575ABC575ABC575ABC575ABC575ABC' + '575ABC575ABC575ABC575ABC575ABC575ABC908686908686575ABC' + '908686908686575ABC575ABC908686908686908686908686908686' + '908686575ABC908686908686908686908686908686908686575ABC' + '908686908686'); If(FindBitmaptolerancein(bmpStrangeBox, a, b, 560, 215, 730, 455, 20))Or FindBitmaptolerancein(bmpStrangeBox, a, b, 95, 65, 440, 255, 20)Then Result:= true; FreeBitmap(bmpStrangeBox); End; {^^^^^^^^^^^^^^^^^ CHECKBOX ^^^^^^^^^^^^^^^^^^^^^^^} {Opens a box If you have one} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure CheckBox; Var a, b, bmpstrangebox : Integer; Begin bmpStrangeBox := BitmapFromstring(7, 8, '908686908686908686908686575ABC908686908686575ABC908686' + '908686575ABC575ABC908686908686908686575ABC575ABC575ABC' + '575ABC908686908686575ABC575ABC575ABC575ABC575ABC575ABC' + '575ABC575ABC575ABC575ABC575ABC575ABC908686908686575ABC' + '908686908686575ABC575ABC908686908686908686908686908686' + '908686575ABC908686908686908686908686908686908686575ABC' + '908686908686'); Repeat If(findbitmaptolerancein(bmpstrangebox, a, b, 560, 215, 730, 455, 20))Then OpenBox(a, b); wait(random(500) + 1200); Until(BoxPresent=False); End; {^^^^^^^^^^^^^^^^^ FINDROWCOL ^^^^^^^^^^^^^^^^^^^^^} {Used in a few Of the procedures here} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure FindRowCol(Var row, col : Integer); Begin Case row Of 1 : row:= 230; 2 : row:= 260; 3 : row:= 300; 4 : row:= 335; 5 : row:= 370; 6 : row:= 405; 7 : row:= 440; End; Case col Of 1 : col:= 580; 2 : col:= 625; 3 : col:= 665; 4 : col:= 710; End; End; {^^^^^^^^^^^^^^^^^ ISBANK ^^^^^^^^^^^^^^^^^^^^^^^^^} {Returns true if the bank is open} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function IsBank : Boolean; Begin result:= IsTextAt3(185, 36, 'The Bank', 100); End; {^^^^^^^^^^^^^^^^^ SLOTFILLED ^^^^^^^^^^^^^^^^^^^^^} {Checks To see If the inventory slot defined by row And col is filled returns true If its filled And false If its not} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function SlotFilled(row, col : Integer) : Boolean; Var a1, b1, a2, b2, c, d, e : Integer; Begin result:= false; Case row Of 1 : a1:= 215; 2 : a1:= 250; 3 : a1:= 285; 4 : a1:= 325; 5 : a1:= 360; 6 : a1:= 395; 7 : a1:= 430; End; Case col Of 1 : b1:= 570; 2 : b1:= 610; 3 : b1:= 655; 4 : b1:= 696; End; a2:= a1 + 30; b2:= b1 + 35; If(IsBank=False)Then OpenBag; c:= b1; d:= a1; e:= 0; Repeat If(getcolor(c, d)<>3885652)And(getcolor(c, d)<>2370094) And(getcolor(c, d)<>2699832)And(getcolor(c, d)<>1713453) And(getcolor(c, d)<>3490379)And(getcolor(c, d)<>3095106) And(getcolor(c, d)<>5531511)And(getcolor(c, d)<>8167865) And(getcolor(c, d)<>6917802)And(getcolor(c, d)<>3951188) And(getcolor(c, d)<>2461584)And(getcolor(c, d)<>2329485) And(getcolor(c, d)<>2328713)And(getcolor(c, d)<>2109231) And(getcolor(c, d)<>2327943)And(getcolor(c, d)<>4543586) And(getcolor(c, d)<>1598565)And(getcolor(c, d)<>6505283) And(getcolor(c, d)<>1796458)And(getcolor(c, d)<>1085328) And(getcolor(c, d)<>1929843)And(getcolor(c, d)<>1383200) And(getcolor(c, d)<>1798257)And(getcolor(c, d)<>1797229) And(getcolor(c, d)<>1995636)And(getcolor(c, d)<>1997692) And(getcolor(c, d)<>2130563)And(getcolor(c, d)<>2129535) And(getcolor(c, d)<>1997692)And(getcolor(c, d)<>1996664) And(getcolor(c, d)<>1974562)And(getcolor(c, d)<>3094847) And(getcolor(c, d)<>3687501)And(getcolor(c, d)<>4345174) And(getcolor(c, d)<>0)And(getcolor(c, d)<>4674653) And(getcolor(c, d)<>16777215)And(getcolor(c, d)<>4231423) And(getcolor(c, d)<>65535)Then result:= true; If(d<>a2)And(c>= b2)Then Begin d:= d + random(2) + 1; c:= b1; End; If(c= b2)And(d>= a2))Or(result= true); End; {^^^^^^^^^^^^^^^^^ DRAGITEM ^^^^^^^^^^^^^^^^^^^^^^^} {Drags an item from row1, col1 To row2, col2} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure DragItem(row1, col1, row2, col2 : Integer); Begin If(getcolor(633, 172)<>2500207)Then OpenBag; If(slotfilled(row1, col1)= false)Then exit; FindRowCol(row1, col1); FindRowCol(row2, col2); MouseC(col1, row1, 0); wait(random(50) + random(50) + 50); HoldMouse(col1, row1, true); wait(random(50) + random(50) + 50); MouseC(col2, row2, 0); wait(random(50) + random(50) + 50); ReleaseMouse(col2, row2, true); End; {^^^^^^^^^^^^^^^^^ ITEMCOUNT ^^^^^^^^^^^^^^^^^^^^^^} {Returns the amount Of items you have in your inventory} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function ItemCount : Integer; Var a, b : Integer; Begin OpenBag; a:= 1; b:= 1; result:= 0; Repeat If(SlotFilled(a, b))Then result:= result + 1; b:= b + 1; If(b= 5)Then Begin b:= 1; a:= a + 1; End; Until(a= 8); End; {^^^^^^^^^^^^^^^^^ FULLBAG ^^^^^^^^^^^^^^^^^^^^^^^^} {Returns true If your bag is full And false If it isnt} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function FullBag : Boolean; Var a, b : Integer; Begin OpenBag; a:= 1; result:= true; b:= 1; Repeat If(b= 5)Then Begin b:= 1; a:= a + 1; End; If(SlotFilled(a, b)= false)Then result:= false; b:= b + 1; Until(a = 8)Or(result= false); End; {^^^^^^^^^^^^^^^^^ DROPITEMCOLOR ^^^^^^^^^^^^^^^^^^} {Drops all items in your inventory that have the color defined in the variable color} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure DropItemColor(color : Integer); Var a, b, c, color1 : Integer; Begin c:= 0; OpenBag; While(findcolor(a, b, color, 555, 205, 735, 460))Do Begin MouseC(random(5) + a, random(5) + b, 2); wait(random(300) + 200); color1:= getcolor(a, b); If(IsTextIn3(545, 190, 750, 480, a, b, 'Drop'))Then Begin MouseC(random(15) + a, random(3) + b, 1); c:= 0; Repeat c:= c + 1; wait(random(200) + 100); Until(color1<>getcolor(a, b))Or(c= 100); End Else OpenBag; End; End; {^^^^^^^^^^^^^^^^^ BANKITEMCOLR ^^^^^^^^^^^^^^^^^^^} {Banks all items that have the color in them defined by the variable color} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure BankItemColor(color : Integer); Var a, b, c, color1 : Integer; Begin c:= 0; If(istextat3(185, 36, 'The Bank', 100)= false)Then exit; While(findcolor(a, b, color, 555, 205, 735, 460))Do Begin MouseC(random(5) + a, random(5) + b, 2); wait(random(300) + 200); color1:= getcolor(a, b); If(IsTextIn3(I1, I2, I3, I4, a, b, 'All'))Then Begin MouseC(random(15) + a, random(3) + b, 1); c:= 0; wait(random(200) + 700); Repeat c:= c + 1; wait(random(200) + 100); Until(color1<>getcolor(a, b))Or(c= 100); End Else MouseC(random(150) + 550, random(15) + 170, 0); End; End; {^^^^^^^^^^^^^^^^^ DROPITEM ^^^^^^^^^^^^^^^^^^^^^^^} {Drops the item in the location defined by row And col} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure DropItem (row, col : Integer); Var b1, a : Integer; Begin OpenBag; If(Slotfilled(row, col)= false)Then exit; Findrowcol(row, col); MouseC(col + random(5), row + random(5), 2); wait(random(500) + 500); If(IsTextIn3(545, 190, 750, 480, a, b1, 'Drop'))Then Begin MouseC(random(20) + a, b1 + random(3) + 4, 1); wait(random(200) + 300); End Else MouseC(random(150) + 550, random(15) + 170, 0); End; {^^^^^^^^^^^^^^^^^ CHECKLAMP ^^^^^^^^^^^^^^^^^^^^^^} {Checks To see If there is a lamp in your inventorty And If so it opens it And clicks the skill defined by a String called LampSkill} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure CheckLamp; Var a, b, bmpTheLamp : Integer; Begin OpenBag; bmpTheLamp := BitmapFromstring(29, 8, '000000000000000000000000000000000000000000000000000000' + '000000000000000000000000000000939212A7A516000000000000' + '000000000000000000000000000000000000000000000000000000' + '000000000000000000000000000000D4D21C000000000000000000' + '000000000000000000000000000000000000B9B716C0BF19B3B116' + 'A7A5169D9C12939212000000000000000000000000000000000000' + '000000000000000000000000000000000000D1CF19C0BF19C0BF19' + 'C0BF19C0BF19000000000000000000000000000000BBB916B3B116' + 'B0AE16ACAB169D9C129392128D8B1276750E000000000000000000' + '000000000000000000000000000000000000000000D1CF19C0BF19' + 'B0AE16B6B416BEBC19C6C519C6C519D1CF19CCCA19C9C719C6C519' + 'C6C519C0BF19BBB916B6B416ACAB16A4A2129A981293921286840E' + '7A790E6B6A095D5C09A7A516000000000000000000000000000000' + '000000000000000000000000000000CCCA19CCCA19CECC19C6C519' + 'C3C219C0BF19BEBC19BBB916B9B716B6B416B3B116A9A816A4A212' + '9D9C12979612908F1282810E9A9812B0AE1689880E000000000000' + '000000000000000000000000000000000000000000000000D4D21C' + 'CECC19CCCA19C0BF19BEBC19BBB916B6B416B3B116B0AE16A9A816' + 'A4A212A19F129A981289880E86840E8D8B129392129D9C12B9B716' + '666509000000000000000000000000000000000000000000000000' + '000000000000000000CCCA19CCCA19BBB916B9B716B6B416B3B116' + 'B0AE16A9A816A4A2129D9C1297961282810E7A790E86840E000000' + '000000000000C3C219A9A816000000000000000000000000000000' + '000000000000000000000000000000CCCA19CCCA19C0BF19B9B716' + 'B3B116B0AE16ACAB16A7A516A19F129A98128D8B127A790E76750E' + '000000000000C3C219B6B416A7A516000000000000'); If(findbitmaptolerancein(bmpthelamp, a, b, I1, I2, I3, I4, 20))Then Begin MouseC(random(5) + a, random(5) + b, 1); Repeat wait(100); Until(getcolor(127, 118)= 65535) TotalLamps:= TotalLamps + 1; TakeScreenShot('Lamp Found', TotalLamps); a:= 0; LampSkill:= Uppercase(LampSkill); Case LampSkill Of 'ATTACK', 'ATK', 'AGI', 'AGILITY', 'MINING', 'MINE' : a:= 155; 'STRENGTH', 'STR', 'HERBLORE', 'HERBLAW', 'HERB', 'SMITHING', 'SMITH', 'SMITHER' : a:= 185; 'RANGE', 'RANGER', 'THIEVING', 'THIEVE', 'THIEF', 'THEIVING', 'FISH', 'FSHING' : a:= 220; 'MAGIC', 'MAGE', 'CRAFTING', 'CRAFTER', 'CRAFT', 'COOKING', 'COOK' : a:= 250; 'DEFENSE', 'DEF', 'RC', 'RUNECRAFTING', 'RUNE', 'FIREMAKING', 'FIRE' : a:= 285; 'HITPOINTS', 'HP', 'HEALTH', 'HITS', 'SLAYER', 'SLAY', 'WOODCUTTING', 'WC' : a:= 315; 'PRAYER', 'PRAY', 'FARMING', 'FARM', 'FLETCHING', 'FLETCH' : a:= 345; End; Case LampSkill Of 'ATTACK', 'ATK', 'STRENGTH', 'STR', 'RANGE', 'RANGER', 'MAGIC', 'MAGE', 'DEFENSE', 'DEF''HITPOINTS', 'HP', 'PRAYER', 'PRAY' : b:= 185; 'AGILITY', 'AGI', 'HERBLORE', 'HERBLAW', 'HERB', 'THIEVING', 'THEIVING', 'THIEVE', 'THIEF', 'CRAFTING', 'CRAFT', 'RUNECRAFTING', 'RC', 'SLAYER', 'SLAY', 'FARMING', 'FARM' : b:= 220; 'MINING', 'MINE', 'SMITHING', 'SMITH', 'FISHING', 'FISH', 'COOKING', 'COOK', 'FIREMAKING', 'FIRE', 'WOODCUTTING', 'WC', 'FLETCHING', 'FLETCH' : b:= 220; End; If(a= 0)Or(b= 0)Then Begin a:= random(5) + 185; b:= random(5) + 145; End; MouseC(a + random(5), b + random(5), 1); wait(random(300) + 1000); MouseC(random(20) + 240, random(5) + 250, 1); wait(random(500) + 2000); End; FreeBitmap(bmpTheLamp); End; {^^^^^^^^^^^^^^^^^ ISDEAD ^^^^^^^^^^^^^^^^^^^^^^^^^} {Returns true If your character has just died And false If it hasnt} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function IsDead : Boolean; Begin result:= false; If(CheckChatMsg('Oh dear'))Then Begin TakeScreenshot('Died', 1); result:= true; End; End; {^^^^^^^^^^^^^^^^^ AXEBROKEN ^^^^^^^^^^^^^^^^^^^^^^} {opens the equipment tab If neccesary And returns true If your axe is broken And false If it isnt} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function AxeBroken(c : Integer) : Boolean; Begin If(c= 0)Then Begin OpenEquip; If(getcolor(601, 297)= 5067346)Then result:= true Else result:= false; End Else Begin OpenBag; If(getcolor(594, 221)= 3885652)Then result:= true Else result:= false; End; End; {^^^^^^^^^^^^^^^^^ USEITEM ^^^^^^^^^^^^^^^^^^^^^^^^} {Opens the bag If needed And clicks on the item defined by row And col} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure UseItem(row, col : Integer); Begin OpenBag; FindRowCol(row, col); MouseC(col + random(5), row + random(5), 1); End; {^^^^^^^^^^^^^^^^^ FINDHEAD ^^^^^^^^^^^^^^^^^^^^^^^} {Checks the minimap For items And moves To them And picks them up, this will Repeat Until all items are gone. ONce it finds the head it will un-equip your axe Or pick And fix them} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure FindHead(Var axez : Integer; c, e : Integer); Var a, b, d, x1, y1, x2, y2, a1, b1 : Integer; mes : String; Begin x1:= 645; y1:= 75; x2:= 650; y2:= 85; d:= 0; If(e= 0)Then mes:= 'Take Gl' Else mes:= 'Take Gl'; Repeat wait(10); a:= 650; b:= 85; If(findcolorspiral(a, b, 241, x1, y1, x2, y2))Then Begin x1:= 645; y1:= 75; x2:= 650; y2:= 85; MouseC(random(2) + a, random(2) + b, 1); wait(random(200) + 300); MapFlagging; Repeat d:= d + 1; a1:= 230; b1:= 145; Repeat MoveMouseSmoothEx(a1, b1, 1, 6, 15, 20, 20); a1:= a1 + random(3); b1:= b1 + random(3); wait(random(3) + 3); Until(b1>195)Or(a1>295) Or(istextat3(9, 9, mes, 100)); a1:= 280; b1:= 135; If(istextat3(9, 9, mes, 100)=false)Then Repeat MoveMouseSmoothEx(a1, b1, 1, 6, 15, 20, 20); a1:= a1 - random(3); b1:= b1 + random(3); wait(random(3) + 3); Until(b1>195)Or(a1<230) Or(istextat3(9, 9, mes, 100)); wait(random(250) + 300); getmousepos(a, b); If(istextat3(9, 9, mes, 100))Then Begin If(c= 0)And(slotfilled(1, 1))Then DropItem(1, 1); wait(random(300) + 300); If(slotfilled(1, 2))Then DropItem(1, 2); wait(random(300) + 300); If(c= 0)Then TakeOffSword; MouseC(a, b, 1); wait(random(300) + 400); UseItem(1, 1); wait(random(300) + 300); UseItem(1, 2); wait(random(200) + 300); If(c= 0)Then UseItem(1, 1); exit; End; Until(d= 25); d:= 0; End; x1:= x1 - 2; y1:= y1 - 2; x2:= x2 + 3; y2:= y2 + 3; If(x1<615)Then Begin axeZ:= 0; exit; End; Until(findcolor(a, b, 241, 615, 55, 675, 110)= false); End; {^^^^^^^^^^^^^^^^^ PICKFOUND ^^^^^^^^^^^^^^^^^^^^^^} {Returns true If your pick is missing its head, If c is 0 it will check your equipment tab, And If its 1 it will check the first slot in your bag. It will Then proceed To find the head} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function PickFound(c : Integer) : Boolean; Var look : Boolean; ab : Integer; Begin look:= false; ab:= 1; If(c= 0)Then Begin OpenEquip; If(getcolor(597, 296)= 5067346)Then look:= true;; End Else Begin OpenBag; If(getcolor(592, 221)= 4345174)Then look:= true; End; If(look= true)Then Begin PickTotal:= PickTotal + 1; TakeScreenshot('Pick Head Lost', PickTotal); result:= true; FindHead(ab, c, 1); If(ab= 0)Then result:= false; End; End; {^^^^^^^^^^^^^^^^^ AXEFOUND ^^^^^^^^^^^^^^^^^^^^^^} {Returns true If your axe is missing its head, If c is 0 it will check your equipment tab, And If its 1 it will check the first slot in your bag. It will Then proceed To find the head} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function AxeFound(c : Integer) : Boolean; Var look : Boolean; ab : Integer; Begin look:= false; ab:= 1; result:= true; If(c= 0)Then Begin OpenEquip; If(getcolor(598, 295)= 5067346)Then look:= true;; End Else Begin OpenBag; If(getcolor(591, 220)= 4345174)Then look:= true; End; If(look= true)Then Begin AxeTotal:= AxeTotal + 1; TakeScreenshot('Axe Head Lost', AxeTotal); result:= true; FindHead(ab, c, 0); If(ab= 0)Then result:= false; End; End; {^^^^^^^^^^^^^^^^^ LOOKFORMIME ^^^^^^^^^^^^^^^^^^^^} {Will check the screen For a mime, And If found will log you out And enter a continues loop} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure LookForMime; Var a, b : Integer; Begin If(FindColor(a,b,11503238,10,350,480,435))And(checkmime=true)Then Begin TakeScreenshot('Mime', 1); writeln('Find Mime'); Logout; writeln('Infinit Loop, so your script doesnt try To Do anything stupid'); KillScript; End; End; {^^^^^^^^^^^^^^^^^ CHECKFORPLANT ^^^^^^^^^^^^^^^^^^} {Will check the screen For a strange plant random event And If it finds one it will try And pick the fruit} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function CheckForPlant : Boolean; Var a, b, c : Integer; Begin result:= false; If(findcolortolerance(a, b, 10095418, 135, 80, 385, 265, 38))And(checkplant= true)Then If(findcolortolerance(a, b, 614473, a - 20, b - 20, a + 20, b + 20, 10))Then Begin MouseC(random(5) + a, random(5) + b, 0); c:= 0; If(istextat3(9, 9, 'Pick', 100)= false)Then exit; Repeat If(findcolortolerance(a, b, 10095418, 135, 80, 385, 265, 38))Then If(findcolortolerance(a, b, 614473, a - 20, b - 20, a + 20, b + 20, 10))Then Begin c:= c + 1; wait(random(100) + 500); getmousepos(a, b); clickmouse(a, b, true); End Else break; Until(istextat3(9, 9, 'Pick', 100)= false) Or(a>20); PlantTotal:= PlantTotal + 1; TakeScreenshot('Plant', PlantTotal); result:= true; End; End; {^^^^^^^^^^^^^^^^^ GASCHECK ^^^^^^^^^^^^^^^^^^^^^^^} {Will check For gas And If it finds some it will return true} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function GasCheck(gx, gy : Integer) : Boolean; //Created by Piv, the original gas finder Var clientcanvas, gascanvas1, gascanvas2 : Tcanvas; x, y, count, TempBitmap : Integer; Begin If(findcolorspiraltolerance(x, y, 8296866, gx - 50, gy - 50, gx + 50, gy + 50, 30))Then Begin TempBitmap:= BitmapFromString(50, 50, ''); GasCanvas1:= GetBitmapCanvas(TempBitmap); GasCanvas2:= GetBitmapCanvas(TempBitmap); clientcanvas:= getclientcanvas; SafeCopyCanvas(GetClientCanvas, gascanvas1, gx - 25, gy - 25, gx + 25, gy + 25, 0, 0, 50, 50); wait(1); SafeCopyCanvas(GetClientCanvas, GasCanvas2, gx - 25, gy - 25, gx + 25, gy + 25, 0, 0, 50, 50); CopyCanvas(clientCanvas, gascanvas1, gx - 25, gy - 25, gx + 25, gy + 25, 0, 0, 50, 50); wait(100); copycanvas(clientcanvas, gascanvas2, gx - 25, gy - 25, gx + 25, gy + 25, 0, 0, 50, 50); count:= 0; For y:= 1 To 50 Do For x:= 1 To 40 Do If((gascanvas1.pixels[x, y]) <> (gascanvas2.pixels[x, y]))Then count:= count + 1; writeln(inttostr(trunc(((count) / 1024) * 100)) + '% change.'); If(count > 375)Then begin gastotal:= gastotal + 1 TakeScreenshot('Gas Found', Gastotal) result:= true; end; End; FreeBitmap(TempBitmap); End; {^^^^^^^^^^^^^^^^^ FINDGAS ^^^^^^^^^^^^^^^^^^^^^^^^} {Will check around your character For gas And If it finds some it will stop your character from mining} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} function FindGas : boolean; {*Made by Piv*, edited by Squigglyo} var clientcanvas, gascanvas1, gascanvas2 : tcanvas; x, y, gx, gy, count, tempbitmap : integer; begin gx:= 260; gy:= 155; result:= false; if(findcolorspiraltolerance(x, y, 8296866, gx - 50, gy - 50, gx + 50, gy + 50, 30))then begin TempBitmap:= BitmapFromString(50, 50, ''); GasCanvas1:= GetBitmapCanvas(TempBitmap); GasCanvas2:= GetBitmapCanvas(TempBitmap); clientcanvas:= getclientcanvas; SafeCopyCanvas(GetClientCanvas, gascanvas1, gx - 25, gy - 25, gx + 25, gy + 25, 0, 0, 50, 50); wait(1); SafeCopyCanvas(GetClientCanvas, GasCanvas2, gx - 25, gy - 25, gx + 25, gy + 25, 0, 0, 50, 50); CopyCanvas(clientCanvas, gascanvas1, gx - 25, gy - 25, gx + 25, gy + 25, 0, 0, 50, 50); wait(100); copycanvas(clientcanvas, gascanvas2, gx - 25, gy - 25, gx + 25, gy + 25, 0, 0, 50, 50); count:= 0; for y:= 1 to 50 do for x:= 1 to 50 do if((gascanvas1.pixels[x, y])<>(gascanvas2.pixels[x, y]))then count:= count + 1; if(count > 375)then //if more than 15% change begin gastotal:= gastotal + 1; TakeScreenshot('Gas Found', gastotal); MouseC(232 + random(5), 186 - random(5), 1); result:= true; end; end; FreeBitmap(TempBitmap); end; {^^^^^^^^^^^^^^^^^ FINDGASAREA ^^^^^^^^^^^^^^^^^^^^} {Will check in the area given For gas} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function FindGasArea(x1, y1, x2, y2 : Integer) : Boolean; { * Made by Piv * , edited by Squigglyo} Var clientcanvas, gascanvas1, gascanvas2 : Tcanvas; x, y, count, TempBitmap : Integer; Begin result:= false; If(findcolorspiraltolerance(x, y, 8296866, x1, y1, x2, y2, 30))Then Begin TempBitmap:= BitmapFromString(50, 50, ''); GasCanvas1:= GetBitmapCanvas(TempBitmap); GasCanvas2:= GetBitmapCanvas(TempBitmap); clientcanvas:= getclientcanvas; SafeCopyCanvas(GetClientCanvas, GasCanvas1, x1, y1, x2, y2, 0, 0, 50, 50); wait(1); SafeCopyCanvas(GetClientCanvas, GasCanvas2, x1, y1, x2, y2, 0, 0, 50, 50); copycanvas(clientcanvas, gascanvas1, x1, y1, x2, y2, 0, 0, 50, 50); wait(100); copycanvas(clientcanvas, gascanvas2, x1, y1, x2, y2, 0, 0, 50, 50); count:= 0; For y:= 1 To 50 Do For x:= 1 To 50 Do If((gascanvas1.pixels[x, y])<>(gascanvas2.pixels[x, y]))Then count:= count + 1; If(count > 375)Then Begin GasTotal:= GasTotal + 1; TakeScreenshot('Gas Found', GasTotal); result:= true; End; End; FreeBitmap(TempBitmap); End; {^^^^^^^^^^^^^^^^^ FINDMAZE ^^^^^^^^^^^^^^^^^^^^^^^} {Will check the screen To see If you are in a maze, If you are you will get logged out And enter a continues loop} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure FindMaze; { * Created by Pups * , edited by Squigglyo} Begin If (getcolor(378, 33)= 15395562)And(getcolor(156, 46)= 15395562) And(getcolor(331, 46)= 15395562) Then Begin TakeScreenshot('Maze', 1); LogOut; writeln('Maze found, entering neverending loop'); KillScript; End; End; {^^^^^^^^^^^^^^^^^ FINDNETS ^^^^^^^^^^^^^^^^^^^^^^^} {Will check the remote area around your character For items And proceed To pick them up until the fishing tool is found} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function FindNets(tool : Integer) : Boolean; Var a, b, d, x1, y1, x2, y2 : Integer; mes : String; Begin Case tool Of 1 : mes:= 'Take Small'; 2 : mes:= 'Take Fishing'; 3 : mes:= 'Take Big'; 4 : mes:= 'Take Fly'; 5 : mes:= 'Take Harpoon'; 6 : mes:= 'Take Lobster'; 7 : mes:= 'Take Karam'; Else exit; End; x1:= 645; y1:= 75; x2:= 650; y2:= 85; d:= 0; Repeat wait(10); a:= 650; b:= 85; If(findcolorspiral(a, b, 241, x1, y1, x2, y2))Then Begin x1:= 645; y1:= 75; x2:= 650; y2:= 85; If(fullbag= true)Then dropitem(1, 1); MouseC(random(2) + a, random(2) + b, 1); wait(random(200) + 300); MapFlagging; Repeat d:= d + 1; MouseC(random(10) + 250 - 5, 170 + random(25) - 5, 0); wait(random(250) + 200); getmousepos(a, b); If(istextat3(9, 9, mes, 100))Then Begin wait(random(300) + 300); MouseC(a, b, 1); result:= true; exit; End; Until(d= 25); d:= 0; End; x1:= x1 - 2; y1:= y1 - 2; x2:= x2 + 3; y2:= y2 + 3; Until(findcolor(a, b, 241, 615, 55, 675, 110)= false); End; {^^^^^^^^^^^^^^^^^ BLUETEXT ^^^^^^^^^^^^^^^^^^^^^^^} {Checks For the Blue text that comes up in the chat log when your talking To an NPC, And clicks it} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function BlueText : Boolean; Var a, b : Integer; Begin result:= false; While(getcolor(25, 434)<>0) And(similarcolors(getcolor(178, 372), 6495240, 20)= false)Do Begin If(findcolor(a, b, 16711680, C1, C2, C3, C4)) Or(findcolor(a, b, 16777215, C1, C2, C3, C4))Then MouseC(a + random(10), b + random(3), 1); result:= true; wait(random(300) + 1300); End; End; {^^^^^^^^^^^^^^^^^ SOLVEFORD ^^^^^^^^^^^^^^^^^^^^^^} {This Procedure will look For And solve the Dr Ford Random event} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function SolveFord : Boolean; // created by knightstreak edited by Squigglyo Var q, backgroundcolor : Integer; firstfinger, secondfinger, thirdfinger, fourthfinger : Boolean; q1 : Extended; Begin If(getcolor(10, 10)<>1052691)Then exit; result:= true; BlueText; wait(5000); If(not(getcolor(650, 185) = 4902398))Then Begin backgroundcolor:= Getcolor(10, 10); Repeat wait(10); q:= q + 1; q1:= q; If(q1 / 250= 1)Or(q1 / 250= 2)Or(q1 / 250= 3)Or(q1 / 250= 4)Then MouseC(random(100) + 200, random(75) + 36, 0); Until(not(getcolor(143, 94) = backgroundcolor)Or (q >= 1000)); FordTotal:= FordTotal + 1; TakeScreenshot('Dr Ford', FordTotal); writeln('Dr Ford found, please wait While solving'); If(q < 1000)Then firstfinger := true; q:= 0; Repeat wait(10); q:= q + 1; q1:= q; If(q1 / 250= 1)Or(q1 / 250= 2)Or(q1 / 250= 3)Or(q1 / 250= 4)Then MouseC(random(100) + 200, random(75) + 36, 0); Until(not(getcolor(302, 41) = backgroundcolor)Or (q >= 1000)); If(q < 1000)Then secondfinger := true; q:= 0 Repeat wait(10); q:= q + 1; q1:= q; If(q1 / 250= 1)Or(q1 / 250= 2)Or(q1 / 250= 3)Or(q1 / 250= 4)Then MouseC(random(100) + 200, random(75) + 36, 0); Until(not(getcolor(409, 75) = backgroundcolor)Or(q >= 1000)); If(q < 1000)Then thirdfinger := true; q := 0; Repeat wait(10); q := q + 1; q1:= q; If(q1 / 250= 1)Or(q1 / 250= 2)Or(q1 / 250= 3)Or(q1 / 250= 4)Then MouseC(random(100) + 200, random(75) + 36, 0); Until(not(getcolor(415, 101) = backgroundcolor)Or(q >= 1000)); If(q < 1000)Then fourthfinger:= true; q := 0; If(firstfinger = true)And(secondfinger = false) And(thirdfinger = false)And(fourthfinger = false)Then mouseC(85 + random(17), 288 + random(12), 1); If(firstfinger= true)And(secondfinger= true) And(thirdfinger= false) And (fourthfinger= false)Then mouseC(142 + random(17), 288 + random(12), 1); If(firstfinger= true)And(secondfinger= false) And(thirdfinger= false)And(fourthfinger= true)Then mouseC(199 + random(17), 288 + random(12), 1); If(firstfinger= false)And(secondfinger= true) And(thirdfinger= true)And(fourthfinger= false)Then mouseC(253 + random(17), 288 + random(12), 1); If(firstfinger= false)And(secondfinger= false) And(thirdfinger= false) And (fourthfinger= true)Then mouseC(307 + random(17), 288 + random(12), 1); If(firstfinger= true)And(secondfinger= true) And(thirdfinger= true)And(fourthfinger= false)Then mouseC(363 + random(17), 288 + random(12), 1); If(firstfinger= true)And(secondfinger= true) And(thirdfinger= true)And(fourthfinger= true)Then mouseC(418 + random(17), 288 + random(12), 1); Repeat wait(random(200) + 300); Until(BlueText= true); End; randomtalked:= true; End; {^^^^^^^^^^^^^^^^^ FINDQUIZ ^^^^^^^^^^^^^^^^^^^^^^^} {Will log out if you are at the Quiz Master, and enter a continues loop} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure FindQuiz; Begin If(similarcolors(getcolor(178, 372), 6495240, 20))Then Begin TakeScreenshot('Quiz Master', 1); writeln('Quiz found, entering continues loop'); LogOut; KillScript; End; End; {^^^^^^^^^^^^^^^^^ FINDFORESTER ^^^^^^^^^^^^^^^^^^^} {This Function will detect the Freaky Forester And If it finds it, it will log you out} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure FindForester; Var x, y, bmpFreakyForester : Integer; Begin bmpFreakyForester := BitmapFromString(106, 2, 'z78DAA552410AC0' + '3008FBD23618B8A3C2FEFFA531BA4346D406DA8394D8468DB1ED3' + 'DE11EE67A34F885F7B8FCB47DC4817F59C07B36442A3C41C2EFEB' + 'E0F8CBB63C2BB1EF61D215E3BADAF437C9221BEC455295AA24B57' + '846A57FE2A9365EB1252FD163E4C0C48DC456EAAC7812676FA75B' + 'F21E5499F00B0E54F6B8C2D96BD8EBD0D7D555AD781E9D382154'); If(FindBitmap(bmpFreakyForester, x, y))Then Begin TakeScreenShot('ForesterFound',1); wait(random(300)+300); LogOut; writeln('Forester Found, logged out'); KillScript; End; FreeBitmap(bmpFreakyForester); End; {^^^^^^^^^^^^^^^^^ SOLVEFROG ^^^^^^^^^^^^^^^^^^^^^^} {This Function will look For frogs, And If found, will solve it} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function SolveFrog : Boolean; //Created by Stupid3ooo, edited by Squigglyo Var tx, ty, a, c, cc, CrownColor, x, y : Integer; i, x1, y1, x2, y2, dtmfrogspot, imgfrog : Integer; Begin dtmFrogSpot := DTMFromString('78DA63AC606260B06100030E2006F2184AF36' + '2C07C4620FE0F048CDD405167881A56A8B8555D3A033F940D565B' + '0254A349404D12508D037E35000D030BB3'); imgFrog := BitmapFromString(30, 2, 'z78DA73727274B534B23000012' + '74747270B47E249645DB84C808A836D4126C91447321317498C9B' + '5154426CC160633119C355982EC4A51E00B445523B'); If(FindBitmap(imgFrog, x, y))Or(FindDtm(dtmFrogSpot, x, y, 570, 5, 725, 160))Then Begin TotalFrogs:= TotalFrogs + 1; TakeScreenShot('FrogFound', TotalFrogs); If(FindDtm(dtmFrogSpot, x, y, 570, 5, 725, 160))Then Begin MouseC(x + random(5), y + random(5), 1); wait(random(200) + 400); MapFlagging; End; x1:= 245; y1:= 165; x2:= 277; y2:= 185; Repeat a:= a + 1; If(a = 1)Then c:= c + 1; If(a = 3)Then c:= c + 1; For i:=1 To c Do Begin If(a = 1)Then Begin x1:= x1 + 30; x2:= x2 + 30; End; If(a = 2)Then Begin y1:= y1 - 20; y2:= y2 - 20; End; If(a = 3)Then Begin x1:= x1 - 30; x2:= x2 - 30; End; If(a = 4)Then Begin y1:= y1 + 20; y2:= y2 + 20; End; If(x1 = 485)And(x2 = 517)Then x2:= x2 - 2; If(y1 = 325)And(y2 = 345)Then y2:= y2 - 7; If(x1 > 515)Then Break; If(FindColorTolerance(x, y, 1077773, x1, y1, x2, y2, 20))Then Begin MouseC(x + random(5), y + random(5), 0); If(IsTextUp('Talk'))Then Begin For cc:= 1 To 20 Do Begin If(FindColorTolerance(tx, ty, 3460859, x-20, y-20, x+20, y+20, cc))Then Begin CrownColor:= GetColor(tx, ty); Break; End; End; If(FindColor(tx, ty, CrownColor, x - 20, y - 20, x + 20, y + 20))And (not(FindColoredAreaTolerance(tx, tx, 2965499, x - 25, y - 25, x + 25, y + 25, 4, 20)))Then Begin MouseC(x + random(5), y + random(5), 1); MapFlagging; Wait(2000 + random(1000)); While(FindColor(x, y, 16711680, 5, 345, 510, 465))And (not(GetColor(20, 434) = 0))Or (FindColor(x, y, 16777215, 5, 345, 510, 465))And (not(GetColor(20, 434) = 0))Do Begin MouseC(x + random(20), y + random(2), 1); wait(500 + random(500)); End; MouseC(256 + random(3), 401 + random(3), 1); Wait(5000 + random(1000)); While(FindColor(x, y, 16711680, 5, 345, 510, 465))And (not(GetColor(20, 434) = 0))Or (FindColor(x, y, 16777215, 5, 345, 510, 465))And (not(GetColor(20, 434) = 0))Do Begin MouseC(x + random(20),y + random(2), 1); wait(500 + random(500)); End; Result:= true; Break; End; End; End; End; If(a = 4)Then a:= 0; Until(x2 > 515)Or(Result = true); End; FreeBitmap(imgfrog); FreeBitmap(dtmfrogspot); End; {^^^^^^^^^^^^^^^^^ FINDCERTERS ^^^^^^^^^^^^^^^^^^^^} {This Function will check For the certers And Then log out If it finds one Of them and enter a continues loop} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure FindCerters; Begin If(getcolor(359, 37) = 8168120) Or(getcolor(163, 167) = 1922399) Or(getcolor(89, 51) = 879691)Then Begin Logout; TakeScreenShot('CerterFound',1); writeln('Certer found, logging out'); KillScript; End; End; {^^^^^^^^^^^^^^^^^ FINDLOST ^^^^^^^^^^^^^^^^^^^^^^^} {This Function will check to see if you are inside the Lost & Found. if you are it will pull the levers and get you out} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Function FindLost : Boolean; Var a, b, c, d, dtmlostfound : Integer; Screenie : Boolean; Begin result:=false; DTMLostFound := DTMFromString('78DA636C656260086000035608C5F0FFFF7F0' + '64920CD0861FF676C02AAF145559362A6025703028C6D44AA09C4' + '6D17584D33A61A0C7332816A0C51D5C0005CCD2CA01A2322D4A41' + '0509302545340404D0E504D101176F9E257030003C71610'); While(FindDtm(dtmLostFound, a, b, M1, M2, M3, M4) = true)Do Begin If(Screenie = false)Then Begin TakeScreenShot('Lost&Found',1); Screenie:= True; End; Sendarrowsilentwait(0, random(300) + 600); wait(random(300) + 300); MapCompass('N'); wait(random(300) + 300); c:= c + 1; Case c Of 1 : Begin a:= 235; b:= 60; End; 2 : Begin a:= 325; b:= 150; End; 3 : Begin a:= 240; b:= 222; End; 4 : Begin a:= 175; b:= 140; End; End; Repeat Mousec(random(30) + a, random(15) + b, 0); wait(random(10) + 30); d:= d + 1; Until(IsTextUp('Operate')) Or (d = 60); If(d = 60)Then Begin Logout; writeln('Lost & Found, logging out'); KillScript; End Else Begin getmousepos(a, b); MouseC(a, b, 1); End; wait(random(1000) + 4500); End; BlueText; wait(random(300) + 600); result:= true; FreeBitmap(DtmLostFound); End; Procedure FindBob; Var a, b : Integer; Begin If(FindColorTolerance(a, b, 4936133, 35, 355, 110, 425, 5))Then Begin TakeScreenShot('Evil Bob',0); writeln('Logged out for evil bob'); LogOut; KillScript; End; end; {^^^^^^^^^^^^^^^^^ FINDRANDOMS ^^^^^^^^^^^^^^^^^^^^} {Will check For all random events and either solve them or log out} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure FindRandoms; Begin fightfound:= false; randomtalked:= false; If(LoggedIn= true)Then Begin If(checklamps= true)Then Begin openbag; CheckLamp; If(LampPresent)Then Begin LampSkill:= 'Attack'; CheckLamp; End; End; CheckIntro; If(CheckForester= true)Then FindForester; If(checkmime= true)Then LookForMime; If(BlueText= true)Then wait(random(300) + 1000); If(checkfights= true)Then Findfight; If(checktext= true)Then Begin SetChat; FindText; End; If(checkmods= true)Then CheckForMods; If(checkboxes= true)Then CheckBox; If(checkplant= true)Then CheckForPlant; If(checkmaze= true)Then FindMaze; If(checkford= true)Then SolveFord; If(CheckQuiz= true)Then FindQuiz; If(CheckFrog= true)Then SolveFrog; If(CheckCerters= true)Then FindCerters; If(CheckBob= True)Then FindBob; exit; End; Login; End; {^^^^^^^^^^^^^^^^^ MAPFLAGGINGR ^^^^^^^^^^^^^^^^^} {Waits Until the Runescape Flag is not in the minimap And looks For random events} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure MapFlaggingR; Var color1, color2, color3, x1 : Integer; aa : Extended; Begin x1:= 0; Repeat wait(100); x1:= x1 + 1; If(FlagPresent=False)Then wait(1000); If(FlagPresent=False)Then Begin color1:= getcolor(70, 185); color2:= getcolor(436, 68); color3:= getcolor(45, 52); wait(500); If(getcolor(45, 52)= color3)Or(getcolor(70, 185)= color1) Or(getcolor(436, 68)= color2)Then If(FlagPresent=False)Then break; End; aa:= x1; If((aa / 5)= (int(x1 / 5)))Then FindRandoms; Until(x1= 150); End; {^^^^^^^^^^^^^^^^^ MAPFLAGGINGH ^^^^^^^^^^^^^^^^} {Waits Until the Runescape Flag is near your character} {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^} Procedure MapFlaggingH(z : Integer); Var cc1, d1, runescapeflag, runescapeflag2 : Integer; Begin runescapeflag := BitmapFromstring(7, 7, '000000000000000000000000000000000000FF0000000000000000' + '000000000000000000FF0000FF0000000000000000000000000000' + 'FF0000FF0000FF0000000000000000000000FF0000FF0000FF0000' + 'FF0000000000000000FF0000FF0000FF0000FF0000FF0000000000' + 'FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000' + 'FF0000FF0000FF0000FF0000'); runescapeflag2 := BitmapFromstring(2, 4, 'C656045D3311C656045D3311C656045D3311C656045D3311'); If(z= 0)Then z:= 14; Repeat wait(100 + random(50)); If(Findbitmapin(runescapeflag, cc1, d1, M1, M2, M3, M4)=false)Then FindBitmapIn(runescapeflag2, cc1, d1, M1, M2, M3, M4); Until(Dist(cc1, d1, 648, 83)