jman1208
2012-07-19 16:43:49
I'm trying to make it so the script checks if i fell into the trap after it clicks Jump but i can't seem to get it working. Also when you fall into the pit you get damage taken, i also tried so it checks for hp bar but none are working. I appreciate any help this is holding me back
Function FallCheck: boolean;
var
xas, yas: Integer;
theChat: String;
begin
xas:=MSCX;
yas:=MSCY;
theChat := GetChatBoxText(8, clBlack);
if(ExecRegExpr('You Fall', theChat) OR ExecRegExpr('onto the spik', theChat)) then
begin
FellIntoTrap := True;
writeln('We fell into the trap');
end;
if(ExecRegExpr('manage to cross', theChat) OR ExecRegExpr('off safely ', theChat)) then
begin
FellIntoTrap := false;
writeln('We didnt fall into the trap');
end;
repeat
if (FellIntoTrap) then
begin
if (FindObjCustom(xas, yas, ['limb'], [1062452], 20)) then
begin
CheckAndClick('limb', xas,yas, 'L')
writeLn('Climbing out of pit');
FellIntoTrap := false;
end;
end;
until Not (FellIntoTrap);
if NOT(FellIntoTrap) then
begin
writeLn('Yay we didnt fall in!');
end;
end;
Function JumpLeaves:boolean;
begin
if (FindJumpLeaves(x, y)) then
begin
CheckAndClick('Jump', x, y, 'L')
Wait(6000);
FallCheck;
end;
have this picture come up when you fall in