FreakyMonkey
2008-12-22 01:20:28
Ya, I just got back into scripting so I'm trying to relearn. Could you guys tell me if this has the potential of working well? I was never very good at TPAs….
just made it rigth nwo. If it has some mistakes I'm sorry, but I'm kinda lookin at the overall picture :f:
Procedure GoToStaircase;
Var StairPoints: TPointArray;
Var i,t2, Stairs: Integer;
Var s: String;
begin
MakeCompass('N');
SetAngle(True);
Stairs := DTMFromString('78DA63E463606050674001895A4C609A11CA6' +
'71404122AA86ADEBD7BC7F00B590D3790D04455F3FEE537B83920' +
'0C00437407C5');
if DTMRotated(Stairs,x,y,MMX1,MMX2,MMY2,MMX2) then
if rs_onminimap(x,y)then
begin
Mouse(x,y,0,0,true);
Wait(RandomRange(300,600));
FFlag(0);
end;
FindColorsSpiralTolerance(x, y, StairPoints, 4280671, MSX1, MSY1, MSX2, MSY2, 5);
t2:= GetArrayLength(StairPoints);
SetArrayLength(StairPoints, t2);
for i:=0 to t2-1 do
begin
MMouse(StairPoints[i].x, StairPoints[i].y, 0, 0);
Wait(RandomRange(300,600));
s:= rs_getuptext;
if not Pos('air',s)<>0 then
Break;
end;
if i = t2-1 then
begin
Writeln('Could not find Stairs.')
Terminatescript;
end;
x:= StairPoints[i].x;
y:= StairPoints[i].y;
Mouse(x,y,0,0,true);
FreeDTM(Stairs);
end;just made it rigth nwo. If it has some mistakes I'm sorry, but I'm kinda lookin at the overall picture :f: