SRL Archive - FAQ

Simba/SMART Problem


WhoCares357

2011-02-13 13:49:27

I'm running trying to run a modified version of Narcle's fletcher (http://villavu.com/forum/showthread.php?t=40813) but SMART keeps hanging on me.

{$DEFINE SMART}
{.include srl/srl.scar}
//...
begin
AllowPVP := False;
Smart_Server := 131;
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
//...
end.

I also tried running the script without all those settings set (just called SetupSRL;) but I got the same problem.

SMART loads up the world, but it hangs on the loop that checks if RS is ready:
  repeat
Wait(100);
if (GetTimeRunning - t) > 120000 then
Break;
until(RSReady);

If I remove that loop (just let SMART load, then restart the script with the same SMART_Server) the script hangs on LogInPlayer.

I reinstalled SIMBA today to version .96 (revision 810). My SMART version is "Public SMARTv6.6". I updated SRL via SMART.

Anyone know what the problem may be?

PS I also made sure all the graphics settings were set to the lowest in SMART.


EDIT: Okay so I debugged it a little more and it seems the problem is definitely with RSReady. The second time it hangs (after it breaks from the RSReady loop in SetupSRL) is in LoginPlayerToLob in the loop:
  T := GetSystemTime;
repeat
if (RSReady) then
Break;
if ((GetSystemTime - T) > 180000) then
begin
WriteLn('It has been 3 minutes and Runescape is not yet ready... Terminating.');
TerminateScript;
end;
Wait(RandomRange(1000, 2000));
until (False);

So the problem is with this function:
function RSReady: Boolean;
var
t: Integer;
begin
t := GetSystemTime + 5000;
while (not (Result)) and (t > GetSystemTime) do
begin
Result := (CountColor(0, MSCx - 20, MSCy - 20, MSCx + 20, MSCy + 20) < 20);
Wait(3);
end;
if (not (Result)) then
Exit;
Result := (LoggedIn)or (LobbyScreen) or (GetColor(745, 17) = 12312554); //X button in top right
end;

Did the colors or their positions change? Or is the color finding not working with SMART?

EDIT 2: Okay, never mind >.>. Apparently my settings were set to "Resizable". That's why I was having that problem. Sometimes all you need to do is to talk your problem through in a post :).

RISK

2011-02-13 14:08:10

"RSReady" works for me. Can you open RuneScape in your normal browser and while it is loading, press "S" on your keyboard to set it in to "Safe Mode", please? And then try the script again.

@ .. ALL of your edits : Congratulations!