SCAR Code:
program VarrockYewchopperandbanker;
{=========================================================================]
[ Varrock Yew Chopper. ]
[ ]
[ NAME : Varrock Yew Chopper. ]
[ WRITER : Omgwoot ]
[ CATEGORY : Woodcutting ]
[ DESCRIPTION : Gathers Yews in East Varrock. ]
[ USAGE : Yew gathering. ]
[ AUTOCOLOR : Yes ]
[ NOTES : Start in Varrock east bank. ]
[ CONTACT : ... ]
[ OTHER INFO : Please inform me of any bugs. Now updated for RS]
[ Update. ]
[ ]
[=========================================================================]
[ Instructions. ]
[=========================================================================]
[ 1. USE Runescape with Low Detail. ]
[ 2. Drag the crosshairs to the Runescape client. ]
[ 3. Hit Run. ] ]
[ 4. Fill out the form. ]
[ 5. Leave the room, or watch.. I don't care. :D ]
[=========================================================================}
{.include SRL/SRL.scar}
{.include SRL/SRL/SKILL/WOODCUTTING.scar}
var
amark, house, r2, boxx, symb, r1, yewcolor1, flagsx : integer;
grass, banker, logxs, entyew, axex, logx : integer;
yy, integer2, axe1, axe2, axe3, treec, loadsx, twalk1 : integer;
bankx, yewcolor, onb, hideb, friendsb, Lscreen, fullz, Int, nofent : integer;
runon, yewcolor2,Housesymbol,yewsymbol, rwalk1, x, y : integer;
whr, treeb, entt, treethere, whctr, woot, woot2, woot3, woot4, omg : boolean;
ents, lowmsped, hte, lefts, rights, attrees, waterfound : boolean;
brokenaxe, treebit, m500, loads, strr, road1 : integer;
trees : string;
STRT: TDTM;
//************************************************************************//
const VersionNumber = 'Version 4.5'; // Compliant with Rev 568+
//************************************************************************//
Procedure DeclarePlayers;
var load : integer;
begin
HowManyPlayers :=6; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:=0; // CurrentPlayer = Array Index
Players[0].Name :=''; // runescape username
Players[0].Pass :=''; // runescape password
Players[0].Nick :=''; // nick, 3 - 4 letters of username
Players[0].Loc :='bank'; // current location
players[0].integers[0]:= 2; // number of loads
Players[0].Active:=True; // active player
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Loc :='bank';
players[1].integers[0]:= 2;
Players[1].Active:=True;
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Loc :='bank';
players[2].integers[0]:= 2;
Players[2].Active:=True;
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Loc :='bank';
players[3].integers[0]:= 2;
Players[3].Active:=True;
Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Loc :='bank';
players[4].integers[0]:= 2;
Players[4].Active:=True;
Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Loc :='bank';
players[5].integers[0]:= 2;
Players[5].Active:=True;
writeln(inttostr(HowManyPlayers)+' Players');
end;
//************************************************************************//
// Below are Two SRL functions edited a little by me
//************************************************************************//
function FindVRoadColor: Integer;
var
GC, a, l, TestColor, Red, Green, Blue : integer;
var
P:array of Tpoint;
begin
GC := 7304312;
Flag;
FindColorsSpiralTolerance(x, y, P, GC, MMX1, MMY1, MMX2, MMY2, 60);
l:=GetArrayLength(P);
for a:= 0 to l-1 do
begin
TestColor := GetColor(P[a].x, P[a].y);
red := (TestColor mod 256);
green := ((TestColor / 256) mod 256);
blue := ((TestColor / 256) / 256);
if Red - Blue <= 12 then if Red - Blue >= 8 then
if Red - Green <= 6 then if Red - Green >= -1 then
if Green - Blue <= 10 then if Green - Blue >= 4 then
if GetColor(P[a].x + 5, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 3) = TestColor then
if GetColor(P[a].x, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 5, P[a].y) = TestColor then
if GetColor(P[a].x, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y) = TestColor then
if GetColor(P[a].x + 5, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 5) = TestColor then
begin
Result := TestColor;
Exit;
end;
end;
WriteLn('Could not find Varrock Road Color!');
Result := 0;
end;
{*******************************************************************************
function GetDoorColor: Integer;
By: Boreas
Description: Finds first door color it comes to. Ignores drop dots :)
*******************************************************************************}
function GetDoorsColor: Integer; // I only edited the name
var
Color, tmpx, tmpy, MinOfRange: Integer;
Length206, Length217, Length233, Length241: Integer;
Array206, Array217, Array233, Array241: TPointArray;
RangeOfOthers206, RangeOfOthers217, RangeOfOthers233, RangeOfOthers241: Integer;
tmpbool: Boolean;
begin
for Color := 200 to 254 do
begin
if not (((Color = 206) or (Color = 217) or (Color = 233) or (Color = 241))) then
begin
if FindColorCircle(tmpx, tmpy, Color, mmcx, mmcy, 70) then
begin
Result := Color;
tmpbool := True;
end;
end;
if tmpbool then Break;
end;
if not (tmpbool) then
begin
//writeln('its a drop dot color');
FindColorsTolerance(Array206, 206, mmx1, mmy1, mmx2, mmy2, 0);
Length206 := getarraylength(Array206);
FindColorsTolerance(Array217, 217, mmx1, mmy1, mmx2, mmy2, 0);
Length217 := getarraylength(Array217);
FindColorsTolerance(Array233, 233, mmx1, mmy1, mmx2, mmy2, 0);
Length233 := getarraylength(Array233);
FindColorsTolerance(Array241, 241, mmx1, mmy1, mmx2, mmy2, 0);
Length241 := getarraylength(Array241);
RangeOfOthers206 := Max(Length233, Max(Length217, Length241)) - Min(Length233, Min(Length217, Length241));
RangeOfOthers217 := Max(Length233, Max(Length206, Length241)) - Min(Length233, Min(Length206, Length241));
RangeOfOthers233 := Max(Length206, Max(Length217, Length241)) - Min(Length206, Min(Length217, Length241));
RangeOfOthers241 := Max(Length233, Max(Length217, Length206)) - Min(Length233, Min(Length217, Length206));
MinOfRange := Min(RangeOfOthers206, Min(RangeOfOthers217, Min(RangeOfOthers233, RangeOfOthers241)));
////////Added in V2///////
if (Length206 = Length217) and (Length217 = Length233) and (Length233 = Length241) then
begin
Result := 0;
Exit;
end;
///////////////////////////
case MinOfRange of
RangeOfOthers206: Result := 206;
RangeOfOthers217: Result := 217;
RangeOfOthers233: Result := 233;
RangeOfOthers241: Result := 241;
end;
end;
end;
//************************************************************************//
function boxcolor( xoof, yoof, X1, Y1, X2, Y2, COLOR, tolerance: INTEGER) : boolean;
begin
if findcolortolerance(x, y, COLOR, x1, y1, x2, y2, Tolerance) then
begin
result:= true;
mouse(x + xoof, y + yoof, 0, 0, true);
end;
end;
//************************************************************************//
// Searches for randoms, and does antiban while waiting //
////////////////////////////////////////////////////////////////////////////
function waitRAN( waittime, randomness, randomwaittime, ranamount : integer) : integer;
var
WI, WI2, i : integer;
begin
marktime(i);
if not randomness mod 2 = 0 then
randomness:= randomness + 1;
WI:= (waittime / randomness);
WI2:= (waittime / randomness);
repeat
wait((waittime / randomness));
case Random(Ranamount) of
0: begin
RandomRClick;
wait(500+random(1000));
end;
1: boredhuman;
2: begin
case random(2) of
0: begin
keydown(VK_Right);
wait(random(2000)+1000);
keyup(Vk_Right);
end;
1: begin
keydown(VK_Left);
wait(random(2000)+1000);
keyup(Vk_Left);
end;
end;
end;
3: boredhuman;
4: begin
gameTab(1 + Random(13));
wait(1000+random(1000));
gameTab(4);
end;
5: begin
gameTab(1 + Random(13));
wait(1000+random(1000));
gameTab(4);
end;
6: begin
gameTab(1 + Random(13));
wait(1000+random(1000));
gameTab(4);
end;
7: RandomMovement;
8: BoredHuman;
9: RandomMovement;
10: boredhuman;
11: case random(2) of
1: boredhuman;
2: HoverSkill('random', false);
end;
12: begin
RandomRClick;
wait(500+random(1000));
end;
13: begin
gameTab(Random(14));
wait(1000+random(1000));
gameTab(4);
end;
end;
mousespeed:= 12;
findnormalrandoms;
WI:= WI2 + WI;
until(WI = waittime)or(timefrommark(i) >= waittime);
result:= WI;
WI:= 0;
WI2:= 0;
mousespeed:= 12;
wait(random(randomwaittime) + 300);
end;
//************************************************************************//
function findYew(clicktree : boolean) : boolean;
var t, time : integer;
begin
mousespeed:= 12;
wait(2000+random(2000));
if FindObj(x, y, 'Yew', 4690821, 5)and not findcolortolerance(x, y, 122847, 0, 0, 229, 36, 10) then
begin
if not findcolortolerance(x, y, 122847, 0, 0, 229, 36, 10) then
begin
result:= true;
mmouse(x, y, 0, 0);
if clicktree=true then
begin
if isuptext('Yew') then
begin
getmousepos(x, y);
mouse(x,y,0,0,true);
end;
end;
exit;
end;
end;
end;
//************************************************************************//
procedure failsafes;
begin
if not loggedin then
begin
exit;
nextplayer(true);
end;
if finddead then
begin
logout;
exit;
nextplayer(true);
end;
end;
//************************************************************************//
Procedure SetUp;
var v : integer;
begin
SetupSRL;
DeclarePlayers;
if not loggedin then
begin
loginplayer;
end;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
yewcolor := 3168336;
whctr:=true;
if players[0].name = '' then begin players[0].active:= false; end;
if players[1].name = '' then begin players[1].active:= false; end;
if players[2].name = '' then begin players[2].active:= false; end;
if players[3].name = '' then begin players[3].active:= false; end;
if players[4].name = '' then begin players[4].active:= false; end;
if players[5].name = '' then begin players[5].active:= false; end;
if players[0].active= true then v:= v + 1;
if players[1].active= true then v:= v + 1;
if players[2].active= true then v:= v + 1;
if players[3].active= true then v:= v + 1;
if players[4].active= true then v:= v + 1;
if players[5].active= true then v:= v + 1;
cleardebug;
writeln('*--------------------------------------------------------------*');
if v >1 then writeln('You currently have '+ inttostr(v)+ ' players active.');
if v =1 then writeln('You currently have '+ inttostr(v)+ ' player active.');
if players[0].active= true then writeln('Player[0] is active. '+'('+Players[0].name+') - ' + inttostr (players[0].integers[0]) + ' loads.');
if players[1].active= true then writeln('Player[1] is active. '+'('+Players[1].name+') - ' + inttostr (players[1].integers[0]) + ' loads.');
if players[2].active= true then writeln('Player[2] is active. '+'('+Players[2].name+') - ' + inttostr (players[2].integers[0]) + ' loads.');
if players[3].active= true then writeln('Player[3] is active. '+'('+Players[3].name+') - ' + inttostr (players[3].integers[0]) + ' loads.');
if players[4].active= true then writeln('Player[4] is active. '+'('+Players[4].name+') - ' + inttostr (players[4].integers[0]) + ' loads.');
if players[5].active= true then writeln('Player[5] is active. '+'('+Players[5].name+') - ' + inttostr (players[5].integers[0]) + ' loads.');
writeln('*--------------------------------------------------------------*');
end;
//*************************************************************************//
procedure PlayerStats;
var Active: string;
var i: Integer;
begin
writeln('**********************************************');
writeln('Name : '+ Players[CurrentPlayer].Name);
writeln('Number : '+ inttostr(CurrentPlayer));
writeln('Worked for : '+ inttostr(scripttime(2))+' minutes.');
writeln('Banked : '+ inttostr(Players[CurrentPlayer].Banked) + ' times.');
writeln('Avoided : '+ inttostr(players[currentplayer].integers[1])+' ents.');
if Players[CurrentPlayer].Active=True then Active:='True' else Active:='False';
writeln('Active : '+ Active);
writeln('Location : '+ Players[CurrentPlayer].loc);
writeln('**********************************************');
for i := 0 to HowManyPlayers-1 do
begin
if Players[i].Active=True then Active:='True' else Active:='False';
writeln( (inttostr(i))+' : '+Players[i].name+ ' = '+Active+
'. - B :'+inttostr(Players[i].Banked)+' Times.'+ ' Avoided. '+ inttostr(players[currentplayer].integers[1]) +
' - : '+IntToStr(scripttime(2))+' mins.'+' - Loc: '+Players[i].loc);
end
writeln('**********************************************');
end;
//*************************************************************************//
procedure ProgressReport;
begin
cleardebug;
begin
WriteLn(' ');
WriteLn('<============== -'+VersionNumber+'- Progress Report ===============>');
SRLRandomsReport;
Writeln(' ');
end;
PlayerStats;
end;
//************************************************************************//
procedure ddtms;
begin
STRT.MainPoint.x := 636;
STRT.MainPoint.y := 101;
STRT.MainPoint.AreaSize := 0;
STRT.MainPoint.AreaShape := 0;
STRT.MainPoint.Color := findvroadcolor;
STRT.MainPoint.Tolerance := 5;
SetArrayLength(STRT.SubPoints, 2);
STRT.SubPoints[0].x := 641;
STRT.SubPoints[0].y := 45;
STRT.SubPoints[0].AreaSize := 0;
STRT.SubPoints[0].AreaShape := 0;
STRT.SubPoints[0].Color := findvroadcolor;
STRT.SubPoints[0].Tolerance := 5;
STRT.SubPoints[1].x := 634;
STRT.SubPoints[1].y := 143;
STRT.SubPoints[1].AreaSize := 0;
STRT.SubPoints[1].AreaShape := 0;
STRT.SubPoints[1].Color := findvroadcolor;
STRT.SubPoints[1].Tolerance := 5;
strr:= adddtm(STRT);
end;
//************************************************************************//
procedure bitmapsdtms;
begin
treebit := BitmapFromString2(False, 'a7CA9478DAD5914B0EC330' +
'0805AF043660B34CD2FAFE47AA29554A944672934DCB62849FCCC' +
'81F0080A982113B48ADA7B274E64556A64A9DCC9673B344920D95' +
'D9F2A2B69099DFACCFA4E9BA2751319B58FFB385040DF0DCD486B' +
'72C402F862409294C1F0C71FF8E3EB5E7B8215722C4A3D9A3BBA4' +
'86B2358F1862B9217AFC24DE8FBF6DF438BFFD1D62BC833ACFFDE' +
'F15C3BFD4033F2');
m500 := DTMFromString('78DA8DD13D0E80200C05E0D6D1431A4D20906' +
'8E4B4F8CB5D6A6173D0BE2E307CE9A385634774D2AB44887A3DB9' +
'DD457850737F9B5A3CAA298699FEB39AA959076032906519A7663' +
'38C07FA04C044202B027B0EC09E3D601C90B502732D8099D5EC80' +
'B980AC02BCD93209983DD9FFF500A78F4FC0');
brokenaxe := DTMFromString('78DA6374676660C8636440061EF1990CFF813' +
'448F43F1030FA02D5E4A0AA01C9B242D580795E4035F904D480CC' +
'2922A0C61BA8A684801A17A09A02026A5C816AB289B02B9F08350' +
'4EC0200AD400CF0');
twalk1 := DTMFromString('78DA63AC666260506640016F3FBE64E002D28' +
'C40FC1F08186B806A9450D55497B9C2D58000588D0A0135559876' +
'75B5D6A3AAE902AA514455539CE988A20600C35F0F45');
fullz := DTMFromString('78DA63EC63606038CCC8800C76AFEE06D3305' +
'1C636207112550D0CC0D57401890304D4B461DA85A16632903846' +
'849A7D04D44C2352CD51026A8A88700F48CD41026A0A8870CF3C2' +
'2EC9A47845D7388B06B291171B19008358B8970F362C26E060036' +
'AC1A03');
rwalk1 := DTMFromString('78DA634C616260D06140019DEDF50C5C409A1' +
'188FF0301631E508D36AA9AEA6A77B81A10608CC354F3EEDD3B54' +
'3520BB3471DB0557A34F404D2A508D0301F780D438E35703007F9' +
'413AC');
Yewsymbol := DTMFromString('78DA63EC606260886240018C1DAC0C5C201A8' +
'8FF0301633B1635D98C7035607E377E73C0FC4EA09A585435DA1A' +
'FCA86ABA806A22F09B03000CB80B2C');
Housesymbol := DTMFromString('78DA63AC676260B06240018CCC8C0C5C201A8' +
'8FF0301631D508D25AA1A8FF060B81AB01E9039D6A86A0C9D6C31' +
'D5D8E1B60BCC6F02AAB121A0A686B01A0007660A64');
yewcolor2 := DTMFromString('78DA63BCCBC0C0E0C88002D2CB65C03423940' +
'F003557021B');
hideb := DTMFromString('78DA635CC4C0C0F081910105FCFF0FA660A28' +
'C6B81C47B026A660389CF44A8794340CD5C22EC5A44845DCB8850' +
'B386B01A0098401CA5');
friendsb := DTMFromString('78DA637CCCC0C0F09E910119FCFF0FA161A28' +
'C5781C467026AAE01893704D47C05121F09A8F94E847B5E13E19E' +
'2F84D50000D0D71AF5');
onb := DTMFromString('78DA63D4626460F808C4C8E03F84828932AA0' +
'2596F08A85106B23E1061CE67026A7481AC4FB8D530C3D47C20A0' +
'06E4AFF744A8F98C5F0D00DD0A10EE');
house := DTMFromString('78DA63CC6262600863400131A1E90C72409A1' +
'188FF030100353705F7');
r2 := DTMFromString('78DA636C616660E061644006D33AD318E4803' +
'448F43F10000036AD0636');
boxx := DTMFromString('78DA633CC5C4C0308B91011914646632A4006' +
'990E87F2060BC0454D38FAA06220B23813448CD3C026A4E00D52C' +
'21A0661711E61C06AAE921C29C29F8D5000054C10F62');
symb := DTMFromString('78DA636C646260A8624001CAABB9194480342' +
'310FF070246909A4A54359233D8E06A4080B109D31C0C352073AA' +
'09A869206C0E00C0D10D11');
yewcolor1 := BitmapFromString2(False, 'a84DB178DA458E4B92C4' +
'300843AF64FE6499D0F8FE471A114F757B21BF0221586B11D1C2A' +
'B0DD14F432D1DEAC9C37E0FD3CB9D5F762928DFE3E7D4E9DA546C' +
'BFB36381FF1A7E0C1A1DC3970CDBEC0AAE1F5F33203A97508C87C' +
'469D35EC91FC62FA5C9E4E69B29224DE4D4FFF561A4689A32C179' +
'AFB2F64DE5192162E5262D25BD723CAB0219FA982046A1C55BD1A' +
'13A95D3F58E14C995AD1A125BFAE49BBA213922E03FBC63AEF268' +
'64BEBB4E05EAE037E764FE01AB4');
flagsx := DTMFromString('78DA63AC63626030674001B1C682609A11CA6' +
'7ACC554F31F2607A341E6B812610E9A9A63612CA86A2A816A6C09' +
'D8554E849A1AA01A0B22D4D8E057030084C50D42');
grass := BitmapFromString2(False, 'a02E2878DAA5CC310E80300C' +
'03C02FB92D4EC20894FCFF49D44582858DE5E4288901208F01BC0' +
'DCC4C62918C21F7F3CDE734744357AEA14B520DCCF95B5566DD55' +
'B96A302FCA5B7B44D71732181E2C99DFDEDB3F5EDF8');
logxs := DTMFromString('78DA632C66626078CA80023C4C39192630323' +
'00011C37F20602C04AAB9C38006189148209D0554F39E809A02A0' +
'9A0F04D43400D5BC26A0A61EA8E60901353540350F09A8A906AAB' +
'949404D3250CD73026AD2816A1EE0570300EB9212B3');
entyew := DTMFromString('78DA63AC67646048654001CF5F71826946289' +
'FB10EC84A4255F3F4393BAA9A1A202B0555CDB3571CA86A6A81AC' +
'745435B76F31A3AA69C454F3F831C22E906AC656202B1955CDCD9' +
'B8C986AD0CCB9718301554D3B7E3783D57412614E1766F83C7ECC' +
'86AAA604C88A23E0AF724C7330EC2AC7E61E34BF5712B60B009EB' +
'42570');
banker := BitmapFromString2(False, 'a93DE478DA758E4B0E033' +
'10843AF4468F8CCB249E0FE472A4EA4E974512F9E2CCB581011E5' +
'2CD0F082AA82D441412223BE3E361D1D3178763445B020B96F196' +
'33605ECB8B5B1D7F2BABD31FA3AD0D137125A60B3EEE66C2B23A3' +
'BD408A9F64D6AF9C9275B94AF87D279BB1A29259A2A3763ACFE4A' +
'C1DFF4CFEF1034BA');
axex:= DTMFromString('78DA63F4636260B8CD80025C63D2181238191' +
'81881ECFF40C0E80F547383010D302291403A08A8E6166E35601C' +
'0C54738F809A40A09A0704D480DCF390801A5FA09AFB04D47803D' +
'5DC25A0C6830835EE44D8E50654F384801A17A09A1704D43803D5' +
'BC26A0C60EA8E60301354E4035EFA860972BFEB401C200A40E19A' +
'A');
logx := DTMFromString('78DA632C66626078CA80023C4C39192630323' +
'00011C37F20602C04AAB9C38006189148209D0554F39E809A02A0' +
'9A0F04D43400D5BC26A0A61EA8E60901353540350F09A8A906AAB' +
'949404D3250CD73026AD2816A1EE0570300EB9212B3');
r1 := DTMFromString('78DA636C616260706640015DAD0D0C22409A1' +
'188FF0301632B508D3B6E3520C0D844849A36A01A2722CC21A406' +
'E41E7B026A40FEF226C21C5B026A9A816A3C89B0CB95087FB9106' +
'18E3D11EEB127229CAD89708F1701358D40353EF8D50000B2772A' +
'E4');
end;
//************************************************************************//
procedure free;
begin
freedtm(r1);
freedtm(logx);
freedtm(axex);
freebitmap(banker);
freedtm(entyew);
freedtm(logxs);
freebitmap(grass);
freedtm(flagsx);
freebitmap(yewcolor1);
freedtm(symb);
freedtm(boxx);
freedtm(r2);
freedtm(house);
freedtm(onb);
freedtm(friendsb);
freedtm(hideb);
freedtm(yewcolor2);
freedtm(housesymbol);
freedtm(yewsymbol);
freedtm(rwalk1);
freedtm(fullz);
freedtm(twalk1);
end;
//************************************************************************//
procedure RandomCompass;
begin
case random(4) of
0: Makecompass('N');
1: Makecompass('E');
2: Makecompass('W');
3: Makecompass('S');
end;
end;
//************************************************************************//
procedure HandleEnt;
Begin
if FindObj(x, y, 'Yew', 4690821, 5) then
mmouse(x, y, 0, 0);
if findcolortolerance(x, y, 122847, 0, 0, 229, 36, 15)then
begin
players[currentplayer].integers[1]:= players[currentplayer].integers[1] +1 ;
mouse(642, 83, 1, 1, true);
writeln('Waiting for Ent.' + ' You have had ' + inttostr(players[currentplayer].integers[1]) + ' Ent(s).');
repeat
wait(2000);
if FindObj(x, y, 'Yew', 4690821, 5) then
mmouse(x, y, 0, 0);
TakeScreen('Ents');
until(not(FindObj(x, y, 'Yew', 4690821, 5)))or(not(findcolortolerance(x, y, 122847, 0, 0, 229, 36, 15)));
end;
end;
//************************************************************************//
procedure whereiswater;
var
p1, p2, p3, p4 : boolean;
begin
findsymbol(x,y,'water');
mmouse(x,y-10,0,0);
if getcolor(x,y) = findvroadcolor then p1 := true else p3 := true;
findsymbol(x,y,'water');
mmouse(x+10,y,0,0);
if getcolor(x,y) = findvroadcolor then p2 := true else p4 := true;
if p1=true and p2=true then lefts:= true;
findsymbol(x,y,'water');
mmouse(x+10,y,0,0);
if getcolor(x,y) = findvroadcolor then p1 := true else p3 := true;
findsymbol(x,y,'water');
mmouse(x,y+10,0,0);
if getcolor(x,y) = findvroadcolor then p2 := true else p4 := true;
if p3=true and p4=true then rights:= true;
if p1=true and p2=true then lefts:= true;
if lefts= true then
begin
rights:= false;
end else
lefts:= false;
if rights= true then
begin
lefts:= false;
end else
rights:= false;
p1:= false;
p2:= false;
p3:= false;
p4:= false;
end;
//************************************************************************//
procedure LeaveScreen;// the one from srl didn't work too well, so i made my own
var
a, xx1,xx2,xx3: Integer;
begin
mousespeed:= 14;
xx1:= -178;
xx2:= -28;
xx3:= 63;
begin
case random(4) of
0: a := 0;
1: a := 1;
2: a := 2;
3: a := 3;
4: a := 4;
5: a := 5;
end;
if (a = 0) then
begin
MMouse(xx1+random(10),75+random(10),20,20);
Wait(1000 + Random(1000));
end;
if (a = 1) then
begin
MMouse(xx2+random(10),586+random(10),20,20);
Wait(1000 + Random(1000));
end;
if (a = 2) then
begin
MMouse(xx3+random(10),595+random(10),20,20);
Wait(1000 + Random(1000));
end;
if (a = 3) then
begin
MMouse(862+random(10), 267+random(10),20,20);
Wait(1000 + Random(1000));
end;
if (a = 4) then
begin
MMouse(504+random(10), 640+random(10),20,20);
Wait(1000 + Random(1000));
end;
if (a = 5) then
begin
MMouse(-194+random(10), 193+random(10),20,20);
Wait(1000 + Random(1000));
end;
end;
end;
//************************************************************************//
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
//************************************************************************//
procedure axecheck;
begin
cleardebug;
gametab(4);
wait(1000);
if finddtm(axex, x,y,0,0,700,700)then
begin
axe1:= getcolor(x,y)
axe2:= getcolor(x+1,y+1)
axe3:= getcolor(x+1,y-1)
writeln('axe is in inventory.')
writeln('axe colors are as follows: ')
whr:= true;
writeln(inttostr(axe1)+' '+inttostr(axe2)+' '+inttostr(axe3))
end;
if whr=false then
begin
gametab(5);
wait(1000);
if finddtm(axex, x, y, 0, 0, 700, 700)then
begin
axe1:= getcolor(x,y)
axe2:= getcolor(x+1,y+1)
axe3:= getcolor(x+1,y-1)
writeln('axe is in equipped.')
writeln('axe colors are as follows: ')
writeln(inttostr(axe1)+' '+inttostr(axe2)+' '+inttostr(axe3))
end;
end;
end;
//************************************************************************//
procedure FindRandoms;
begin
findnormalrandoms;
FindFastRandoms;
if(finddtm(boxx,x,y,553, 202,742, 465))then
begin
openbox;
wait(random(1000));
solvebox;
end;
if findcolortolerance(x,y,1479347,553, 202,742, 465,10) then
begin
mouse(x,y,0,0,false);
wait(1000);
chooseoption('Drop');
end;
if findfight then
begin
makecompass('N');
setrun(true);
mouse(655, 31,0,0,true);
flag;
wait(5000);
findsymbol(x,y,'rare trees');
mouse(x,y,0,0,true);
flag;
setrun(false);
end;
end;
//*************************************************************************//
procedure bank;
begin
failsafes;
mousespeed:= 12;
makecompass('S');
lowestangle;
openbank3;
wait(random(500));
fixbank;
wait(random(500));
finddtm(logx, x, y, 560, 210, 739, 458);
mouse(x,y,0,0,false);
chooseoption('All');
closebank;
players[currentplayer].banked := players[currentplayer].banked + 1;
end;
//*************************************************************************//
procedure depositelogs;
begin
mousespeed:= 12;
Makecompass('S');
lowestangle;
openbank3;
wait(random(500));
fixbank;
wait(random(500));
finddtm(logxs, x, y, 560, 210, 739, 458);
mouse(x,y,0,0,false);
chooseoption('All');
closebank;
highestangle;
end;
//*************************************************************************//
procedure brightnessnchat;
begin
repeat
if findcolor(x,y,16776960,145, 478,389, 501) or findcolor(x,y,65535,145, 478,389, 501) or findcolor(x,y,65280,145, 478,389, 501) then
begin
mouse(x,y,0,0,false);
wait(200+random(200));
chooseoption('Off');
end;
until (not(finddtm(onb,x,y,145, 478,389, 501)or(finddtm(friendsb,x,y,145, 478,389, 501)or(finddtm(hideb,x,y,145, 478,389, 501)))));
gametab(11);
if(findcolor(x,y,9981222, 705, 221, 720, 236)) then gametab(4)
else
if(not(findcolor(x,y,9981222, 705, 221, 720, 236)))then
begin
mouse(715, 228, 0, 0, true);
gametab(4);
end;
end;
//************************************************************************//
procedure ent;
Begin
if FindObj(x, y, 'Yew', 4690821, 5) then
mmouse(x, y, 0, 0);
if findcolortolerance(x, y, 122847, 0, 0, 229, 36, 15)then
begin
players[currentplayer].integers[1]:= players[currentplayer].integers[1] +1 ;
mouse(642, 83, 1, 1, true);
writeln('Waiting for Ent.' + ' You have had ' + inttostr(players[currentplayer].integers[1]) + ' Ent(s).');
repeat
wait(2000);
if FindObj(x, y, 'Yew', 4690821, 5) then
mmouse(x, y, 0, 0);
TakeScreen('Ents');
until(not(FindObj(x, y, 'Yew', 4690821, 5)))or(not(findcolortolerance(x, y, 122847, 0, 0, 229, 36, 15)));
end;
end;
//************************************************************************//
procedure lineupr;
begin
if not finddtm(strr, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
makecompass('w');
begin
keydown(VK_LEFT);
repeat
wait(10);
until(finddtm(strr, x, y, MMX1, MMY1, MMX2, MMY2));
keyup(VK_LEFT);
end;
end;
end;
//************************************************************************//
procedure walktotree;
begin
findrandoms;
attrees:= true;
failsafes;
mousespeed:= 12;
writeln('Walking from bank to tree 1');
Makecompass('N');
wait(random(1000));
setrun(true);
gametab(4);
mousespeed:= 12;
RadialWalk( findvroadcolor , 306, 332, 57, 0, 0);
flag;
whereiswater;
findsymbol(x,y,'water');
if lefts=true then mouse(x+20,y,0,0,true) else mouse(x,y,0,0,true);
flag;
LinearRoadWalk(findvroadcolor, 0, 60, 0, 0);
flag;
repeat
findrandoms;
LinearRoadWalk(findvroadcolor, 0, 60, 0, 0);
flag;
until findsymbol(x,y,'rare trees')
if findsymbol(x,y,'rare trees') then
begin
findrandoms;
mouse(x,y,0,0,true);
flag;
end else
begin
logout;
exit;
end;
findrandoms;
players[currentplayer].loc:= 'Yew trees.';
setrun(false);
findrandoms;
players[currentplayer].loc:='Tree 1';
findrandoms;
if findsymbol(x,y,'rare trees') then
mouse(x,y,0,0,true);
flag;
end;
//*************************************************************************//
procedure walkfromtree;
begin
findrandoms;
failsafes;
mousespeed:= 12;
writeln('walking to bank');
findrandoms;
if(not(findsymbol(x, y, 'house')))then
begin
Makecompass('N');
findrandoms;
whctr:= true;
treeb:= true;
woot:=true;
treethere:= false;
mouse(615, 80, 4, 4, true);
flag;
mouse(633, 146,6,6,true);
wait(20000);
findsymbol(x,y,'rare trees');
mouse(x,y,0,0,true);
flag;
players[currentplayer].loc:='Tree 1';
end;
findrandoms;
findsymbol(x,y,'rare trees');
mouse(x,y,0,0,true);
flag;
Makecompass('N');
gametab(4);
findrandoms;
repeat
findrandoms;
LinearRoadWalk(findvroadcolor, 180, 64, 0, 0);
flag;
until(findsymbol(x, y, 'training dummy'))
if findsymbol(x, y, 'Water') then
begin
findrandoms;
mouse(x, y, 0, 0, true);
flag;
end else
begin
if not findsymbol(x, y, 'Water') then
begin
findrandoms;
waterfound:= true;
LinearRoadWalk(findvroadcolor, 180, 64, 0, 0);
flag;
end;
end;
if waterfound = true then
begin
findrandoms;
whereiswater;
flag;
MouseBox(647, 86, 672, 110, True);
flag;
end;
if(not(findsymbol(x,y,'bank')))then
begin
findrandoms;
mouse(682, 88, 6, 6, true);
flag;
end;
if findsymbol(x,y,'bank') then
begin
findrandoms;
mouse(x, y, 0, 0, true);
flag;
end;
findrandoms;
players[currentplayer].loc:= 'Bank.';
attrees:= false;
waterfound:= false;
findrandoms;
end;
//*************************************************************************//
Procedure Walktotree1;
var tmark : integer;
begin
findrandoms;
findsymbol(x, y, 'rare trees');
mouse(x, y, 0, 0, true);
failsafes;
mousespeed:= 12;
writeln('Now walking to tree 1');
Makecompass('N');
whctr:= true;
treeb:= true;
findrandoms;
mouse(615, 80, 4, 4, true);
flag;
mouse(633, 146,6,6,true);
wait(20000-random(1000));
findsymbol(x,y,'rare trees');
mouse(x,y,0,0,true);
flag;
players[currentplayer].loc:='Tree 1';
findrandoms;
end;
//*************************************************************************//
procedure Walktotree2;
var
accu, rst : extended;
begin
findrandoms;
lineupr;
failsafes;
findsymbol(x, y, 'rare trees');
mouse(x, y, 0, 0, true);
if not finddtm(logx, x, y, 683, 429, 728, 461) then
begin
findrandoms;
mousespeed:= 12;
writeln('Now walking to tree 2');
Makecompass('N');
treeb:= false;
whctr:= false;
findrandoms;
flag;
lineupr;
boxcolor(15, 0, 582, 9, 646, 45, GetDoorsColor, 10);
fflag(10);
FindDeformedBitmapToleranceIn(treebit, x, y, 620, 25, 674, 62, 50, 0, True, accu);
Mouse(x, y, 0, 0, true);
flag;
MouseBox(685, 70, 704, 87, True);
flag;
findsymbol(x,y,'rare trees');
mouse(x,y,0,0,true);
flag;
players[currentplayer].loc:='Tree 2';
accu:= rst;
findrandoms;
end;
end;
//*************************************************************************//
procedure ChopTree;
begin
waitRAN( 500, 2, 1000, 0);
repeat
findrandoms;
findyew(true);
findrandoms;
ent;
findrandoms;
waitRAN( 3000, 3, 1000, 13);
findrandoms;
if not FindObj(x, y, 'Yew', 4690821, 10) then
begin
findrandoms;
if whctr= false then
begin
findrandoms;
WalkToTree1;
end;
if whctr= true then
begin
if FindObj(x, y, 'Yew', 4690821, 10) = false then
WalkToTree2;
end;
end;
Until invfull;
end;
//*************************************************************************//
begin
Setup;
ddtms;
wait(5000);
writeln(' ');
writeln('Starting script...');
wait(1000);
activateclient;
wait(2000);
if not loggedin then loginplayer;
whctr:= true;
repeat
bitmapsdtms;
brightnessnchat;
axecheck;
gametab(4);
if finddtm(logxs, x, y, 560, 210, 739, 458)then depositelogs;
begin
repeat
highestangle;
walktotree;
gametab(4);
ChopTree;
walkfromtree;
if findsymbol(x,y,'bank') then
begin
mouse(x, y, 0, 0, true);
flag;
end;
bank;
loadsx:= loadsx + 1;
until loadsx = players[currentplayer].integers[0];
end;
if loadsx = players[currentplayer].integers[0] then
logout;
players[currentplayer].active := false;
loadsx:= 0;
ProgressReport;
nextplayer(true);
free;
until(false);
end.