SCAR Code:
Procedure UpStairs(LeftClick,MiddleStair:Boolean);
var i,x,y,color:integer;
points:array of tpoint;
point1:tpoint;
Begin
wait(250);
point1.x:=MSCX;
point1.y:=MSCY
colortolerancespeed(2)
FindColorsTolerance(Points,869474,MSx1,MSy1,MSCX-12,MSCY-10,15)
writeln(inttostr(length(points)))
SortTPAFrom(points,point1)
Mousespeed:=25+random(10)
wait(250)
For i:=0 to (length(Points)-1) do
begin
wait(2)
If FindColoredAreaTolerance(x,y,3752264,points[i].x-20,points[i].y-20,points[i].x+20,
points[i].y+20,10,20) then
begin
MMouse(x,y,6,4)
wait(100+random(100))
If IsUpTextMulti('lim','tair','case') then
Begin
GetMousePos(x,y)
Mouse(x,y,0,0,LeftClick)
if LeftClick then
begin
Mousespeed:=MSpeed;
if MiddleStair then
begin
repeat
wait(10)
until (GetColor(37, 369)=10264383)
wait(100)
if not(ClickNpcChatText('up t',true)) then
exit;
end else
begin
wait(100)
Repeat
wait(20)
until(not(getcolor(377, 263)=16777215))
wait(500)
end;
end else
begin
ChooseOption('mb-up')
end;
break;
end;
end;
end;
colortolerancespeed(1)
wait(100)
end;
Procedure DownStairs(LeftClick,MiddleStair:boolean);
var i,x,y,color:integer;
points:array of tpoint;
point1:tpoint;
Begin
wait(250);
point1.x:=MSCX;
point1.y:=MSCY
colortolerancespeed(2)
FindColorsTolerance(Points,869474,MSx1,MSy1,MSCX-12,MSCY-10,15)
writeln(inttostr(length(points)))
SortTPAFrom(points,point1)
Mousespeed:=25+random(10)
wait(250)
For i:=0 to (length(Points)-1) do
begin
wait(2)
If FindColoredAreaTolerance(x,y,3752264,points[i].x-20,points[i].y-20,points[i].x+20,
points[i].y+20,10,20) then
begin
MMouse(x,y,6,4)
wait(100+random(100))
If IsUpTextMulti('lim','tair','case') then
Begin
GetMousePos(x,y)
Mouse(x,y,0,0,LeftClick)
if LeftClick then
begin
Mousespeed:=MSpeed;
if middlestair then
begin
repeat
wait(10)
until (GetColor(37, 369)=10264383)
if not(ClickNpcChatText('b down',true)) then
exit;
end else
begin
wait(100)
Repeat
wait(20)
until(not(getcolor(377, 263)=16777215))
wait(400)
end;
end else
begin
ChooseOption('mb-down')
end;
break;
end;
end;
end;
colortolerancespeed(1)
end;
Procedure Stairs(Up,LeftClick:boolean);
Begin
SetAngle(true);
if (Up) then
begin
UpStairs(true,false)
IdleTime(400, 400, 0.5);
wait(600)
UpStairs(LeftClick,true)
end else
begin
DownStairs(true,false)
IdleTime(400, 400, 0.5);
wait(500)
DownStairs(LeftClick,true)
wait(500)
end;
End;