How about something like this:
Simba Code:
function FallCheck: boolean;
var
xas, yas: Integer;
begin
xas := MSCX;
yas := MSCY;
Result := FindChatBoxText('You Fall', 8, clMessage) or FindChatBoxText('onto the spik', 8, clMessage);
if (Result) then
WriteLn('You fell into the trap')
else
WriteLn('You did not fall, Yay!');
end;
function GetOutOfTrap: Boolean;
Var
x, y, xas, yas : integer;
begin
if (FindObjCustom(xas, yas, ['limb'], [1062452], 20)) then
begin
if(WaitUpText('limb', 200+Random(500)))then
begin
GetMousePos(x, y);
if((x = xas) and (y = yas))then
ClickMouse2(mouse_Left)
else
Mouse(xas, yas, 3, 3, mouse_Left);
end;
writeLn('Climbing out of pit');
Result := DidRedClick;
end;
end;
function JumpLeaves: boolean;
var
Tries, x, y : integer;
begin
if (FindJumpLeaves(x, y)) then
begin
CheckAndClick('Jump', x, y, 'L') Wait(6000);
Tries := 0;
if (FallCheck) then
while ((not GetOutOfTrap) and (Tries < 5)) do
inc(Tries);
end;
end;
If you don't understand what any of the code does then just ask