SCAR Code:
x:=156;
y:=251;
if findcolorspiraltolerance(x,y,1936096,MSX1,MSY1,MSX2,MSY2,30) then //Mind rune
begin
Mouse(x - 50, y + 10, 5 , 5,false);
wait(1000+random(500));
fflag(0);
if chooseoptionex('limb-up',false) then
begin
players[currentplayer].loc:='Up one flight of stairs';
getmousepos(x,y);
if findcolortolerance(xx,yy,602955,x-110,y-110,x,y + 110,30) then
begin
stairwoodcol:=getcolor(xx,yy);
gotwoodcol:=true;
end;
Mouse(x,y,0,0,false);
chooseoptionex('limb-up',true);
end else goto backup;
end else
begin
backup:
if FindObjTPA( x, y,602955,25, -1, 10, 10, 50, ['aircase']) then
begin
Mouse(x,y,5,5,false);
stairwoodcol:=getcolor(x,y);
if chooseoption('limb-up') then
begin
players[currentplayer].loc:='Up one flight of stairs using FindObjTPA';
gotwoodcol:=true;
end else goto secondfail;
end else
begin
secondfail: //EXPERMENTAL: Never knew if this works. Should in theory
Makecompass('284.036243467926');
Setangle(false);
setarraylength(BarrelTbox,5);
BarrelTbox[0].x1:=0;
BarrelTbox[0].y1:=0; //Kitchen and a few of the torches
BarrelTbox[0].x2:=184;
BarrelTbox[0].y2:=211;
inc(i);
setarraylength(barreltbox,5);
repeat
if FindColorSkipBoxArrayTolerance(x, y, 803168, msx1, msy1, msx2, msy2, 40, BarrelTBox) then
begin
Mouse(x,y,0,0,false);
if chooseoption('limb-up') then
begin
players[currentplayer].loc:='Used last failsafe color to climb stairs';
break;
end else
begin
try
BarrelTbox[i].x1:= x - 50;
BarrelTbox[i].y1:= y - 50;
BarrelTbox[i].x2:= x + 50;
BarrelTbox[i].y2:= y + 50;
except
players[currentplayer].loc:='Failed climbing stairs error';
logout;
exit;
end;
inc(i);
end;
end else
inc(i);
if i>5 then
begin
Logout;
players[currentplayer].loc:='Lost at first stairs';
Exit;
end;
until(i > 5 )
end;
end;