Why does this give me Out of Memory error... It makes me have to restart simba in order to run the script again... It runs out of memory after 3 rocks :S
Simba Code:
Procedure FindRock1;
var
RockObj : TRSObject;
Rock: TTile;
RockLoc: TTile;
Me:TMe;
begin
Me := GetMe;
RockObj := GetObjectByID (3803, OBJECT_TYPE_INTERACTABLE, 52);
If(FindRSObjectSimple(RockObj) = True) then
begin
Repeat
Writeln('The First rock is found!');
wait(500);
Mouse(RockObj.Tile.x, RockObj.Tile.y, 2, 2, True);
Writeln('Clicked the first rock.');
writeln ('Climbed down the First Rock!');
Until((Me.Animation = 740) or (Me.Animation = 739));
end else
begin
wait(500);
RockLoc := Tile(2885, 3683); //Rock Position Tile
Rock := TileToMS (RockLoc, 0);
Mouse (Rock.x, Rock.y, 2, 2, false);
if R_ChooseOption ('Climb Rocks') then
begin
writeln ('Climbed down the First Rock!');
end else
writeln('Cannot Find the First Rock!');
end;
end;
And can someone explain why this doesnt work?
Simba Code:
Procedure TrollHeimWalk2;
var
TTroll2: TTileArray;
Me: TTile;
begin
Me:= GetMyPos; //(2884,3683)
//Repeat
TTroll2 := [Tile(2881,3686), Tile(2874,3677), Tile(2874,3669), Tile(2872,3671)];
WalkPath(TTroll2);
//Until((Me.x = 2872) and (Me.y = 3671));
end;