SCAR Code:
//TREE FINDING, CHOPPING, & DEATH WALKBACK PROCEDURES//
procedure CheckBroken;
begin
if (Wielding = True) then
begin
GameTab(5);
end else
if (FindDTM(BrokenAxeDTM,x,y,MIX1,MIY1,MIX2,MIY2)) then
begin
NextPlayer(False);
end;
end;
Function IsDead: Boolean;
begin
if(FindSymbol(x,y,'water')) or (FindChatText('h dear you are dead'))then
Writeln('you are dead =(');
Result:= True;
end;
Function FindTree: Boolean;
var i: integer;
begin
for i:= 0 to 4 do
begin
MarkTime(WaitTime);
if (IsUpText(TreeType)) then
Break;
if (TimeFromMark(WaitTime) > 60000) then
begin
Writeln('couldnt find the tree');
Result:= False;
end else
if (FindColorSpiralTolerance(x,y,TreeColor1,Quad[i].x1,Quad[i].y1,Quad[i].x2,Quad[i].y2,TreeTol))or
(FindColorSpiralTolerance(x,y,TreeColor2,Quad[i].x1,Quad[i].y1,Quad[i].x2,Quad[i].y2,TreeTol))or
(FindColorSpiralTolerance(x,y,TreeColor3,Quad[i].x1,Quad[i].y1,Quad[i].x2,Quad[i].y2,TreeTol))then
begin
MMouse(x,y,3,3);
if (IsUpText(TreeType)) then
Result:= True;
end;
end;
end;
procedure WalkBackWillows;
begin
PerfectNorth;
RadialRoadWalk(FindRoadColor,89,100,10,0,0);
Flag;
RadialRoadWalk(FindRoadColor,82,100,50,0,0);
Flag;
RadialRoadWalk(FindRoadColor,324,360,60,0,0);
Flag;
RadialRoadWalk(FindRoadColor,305,336,60,0,0);
Flag;
if(not(FindSymbol(x,y,'furnace')))then
begin
MarkTime(WaitTime);
repeat
RadialRoadWalk(FindRoadColor,288,400,25,0,0)
until(FindSymbol(x,y,'furnace')) or (TimeFromMark(WaitTime) > 10000);
end else
RadialRoadWalk(FindRoadColor,335,360,65,0,0);
Flag;
RadialRoadWalk(FindRoadColor,345,375,60,0,0);
Flag;
RadialRoadWalk(FindRoadColor,300,275,60,0,0);
Flag;
if(not(FindSymbol(x,y,'quest')))then
begin
MarkTime(WaitTime);
repeat
RadialRoadWalk(FindRoadColor,290,215,20,0,0);
Flag;
until(FindSymbol(x,y,'quest')) or (TimeFromMark(WaitTime) > 10000);
end else
RadialRoadWalk(FindRoadColor,305,275,55,0,0);
Flag;
Mouse(596,136,10,10,True);
Flag;
Wait(1000 + random(700));
begin
if (FindTree = True) then
begin
Writeln('We are HERE!!!...next player now =p');
WB:= WB + 1;
NextPlayer(True);
end else
Writeln('We got lost =( next player...');
WBF:= WBF + 1;
NextPlayer(False);
end;
end;
procedure WalkBackOaks;
begin
PerfectNorth;
RadialRoadWalk(FindRoadColor,89,100,10,0,0);
Flag;
RadialRoadWalk(FindRoadColor,82,100,50,0,0);
Flag;
RadialRoadWalk(FindRoadColor,324,360,60,0,0);
Flag;
RadialRoadWalk(FindRoadColor,305,336,60,0,0);
Flag;
if(not(FindSymbol(x,y,'furnace')))then
begin
MarkTime(WaitTime);
repeat
RadialRoadWalk(FindRoadColor,288,400,25,0,0)
until(FindSymbol(x,y,'furnace')) or (TimeFromMark(WaitTime) > 10000);
end else
RadialRoadWalk(FindRoadColor,335,360,65,0,0);
Flag;
Mouse(702,58,7,7,True);
Wait(1000 + random(700));
begin
if (FindTree = True) then
begin
Writeln('We are HERE!!!...next player now =p');
WB:= WB + 1;
NextPlayer(True);
end else
Writeln('We got lost =( next player...');
WBF:= WBF + 1;
NextPlayer(False);
end;
end;
procedure WalkBackTrees;
begin
PerfectNorth;
RadialRoadWalk(FindRoadColor,89,100,10,0,0);
Flag;
RadialRoadWalk(FindRoadColor,82,100,50,0,0);
Flag;
RadialRoadWalk(FindRoadColor,60,85,65,0,0);
Flag;
RadialRoadWalk(FindRoadColor,67,84,60,0,0);
Flag;
RadialRoadWalk(FindRoadColor,340,380,65,0,0);
Flag;
Mouse(665,71,7,7,True);
Wait(1000 + random(700));
begin
if (FindTree = True) then
begin
Writeln('We are HERE!!!...next player now =p');
WB:= WB + 1;
NextPlayer(True);
end else
Writeln('We got lost =( next player...');
WBF:= WBF + 1;
NextPlayer(False);
end;
end;
procedure DeathWalk;
begin
if(not(IsDead)) then
Exit;
if (IsDead = True) then
begin
if (Wielding = True) and (FindDTM(AxeDTM,x,y,MIX1,MIY1,MIX2,MIY2)) then
Mouse(x,y,2,2,True);
end else
if (Players[CurrentPlayer].integer1 = 3) then
begin
WalkBackWillows;
end else
if (Players[CurrentPlayer].integer1 = 2) then
begin
WalkBackOaks;
end else
if (Players[CurrentPlayer].integer1 = 1) then
begin
WalkBackTrees;
end;
end;
procedure CutIt;
begin
case random(2) of
0: begin
GetMousePos(x,y);
Wait(500 + random(100));
Mouse(x,y,3,3,True);
Wait(1000 + random(100));
MMouse(x,y,3,3);
MarkTime(WaitTime);
if(InvFull) or (FindFastRandoms) or (not(FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX2,MSY2,3)))then
Exit;
while(TimeFromMark(WaitTime) < ChopTime * 1000)do
begin
Randoms;
CheckBroken;
DontGetBanned;
Respond;
DeathWalk;
RRotate;
end;
end;
1: begin
GetMousePos(x,y);
Wait(500 + random(100));
Mouse(x,y,3,3,False);
ChooseOption(x,y,'own');
Wait(1000 + random(100));
MMouse(x,y,3,3);
MarkTime(WaitTime);
if(InvFull) or (FindFastRandoms) or (not(FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX2,MSY2,3)))then
Exit;
while(TimeFromMark(WaitTime) < ChopTime * 1000)do
begin
Randoms;
CheckBroken;
DontGetBanned;
Respond;
DeathWalk;
RRotate;
end;
end;
end;
end;
procedure Chop;
begin
repeat
if (not(LoggedIn)) then
NextPlayer(True);
if (IsDead = True) then
DeathWalk;
if (FindColorTolerance(x,y, 65535, 6,6,117,27,10)) or
(FindColorTolerance(x,y, 383705,6,6,117,27,10)) or
(FindColorTolerance(x,y, 55769, 6,6,117,27,10)) and
(IsUpTextMulti('hop','own',TreeType)) then
begin
Writeln('Ent Found RUNNING!');
RunAwayDirection(RunDir);
Wait(40000 + random(15000));
RunBack;
EntsAvoided:= EntsAvoided + 1;
end else
if (FindTree = True) then
begin
CutIt;
end;
until(InvFull);
end;
//MAIN LOOP//
begin
ScriptSetup;
NEWLINE:='';
if (not(LoggedIn)) then
LogInPlayer;
Setup;
repeat
begin
if (not(LoggedIn)) then
NextPlayer(True);
if(IsDead = True)then
DeathWalk;
Chop;
Drop;
Proggy;
if (LoadsB = Loads) then
begin
NextPlayer(True);
LoadsB:= 0;
Writeln('w00t switched players');
Setup;
end;
end;
until(False);
end.