SRL Archive - RS Scripts

post best scrit u eva made here


king tut

2006-09-20 20:32:15

this one is my best:spot:


[PHP]
program AutoFighter;
var ax,ay,report,report2,FightMode:Integer;
BonesCollected,BonesBuried,Killed,Timeout,Ate,LastBuried,Runs,RandomCount,Lamps:Integer; {Counters}
BoneColor,BoneInvColor,color1,color2,mcolor,tol,FoodInvColor:Integer; {Colors}
TakeBones,TakeBonesY,AttackIt,AttackIt2,TalkW,TalkY,iLamp:integer; {Bitmaps}
RWX,RWY,CriticalHP:integer; //Misc
BoneCollecting,Att,Run,CHP,EatFood,Attacking:boolean;
STT,LastFight,LFTimeout,TT:LongInt;
username,password,RunWhere:string;
{.include OSi.txt}
{.include BoxBreaker.txt}

Procedure Setup;
begin
//+++++++++++++++Setup+++++++++++++++
Username:='zezima'; //Set Username
Password:='iautoallthefukingtimesogetlostjagex'; //Set Password
color1:=1422261; //Monster Color 1
color2:=1608136; //Monster Color 2
tol:=0; //Tolerance to find the monster color. 0 is default
FightMode:=2; //Set fight mode 1-4 top to bottom
EatFood:=false; //True to eat food, false to not
FoodInvColor:=937341; //Set the color of the food in your invin
CriticalHP:=0; //Percent of HP left when you should run
RunWhere:='n'; //Set Which way to run if fight random occurs
Timeout:=45; //The maximum time (in seconds) a fight should last (will run if lasts longer)
LFTimeout:=1; //The maximum time (in min) between fights
BoneCollecting:=false; //Set True to collect bones, Fasle to not
BoneColor:=12303300; //Set BoneColor on Screen
Report:=10000000000000; //Set how often to print progress report (in minutes)

end; //End of Setup

//+++++++++++++++Anti-Randoms+++++++++++++++
procedure LoginIfNeeded;//A king tut procedure based of many others
var counter:integer;
begin
if(length(username) > 0)and(length(password) > 0)then
begin
if(IsTextAt2(293,251,'Username',0))and(NotLogedIn)then
Mouse(460,322,10,2,true);
if(IsTextAt2(309,241,'Welcome to RuneScape',0))and(NotLogedIn)then
begin
Mouse(400,280,125,20,true);
if(IsTextAt2(271,214,'Enter your username',50))then
begin
Mouse(400,256,20,5,true);
SendKeysSilentsmooth(username,50);
Mouse(400,270,20,5,true);
SendKeysSilentsmooth(password,50);
Mouse(300,322,20,5,true);
repeat
counter:=counter+1;
wait(100);
until(FindColor(x,y,8421504,0,0,515,338))or(counter=60)
end;
end;
if(FindColor(x,y,8421504,400,0,515,338))then
begin
Mouse(x+5,y+1,15,5,true);
sendarrowsilentwait(0,900+random(200))
wait(200+random(100));
SetFightMode(FightMode);
end;
end;
end;

Procedure Eat;
var c:integer;
begin
Writeln('You have low hp, now running…')
SetRun(true);
Mouse(648+RWX,83+RWY,2,2,true);
wait(2000);
MapFlag;
wait(1000+random(500));
OpenBag;
if(EatFood)and(FindColorSpiral(x,y,FoodInvColor,560,210,730,460))then
repeat
OpenBag;
if(FindColorSpiral(x,y,FoodInvColor,560,210,730,460))then
begin
Mouse(x,y,3,3,true);
wait(3000+random(500));
Ate:=Ate+1;
end;
c:=c+1;
until(GetHp>80)or(c>5)
OpenBag;
if(not(FindColorSpiral(x,y,FoodInvColor,560,210,730,460)))and(GetHp<50)then
LogOut('Low HP and unable to eat');
Status('Walking back to NPCs');
Mouse(648-RWX,83-RWY,2,2,true);
wait(2000);
MapFlag;
CHP:=false;
end;

Procedure RunAway;
begin
Status('Running Away…')
runs:=runs+1;
GetScreenshot('Ran',runs);
SetRun(true);
Mouse(648+RWX,83+RWY,2,2,true);
wait(2000);
MapFlag;
wait(10000+random(3000));
Status('Running Back…')
Mouse(648-RWX,83-RWY,2,2,true);
wait(2000);
MapFlag;
Run:=false;
end;

procedure FindText;
var counter,c:integer; Talked2Rand:boolean;
begin
if(FindColor(x,y,65535,5,5,514,337))then wait(200)
if(FindColor(x,y,65535,5,5,514,337))and(LogedIn)then
begin
RandomCount:=RandomCount+1;
GetScreenShot('YellowtextFound',RandomCount);
repeat
counter:=counter+2+random(1);
if((x+counter) < 515)and((y+18) < 338)then
MoveMouseSmoothEx(x+counter,y+15+random(3),1,6,15,20,20);
wait(5);
if(IsTextAt2(9,9,'Ta',100))then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
if(FindBitmap(TalkW,x,y))or(FindBitmap(TalkY,x,y))then
begin
Mouse(x,y,40,5,true);
MapFlag;
wait(1000+random(1000));
while((FindColor(x,y,16711680,5,345,510,465))or //Replaces TalkToRand
(FindColor(x,y,16777215,5,345,510,465)))and
(not(GetColor(20,434)=0))and(c<=10)do
begin
GetScreenShot('Talked',RandomCount);
Mouse(x,y,50,2,true);
wait(2000+random(1000));
c:=c+1;
end;
Talked2Rand:=true;
end;
end;
until(counter>=250)or(Talked2Rand);
end;
end;

Procedure FindLamp;
begin
while(FindBitmapSpiralTolerance(iLamp,x,y,550,200,745,470,100)) do
begin
Lamps:=Lamps+1;
GetScreenshot('Lamp',Lamps);
Mouse(x,y,10,10,true);
wait(3000+random(1000));
Mouse(157,220,12,12,true)
wait(3000+random(1000));
Mouse(248,255,10,2,true);
wait(3000+random(1000));
Mouse(226,442,10,3,true);
wait(3000+random(1000));
end;
end;

procedure FindMiscRandoms;
var ax,ay:integer;
begin
if(FindColor(ax,ay,786423,10,350,150,433))then
begin
GetScreenshot('Mod',1);
LogOut('UHOH, A MOD!!!');
end;
if(GetColor(30,418)=0)and(GetColor(72,429)=0)then
begin
GetScreenshot('Dead',1);
LogOut('You are dead!');
end;
if(FindColor(ax,ay,11503238,10,350,479,433))then
begin
GetScreenshot('Mime',1);
LogOut('Mime Found');
end;
end;

Procedure FindRandoms;
begin
LoginIfNeeded;
FindText;
FindBox;
FindMiscRandoms;
end;

Procedure ProgressReport;
var
RHours,Minutes,Seconds,RMinutes,RSeconds:LongInt;
Time:String;
begin
if(GetSystemTime-report2 > report*60000)then
begin
Seconds:=(GetSystemTime-ST) div 1000;
Minutes:=Seconds div 60;
RHours:=Minutes div 60;
Time:=inttostr(Seconds)+' Seconds';
if Minutes<>0 then
begin
RSeconds:=Seconds Mod (Minutes*60);
Time:=inttostr(Minutes)+' Minutes and '+inttostr(RSeconds)+' Seconds';
end;
if RHours<>0 then
begin
RMinutes:=Minutes Mod (RHours*60);
RSeconds:=Seconds Mod (Minutes*60);
Time:=inttostr(RHours)+' Hours, '+inttostr(RMinutes)+' Minutes and '+inttostr(RSeconds)+' Seconds';
end;
begin
writeln(' ');
writeln('<=================Progress Report================>');
writeln('Worked for '+Time);
writeln('Fought '+inttostr(Killed)+' time');
if(EatFood)then
writeln('Ate '+inttostr(ate)+' pieces of food')
if(bonecollecting)then
writeln('Collected '+inttostr(BonesCollected)+', and buried '+inttostr(BonesBuried)+' bones');
writeln('Handled: '+inttostr(RandomCount)+' Randoms, and ran from '+inttostr(runs)+' random events');
writeln('<================================================>');
Report2:=GetSystemTime;
end;
end;
end;

Procedure GetBoneInvColor;
begin
Status('Getting boneinvcolor…');
OpenBag;
MMouse(620,220,10,10);
Wait(500+random(200));
If(IsTextAt2(9,9,'Bury',100))then
begin
BoneInvColor := GetColor(625,230);
Status('BoneInvinColor is '+inttostr(BoneInvColor));
end else
begin
BoneCollecting := false;
Writeln('');
Writeln('No bone in second inv slot!');
Writeln('');
end;
end;

Procedure BoneBurier;
begin
OpenBag;
Wait(200+random(100));
Status('Burying bones…');
If(FindColorSpiral(x,y,(BoneInvColor),555,216,740,465))then
repeat
LastBuried:=0;
Mouse(x,y,10,10,true);
Wait(1500+random(300));
BonesBuried:=BonesBuried+1;
until(not(FindColorSpiral(x,y,(BoneInvColor),555,216,740,465)));
end;

Procedure BoneCollector;
begin
Wait(200+random(100));
Status('Collecting bones…');
x:=262;
y:=174;
If(FindColorSpiral(x,y,(BoneColor),5,5,515,337))then
begin
Mouse(x,y,5,5,false);
wait(50+random(25));
If(FindBitmapIn(TakeBones,x,y,5,5,515,337))then
begin
Mouse(x,y,0,0,true);
Wait(15+random(5));
BonesCollected:=BonesCollected+1;
LastBuried:=LastBuried+1;
MapFlag;
wait(500+random(100));
end;
If(FindBitmapIn(TakeBonesY,x,y,5,5,515,337))then
begin
Mouse(x,y,0,0,true);
Wait(15+random(5));
BonesCollected:=BonesCollected+1;
LastBuried:=LastBuried+1;
MapFlag;
wait(500+random(100));
end;
end;
end;

Procedure Attack;
var c:integer;
begin
mcolor:=random(2);
case mcolor of
0:mcolor:=color1;
1:mcolor:=color2;
end;
x:=25+random(200);
y:=25+random(200);
if(FindColorSpiralTolerance(x,y,mcolor,5,5,514,337,tol))then
begin
status('Attacking…');
MoveMouseSmooth(x,y);
GetMousePos(ax,ay);
if(not FindColor(ax,ay,65280,ax-15,ay-30,ax+10,ay+15))and
(not(FindColor(ax,ay,65280,240,125,270,180)))then
begin
Mouse(ax,ay,1,1,false);
wait(150+random(50));
if(FindBitmapIn(AttackIt,x,y,10,12,516,342))or
(FindBitmapIn(AttackIt2,x,y,10,12,516,342))then
begin
Attacking:=true;
wait(50+random(25));
Mouse(x,y,5,3,true);
for c:=0 to 3 do
if(not (FindColorSpiral(ax,ay,65280,240,125,270,180)))then
begin
MapFlag;
wait(300+random(100));
FindRandoms;
end;
end else
MMouse(5,5,60,60);
end;
end;
end;

Procedure WaitWhileAttacking;
var c:integer;
begin
if(FindColorSpiral(ax,ay,65280,240,125,270,180))then
begin
if(Attacking)then
begin
Killed:=Killed+1;
Attacking:=false;
end;
STT:=GetSystemTime;
repeat
TT:=(GetSystemTime-STT)/1000;
status('Fighting monster for '+inttostr(TT)+' second(s)')
wait(300);
if(TT>Timeout)then
Run:=true;
if(c>3)then
begin
FindRandoms;
if(GetHp<CriticalHP)then
CHP:=true;
c:=0;
end;
c:=c+1;
until(not (FindColorSpiral(ax,ay,65280,240,125,270,180)))or(Run)or(CHP)
if(Run)then
begin
Status('Fight lasted too long')
RunAway;
end;
if(CHP)then
Eat;
LastFight:=GetSystemTime;
If(BoneCollecting)then
BoneCollector;
end;
end;

