SRL Archive - Research & Development Lounge

Graphics Settings


Dusk412

2008-07-06 16:43:09

Use these to set all the Graphics Options on GameTab 11 as well as change the brightness. The first two are just open close procedures that you do not need. The second two are useful.

// * procedure OpenGraphicsSettings                              // * by Dusk412
// * procedure CloseGraphicsSettings; // * by Dusk412
// * procedure SetBrightness(Point: Integer); // * by Dusk412
// * procedure SetOptions(Option: String; Choice: String); // * by Dusk412

{*******************************************************************************
procedure OpenGraphicsSettings;
By: Dusk412
Description: Opens Graphics Settings Window
*******************************************************************************}

procedure OpenGraphicsSettings;
var
cx, cy : Integer;
begin
if (not LoggedIn) then Exit;
GameTab(11);
Wait(200+random(100));
MMouse(586, 249, 10, 10);
Wait(50+random(50));
GetMousePos(cx, cy);
if (IsUpTextMultiCustom(['raphic', 'etting'])) then Mouse(cx, cy, 0, 0, True);
end;

{*******************************************************************************
procedure CloseGraphicsSettings;
By: Dusk412
Description: Closes Graphics Settings Window
*******************************************************************************}

procedure CloseGraphicsSettings;
var
cx, cy : Integer;
begin
if (not LoggedIn) then Exit;
MMouse(486, 36, 5, 5);
Wait(50+random(50));
GetMousePos(cx, cy);
if (IsUpText('lose')) then Mouse(cx, cy, 0,0, True);
end;

{*******************************************************************************
procedure SetBrightness(Point: Integer);
By: Dusk412
Description: Sets Brightness To Point
*******************************************************************************}

procedure SetBrightness(Point: Integer);
var
P: TPoint;
cx, cy: integer;
begin
if (not LoggedIn) then Exit;
if (Point < 0) or (Point > 4) then Exit;
OpenGraphicsSettings;
Wait(200+random(100));
P := IntToPoint(50 + (Point * 32) , 297);
if not FindColorTolerance(cx, cy, 10172937, P.x -6, P.y -6, P.x +6, P.y +6, 10) then
Mouse(P.x, P.y, 3, 3, True);
Wait(200+random(100));
CloseGraphicsSettings;
end;

{*******************************************************************************
procedure SetOptions(Option: String; Choice: String);
By: Dusk412
Description: Changes Graphics Option To Choice
*******************************************************************************}

procedure SetOptions(Option: String; Choice: String);
{******************************************
* Option * Choice *
*******************************************
* visible levels * current/all *
* remove roofs * always/selectively *
* ground decoration * off/on *
* texture detail * low/high *
* idle animations * few/many *
* flickering effects * off/on *
* ground textures * few/many *
* character shadows * off/on *
******************************************}
var
P, C: TPoint;
begin
if (not LoggedIn) then Exit;
OpenGraphicsSettings;
Wait(200+random(100));
case (Lowercase(Option)) of
'visible levels': P := IntToPoint(246 , 72);
'remove roofs': P := IntToPoint(246 , 92);
'ground decoration': P := IntToPoint(246 , 112);
'texture detail': P := IntToPoint(246 , 132);
'idle animations': P := IntToPoint(246 , 152);
'flickering effects': P := IntToPoint(246 , 172);
'ground textures': P := IntToPoint(246 , 192);
'character shadows': P := IntToPoint(469 , 72);
else
begin
WriteLn('ERROR: Unknown Option!');
Exit;
end;
end;
case (Lowercase(Choice)) of
'all', 'always', 'off', 'low', 'few': C := IntToPoint(P.x - 70 , P.y + 14);
'current', 'selectively', 'on', 'high', 'many': C := IntToPoint(P.x - 70 , P.y + 29);
else
begin
Writeln('ERROR: Unknown Choice!');
CloseGraphicsSettings;
Exit;
end;
end;
Mouse(P.x, P.y, 6, 6, True);
Wait(200+random(100));
Mouse(C.x, C.y, 4, 2, True);
CloseGraphicsSettings;
end;

randy marsh

2008-07-06 17:02:14

So this goes in the script not in the srl folder?

Dusk412

2008-07-06 17:03:48

Well you can do whatever you want with it. I just made it cuz the ones they have now do not work.

Metagen

2008-07-07 11:32:19

Good work dusky. You is smart.

but dude the srl devs have made all this, they are just finishing touches now :)

jose89

2008-07-08 01:30:28

Good work dusky. You is smart.

but dude the srl devs have made all this, they are just finishing touches now


OMG really? I can't wait to auto again =p

Claymore

2008-07-08 12:42:16

you can auto still, there are some SRLs that were fixed by gr8 ppl like Dust412.

P1nky

2008-07-08 16:13:19

yeah you could replace the 1 that already made :P and wait till devs

randy marsh

2008-07-10 20:23:52

So Where Do I Paste That What Folder?

Dusk412

2008-07-10 21:05:11

Frankly, I would just wait at this point. The new rev will be out soon. But if you want to, just use these functions locally in a script if u even actually need them, many scripts dont.