PriSoner
2008-02-05 23:19:37
I've worked out the problem read post #5
Ok.. i've hunted and looked, I may be going word blind but I can't figure out where you're supposed to post bug report with SRL releases so here it is.. Please pass it on to the relevent section if here is not good enough..
I'm experiencing a problem in my script with the SRL FindFight function and reading through other user comments many others appear to be waking up dead. :confused:
The Error applies with or without SMART.
Basically it doesn't work any more. It detects a fight in the area but never returns true.
I've gone though the code bit by bit and tested each if statement and each function within it but can't for the life of me find out where it's failing…
From the behaviour of the function when a fight is in progress I track it down to this if statement: if (HpPercent < 100) then but when I test HpPercent seperatly or even the whole if statement by itself it appears to function correctly..
Am I going mad? What's missing?
Ok.. i've hunted and looked, I may be going word blind but I can't figure out where you're supposed to post bug report with SRL releases so here it is.. Please pass it on to the relevent section if here is not good enough..
I'm experiencing a problem in my script with the SRL FindFight function and reading through other user comments many others appear to be waking up dead. :confused:
The Error applies with or without SMART.
Basically it doesn't work any more. It detects a fight in the area but never returns true.
I've gone though the code bit by bit and tested each if statement and each function within it but can't for the life of me find out where it's failing…
From the behaviour of the function when a fight is in progress I track it down to this if statement: if (HpPercent < 100) then but when I test HpPercent seperatly or even the whole if statement by itself it appears to function correctly..
Am I going mad? What's missing?
{*******************************************************************************
function FindFight: Boolean;
by: Stupid3ooo
Description: Results True if in Fight
*******************************************************************************}
function FindFight: Boolean;
var
xf, yf,CurTab: Integer;
begin
if (FindColor(xf, yf, 65280, 217, 129, 297, 209)) then
begin
Curtab := GetCurrentTab;
if (CheckHpFirst = True) then
begin
GameTab(2);
Wait(500 + Random(100));
if (HpPercent < 100) then
begin
Result := True;
WriteLn('******** FOUND FIGHTING RANDOM ********');
WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
Chr(13))
TakeScreen('Found Fight');
Fights := Fights + 1;
end;
end
else
begin
WriteLn('******** FOUND FIGHTING RANDOM ********');
WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
Chr(13))
Result := True;
TakeScreen('Found Fight');
Fights := Fights + 1;
end;
GameTab(Curtab);
end;
end;