Procedure LoadBmps;
begin
TakeBones := BitmapFromString(70, 1,
'FFFFFFFFFFFF0000005D54475D54475D5447FFFFFFFFFFFFFFFFFF' +
'FFFFFF5D54475D54475D5447FFFFFFFFFFFF000000FFFFFFFFFFFF' +
'5D54475D54475D5447FFFFFFFFFFFFFFFFFFFFFFFF5D54475D5447' +
'5D54475D54475D54475D54475D5447FF9040FF9040FF9040FF9040' +
'FF90400000000000005D54475D5447FF9040FF9040FF9040FF9040' +
'5D54475D54475D5447FF9040FF9040FF9040FF9040FF90405D5447' +
'5D54475D54475D5447FF9040FF9040FF9040FF90405D54475D5447' +
'5D54475D5447FF9040FF9040FF9040FF9040FF9040');
TakeBonesY := BitmapFromString(70, 1,
'FFFF00FFFF000000005D54475D54475D5447FFFF00FFFF00FFFF00' +
'FFFF005D54475D54475D5447FFFF00FFFF00000000FFFF00FFFF00' +
'5D54475D54475D5447FFFF00FFFF00FFFF00FFFF005D54475D5447' +
'5D54475D54475D54475D54475D5447FF9040FF9040FF9040FF9040' +
'FF90400000000000005D54475D5447FF9040FF9040FF9040FF9040' +
'5D54475D54475D5447FF9040FF9040FF9040FF9040FF90405D5447' +
'5D54475D54475D5447FF9040FF9040FF9040FF90405D54475D5447' +
'5D54475D5447FF9040FF9040FF9040FF9040FF9040');
AttackIt := BitmapFromString(10, 6,
'FFFFFF5D54475D54475D5447FFFFFFFFFFFF5D54475D54475D5447' +
'5D5447FFFFFFFFFFFF5D54475D5447FFFFFFFFFFFF0000005D5447' +
'5D54475D5447FFFFFFFFFFFF0000005D5447FFFFFFFFFFFF000000' +
'5D54475D54475D5447FFFFFFFFFFFF0000005D5447FFFFFFFFFFFF' +
'FFFFFFFFFFFF5D54475D5447FFFFFFFFFFFF0000005D5447FFFFFF' +
'FFFFFF0000000000000000005D5447FFFFFFFFFFFF0000005D5447' +
'FFFFFFFFFFFF0000005D54475D54475D5447');
AttackIt2 := BitmapFromString(21, 7,
'5D5447FFFF00FFFF000000005D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D5447FFFF00FFFF00FFFF00FFFF005D5447' +
'5D54475D5447FFFF00FFFF00FFFF00FFFF005D54475D54475D5447' +
'5D5447FFFF00FFFF00FFFF00FFFF005D54475D5447FFFF00FFFF00' +
'0000000000000000005D5447FFFF00FFFF00000000000000FFFF00' +
'FFFF005D54475D5447FFFF00FFFF00000000000000000000000000' +
'5D5447FFFF00FFFF000000005D54475D54475D54475D5447FFFF00' +
'FFFF00FFFF00FFFF00FFFF000000005D5447FFFF00FFFF00000000' +
'5D54475D54475D54475D5447FFFF00FFFF000000005D54475D5447' +
'5D5447FFFF00FFFF00000000000000FFFF00FFFF000000005D5447' +
'FFFF00FFFF000000005D54475D54475D54475D5447FFFF00FFFF00' +
'0000005D54475D54475D5447FFFF00FFFF000000005D5447FFFF00' +
'FFFF000000005D5447FFFF00FFFF000000005D54475D54475D5447' +
'5D54475D5447FFFF00FFFF00FFFF005D54475D54475D5447FFFF00' +
'FFFF00FFFF00FFFF00FFFF000000005D54475D5447FFFF00FFFF00' +
'FFFF00FFFF005D5447');
TalkW := BitmapFromString(17, 10,
'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000' +
'000000000000000000000000000000000000FFFFFFFFFFFF000000' +
'000000FFFFFFFFFFFF000000000000000000000000000000000000' +
'000000000000000000000000000000FFFFFFFFFFFF000000000000' +
'FFFFFFFFFFFF000000000000000000000000000000000000000000' +
'000000000000000000000000FFFFFFFFFFFF000000000000FFFFFF' +
'FFFFFF000000000000000000000000000000000000000000000000' +
'000000000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF' +
'000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF000000' +
'000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000' +
'000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000' +
'000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000000000' +
'000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000' +
'FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000000000000000' +
'FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000000000FFFFFF' +
'FFFFFF000000000000FFFFFFFFFFFF000000000000000000FFFFFF' +
'FFFFFF000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF' +
'000000000000FFFFFFFFFFFF000000000000000000000000FFFFFF' +
'FFFFFFFFFFFFFFFFFFFFFFFF000000000000FFFFFFFFFFFF');
TalkY := BitmapFromString(17, 10,
'FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00000000000000000000' +
'000000000000000000000000000000000000FFFF00FFFF00000000' +
'000000FFFF00FFFF00000000000000000000000000000000000000' +
'000000000000000000000000000000FFFF00FFFF00000000000000' +
'FFFF00FFFF00000000000000000000000000000000000000000000' +
'000000000000000000000000FFFF00FFFF00000000000000FFFF00' +
'FFFF00000000000000000000000000000000000000000000000000' +
'000000000000000000FFFF00FFFF00000000000000FFFF00FFFF00' +
'000000000000000000000000FFFF00FFFF00FFFF00FFFF00000000' +
'000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000' +
'000000000000FFFF00FFFF00000000000000FFFF00FFFF00000000' +
'000000FFFF00FFFF00000000000000FFFF00FFFF00000000000000' +
'000000000000FFFF00FFFF00FFFF00FFFF00FFFF00000000000000' +
'FFFF00FFFF00000000000000FFFF00FFFF00000000000000000000' +
'FFFF00FFFF00000000000000FFFF00FFFF00000000000000FFFF00' +
'FFFF00000000000000FFFF00FFFF00000000000000000000FFFF00' +
'FFFF00000000000000FFFF00FFFF00000000000000FFFF00FFFF00' +
'000000000000FFFF00FFFF00000000000000000000000000FFFF00' +
'FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00');
//Lamp pic by Chriz
iLamp := BitmapFromString(17, 6,
'000001000001000001000001BAB815B2B015AEAD15ABAA159C9A12' +
'9291128C8A1275740E000001000001000001000001000001D0CE18' +
'CBC918C8C618C5C418C5C418C0BE18BAB815B5B315ABAA15A3A112' +
'99971292911284820E79780E6968095C5A09A6A415CECC18C5C418' +
'C2C118C0BE18BDBB18BAB815B8B615B5B315B2B015A8A715A3A112' +
'9C9A129594128E8D1281800E999712AEAD15CECC18CBC918C0BE18' +
'BDBB18BAB815B5B315B2B015AEAD15A8A715A3A1129F9E12999712' +
'88860E84820E8C8A129291129C9A12000001CBC918CBC918BAB815' +
'B8B615B5B315B2B015AEAD15A8A715A3A1129C9A1295941281800E' +
'79780E84820E000001000001000001CBC918CBC918C0BE18B8B615' +
'B2B015AEAD15ABAA15A6A4159F9E129997128C8A1279780E75740E' +
'000001000001C2C118');
end;

begin
clearreport;
Setup;
SetupOSi;
Report2:=ST;
LoadBmps;
LoginIfNeeded;
SetFightMode(FightMode);
OpenBag;
ChatFixer;
if(BoneCollecting)then
GetBoneInvColor;
LFTimeout:=LFTimeout*60000;
LastFight:=GetSystemTime;
case RunWhere of
'N':begin RWX:=-1; RWY:=-48; end;
'S':begin RWX:=1; RWY:=48; end;
'E':begin RWX:=-58; RWY:=-1; end;
'W':begin RWX:=58; RWY:=1; end;
end;
repeat
FindRandoms;
wait(300+random(150));
Att:=False;
Attack;
WaitWhileAttacking;
If(BoneCollecting)and(LastBuried>4)then
BoneBurier;
ProgressReport;
until(GetSystemTime-LastFight>LFTimeout);
LogOut('Loop Ended');
end.[/PHP]

WhiteShadow

2006-09-20 20:50:44

Ohh, so you must be odie5533? Or are you just a script stealer?

king tut

2006-09-20 20:55:35

i tweeked it a bit:bart:

Pentti

2006-09-21 11:07:43

have you even made any scripts yourself?

Sumilion

2006-09-21 11:52:27

My best script is the Willow Whacker, tho some parts are still from the original willow whacker ( By Dankness), i think i fixed it up as a fine SRL script :) My best made script that really is made by myself is private :p

Home

2006-09-22 00:48:41

This is mine :D Thanks for everyone who helpt me on this :D

[PHP]Program O_RLY;
Begin
Repeat
Writeln('YA RLY')
Until(false)
End.[/PHP]

mikev

2006-09-22 00:58:27

They need an "O RLY" smily. It would be a little pixelated version of that funny owl lol

Yakman

2006-09-22 03:27:10

i think my best is the scar minigame i made called Ice Magick, a screenshot of it is in my avatar

Infantry001

2006-09-22 19:47:33

My infminers are probably the best scripst i have ever made

WhiteShadow

2006-09-22 23:40:20

From: king tut
i tweeked it a bit:bart:


Don't lie, all you did was erase his comments. >[ …..

inferno

2006-09-23 08:04:52

Hahahaha oh, wow. I can't believe I still have this. This is my first script I ever made in scar. Feel honoured :spot: *Goes off into daydream of the past*

/////////////// INFERNO'S AIR RUNE CRAFTER ///////////////////
// Have map facing directly north(scarscape recommended) //
// Start in fallador east bank in second bankbooth from left//
// Have all your essence in first bank slot //
// Wear an air tiara //
// Start with inventory full of essence //
//////////////////////////////////////////////////////////////

program aircrafter;

procedure walkto;
begin;
movemouse(631+random(2),147+random(2));
wait(200);
clickmouse(631+random(2),147+random(2), true);
wait(19000+random(1000));
movemouse(642+random(2),142+random(2));
wait(197);
clickmouse(642+random(2),142+random(2), true);
wait(12500+random(1000));
movemouse(609+random(2),126+random(2));
wait(205);
clickmouse(609+random(2),126+random(2), true);
wait(9000+random(1000));
movemouse(608+random(2),127+random(2));
wait(203);
clickmouse(608+random(2),127+random(2), true);
wait(11000+random(1000));
movemouse(643+random(2),122+random(2));
wait(156);
clickmouse(643+random(2),122+random(2), true);
wait(10000+random(1000));
end;

procedure entercraftexit;
begin;
movemouse(258+random(2),300+random(2));
wait(200);
clickmouse(258+random(2),300+random(2), true);
wait(3000+random(500));
movemouse(348+random(2),55+random(3));
wait(204);
clickmouse(348+random(2),55+random(3), true);
wait(9000+random(500));
movemouse(179+random(2),320+random(2));
wait(187);
clickmouse(179+random(2),320+random(2), true);
wait(8000+random(500));
end;

