SRL Archive - S.M.A.R.T.

SMART offline world bug


Jelloman

2008-04-05 10:47:20

ive had this problem twice using SMART on a world thats offline (without knowing its offline of course) SCAR shuts down but the SCAR process is still running in the background. i resolved the problem when i went on runescape normally and saw that the world i was using was offline and when the world came back online everything worked fine. my suggestion is to have SMART c if the world is online or offline before everything sets up (im not sure how all that works) and if its offline say sumthin in the SCAR debug box about using a different world.

P1nky

2008-04-05 13:29:04

i agree

and if its possible how about this when a world goes offline cause a update of RS, there should be a restart on SMART(a refresh).

bullzeye95

2008-04-05 14:10:23

Just check if the world's offline first :rolleyes:

mixster

2008-04-09 07:14:23

Or you could write your own procedure that loads the RS world select page and randomly pick a world from there/most empty world (I believe someone else did the most empty world, though not sure who) and your problem would be solved. Otherwise you can always use Prisoner's random world selector (I think I saw it posted in Public Test Corner in someone else's random world selector) which would solve the offline world problem by refreshing the page :)

linusgr

2008-04-09 07:22:14

i need help to do a script to a game the only thing i need is so
wenn it will see a coler that i set out
it will prees right in 2 sec and
the repet if it see the coler ther agine
can anyone help me

nickienine

2008-04-10 22:29:47

From: P1NKY
i agree

and if its possible how about this when a world goes offline cause a update of RS, there should be a restart on SMART(a refresh).


Exactly what i was thinking, this would be especially good for the scripts that run for long periods of time (i.e. hy's fight cave runner). wherease rs updates a lot.

Gazrat

2008-04-11 00:12:55

the same exact thing happened to me. I tried to run a yew cutter on world 111 cuz there was like literally 60 ppl on it. Wasnt working so i started foolin around with stuff. Later looked and saw its offline..silly me =P

mastaraymond

2008-04-13 15:19:25

From: mixster
Or you could write your own procedure that loads the RS world select page and randomly pick a world from there/most empty world (I believe someone else did the most empty world, though not sure who) and your problem would be solved. Otherwise you can always use Prisoner's random world selector (I think I saw it posted in Public Test Corner in someone else's random world selector) which would solve the offline world problem by refreshing the page :)


This? :rolleyes:.

Might need some refreshment, but I'm not really bothered:p.

{.include smart.scar}
var
Worlds,Temp : String;
Function FindWorlds(Members : Boolean): TIntegerArray;
var
I,j,K,T: integer;
WorldListArray : TStringArray;
WorldList : String;
begin;
WorldList := Between('d.write("</tr>");'#10'}'#10#10' '#10' '#10' ','</script>',GetPage('http://www.runescape.com/slj.ws?lores.x=1&plugin=2&order=MPWLA'));
WorldList := Replace(WorldList,#10#10' '#10' '#10' ','');
J := pos(';', WorldList);
repeat
SetArrayLength(WorldListArray, i + 2);
WorldListArray[i] := copy(WorldList, 1, J-1);
delete(WorldList, 1, pos(WorldListArray[i], WorldList)+Length(WorldListArray[i]));
i := i + 1;
J := pos(';', WorldList);
until(J = 0)
SetLength(WorldListArray,I);
SetLength(Result,100);
For I := 0 to Length(WorldListArray) -1 do
begin;
if Not (WorldListArray[I] = '127') then
begin;
J := LastPos(',',WorldListArray[I]);
K := LastPosEx(',',WorldListArray[I],J);
if GetNumbers(Copy(WorldListArray[i],K+1,J-K-1)) <> '0' then
begin;
if members then if WorldListArray[I][Pos(',',WorldListArray[I])+1] = '1' then
begin;
Result[T] := StrToInt(Copy(WorldListArray[i],3,Pos(',',WorldListArray[I])-3));
inc(T);
end;
if not Members then if WorldListArray[I][Pos(',',WorldListArray[I])+1] = '0' then
begin;
Result[T] := StrToInt(Copy(WorldListArray[i],3,Pos(',',WorldListArray[I])-3));
inc(T);
end;
end;
end;
end;
SetLength(Result,T);
end;

procedure SmartSetupEx(Worlds : TIntegerArray; SearchLessCrowded, Member, RandomizeArray, HighDetail, Signed: boolean);
var
Prefix : string;
Used : String;
I,L, II : Integer;
Randomized : TIntegerArray;
begin
SetLength(Randomized,L);
if SearchLessCrowded then
Randomized := FindWorlds(member)
else if RandomizeArray then
begin;
L := Length(Worlds);
For I:= 0 to L - 1 do
Repeat
II := Random(L);
if Randomized[II] = 0 then
Randomized[II] := Worlds[I];
until (Randomized[II] = Worlds[I]);
end else
Randomized := Worlds;
L := Length(Randomized);
Try
Used := ReadInterSCARMessage('SMART_Worlds');
For I:= 0 to L - 1 do
begin;
if (pos('-'+inttostr(Randomized[I])+'-',Used) < 1) and not (Randomized[I] = 127) and not (Randomized[I] = 123) and not (RAndomized[I] = 126) and not (Randomized[I] = 125) then
begin;
Prefix := ReadINI('World' + inttostr(Randomized[I]), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if Prefix = '' then begin;
Writeln('Your world number is invalid! You used number: '+inttostr(Randomized[I]));
Continue;
end;
SendInterSCARMessage('SMART___'+ Inttostr(GetSelf.Handle),IntTostr(Randomized[I]));
SendInterSCARMessage('SMART__'+ Inttostr(GetSelf.Handle),Prefix);
SendInterSCARMessage('SMART_'+ Inttostr(GetSelf.Handle),inttostr(Randomized[I]));
SendInterSCARMessage('SMART_Worlds',Used+'-'+inttostr(Randomized[I])+'-');
Writeln('Loading world '+inttostr(Randomized[I])+'_ '+prefix+' _'+Used);
SmartSetup(Prefix, HighDetail, Signed);
Exit;
end;
end;
except
end;
Writeln('Error or something like that, closing!');
TerminateScript;
end;

begin
Writeln(Apppath);
Worlds := ReadInterSCARMessage('SMART_Worlds');
Temp := '-'+ReadInterSCARMessage('SMART_'+ Inttostr(GetSelf.Handle))+'-';
if Length(Temp) > 2 then
Delete(Worlds,Pos(Temp,Worlds),Length(Temp));
SendInterSCARMessage('SMART_Worlds',Worlds);
if Readln('Erase previous worlds: '+ ReadInterSCARMessage('SMART_Worlds')) <> 'no' then
SendInterSCARMessage('SMART_Worlds','');

SmartSetupEx([], True,false,false,false, false);
// SmartSetup('ny4',false,false);
// SmartSetTarget;
SetTargetDc( SmartGetDC);
wait(5000 + random(5000));
repeat
wait(1000);
until(Smartgetcolor(231, 233)<>1118604);
//SmartClickMouse(741,480,true);
end.

mixster

2008-04-14 08:46:27

I wrote my own one that was a bit more… simple… but I knew someone else had made one, though I don't remember it being as complex as that :) All mine does is choose one of the 10 least populated worlds with a boolean for members and returns the prefix as a string :(

bashbro900

2008-04-20 19:28:23

what?