{.Script Info: # ScriptName = Gnome Agility Course Bot # Author = Solarwind # Description = Automates traing agility at the gnome agility course. # Version = 1.0 # Date = October 2006. # Comments = Created by Solarwind. /Script Info} (* Gnome Agility There is no antirandom in this script (maybe I'll add it later if needed). Instructions: - Use low detail (this is very important). - Keep Runescape on very bright. - Have run mode on (dont worry about your energy, the program is calibrated to allow the energy to recover). - This is calibrated to run by default, however you may need to set up lines 23 - 30. - Note: This script has increased failsafe code in this version. =) *) (****** This script is licensed under the GNU GPL. ******) program gnome_agility; const tol=10; (* This is the spiral tolerence, do not change.*) color1=6959; (* The log *) color2=5464176; (* The first net *) color3=1726064; (* The first tree stub *) color4=5799322; (* The rope *) color5=1195344; (* The second tree stub *) color6=5595256; (* The second net *) color7=7500411; (* The pipes *) var x,y,xx,yy,z,zz,v,pipe:integer; found:boolean; procedure sendkeyssilentsmooth(text:string;pause:integer); begin repeat sendkeyssilent(copy(text,1,1)); wait(pause+random(50)); delete(text,1,1); wait(50); until(length(text)=0); wait(200+random(50)); end; procedure searchd(color:integer); begin repeat sleep(10); z:=z+1; if (z>15)then z:=0; writeln(inttostr(z)); until(findcolorspiraltolerance(x,y,color,128,180+z*10,400,190+z*10,tol)) end; procedure searchu(color:integer); begin repeat sleep(10); z:=z+1; if (z>18)then z:=0; writeln(inttostr(z)); until(findcolorspiraltolerance(x,y,color,128,180-z*10,400,190-z*10,tol)) end; procedure searcha(color:integer); begin repeat sleep(10); z:=z+1; if (z>15)then z:=0; writeln(inttostr(z)); until(findcolorspiraltolerance(x,y,color,128-z*2,180-z*10,400+z*2,190+z*10,tol)) end; procedure searchr(color:integer); begin repeat sleep(10); z:=z+1; if (z>20)then z:=0; writeln(inttostr(z)); until(findcolorspiraltolerance(x,y,color,300+z*10,50,310+z*10,240,tol)) end; procedure viewup; begin clickmouse(646,189,true); repeat v:=v+1; sendarrowsilent(0); writeln(IntToStr(v)); Wait(3); until(v>600) end; (*Star the main program....................................................*) begin loadchars(''); pipe := BitmapFromString(24, 6, 'BAAB8ABBAE92000000000000000000BAAB8ABAAB8ABAAB8ABAAB8A' + 'B9A581BAAB8AB9A581000000000000000000B9A581B9A581B9A581' + 'B9A581000000000000000000B9A581B9A581BBAE92000000BBAE92' + 'BBAE92BAAB8A000000BAAB8ABAAB8A000000B9A581B9A581000000' + 'B9A581B9A581B9A581000000B9A581B9A581000000B9A581B9A581' + 'B9A581000000B9A581BBAE92000000BBAE92BBAE92BAAB8A000000' + 'BAAB8ABAAB8A000000B9A581B9A581000000B9A581B9A581B9A581' + '000000B9A581B9A581000000B9A581B9A581B9A581000000B9A581' + 'BBAE92000000BAAB8ABAAB8ABAAB8A000000B9A581B9A581000000' + 'BAAB8AB9A581000000B9A581B9A581B9A581000000B9A581B9A581' + '000000000000000000000000B9A581B9A581BAAB8A000000BAAB8A' + 'B9A581B9A581000000BAAB8ABAAB8A000000BAAB8ABAAB8A000000' + 'B9A581BAAB8ABAAB8A000000BAAB8ABAAB8A000000BAAB8ABAAB8A' + 'BAAB8AB9A581B9A581B9A581000000000000000000000000BAAB8A' + 'BAAB8ABAAB8A000000BAAB8ABAAB8A000000000000000000000000' + 'B9A581BAAB8ABAAB8AB9A581000000000000000000000000B9A581' + ''); repeat viewup; z:=-1; repeat (*Find the log.*) found:=false; searchd(color1); movemousesmooth(x,y); sleep(200+random(50)); zz:=0; repeat zz:=zz+1; sleep(5); if (istextat2(46+zz,9,'a',100)) then begin found:=true; clickmouse(x,y,true); sleep(100+random(100)) sleep(6900+random(200)); end; sleep(5); until(zz>3); until(found); x:=230+random(30); y:=260+random(25); movemousesmooth(x,y); sleep(70+random(50)); clickmouse(x,y,true); sleep(1400+random(200)); z:=-1; repeat (*Find the first net.*) found:=false; searchd(color2); movemousesmooth(x,y); sleep(70+random(50)); if (istextat2(9,9,'C',100)) then begin found:=true; clickmouse(x,y,true); sleep(3600+random(200)); end; until(found); z:=-1; repeat (*Find the first tree stub.*) found:=false; searcha(color3); movemousesmooth(x,y); sleep(70+random(50)); if (istextat2(9,9,'C',100)) then begin found:=true; clickmouse(x,y,true); sleep(4000+random(200)); end; until(found); z:=-1; repeat (*Find the rope.*) found:=false; searchr(color4); movemousesmooth(x,y); sleep(250+random(50)); zz:=0; repeat zz:=zz+1; sleep(5); if (istextat2(46+zz,9,'on',100)) then begin found:=true; clickmouse(x,y,true); sleep(7000+random(30)) end; sleep(5); until(zz>3); until(found); z:=-1; repeat (*Find the second tree stub.*) found:=false; searchr(color5); movemousesmooth(x,y); sleep(70+random(50)); if (istextat2(9,9,'C',100)) then begin found:=true; clickmouse(x,y,true); sleep(6500+random(200)); end; until(found); {This is where most of the bugs occur. Lets fix it. 228} x:=190+random(32); y:=20+random(30); writeln(inttostr(x)); writeln(inttostr(y)); writeln('=========================='); movemousesmooth(x,y); sleep(100+random(50)); clickmouse(x,y,true); sleep(20+random(5)); clickmouse(x,y,true); sleep(1100+random(200)); z:=-1; repeat (*Find the second net.*) found:=false; searchu(color6); movemousesmooth(x,y); sleep(100+random(50)); if (istextat2(9,9,'C',100)) then begin found:=true; clickmouse(x,y,true); sleep(3900+random(200)); end; until(found); z:=-1; repeat (*Find the pipe.*) found:=false; searchu(color7); movemousesmooth(x,y); sleep(70+random(50)); if (istextat2(9,9,'S',100)) then begin found:=true; clickmouse(x,y,true); sleep(2000+random(200)); if(findbitmapspiraltolerance(pipe,x,y,37,417,81,433,5)=false)then begin sleep(7900+random(200)); end; if(findbitmapspiraltolerance(pipe,x,y,37,417,81,433,5))then begin found:=false; sendkeyssilentsmooth('omg'+chr(13),10); sleep(500); end; end; until(found); x:=40+random(20); y:=140+random(30); movemousesmooth(x,y); sleep(70+random(50)); clickmouse(x,y,true); sleep(100+random(100)) clickmouse(x,y,true); sleep(100+random(100)) clickmouse(x,y,true); sleep(2600+random(200)); x:=40+random(20); y:=170+random(30); movemousesmooth(x,y); sleep(70+random(50)); clickmouse(x,y,true); sleep(100+random(100)) clickmouse(x,y,true); sleep(100+random(100)) clickmouse(x,y,true); sleep(3000+random(200)); until(false); end. (*End of file...*)