I don't think this part is quite right:
Simba Code:
WriteLn('Array length is '+IntToStr(Length(PointsToAltar))+'');
i := RandomRange(3, 6);
MyPoint := PointsToAltar[i];
SPS_BlindWalk(MyPoint);
If you are not very close to the alter at all it won't click very close to the alter, infact it probably won't click at all, I'll show you why:
Say our current position was (60, 60) and we wanted to walk to (10, 10), a path that it could generate is:
Simba Code:
[(60, 60), (54, 56), (52, 52), (48, 49), (45, 44), (43, 43), (37, 39), (36, 36), (30, 30), (28, 26), (23, 24), (20, 19), (16, 18), (12, 12), (12, 11), (10, 10)]
It would then say:
So it would do the else part of that if statement...
Say "i" was assigned the value of 4, it would then put MyPoint as (45, 44) which is no where near the (10, 10) that we wanted to walk to. I think you want to do something like:
Simba Code:
WriteLn('Array length is '+IntToStr(Length(PointsToAltar))+'');
i := RandomRange(high(PointsToAltar) - 3, high(PointsToAltar));
MyPoint := PointsToAltar[i];
SPS_BlindWalk(MyPoint);
That way the furthest away point it could generate is (16, 18) which is 10 pixels away (2 RS Squares)