MattL191
2012-02-10 00:43:10
I'm attaching the attack and heal procedures of a script i'm currently working on for attacking monks for pures.
but for some reason everythime it attacks the monk the first time it stops scripts and opens some gametab and i can't find out why. please help
So i found out its HpPercent thats doing it. can't find a fix.
Thanks
MattL191
but for some reason everythime it attacks the monk the first time it stops scripts and opens some gametab and i can't find out why. please help
So i found out its HpPercent thats doing it. can't find a fix.
Thanks
MattL191
{$i SRL\SRL.simba}
{$i sps/sps.simba}
{$i SRL\SRL\Misc\Debug.simba}
{$i SRL/SRL/skill/fighting.simba}
procedure Attack;
var
ax, ay: integer;
begin
if InFight then
begin
repeat
FindNormalRandoms;
until Not Infight
end;
begin
if FindObjTPA(ax, ay, 7251654, 15, -1, 25, 25, 1, ['onk', 'Monk']) then
begin
if not (IsFightAt(ax, ay) and not InFight) then
begin
GetMousePos(ax, ay);
ClickMouse(ax,ay, Mouse_Right);
WaitOptionMulti(['ttack M', 'attack Monk'], 200);
wait(500);
end;
while IsMoving do
begin
wait(350);
end;
end;
end;
end;
Procedure CheckHphealmonk;
var
bx, by: Integer;
begin
FindObjTPA(bx, by, 7251654, 15, -1, 25, 25, 1, ['onk', 'Monk']);
GetMousePos(bx, by);
ClickMouse(bx, by, Mouse_Right);
WaitOptionMulti(['alk', 'Talk'], 200);
end;
begin;
SetupSRL;
repeat
Attack;
if (HPPercent < (65)) then
repeat
CheckHphealmonk;
until (HPPercent = (100));
until(false)
end.