procedure walkbackbank;
begin;
movemouse(657+random(2),21+random(2));
wait(200);
clickmouse(657+random(2),21+random(2), true);
wait(15000+random(1000));
movemouse(703+random(2),41+random(2));
wait(170)
clickmouse(703+random(2),41+random(2), true);
wait(13000+random(2000));
movemouse(678+random(2),23+random(2));
wait(200);
clickmouse(678+random(2),23+random(2), true);
wait(12000+random(1000));
movemouse(646+random(2),16);
wait(200);
clickmouse(646+random(2),16, true);
wait(13000+random(1000));
movemouse(671+random(1),58+random(1));
wait(200);
clickmouse(671+random(1),58+random(1), true);
wait(15000+random(500));
movemouse(264+random(5),197+random(5));
wait(200);
clickmouse(264+random(5),197+random(5), false);
wait(2000+random(100));
movemouse(243+random(2),239+random(1));
wait(200);
clickmouse(243+random(2),239+random(1), true);
wait(2000+random(1000));
movemouse(585+random(5),229+random(5));
wait(198);
clickmouse(585+random(5),229+random(5), false);
wait(1000+random(50));
movemouse(594+random(3),301+random(2));
wait(200);
clickmouse(594+random(3),301+random(2), true);
wait(2000+random(200));
movemouse(94+random(2),76+random(2));
wait(200);
clickmouse(94+random(2),76+random(2), false);
wait(2000+random(100));
movemouse(83+random(5),146+random(3));
wait(201);
clickmouse(83+random(5),146+random(3), true);
wait(3000+random(200));
movemouse(445+random(4),42+random(1));
wait(100);
clickmouse(445+random(4),42+random(1), true);
wait(200);
end;

Begin;
repeat;
walkto;
entercraftexit;
walkbackbank;
until(false);
end.

Sumilion

2006-09-23 10:51:35

Lol, did it even work :p, is it really the best you can :rolleyes: :spot:

inferno

2006-09-23 12:58:51

Well it did work for about 6 runs until the map rotated too far lol.

And I'm not going to post my best script here because:
1. It's private.
2. This thread is just an excuse for this guy to get good scripts.

hakeris15

2006-11-02 08:13:18

