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;