m best script is {=========================================================================]
[ ChArM's Willow Chopper ]
[ Version: 1.5 ]
[=========================================================================]
| Description: |
| A macro that chops a full load of willows in Draynor, |
| then banks it, and if chosen will powerchop. |
| Instructions: |
| 1. Set the Runescape brightness to V-bright, and your computer's |
| resolution to 32bit resolution. |
| 2. Need SCAR version 2.0.3. |
| 3. Need SRL version 3.2. |
| 4. Start script Draynor Bank, if powerchopping start by trees. |
| 5. Start with a axe in your fist inventory slot(Recomended). |
| 6. Recomended to have extra axes in your first bank slot. |
[=========================================================================]
[ Features: ]
[ AutoResponder ]
[ Forms ]
[ AntiBan ]
[ Full Randoms (UpToDate With SRL) ]
[ AutoColor Finding ]
[ Handles Trades (If powerchop is chosen, will trade the willows) ]
[ Multiple Players ]
[ Good Ent and Axe Head Finding ]
[=========================================================================}

{~//Lithuanian description and instruction By MaksasMks//~}
{~//Visit Www.Skeiperiai.Tinkle.Lt//~}

{=========================================================================]
[ ChArM's Willow Chopper ]
[ Versija: 1.5 ]
[=========================================================================]
| Aprasymas: |
| Skriptas prikirs pilna krepsi malku Draynor mieste, |
| tada pades jas visas i banka ir grys atgal kirsti malku. |
| Arba galite pasirinkti "powerchop", taciau tuomet malkos |
| nebus nesamos i banka. |
| Instrukcija: |
| 1. Nustatykite Runescape V-bright ir kompiuterio |
| rezoliucija turi buti 32bit. |
| 2. Reikia SCAR versijos 2.0.3. |
| 3. Reikia SRL versijos 3.2. |
| 4. Skripta paleiskite Draynor banke, jeigu powerchop tada sale medziu.|
| 5. Jusu kirvis turi buti pirmame krepsio laukelyje (rekomenduojama). |
| 6. Visi kiti atsarginiai kirviai turi buti pirmame banko laukelyje. |
| 7. Nerekomenduojama naudoti steel axe! |
[=========================================================================]
[ Ypatybes: ]
[ Automatinis atsiliepimas ]
[ Forma ]
[ Apsauga nuo bano ]
[ Pilnas atsitiktinumas (atnaujinta su With SRL) ]
[ Automatine spalvu paieska ]
[ Gali naudoti kelis acc ]
[ Labai gera apsauga nuo blogu medziu ir puikus kirvio galvos suradimas ]
[=========================================================================}

{~//Don't Touch Below//~}
{~//Nieko neliesk zemiau//~}

Program WillowChopper;
{.Include SRL/SRL.Scar}
{.Include SRL/SRL/Skill/Woodcutting.Scar}
{.Include SRL/SRL/Misc/Trade.Scar}
{.Include SRL/SRL/Misc/PlayerForm.Scar}
{.include SRL/SRL/Extended/xMapWalk.Scar}

Var
WillowForm: TForm;
WaitLabel, LoadLabel: TLabel;
AxeImage, WillowImage : TImage;
WaitEdit, LoadEdit: TEdit;
AxeCheckBox, AntiCheckBox, PowerCheckBox: TCheckBox;
PlayManButton, StartButton: TButton;
AxeCanv, WillowCanv: TCanvas;
RuneAxe, WillowLog: Integer;

Var
WaitTime, LoadsToDo: Integer;
UseAntiBan, PowerChop, EAxe: Boolean;

Var
Willow: Integer;
BankDot1, BankDot2, BankDot3: Integer;
TraderName: String;
LaughText: Array of string;
WhatText: Array of string;
Bank, TotalChopped, Loads: Integer;
FishSymbolColor: Integer;
NoAxe: Boolean;

Const
Ver= 'v1.5';

//—————————————————————————-//

Procedure FormBitmaps;
Begin

RuneAxe := BitmapFromString(23, 28, 'z78DACDD6DB8E832010' +
'06E05702E6005CBA88EFFF483B753019B761A3A5D5B6C95C98885' +
'FE61FC45A6A9E533D5CDDE3E79F6B3DB9CE48D527F244CEE5C894' +
'5D4D9EBDD4858B0F3DE127E44D52095C8D13FD888198360966F65' +
'C30D1C2B955A29963AB4013A3AD239E9DA4D22286C279EBC6EEB9' +
'D6A342E3E1C9B3CB7A17B820FFD306C622B904A2BD04226672507' +
'0A1040B2155AD1828B1DBF5E74D1235B4D930DD080900A650C412' +
'009070868485506DBB7456DB1B24764A8DA45755650D2392968BC' +
'7FC67BF1889AE666BBB6E526B067E186C3D3EB73B89EE97CCD1D5' +
'6743EFDE96D43A39CF86FF57382B39B202CCE425A50103CD4862D' +
'09D62DE1EAFA57CD6D0957466E3F8E4BF769795F4A6F49AF30501' +
'A49B4D3290CBB8E4B1F3B637AA4A46721997E84EB9AB1B10C324B' +
'918C9BDDD68B95C3EA5DF23D94E552F4910C0B29D32B7E5620CD7' +
'4F694F9281EB7748EECAC5573925BB137265373043942F073DFDD' +
'7F3EE36C97ACAE8CEBD3E97777D3F7CA2DE6BF8054250826D');

WillowLog := BitmapFromString(32, 26, 'z78DACD97DB9283200C8' +
'65F090841BCDC22BEFF23AD2574262C868DD51EDA99FF46C02F09' +
'3998539E9798DFAEE6FEB392E60F51E9995D72D164B02E5B0711E' +
'CA60B4C36788064E76FB382782A6DCF9C3CDAE4A3377626ADEB8D' +
'DBFEAF8EB54689967C8BD6C78D969805BD8A9FCEA99E296F278F5' +
'5251F765EA595B48B68F57A95FFE9045C100143C00C3F610E1612' +
'CE689C45F4C9E646C76CFD7A616F8D8281E4F04C16D0DEE0F0067' +
'10A21799820CCDE1CE01F330B27F05C381305DACBC91B7EC98A5E' +
'F9FAB1322B38F9B5FC216D256E11ADD0D372CDE81FE75C95BF07F' +
'8C75427FC7FF4FEF775AFE7AF6AC2046B25ECF5B92890FFA9CA01' +
'98924737973556347592E90EFF2BC88B366FE71D81E5726F4BAD9' +
'3E85730546DFA6EB293C543663E09F05E20118A55ABBB573C3B30' +
'F8C53BCE5F398B87EB3D672773F286ADD7E768A50A20F0537637F' +
'CB7C9F9C0ADF8F3AE7B8C4A2F1B777F9176DC1714792DF26F7D1E' +
'EC1443F6D874AB8E9F9ED6E81CED50CFF5080D7F991376EEF9837' +
'FAB03522DDAC982ABC8F5FC2B469876EACC989FD7223DFF457D8D' +
'F353E5A1098DF7A93AB3F1EC3EC37FB4AEB289946A9AD497AB153' +
'467F26993FC4FD9A1E73F3157FCF31D319C88C67B0FDCFFB12D45' +
'3584928E7B71BF9E47A7B1A2F85F738B8E72BEEE1B56737FF4B49' +
'FFA12EFC9BF93563FA97E33AD3E53DECFF00B8C574DBA');

End;

Procedure StartSend(Sender: TObject);
Begin

WillowForm.ModalResult:= mrOk;

FreeBitmap(RuneAxe);
FreeBitmap(WillowLog);

WaitTime:= StrToInt(WaitEdit.Text);
LoadsToDo:= StrToInt(LoadEdit.Text);

If(PowerCheckBox.State = cbChecked)then
Begin
PowerChop:= True;
WriteLn('PowerChop? - Yes');
End else
Begin
PowerChop:= False;
WriteLn('PowerChop? - No');
End;
If(AxeCheckBox.State = cbChecked)then
Begin
EAxe:= True;
WriteLn('Equip Axe? - Yes');
End else
Begin
EAxe:= False;
WriteLn('Equip Axe? - No');
End;
If(AntiCheckBox.State = cbChecked)then
Begin
UseAntiBan:= True;
WriteLn('Use Antiban? - Yes');
End else
Begin
UseAntiBan:= False;
WriteLn('Use Antiban? - No');
End;
WriteLn('WaitTime? - '+IntToStr(WaitTime)+' Seconds');
WriteLn('Loads To Do? - '+IntToStr(LoadsToDo));
End;

Procedure PlayerSend(Sender: TObject);
Begin
SetupPlayers;
End;

Procedure Form;
Begin

WillowForm := CreateForm;
WillowForm.Left := 328;
WillowForm.Top := 251;
WillowForm.BorderIcons := [biSystemMenu];
WillowForm.BorderStyle := bsToolWindow;
WillowForm.Caption := 'ChArM'#39's Willow Chopper';
WillowForm.ClientHeight := 230;
WillowForm.ClientWidth := 220;
WillowForm.Color := clBtnFace;
WillowForm.Font.Color := clWindowText;
WillowForm.Font.Height := -11;
WillowForm.Font.Name := 'Comic Sans MS';
WillowForm.Font.Style := [];
WillowForm.Visible := False;
WillowForm.PixelsPerInch := 96;

WaitLabel := TLabel.Create(WillowForm);
WaitLabel.Parent := WillowForm;
WaitLabel.Left := 77;
WaitLabel.Top := 43;
WaitLabel.Width := 60;
WaitLabel.Height := 15;
WaitLabel.Caption := 'Wait Time?';

LoadLabel := TLabel.Create(WillowForm);
LoadLabel.Parent := WillowForm;
LoadLabel.Left := 74;
LoadLabel.Top := 100;
LoadLabel.Width := 68;
LoadLabel.Height := 15;
LoadLabel.Caption := 'Loads To Do?';

AxeImage := TImage.Create(WillowForm);
AxeImage.Parent := WillowForm;
AxeImage.Left := 19;
AxeImage.Top := 154;
AxeImage.Width := 23;
AxeImage.Height := 28;

WillowImage := TImage.Create(WillowForm);
WillowImage.Parent := WillowForm;
WillowImage.Left := 171;
WillowImage.Top := 158;
WillowImage.Width := 32;
WillowImage.Height := 26;

PowerCheckBox := TCheckBox.Create(WillowForm);
PowerCheckBox.Parent := WillowForm;
PowerCheckBox.Left := 18;
PowerCheckBox.Top := 15;
PowerCheckBox.Width := 79;
PowerCheckBox.Height := 17;
PowerCheckBox.Hint := 'Check if you wish to powerchop.';
PowerCheckBox.Caption := 'PowerChop?';
PowerCheckBox.ParentShowHint := False;
PowerCheckBox.ShowHint := True;
PowerCheckBox.TabOrder := 8;

WaitEdit := TEdit.Create(WillowForm);
WaitEdit.Parent := WillowForm;
WaitEdit.Left := 49;
WaitEdit.Top := 65;
WaitEdit.Width := 121;
WaitEdit.Height := 23;
WaitEdit.Hint := 'Amount of time to wait before switching trees (In Seconds).';
WaitEdit.ParentShowHint := False;
WaitEdit.ShowHint := True;
WaitEdit.TabOrder := 9;
WaitEdit.Text := '10';

LoadEdit := TEdit.Create(WillowForm);
LoadEdit.Parent := WillowForm;
LoadEdit.Left := 51;
LoadEdit.Top := 123;
LoadEdit.Width := 121;
LoadEdit.Height := 23;
LoadEdit.Hint := 'How many loads to chop before switching players.';
LoadEdit.ParentShowHint := False;
LoadEdit.ShowHint := True;
LoadEdit.TabOrder := 10;
LoadEdit.Text := '100';

AxeCheckBox := TCheckBox.Create(WillowForm);
AxeCheckBox.Parent := WillowForm;
AxeCheckBox.Left := 119;
AxeCheckBox.Top := 15;
AxeCheckBox.Width := 78;
AxeCheckBox.Height := 17;
AxeCheckBox.Hint := 'Check if you wish to equip axe, recomended that you don'#39't.';
AxeCheckBox.Caption := 'Equip Axe?';
AxeCheckBox.ParentShowHint := False;
AxeCheckBox.ShowHint := True;
AxeCheckBox.TabOrder := 11;

AntiCheckBox := TCheckBox.Create(WillowForm);
AntiCheckBox.Parent := WillowForm;
AntiCheckBox.Left := 69;
AntiCheckBox.Top := 161;
AntiCheckBox.Width := 90;
AntiCheckBox.Height := 17;
AntiCheckBox.Hint := 'Check if you want antiban enabled.';
AntiCheckBox.Caption := 'Use AntiBan?';
AntiCheckBox.ParentShowHint := False;
AntiCheckBox.ShowHint := True;
AntiCheckBox.TabOrder := 12;

PlayManButton := TButton.Create(WillowForm);
PlayManButton.Parent := WillowForm;
PlayManButton.Left := 15;
PlayManButton.Top := 195;
PlayManButton.Width := 91;
PlayManButton.Height := 25;
PlayManButton.Hint := 'Click to setup players.';
PlayManButton.Caption := 'Player Manager';
PlayManButton.ParentShowHint := False;
PlayManButton.ShowHint := True;
PlayManButton.OnClick := @PlayerSend;
PlayManButton.TabOrder := 13;

StartButton := TButton.Create(WillowForm);
StartButton.Parent := WillowForm;
StartButton.Left := 124;
StartButton.Top := 195;
StartButton.Width := 75;
StartButton.Height := 25;
StartButton.Hint := 'Click to start the script.';
StartButton.Caption := 'Start';
StartButton.ParentShowHint := False;
StartButton.ShowHint := True;
StartButton.OnClick := @StartSend;
StartButton.TabOrder := 14;

FormBitmaps;

AxeCanv := GetBitmapCanvas(RuneAxe);
CopyCanvas(AxeCanv, AxeImage.Canvas, 0, 0, 132, 30, 0, 0, 132, 30);

WillowCanv := GetBitmapCanvas(WillowLog);
CopyCanvas(WillowCanv, WillowImage.Canvas, 0, 0, 132, 30, 0, 0, 132, 30);

End;

Procedure SafeForm;
Var
v: TVariantArray;
Begin
SetArrayLength(V, 0);
ThreadSafeCall('Form', v);
End;

Procedure ShowFormMod;
Begin
WillowForm.ShowModal;
End;

Procedure SafeShowFormMod;
Var
v: TVariantArray;
Begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowFormMod', v);
End;

//—————————————————————————-//

Procedure Bitmaps;
Begin

Willow := BitmapFromString(5, 11, 'z78DA9DCE310EC0200C03C02' +
'F11E29832520AFF7F52A5864A48A00E5D3CF8A22489BC80A42C10' +
'4FCB16E2C8B4282F42DB3F1D1998B46FF4E9AD19A2A0C2A4AE33A' +
'E167148F59C7B40ABE4598DE81A486B5A7CE7AA7E657CFEEA19DB' +
'E6FAA7DE9BAE46C6');

End;

Procedure DTMs;
Begin

BankDot1 := DTMFromString('78DA636C67626008664001FFFFFF67F80FA41' + //By Fawki =P
'921ECFF8CB54035DEA86AFEFC61621081AA0101C63A4C73B0AA09' +
'C7AF06000153117B');

BankDot2 := DTMFromString('78DA63EC60626008624001FFFFFF67F80FA41' +
'921ECFF8C3540353EA86AFEFC61621081AA0101C63AA09A1022D4' +
'44E057030001B5117D');

BankDot3 := DTMFromString('78DA63EC60626008624001FFFFFF67F80FA41' +
'921ECFF8CF540359EA86AFEFC61621081AA0101C63AA09A40026A' +
'6A816A42F1AB010000781176');

End;

//—————————————————————————-//

Procedure ExitWindow;
Var
Close: Integer;
Begin
Close := BitmapFromString(10, 11, 'z78DA3330000243033069E66' +
'4EA62628C9F3440528F4912AF0BBF38015913537313430889DF3D' +
'505D48EA3149F274E13201971A533753236367641297BD982A89D' +
'185DF04FC6A70C96211B7347131B6C42409B807872E5C260000D9' +
'5685F1');
If FindBitmapToleranceIn(Close, x, y, MSX1, MSY1, MSX2, MSY2, 10) then
Begin
MMouse(x, y, 0, 0);
Wait(100+Random(50));
GetMousePos(x, y);
Wait(100+Random(50));
Mouse(x, y, 3, 3, True);
End;
FreeBitmap(Close);
End;

//—————————————————————————-//

Function HandleTrade:Boolean;
Var
TradeMark : LongInt;
Begin
If AcceptTrade or TradeScreen then
Begin
Result := True;
Wait(1000+Random(501));
TraderName := GetTraderName;
If(PowerChop)then
Begin
ClickAllItemsBmpTolWait('All', Willow, 10, 250+Random(100));
End
Accept;
MarkTime(TradeMark)
While (not PlayerAccepted) and (TimeFromMark(TradeMark) < 20000) do Wait(1000+Random(501));
If TimeFromMark(TradeMark) > 20000 then Decline;
Accept;
MarkTime(TradeMark)
While (TradeScreen2) and (TimeFromMark(TradeMark) < 20000) Do Wait(1000+Random(501));
If TimeFromMark(TradeMark) > 20000 then Decline;
If TimeFromMark(TradeMark) < 20000 then TypeSend('Ty '+TraderName)
Else TypeSend('What do u want '+TraderName)
Trades := Trades + 1;
ExitWindow;
End;
End;

//—————————————————————————-//

Procedure RCExamine;
Begin
MMouse(Random(MSX2), Random(MSY2), 0, 0);
If IsUpText('opti') or IsUpText('alk Her') then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Case Random(2) of
0: ChooseOption(x, y, 'Examine');
1: ChooseOption(x, y, 'Cancel');
End;
Wait(Random(50)+Random(50));
End;
End;

Procedure MoveMouseAround;
Begin
Case Random(5) of
1: SleepAndMoveMouse(1000+Random(2500));
2: SleepAndMoveMouse(750+Random(2000));
3: SleepAndMoveMouse(1500+Random(1000));
4: SleepAndMoveMouse(1000+Random(500));
5: SleepAndMoveMouse(500+Random(2000));
End;
End;

Procedure RandomMoveMouseAroundEvery(mins: Integer);
Begin
If ((TimeFromMark(Mark) / 1000) / 60 >= mins) then
Begin
MarkTime(Mark);
MoveMouseAround;
End;
End;

Procedure RandomRClickExamineEvery(mins: Integer);
Begin
If ((TimeFromMark(Mark) / 1000) / 60 >= mins) then
Begin
MarkTime(Mark);
RCExamine;
End;
End;

Procedure RandomGameTabEvery(mins : Integer);
Begin
If ((TimeFromMark(Mark) / 1000) / 60 >= mins) then
Begin
MarkTime(Mark);
GameTab(1+Random(12));
End;
End;

Procedure WoodCuttingAntiBan;
Begin
If(UseAntiBan= True)then
Begin
RandomMoveMouseAroundEvery(7 + Random(4));
RandomRClickExamineEvery(7 + Random(2));
RandomGameTabEvery(6 + Random(3));
RotateEvery(8 + Random(4));
PickUpMouseEvery(15 + Random(2));
LeaveScreenEvery(12 + Random(2));
HoverEvery(9 + Random(5), 'woodcutting');
End;
End;

//—————————————————————————-//

Procedure SetupLaughText;
Begin
SetArrayLength(LaughText, 25);
LaughText[0] := 'lolol';
LaughText[1] := 'lol';
LaughText[2] := 'haha';
LaughText[3] := 'hihi';
LaughText[4] := 'ghehe';
LaughText[5] := 'lmao';
LaughText[6] := 'lmfao';
LaughText[7] := 'rofls';
LaughText[8] := 'fun';
LaughText[9] := 'nice';
LaughText[10]:= 'lolz';
LaughText[11]:= 'yep';
LaughText[12]:= 'hola';
LaughText[13]:= 'wow';
LaughText[14]:= 'i bet';
LaughText[15]:= 'rofl';
LaughText[16]:= 'ghehehghehighhe';
LaughText[17]:= 'cool';
LaughText[18]:= '…';
LaughText[19]:= '???';
LaughText[20]:= 'wowzers';
LaughText[21]:= 'grrr…';
LaughText[22]:= 'rowr';
LaughText[23]:= 'lolololololol';
LaughText[24]:= 'ha ha ha!!!';
End;

Procedure SetupWhatText;
Begin
SetArrayLength(WhatText, 7);
WhatText[0]:= 'what';
WhatText[1]:= 'yes';
WhatText[2]:= 'how can i help lol';
WhatText[3]:= 'what do you want';
WhatText[4]:= 'me?';
WhatText[5]:= 'Yah?';
WhatText[6]:= 'who?';
End;

Procedure AutoRespond;
Begin

OldLine := TheLine;
TheName := Lowercase(trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
TheLine := Lowercase(trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 16711680, 40, False, tr_NormalChars)));
NewLine := TheLine;

If OldLine <> NewLine then
If (pos('yo', TheName) <> 0) or (pos(Players[CurrentPlayer].Nick, TheName) <> 0) then
Begin
Exit;
End

If(InChat('Wc') or InChat('Woodcut') or InChat('Woodcutting') and InChat('lvls') or InChat('levels'))then
Begin
TypeSend(IntToStr(GetSkillLevel('woodcutting')));
End else

If(InChat('lol') or InChat('lmao')) or InChat('lmfao') or InChat('rofl')then
Begin
TypeSend(LaughText[Random(25)]);
End else

If(InChat(Players[CurrentPlayer].Name)) or (InChat(Players[CurrentPlayer].Nick))then
Begin
TypeSend(WhatText[Random(7)]);

End;
End;

//—————————————————————————-//

Function CFindAxeHead: Boolean;
Var
Chat, AxeHeadDTM, Tries: Integer;
StartSearch: Boolean;
Begin

AxeHeadDTM := DTMFromString('78DA63CC62626078C180021C2312191E02694' +
'620FE0F048C694035CF18D000231209A473816A9E12A1E6150135' +
'A94035AF09A801B9F9090135994498930C54F392809A3CCCF0415' +
'70300FB8311DF');

GameTab(4);
Result:= True;

Chat:= CreateBitmapMaskFromText('You do not have an axe', SmallChars);
If(FindBitmapMaskTolerance(Chat, x, y, 17, 410, 495, 452, 10, 85))then
Begin
If((EquipAxe= False)and
Not(GetColor(590, 220)= Head)or
Not(GetColor(587, 219)= Head2)or
Not(GetColor(588, 218)= Head3))then
StartSearch:= True;
If(EquipAxe)then
Begin
GameTab(5);
Wait(200+Random(200));
If(not(GetColor(597, 294)= Head))or
Not(GetColor(600, 295) = Head2)or
Not(GetColor(599, 298) = Head3)then
Begin
StartSearch:= True;
Mouse(592, 297, 2, 2, True);
Wait(1000);
End;
End;
End;
If(StartSearch= True)then
Begin
Result:= False;
NoAxe:= False;
Tries:= 0;
WriteLn('Looking For Axe Head');
Repeat
If(not(LoggedIn))then Exit;
Tries:= Tries + 1;
If(FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465))or
(FindColorSpiral(x, y, Head, MSX1, MSY1, MSX2, MSY2))or
(FindColorSpiral(x, y, Head2, MSX1, MSY1, MSX2, MSY2))or
(FindObj3(x, y, 'Take', Head3, 5))then
Begin
MMouse(x, y, 0, 0);
If(IsUpText('Take'))then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Flag;
Wait(1000+Random(100));
End else
Begin
If(FindColorSpiral(x, y, 241, 565, 5, 725, 155))then
Begin
Mouse(x, y, 1, 1, True);
Flag;
Wait(100+Random(100));
End
End
End
Until(Tries >= 10) or (FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465));
If(Tries >= 10)then
Begin
NoAxe:= True;
WriteLn('Couldn''t find axe, going to bank to withdraw another.');
End else
Begin
WriteLn('Axe Head Found.');
AttachHead;
Result:= True;
NoAxe:= False;
End;
End;
FreeBitmap(Chat);
FreeDTM(AxeHeadDTM);
End;

//—————————————————————————-//

Procedure RunAway;
Begin
Case (Random(5)) of
1 : Begin TypeSend('ahh'); end
2 : Begin TypeSend('=S'); end
3 : Begin TypeSend('hah'); end
4 : Begin TypeSend('stupid randoms'); end
5 : Begin TypeSend('-.-') end
End
RunAwayDirection('N');
Wait(10000+Random(2000));
RunBack;
End;

Procedure Randoms;
Begin
HandleTrade;
CFindAxeHead;
FindNormalRandoms;
FindEnt(3432536);
FindBirdsNest;
DwarfItem;
If(FindFight)then
RunAway;
End;

Procedure FlagRand;
Begin
While (FlagDistance > 4) Do
Begin
Wait(100+Random(50));
FindTalk;
End;
End;

//—————————————————————————-//

Procedure FindFishSymbolColor;
Begin
Repeat
FishSymbolColor:= GetSymbolColor(x, y, 'fish')
SymbolAccuracy:= SymbolAccuracy-0.1;
Until(SymbolAccuracy= 0.4) or (FishSymbolColor > 0);
If(FishSymbolColor > 0)then
Begin
WriteLn('FishSymbolColor - '+IntToStr(FishSymbolColor));
SymbolAccuracy:= 0.8;
End else
Begin
WriteLn('Could NOT find fish symbol color, its alright already at willows');
//TerminateScript;
End;
End;

//—————————————————————————-//

Procedure BankToWillows;
Begin
MouseFindFlag(625+Random(3), 108+Random(5), -1, 1);
Wait(100+Random(50));
FlagRand;
FindFishSymbolColor;
If(FindColorSpiralTolerance(x, y, FishSymbolColor, MMX1, MMY1, MMX2, MMY2, 10))then
Begin
Mouse(x, y - 8, 7, 7, True);
Wait(100+Random(50));
FlagRand;
End;
End;

Function Ent: Boolean;
Begin
If(FindColorSpiralTolerance(x, y, 3432536, MSX1, MSY1, MSX2, MSY2, 10))then
MMouse(x, y, 0, 0);
If(IsUpText('Chop')) or (IsUpText('Willow')) or (IsUpText('Down'))then
Begin
If(FindColorSpiralTolerance(x, y, 383705, 1, 1, 180, 39, 20))or
(FindColorSpiralTolerance(x, y, 65535, 1, 1, 200, 40, 20))then
Begin
Result:= True;
EntsAvoided:=EntsAvoided + 1;
WriteLn('Ent found, waiting');
Mouse(648, 83, 1, 1, True);
Wait(5000+Random(2000));
End else
Result:= False;
Exit;
End;
End;

Procedure ChopWillows;
Begin
If(FindColorSpiralTolerance(x, y, 2914416, MSX1, MSY1, MSX2, MSY2, 5))or
(FindColorSpiralTolerance(x, y, 3829856, MSX1, MSY1, MSX2, MSY2, 7))or
(FindColorSpiralTolerance(x, y, 4890768, MSX1, MSY1, MSX2, MSY2, 10))then
Begin
MMouse(x, y, 0, 0);
Wait(100+Random(50));
If IsUpText('Chop') or IsUpText('down') and IsUpText('Willow') then
Begin
If(Ent= False)then
Begin
Case Random(2) of
0: Begin Mouse(x, y, 0, 0, False); Wait(100+Random(50)); ChooseOption(x, y, 'Chop down'); Flag; end;
1: Begin Mouse(x, y, 0, 0, True); Flag; end;
End;
MarkTime(Mark);
Repeat
Randoms;
Wait(50);
AutoRespond;
If(FindNormalRandoms)then
Begin
ChopWillows;
End;
Until(TimeFromMark(Mark) >= (WaitTime*1000));
End;
End;
End;
End;

Procedure WillowsToBank;
Begin
If(FindDTM(BankDot1, x, y, MMX1, MMY1, MMX2, MMY2))or
(FindDTM(BankDot2, x, y, MMX1, MMY1, MMX2, MMY2))or
(FindDTM(BankDot3, x, y, MMX1, MMY1, MMX2, MMY2))then
Begin
DTM3Flag(BankDot1, BankDot2, BankDot3, True);
Wait(100+Random(50));
Flag;
End else
Begin
MouseFindFlag(634+Random(3), 51+Random(2), -1, 1);
Wait(100+Random(50));
FlagRand;
DTM3Flag(BankDot1, BankDot2, BankDot3, True);
Wait(100+Random(50));
Flag;
End;
End;

//—————————————————————————-//

Function FindBanker: Boolean;
Var
D, C: Integer;
Begin
If(BankScreen)then
Begin
Result:=True;
Exit;
End;
D:= 246;
C:= 163;
If(FindColorSpiralTolerance(D, C, 607837, 10, 10, 500, 330, 3))or
(FindColorSpiralTolerance(D, C, 3552827, 10, 10, 500, 330, 4))or
(FindColorSpiralTolerance(D, C, 2908795, 10, 10, 500, 330, 5))then
Begin
MMouse(D, C, 2, 2);
Wait(100+random(50));
If(Option2('Talk'))or
(IsUpText('Use'))or
(IsUpText('Bank'))then
Begin
Mouse(D, C, 1, 1, False);
Wait(100+random(50));
ChooseOption(x, y, 'Use-quickly');
Flag;
Wait(1000+Random(250));
End;
If(BankScreen)then
Begin
Result:=True;
Exit;
End;
End;
End;

Procedure BankWillows;
Begin
MarkTime(Mark);
Repeat
Wait(10+Random(5));
Until(FindBanker) or (TimeFromMark(Mark) >= 120000);
If(TimeFromMark(Mark) >= 120000)then
Begin
WriteLn('Could not find bank, restart script');
Logout;
End;
If(BankScreen)then
Begin
If(NoAxe= True)then
Begin
ClickAllItemsColorWait('All', 65536, 1000+Random(100));
FixBank;
Wait(Random(750)+500);
Withdraw(1, 1, 1);
Wait(Random(750)+500);
End else
Begin
If(EquipAxe=False)then
Begin
Deposit(2, 28, 2);
End else
If(EquipAxe=True)then
Begin
ClickAllItemsColorWait('All', 65536, 1000+Random(100));
Wait(Random(750)+500);
End;
End;
Repeat
ExitWindow;
Wait(1000+Random(1000));
Until(not(BankScreen));
If (NoAxe= True) and (EquipAxe= True)then
Begin
FindAxeHeadColor;
Wait(Random(1000)+250);
ClickItemColor(Head, True);
End;
Bank:=Bank + 1;
TotalChopped:=TotalChopped + 27;
Loads:=Loads + 1;
End;
End;

//—————————————————————————-//

Procedure DropWillows;
Begin
Repeat
ClickAllItemsBmpTolWait('Drop', Willow, 10, 250+Random(100));
Until(not(FindBitmapToleranceIn(Willow, x, y, MIX1, MIY1, MIX2, MIY2,10)));
End;

//—————————————————————————-//

Procedure ProgressReport;
Begin
ClearDebug;
WriteLn(' ');
WriteLn('<=============Progress Report============>');
WriteLn('Willow Chopper '+Ver+' By: ChArMz');
WriteLn('Worked for '+TimeRunning+' .');
WriteLn('Banked '+IntToStr(Bank)+' times.');
If(not(PowerChop))then
WriteLn('Chopped '+IntToStr(TotalChopped)+' Willows.');
If(PowerChop)then
WriteLn('Chopped/Dropped '+IntToStr(TotalChopped)+' Willows.');
WriteLn('Gained '+IntToStr(TotalChopped*(62/5))+' experience.');
WriteLn('<========================================>');
SRLRandomsReport;
Writeln(' ');
End;

//—————————————————————————-//

Procedure Setup;
Begin
SetupSRL;
Bitmaps;
DTMs;
SetupLaughText;
SetupWhatText;
MouseSpeed:= 10;
SafeForm;
SafeShowFormMod;
EquipAxe:= EAxe;
ActivateClient;
If(not(LoggedIn))then
Begin
LoginPlayer;
End
If(LoggedIn)then
Begin
NickNameBMP:= CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
PerfectNorth;
Wait(100+Random(50));
FindAxeHeadColor;
Wait(100+Random(50));
ClearDebug;
End;
End;

//—————————————————————————-//

Procedure PowerLoop;
Begin
Repeat
SetRun(True);
Repeat
ChopWillows;
WoodCuttingAntiBan;
Until(InvCount= 28) or (NoAxe= True);
DropWillows;
TotalChopped:=TotalChopped + 27;
Loads:=Loads + 1;
ProgressReport;
If(NoAxe= True)then
Begin
SetRun(False);
WillowsToBank;
BankWillows;
BankToWillows;
End
If (LoggedIn) and (LoadsToDo=Loads) then
Begin
NextPlayer(True);
End;
If(not(LoggedIn))then NextPlayer(False);
Until(False);
End;

Begin
Setup;
If(PowerChop)then
PowerLoop;
If(not(PowerChop))then
Repeat
SetRun(True);
BankToWillows;
Repeat
ChopWillows;
WoodCuttingAntiBan;
Until(InvCount= 28) or (NoAxe= True);
SetRun(False);
WillowsToBank;
BankWillows;
ProgressReport;
If (LoggedIn) and (LoadsToDo=Loads) then
Begin
NextPlayer(True);
End;
If(not(LoggedIn))then NextPlayer(False);
Until(False);
End.

{==============================================================================]
Versions:
v1.0 - First Release
v1.1 - Fixed Lag?, Updated Walking, and fixed little things
v1.2 - Fixed Lag Problems
v1.5 - New forms, made my own axe finding and ent finding, edited walking,
lots of little things also
[==============================================================================}

{==============================================================================]
Versija:
v1.0 - Pirmas paleidimas
v1.1 - Atnaujintas ejimas ir dar keleta dalyku
v1.2 - Istaisytos kaikurios lago problemos
v1.5 - Nauja forma, gera apsauga nuo blogu medziu, geras kirvio galvos
suradimas, pakeistas ejimas ir dar keletas dalyku. Taciau skriptas
turi vis dar keleta klaidu
[==============================================================================}

hakeris15

2006-11-02 08:16:25

m best script is {=========================================================================]
[ ChArM's Willow Chopper ]
[ Version: 1.5 ]
[=========================================================================]
| Description: |
| A macro that chops a full load of willows in Draynor, |
| then banks it, and if chosen will powerchop. |
| Instructions: |
| 1. Set the Runescape brightness to V-bright, and your computer's |
| resolution to 32bit resolution. |
| 2. Need SCAR version 2.0.3. |
| 3. Need SRL version 3.2. |
| 4. Start script Draynor Bank, if powerchopping start by trees. |
| 5. Start with a axe in your fist inventory slot(Recomended). |
| 6. Recomended to have extra axes in your first bank slot. |
[=========================================================================]
[ Features: ]
[ AutoResponder ]
[ Forms ]
[ AntiBan ]
[ Full Randoms (UpToDate With SRL) ]
[ AutoColor Finding ]
[ Handles Trades (If powerchop is chosen, will trade the willows) ]
[ Multiple Players ]
[ Good Ent and Axe Head Finding ]
[=========================================================================}

{~//Lithuanian description and instruction By MaksasMks//~}
{~//Visit Www.Skeiperiai.Tinkle.Lt//~}

{=========================================================================]
[ ChArM's Willow Chopper ]
[ Versija: 1.5 ]
[=========================================================================]
| Aprasymas: |
| Skriptas prikirs pilna krepsi malku Draynor mieste, |
| tada pades jas visas i banka ir grys atgal kirsti malku. |
| Arba galite pasirinkti "powerchop", taciau tuomet malkos |
| nebus nesamos i banka. |
| Instrukcija: |
| 1. Nustatykite Runescape V-bright ir kompiuterio |
| rezoliucija turi buti 32bit. |
| 2. Reikia SCAR versijos 2.0.3. |
| 3. Reikia SRL versijos 3.2. |
| 4. Skripta paleiskite Draynor banke, jeigu powerchop tada sale medziu.|
| 5. Jusu kirvis turi buti pirmame krepsio laukelyje (rekomenduojama). |
| 6. Visi kiti atsarginiai kirviai turi buti pirmame banko laukelyje. |
| 7. Nerekomenduojama naudoti steel axe! |
[=========================================================================]
[ Ypatybes: ]
[ Automatinis atsiliepimas ]
[ Forma ]
[ Apsauga nuo bano ]
[ Pilnas atsitiktinumas (atnaujinta su With SRL) ]
[ Automatine spalvu paieska ]
[ Gali naudoti kelis acc ]
[ Labai gera apsauga nuo blogu medziu ir puikus kirvio galvos suradimas ]
[=========================================================================}

{~//Don't Touch Below//~}
{~//Nieko neliesk zemiau//~}

Program WillowChopper;
{.Include SRL/SRL.Scar}
{.Include SRL/SRL/Skill/Woodcutting.Scar}
{.Include SRL/SRL/Misc/Trade.Scar}
{.Include SRL/SRL/Misc/PlayerForm.Scar}
{.include SRL/SRL/Extended/xMapWalk.Scar}

Var
WillowForm: TForm;
WaitLabel, LoadLabel: TLabel;
AxeImage, WillowImage : TImage;
WaitEdit, LoadEdit: TEdit;
AxeCheckBox, AntiCheckBox, PowerCheckBox: TCheckBox;
PlayManButton, StartButton: TButton;
AxeCanv, WillowCanv: TCanvas;
RuneAxe, WillowLog: Integer;

Var
WaitTime, LoadsToDo: Integer;
UseAntiBan, PowerChop, EAxe: Boolean;

Var
Willow: Integer;
BankDot1, BankDot2, BankDot3: Integer;
TraderName: String;
LaughText: Array of string;
WhatText: Array of string;
Bank, TotalChopped, Loads: Integer;
FishSymbolColor: Integer;
NoAxe: Boolean;

Const
Ver= 'v1.5';

//—————————————————————————-//

Procedure FormBitmaps;
Begin

RuneAxe := BitmapFromString(23, 28, 'z78DACDD6DB8E832010' +
'06E05702E6005CBA88EFFF483B753019B761A3A5D5B6C95C98885' +
'FE61FC45A6A9E533D5CDDE3E79F6B3DB9CE48D527F244CEE5C894' +
'5D4D9EBDD4858B0F3DE127E44D52095C8D13FD888198360966F65' +
'C30D1C2B955A29963AB4013A3AD239E9DA4D22286C279EBC6EEB9' +
'D6A342E3E1C9B3CB7A17B820FFD306C622B904A2BD04226672507' +
'0A1040B2155AD1828B1DBF5E74D1235B4D930DD080900A650C412' +
'009070868485506DBB7456DB1B24764A8DA45755650D2392968BC' +
'7FC67BF1889AE666BBB6E526B067E186C3D3EB73B89EE97CCD1D5' +
'6743EFDE96D43A39CF86FF57382B39B202CCE425A50103CD4862D' +
'09D62DE1EAFA57CD6D0957466E3F8E4BF769795F4A6F49AF30501' +
'A49B4D3290CBB8E4B1F3B637AA4A46721997E84EB9AB1B10C324B' +
'918C9BDDD68B95C3EA5DF23D94E552F4910C0B29D32B7E5620CD7' +
'4F694F9281EB7748EECAC5573925BB137265373043942F073DFDD' +
'7F3EE36C97ACAE8CEBD3E97777D3F7CA2DE6BF8054250826D');

WillowLog := BitmapFromString(32, 26, 'z78DACD97DB9283200C8' +
'65F090841BCDC22BEFF23AD2574262C868DD51EDA99FF46C02F09' +
'3998539E9798DFAEE6FEB392E60F51E9995D72D164B02E5B0711E' +
'CA60B4C36788064E76FB382782A6DCF9C3CDAE4A3377626ADEB8D' +
'DBFEAF8EB54689967C8BD6C78D969805BD8A9FCEA99E296F278F5' +
'5251F765EA595B48B68F57A95FFE9045C100143C00C3F610E1612' +
'CE689C45F4C9E646C76CFD7A616F8D8281E4F04C16D0DEE0F0067' +
'10A21799820CCDE1CE01F330B27F05C381305DACBC91B7EC98A5E' +
'F9FAB1322B38F9B5FC216D256E11ADD0D372CDE81FE75C95BF07F' +
'8C75427FC7FF4FEF775AFE7AF6AC2046B25ECF5B92890FFA9CA01' +
'98924737973556347592E90EFF2BC88B366FE71D81E5726F4BAD9' +
'3E85730546DFA6EB293C543663E09F05E20118A55ABBB573C3B30' +
'F8C53BCE5F398B87EB3D672773F286ADD7E768A50A20F0537637F' +
'CB7C9F9C0ADF8F3AE7B8C4A2F1B777F9176DC1714792DF26F7D1E' +
'EC1443F6D874AB8E9F9ED6E81CED50CFF5080D7F991376EEF9837' +
'FAB03522DDAC982ABC8F5FC2B469876EACC989FD7223DFF457D8D' +
'F353E5A1098DF7A93AB3F1EC3EC37FB4AEB289946A9AD497AB153' +
'467F26993FC4FD9A1E73F3157FCF31D319C88C67B0FDCFFB12D45' +
'3584928E7B71BF9E47A7B1A2F85F738B8E72BEEE1B56737FF4B49' +
'FFA12EFC9BF93563FA97E33AD3E53DECFF00B8C574DBA');

End;

Procedure StartSend(Sender: TObject);
Begin

WillowForm.ModalResult:= mrOk;

FreeBitmap(RuneAxe);
FreeBitmap(WillowLog);

WaitTime:= StrToInt(WaitEdit.Text);
LoadsToDo:= StrToInt(LoadEdit.Text);

If(PowerCheckBox.State = cbChecked)then
Begin
PowerChop:= True;
WriteLn('PowerChop? - Yes');
End else
Begin
PowerChop:= False;
WriteLn('PowerChop? - No');
End;
If(AxeCheckBox.State = cbChecked)then
Begin
EAxe:= True;
WriteLn('Equip Axe? - Yes');
End else
Begin
EAxe:= False;
WriteLn('Equip Axe? - No');
End;
If(AntiCheckBox.State = cbChecked)then
Begin
UseAntiBan:= True;
WriteLn('Use Antiban? - Yes');
End else
Begin
UseAntiBan:= False;
WriteLn('Use Antiban? - No');
End;
WriteLn('WaitTime? - '+IntToStr(WaitTime)+' Seconds');
WriteLn('Loads To Do? - '+IntToStr(LoadsToDo));
End;

Procedure PlayerSend(Sender: TObject);
Begin
SetupPlayers;
End;

Procedure Form;
Begin

WillowForm := CreateForm;
WillowForm.Left := 328;
WillowForm.Top := 251;
WillowForm.BorderIcons := [biSystemMenu];
WillowForm.BorderStyle := bsToolWindow;
WillowForm.Caption := 'ChArM'#39's Willow Chopper';
WillowForm.ClientHeight := 230;
WillowForm.ClientWidth := 220;
WillowForm.Color := clBtnFace;
WillowForm.Font.Color := clWindowText;
WillowForm.Font.Height := -11;
WillowForm.Font.Name := 'Comic Sans MS';
WillowForm.Font.Style := [];
WillowForm.Visible := False;
WillowForm.PixelsPerInch := 96;

WaitLabel := TLabel.Create(WillowForm);
WaitLabel.Parent := WillowForm;
WaitLabel.Left := 77;
WaitLabel.Top := 43;
WaitLabel.Width := 60;
WaitLabel.Height := 15;
WaitLabel.Caption := 'Wait Time?';

LoadLabel := TLabel.Create(WillowForm);
LoadLabel.Parent := WillowForm;
LoadLabel.Left := 74;
LoadLabel.Top := 100;
LoadLabel.Width := 68;
LoadLabel.Height := 15;
LoadLabel.Caption := 'Loads To Do?';

AxeImage := TImage.Create(WillowForm);
AxeImage.Parent := WillowForm;
AxeImage.Left := 19;
AxeImage.Top := 154;
AxeImage.Width := 23;
AxeImage.Height := 28;

WillowImage := TImage.Create(WillowForm);
WillowImage.Parent := WillowForm;
WillowImage.Left := 171;
WillowImage.Top := 158;
WillowImage.Width := 32;
WillowImage.Height := 26;

PowerCheckBox := TCheckBox.Create(WillowForm);
PowerCheckBox.Parent := WillowForm;
PowerCheckBox.Left := 18;
PowerCheckBox.Top := 15;
PowerCheckBox.Width := 79;
PowerCheckBox.Height := 17;
PowerCheckBox.Hint := 'Check if you wish to powerchop.';
PowerCheckBox.Caption := 'PowerChop?';
PowerCheckBox.ParentShowHint := False;
PowerCheckBox.ShowHint := True;
PowerCheckBox.TabOrder := 8;

WaitEdit := TEdit.Create(WillowForm);
WaitEdit.Parent := WillowForm;
WaitEdit.Left := 49;
WaitEdit.Top := 65;
WaitEdit.Width := 121;
WaitEdit.Height := 23;
WaitEdit.Hint := 'Amount of time to wait before switching trees (In Seconds).';
WaitEdit.ParentShowHint := False;
WaitEdit.ShowHint := True;
WaitEdit.TabOrder := 9;
WaitEdit.Text := '10';

LoadEdit := TEdit.Create(WillowForm);
LoadEdit.Parent := WillowForm;
LoadEdit.Left := 51;
LoadEdit.Top := 123;
LoadEdit.Width := 121;
LoadEdit.Height := 23;
LoadEdit.Hint := 'How many loads to chop before switching players.';
LoadEdit.ParentShowHint := False;
LoadEdit.ShowHint := True;
LoadEdit.TabOrder := 10;
LoadEdit.Text := '100';

AxeCheckBox := TCheckBox.Create(WillowForm);
AxeCheckBox.Parent := WillowForm;
AxeCheckBox.Left := 119;
AxeCheckBox.Top := 15;
AxeCheckBox.Width := 78;
AxeCheckBox.Height := 17;
AxeCheckBox.Hint := 'Check if you wish to equip axe, recomended that you don'#39't.';
AxeCheckBox.Caption := 'Equip Axe?';
AxeCheckBox.ParentShowHint := False;
AxeCheckBox.ShowHint := True;
AxeCheckBox.TabOrder := 11;

AntiCheckBox := TCheckBox.Create(WillowForm);
AntiCheckBox.Parent := WillowForm;
AntiCheckBox.Left := 69;
AntiCheckBox.Top := 161;
AntiCheckBox.Width := 90;
AntiCheckBox.Height := 17;
AntiCheckBox.Hint := 'Check if you want antiban enabled.';
AntiCheckBox.Caption := 'Use AntiBan?';
AntiCheckBox.ParentShowHint := False;
AntiCheckBox.ShowHint := True;
AntiCheckBox.TabOrder := 12;

PlayManButton := TButton.Create(WillowForm);
PlayManButton.Parent := WillowForm;
PlayManButton.Left := 15;
PlayManButton.Top := 195;
PlayManButton.Width := 91;
PlayManButton.Height := 25;
PlayManButton.Hint := 'Click to setup players.';
PlayManButton.Caption := 'Player Manager';
PlayManButton.ParentShowHint := False;
PlayManButton.ShowHint := True;
PlayManButton.OnClick := @PlayerSend;
PlayManButton.TabOrder := 13;

StartButton := TButton.Create(WillowForm);
StartButton.Parent := WillowForm;
StartButton.Left := 124;
StartButton.Top := 195;
StartButton.Width := 75;
StartButton.Height := 25;
StartButton.Hint := 'Click to start the script.';
StartButton.Caption := 'Start';
StartButton.ParentShowHint := False;
StartButton.ShowHint := True;
StartButton.OnClick := @StartSend;
StartButton.TabOrder := 14;

FormBitmaps;

AxeCanv := GetBitmapCanvas(RuneAxe);
CopyCanvas(AxeCanv, AxeImage.Canvas, 0, 0, 132, 30, 0, 0, 132, 30);

WillowCanv := GetBitmapCanvas(WillowLog);
CopyCanvas(WillowCanv, WillowImage.Canvas, 0, 0, 132, 30, 0, 0, 132, 30);

End;

Procedure SafeForm;
Var
v: TVariantArray;
Begin
SetArrayLength(V, 0);
ThreadSafeCall('Form', v);
End;

Procedure ShowFormMod;
Begin
WillowForm.ShowModal;
End;

Procedure SafeShowFormMod;
Var
v: TVariantArray;
Begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowFormMod', v);
End;

//—————————————————————————-//

Procedure Bitmaps;
Begin

Willow := BitmapFromString(5, 11, 'z78DA9DCE310EC0200C03C02' +
'F11E29832520AFF7F52A5864A48A00E5D3CF8A22489BC80A42C10' +
'4FCB16E2C8B4282F42DB3F1D1998B46FF4E9AD19A2A0C2A4AE33A' +
'E167148F59C7B40ABE4598DE81A486B5A7CE7AA7E657CFEEA19DB' +
'E6FAA7DE9BAE46C6');

End;

Procedure DTMs;
Begin

BankDot1 := DTMFromString('78DA636C67626008664001FFFFFF67F80FA41' + //By Fawki =P
'921ECFF8CB54035DEA86AFEFC61621081AA0101C63A4C73B0AA09' +
'C7AF06000153117B');

BankDot2 := DTMFromString('78DA63EC60626008624001FFFFFF67F80FA41' +
'921ECFF8C3540353EA86AFEFC61621081AA0101C63AA09A1022D4' +
'44E057030001B5117D');

BankDot3 := DTMFromString('78DA63EC60626008624001FFFFFF67F80FA41' +
'921ECFF8CF540359EA86AFEFC61621081AA0101C63AA09A40026A' +
'6A816A42F1AB010000781176');

End;

//—————————————————————————-//

Procedure ExitWindow;
Var
Close: Integer;
Begin
Close := BitmapFromString(10, 11, 'z78DA3330000243033069E66' +
'4EA62628C9F3440528F4912AF0BBF38015913537313430889DF3D' +
'505D48EA3149F274E13201971A533753236367641297BD982A89D' +
'185DF04FC6A70C96211B7347131B6C42409B807872E5C260000D9' +
'5685F1');
If FindBitmapToleranceIn(Close, x, y, MSX1, MSY1, MSX2, MSY2, 10) then
Begin
MMouse(x, y, 0, 0);
Wait(100+Random(50));
GetMousePos(x, y);
Wait(100+Random(50));
Mouse(x, y, 3, 3, True);
End;
FreeBitmap(Close);
End;

//—————————————————————————-//

Function HandleTrade:Boolean;
Var
TradeMark : LongInt;
Begin
If AcceptTrade or TradeScreen then
Begin
Result := True;
Wait(1000+Random(501));
TraderName := GetTraderName;
If(PowerChop)then
Begin
ClickAllItemsBmpTolWait('All', Willow, 10, 250+Random(100));
End
Accept;
MarkTime(TradeMark)
While (not PlayerAccepted) and (TimeFromMark(TradeMark) < 20000) do Wait(1000+Random(501));
If TimeFromMark(TradeMark) > 20000 then Decline;
Accept;
MarkTime(TradeMark)
While (TradeScreen2) and (TimeFromMark(TradeMark) < 20000) Do Wait(1000+Random(501));
If TimeFromMark(TradeMark) > 20000 then Decline;
If TimeFromMark(TradeMark) < 20000 then TypeSend('Ty '+TraderName)
Else TypeSend('What do u want '+TraderName)
Trades := Trades + 1;
ExitWindow;
End;
End;

//—————————————————————————-//

Procedure RCExamine;
Begin
MMouse(Random(MSX2), Random(MSY2), 0, 0);
If IsUpText('opti') or IsUpText('alk Her') then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Case Random(2) of
0: ChooseOption(x, y, 'Examine');
1: ChooseOption(x, y, 'Cancel');
End;
Wait(Random(50)+Random(50));
End;
End;

Procedure MoveMouseAround;
Begin
Case Random(5) of
1: SleepAndMoveMouse(1000+Random(2500));
2: SleepAndMoveMouse(750+Random(2000));
3: SleepAndMoveMouse(1500+Random(1000));
4: SleepAndMoveMouse(1000+Random(500));
5: SleepAndMoveMouse(500+Random(2000));
End;
End;

Procedure RandomMoveMouseAroundEvery(mins: Integer);
Begin
If ((TimeFromMark(Mark) / 1000) / 60 >= mins) then
Begin
MarkTime(Mark);
MoveMouseAround;
End;
End;

Procedure RandomRClickExamineEvery(mins: Integer);
Begin
If ((TimeFromMark(Mark) / 1000) / 60 >= mins) then
Begin
MarkTime(Mark);
RCExamine;
End;
End;

Procedure RandomGameTabEvery(mins : Integer);
Begin
If ((TimeFromMark(Mark) / 1000) / 60 >= mins) then
Begin
MarkTime(Mark);
GameTab(1+Random(12));
End;
End;

Procedure WoodCuttingAntiBan;
Begin
If(UseAntiBan= True)then
Begin
RandomMoveMouseAroundEvery(7 + Random(4));
RandomRClickExamineEvery(7 + Random(2));
RandomGameTabEvery(6 + Random(3));
RotateEvery(8 + Random(4));
PickUpMouseEvery(15 + Random(2));
LeaveScreenEvery(12 + Random(2));
HoverEvery(9 + Random(5), 'woodcutting');
End;
End;

//—————————————————————————-//

Procedure SetupLaughText;
Begin
SetArrayLength(LaughText, 25);
LaughText[0] := 'lolol';
LaughText[1] := 'lol';
LaughText[2] := 'haha';
LaughText[3] := 'hihi';
LaughText[4] := 'ghehe';
LaughText[5] := 'lmao';
LaughText[6] := 'lmfao';
LaughText[7] := 'rofls';
LaughText[8] := 'fun';
LaughText[9] := 'nice';
LaughText[10]:= 'lolz';
LaughText[11]:= 'yep';
LaughText[12]:= 'hola';
LaughText[13]:= 'wow';
LaughText[14]:= 'i bet';
LaughText[15]:= 'rofl';
LaughText[16]:= 'ghehehghehighhe';
LaughText[17]:= 'cool';
LaughText[18]:= '…';
LaughText[19]:= '???';
LaughText[20]:= 'wowzers';
LaughText[21]:= 'grrr…';
LaughText[22]:= 'rowr';
LaughText[23]:= 'lolololololol';
LaughText[24]:= 'ha ha ha!!!';
End;

Procedure SetupWhatText;
Begin
SetArrayLength(WhatText, 7);
WhatText[0]:= 'what';
WhatText[1]:= 'yes';
WhatText[2]:= 'how can i help lol';
WhatText[3]:= 'what do you want';
WhatText[4]:= 'me?';
WhatText[5]:= 'Yah?';
WhatText[6]:= 'who?';
End;

Procedure AutoRespond;
Begin

OldLine := TheLine;
TheName := Lowercase(trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
TheLine := Lowercase(trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 16711680, 40, False, tr_NormalChars)));
NewLine := TheLine;

If OldLine <> NewLine then
If (pos('yo', TheName) <> 0) or (pos(Players[CurrentPlayer].Nick, TheName) <> 0) then
Begin
Exit;
End

If(InChat('Wc') or InChat('Woodcut') or InChat('Woodcutting') and InChat('lvls') or InChat('levels'))then
Begin
TypeSend(IntToStr(GetSkillLevel('woodcutting')));
End else

If(InChat('lol') or InChat('lmao')) or InChat('lmfao') or InChat('rofl')then
Begin
TypeSend(LaughText[Random(25)]);
End else

If(InChat(Players[CurrentPlayer].Name)) or (InChat(Players[CurrentPlayer].Nick))then
Begin
TypeSend(WhatText[Random(7)]);

End;
End;

//—————————————————————————-//

Function CFindAxeHead: Boolean;
Var
Chat, AxeHeadDTM, Tries: Integer;
StartSearch: Boolean;
Begin

AxeHeadDTM := DTMFromString('78DA63CC62626078C180021C2312191E02694' +
'620FE0F048C694035CF18D000231209A473816A9E12A1E6150135' +
'A94035AF09A801B9F9090135994498930C54F392809A3CCCF0415' +
'70300FB8311DF');

GameTab(4);
Result:= True;

Chat:= CreateBitmapMaskFromText('You do not have an axe', SmallChars);
If(FindBitmapMaskTolerance(Chat, x, y, 17, 410, 495, 452, 10, 85))then
Begin
If((EquipAxe= False)and
Not(GetColor(590, 220)= Head)or
Not(GetColor(587, 219)= Head2)or
Not(GetColor(588, 218)= Head3))then
StartSearch:= True;
If(EquipAxe)then
Begin
GameTab(5);
Wait(200+Random(200));
If(not(GetColor(597, 294)= Head))or
Not(GetColor(600, 295) = Head2)or
Not(GetColor(599, 298) = Head3)then
Begin
StartSearch:= True;
Mouse(592, 297, 2, 2, True);
Wait(1000);
End;
End;
End;
If(StartSearch= True)then
Begin
Result:= False;
NoAxe:= False;
Tries:= 0;
WriteLn('Looking For Axe Head');
Repeat
If(not(LoggedIn))then Exit;
Tries:= Tries + 1;
If(FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465))or
(FindColorSpiral(x, y, Head, MSX1, MSY1, MSX2, MSY2))or
(FindColorSpiral(x, y, Head2, MSX1, MSY1, MSX2, MSY2))or
(FindObj3(x, y, 'Take', Head3, 5))then
Begin
MMouse(x, y, 0, 0);
If(IsUpText('Take'))then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Flag;
Wait(1000+Random(100));
End else
Begin
If(FindColorSpiral(x, y, 241, 565, 5, 725, 155))then
Begin
Mouse(x, y, 1, 1, True);
Flag;
Wait(100+Random(100));
End
End
End
Until(Tries >= 10) or (FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465));
If(Tries >= 10)then
Begin
NoAxe:= True;
WriteLn('Couldn''t find axe, going to bank to withdraw another.');
End else
Begin
WriteLn('Axe Head Found.');
AttachHead;
Result:= True;
NoAxe:= False;
End;
End;
FreeBitmap(Chat);
FreeDTM(AxeHeadDTM);
End;

//—————————————————————————-//

Procedure RunAway;
Begin
Case (Random(5)) of
1 : Begin TypeSend('ahh'); end
2 : Begin TypeSend('=S'); end
3 : Begin TypeSend('hah'); end
4 : Begin TypeSend('stupid randoms'); end
5 : Begin TypeSend('-.-') end
End
RunAwayDirection('N');
Wait(10000+Random(2000));
RunBack;
End;

Procedure Randoms;
Begin
HandleTrade;
CFindAxeHead;
FindNormalRandoms;
FindEnt(3432536);
FindBirdsNest;
DwarfItem;
If(FindFight)then
RunAway;
End;

Procedure FlagRand;
Begin
While (FlagDistance > 4) Do
Begin
Wait(100+Random(50));
FindTalk;
End;
End;

//—————————————————————————-//

Procedure FindFishSymbolColor;
Begin
Repeat
FishSymbolColor:= GetSymbolColor(x, y, 'fish')
SymbolAccuracy:= SymbolAccuracy-0.1;
Until(SymbolAccuracy= 0.4) or (FishSymbolColor > 0);
If(FishSymbolColor > 0)then
Begin
WriteLn('FishSymbolColor - '+IntToStr(FishSymbolColor));
SymbolAccuracy:= 0.8;
End else
Begin
WriteLn('Could NOT find fish symbol color, its alright already at willows');
//TerminateScript;
End;
End;

//—————————————————————————-//

Procedure BankToWillows;
Begin
MouseFindFlag(625+Random(3), 108+Random(5), -1, 1);
Wait(100+Random(50));
FlagRand;
FindFishSymbolColor;
If(FindColorSpiralTolerance(x, y, FishSymbolColor, MMX1, MMY1, MMX2, MMY2, 10))then
Begin
Mouse(x, y - 8, 7, 7, True);
Wait(100+Random(50));
FlagRand;
End;
End;

Function Ent: Boolean;
Begin
If(FindColorSpiralTolerance(x, y, 3432536, MSX1, MSY1, MSX2, MSY2, 10))then
MMouse(x, y, 0, 0);
If(IsUpText('Chop')) or (IsUpText('Willow')) or (IsUpText('Down'))then
Begin
If(FindColorSpiralTolerance(x, y, 383705, 1, 1, 180, 39, 20))or
(FindColorSpiralTolerance(x, y, 65535, 1, 1, 200, 40, 20))then
Begin
Result:= True;
EntsAvoided:=EntsAvoided + 1;
WriteLn('Ent found, waiting');
Mouse(648, 83, 1, 1, True);
Wait(5000+Random(2000));
End else
Result:= False;
Exit;
End;
End;

Procedure ChopWillows;
Begin
If(FindColorSpiralTolerance(x, y, 2914416, MSX1, MSY1, MSX2, MSY2, 5))or
(FindColorSpiralTolerance(x, y, 3829856, MSX1, MSY1, MSX2, MSY2, 7))or
(FindColorSpiralTolerance(x, y, 4890768, MSX1, MSY1, MSX2, MSY2, 10))then
Begin
MMouse(x, y, 0, 0);
Wait(100+Random(50));
If IsUpText('Chop') or IsUpText('down') and IsUpText('Willow') then
Begin
If(Ent= False)then
Begin
Case Random(2) of
0: Begin Mouse(x, y, 0, 0, False); Wait(100+Random(50)); ChooseOption(x, y, 'Chop down'); Flag; end;
1: Begin Mouse(x, y, 0, 0, True); Flag; end;
End;
MarkTime(Mark);
Repeat
Randoms;
Wait(50);
AutoRespond;
If(FindNormalRandoms)then
Begin
ChopWillows;
End;
Until(TimeFromMark(Mark) >= (WaitTime*1000));
End;
End;
End;
End;

Procedure WillowsToBank;
Begin
If(FindDTM(BankDot1, x, y, MMX1, MMY1, MMX2, MMY2))or
(FindDTM(BankDot2, x, y, MMX1, MMY1, MMX2, MMY2))or
(FindDTM(BankDot3, x, y, MMX1, MMY1, MMX2, MMY2))then
Begin
DTM3Flag(BankDot1, BankDot2, BankDot3, True);
Wait(100+Random(50));
Flag;
End else
Begin
MouseFindFlag(634+Random(3), 51+Random(2), -1, 1);
Wait(100+Random(50));
FlagRand;
DTM3Flag(BankDot1, BankDot2, BankDot3, True);
Wait(100+Random(50));
Flag;
End;
End;

//—————————————————————————-//

Function FindBanker: Boolean;
Var
D, C: Integer;
Begin
If(BankScreen)then
Begin
Result:=True;
Exit;
End;
D:= 246;
C:= 163;
If(FindColorSpiralTolerance(D, C, 607837, 10, 10, 500, 330, 3))or
(FindColorSpiralTolerance(D, C, 3552827, 10, 10, 500, 330, 4))or
(FindColorSpiralTolerance(D, C, 2908795, 10, 10, 500, 330, 5))then
Begin
MMouse(D, C, 2, 2);
Wait(100+random(50));
If(Option2('Talk'))or
(IsUpText('Use'))or
(IsUpText('Bank'))then
Begin
Mouse(D, C, 1, 1, False);
Wait(100+random(50));
ChooseOption(x, y, 'Use-quickly');
Flag;
Wait(1000+Random(250));
End;
If(BankScreen)then
Begin
Result:=True;
Exit;
End;
End;
End;

Procedure BankWillows;
Begin
MarkTime(Mark);
Repeat
Wait(10+Random(5));
Until(FindBanker) or (TimeFromMark(Mark) >= 120000);
If(TimeFromMark(Mark) >= 120000)then
Begin
WriteLn('Could not find bank, restart script');
Logout;
End;
If(BankScreen)then
Begin
If(NoAxe= True)then
Begin
ClickAllItemsColorWait('All', 65536, 1000+Random(100));
FixBank;
Wait(Random(750)+500);
Withdraw(1, 1, 1);
Wait(Random(750)+500);
End else
Begin
If(EquipAxe=False)then
Begin
Deposit(2, 28, 2);
End else
If(EquipAxe=True)then
Begin
ClickAllItemsColorWait('All', 65536, 1000+Random(100));
Wait(Random(750)+500);
End;
End;
Repeat
ExitWindow;
Wait(1000+Random(1000));
Until(not(BankScreen));
If (NoAxe= True) and (EquipAxe= True)then
Begin
FindAxeHeadColor;
Wait(Random(1000)+250);
ClickItemColor(Head, True);
End;
Bank:=Bank + 1;
TotalChopped:=TotalChopped + 27;
Loads:=Loads + 1;
End;
End;

//—————————————————————————-//

Procedure DropWillows;
Begin
Repeat
ClickAllItemsBmpTolWait('Drop', Willow, 10, 250+Random(100));
Until(not(FindBitmapToleranceIn(Willow, x, y, MIX1, MIY1, MIX2, MIY2,10)));
End;

//—————————————————————————-//

Procedure ProgressReport;
Begin
ClearDebug;
WriteLn(' ');
WriteLn('<=============Progress Report============>');
WriteLn('Willow Chopper '+Ver+' By: ChArMz');
WriteLn('Worked for '+TimeRunning+' .');
WriteLn('Banked '+IntToStr(Bank)+' times.');
If(not(PowerChop))then
WriteLn('Chopped '+IntToStr(TotalChopped)+' Willows.');
If(PowerChop)then
WriteLn('Chopped/Dropped '+IntToStr(TotalChopped)+' Willows.');
WriteLn('Gained '+IntToStr(TotalChopped*(62/5))+' experience.');
WriteLn('<========================================>');
SRLRandomsReport;
Writeln(' ');
End;

//—————————————————————————-//

Procedure Setup;
Begin
SetupSRL;
Bitmaps;
DTMs;
SetupLaughText;
SetupWhatText;
MouseSpeed:= 10;
SafeForm;
SafeShowFormMod;
EquipAxe:= EAxe;
ActivateClient;
If(not(LoggedIn))then
Begin
LoginPlayer;
End
If(LoggedIn)then
Begin
NickNameBMP:= CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
PerfectNorth;
Wait(100+Random(50));
FindAxeHeadColor;
Wait(100+Random(50));
ClearDebug;
End;
End;

//—————————————————————————-//

Procedure PowerLoop;
Begin
Repeat
SetRun(True);
Repeat
ChopWillows;
WoodCuttingAntiBan;
Until(InvCount= 28) or (NoAxe= True);
DropWillows;
TotalChopped:=TotalChopped + 27;
Loads:=Loads + 1;
ProgressReport;
If(NoAxe= True)then
Begin
SetRun(False);
WillowsToBank;
BankWillows;
BankToWillows;
End
If (LoggedIn) and (LoadsToDo=Loads) then
Begin
NextPlayer(True);
End;
If(not(LoggedIn))then NextPlayer(False);
Until(False);
End;

Begin
Setup;
If(PowerChop)then
PowerLoop;
If(not(PowerChop))then
Repeat
SetRun(True);
BankToWillows;
Repeat
ChopWillows;
WoodCuttingAntiBan;
Until(InvCount= 28) or (NoAxe= True);
SetRun(False);
WillowsToBank;
BankWillows;
ProgressReport;
If (LoggedIn) and (LoadsToDo=Loads) then
Begin
NextPlayer(True);
End;
If(not(LoggedIn))then NextPlayer(False);
Until(False);
End.

{==============================================================================]
Versions:
v1.0 - First Release
v1.1 - Fixed Lag?, Updated Walking, and fixed little things
v1.2 - Fixed Lag Problems
v1.5 - New forms, made my own axe finding and ent finding, edited walking,
lots of little things also
[==============================================================================}

{==============================================================================]
Versija:
v1.0 - Pirmas paleidimas
v1.1 - Atnaujintas ejimas ir dar keleta dalyku
v1.2 - Istaisytos kaikurios lago problemos
v1.5 - Nauja forma, gera apsauga nuo blogu medziu, geras kirvio galvos
suradimas, pakeistas ejimas ir dar keletas dalyku. Taciau skriptas
turi vis dar keleta klaidu
[==============================================================================}

Spky

2006-11-02 09:12:49

-.- Use tags and don't double post. j00 prune!

drowningtrout

2006-11-02 21:13:37

hmmm I'm going to be as nice as I can here…LEECHER!!!
Oh and its my auto runebuyer coming out in a couple of days.

shadowblade

2006-11-25 21:09:05

lol its funny its called charms willowcutter n yet they claim it as there own if you were smart you wouldve atleast taken charms name out and put your own lol

bod1977

2006-12-18 17:10:13

From: drowningtrout
hmmm I'm going to be as nice as I can here…LEECHER!!!
Oh and its my auto runebuyer coming out in a couple of days.


Oh please share that one. :(

bod1977

2006-12-18 21:53:57

The script you posted King Tut doesn't log in. :( It clicks but never actually types in the login name and password. (Yes I filled it in). How do you fix that?