SRL Archive - Research & Development Lounge

Fix for SRL - Runescape Update 15/10


ZephyrsFury

2008-10-16 05:57:26

As of the Runescape Update on the 15 October, LoginPlayer, (Login_)SetAudio/Graphics, WorldSwitcher.scar and possibly other parts of SRL in Rev 27 and earlier are broken. Here is the fix for these procedures/functions/includes. More will be posted as they appear or are made:

New Login.scar, replace all of Login.scar with this:

//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- » Login Routines --//
//-----------------------------------------------------------------//
// * function RSReady: Boolean; // * by ZephyrsFury
// * Procedure LoginScreenMusic(State: Variant); // * by Wizzup?
// * procedure Login_SetAudio(Volume, SFX, Area: Integer; SMSetting: (Stereo, Mono, NoChange) ); // * by ZephyrsFury
// * procedure Login_SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fl, gt, cs: string); // * by ZephyrsFury
// * procedure SetAutoingDefaults; // * by ZephyrsFury
// * procedure Logout; // * by Starblaster100 and Raymond
// * procedure LoginPlayer; // * by SRL Developers
// * procedure RandomNextPlayer(Active: Boolean); // * by Dankness, Ron and Raymond
// * procedure NextPlayer(Active: Boolean); // * by Dankness, Ron and Raymond
// * procedure CheckUserNicks; // * by Sumilion and Raymond

{ var SRL_Logs: Integer;
Description: Variables needed for some login functions. }
{ var RandomPlayer, GraphicsSet: Boolean;
Description: Variables needed for some login functions. }
var
SRL_Logs: Integer;
RandomPlayer, GraphicsSet: Boolean;

procedure NextPlayer(Active: Boolean); forward;
procedure RandomNextPlayer(Active: Boolean); forward;

{*******************************************************************************
function RSReady: Boolean;
By: ZephyrsFury
Description: Returns true if we are ready to auto (on loginscreen or logged in).
Useful for waiting until RS has fully loaded.
*******************************************************************************}

function RSReady: Boolean;
begin
Result := (LoggedIn) or (GetColor(520, 146) = 4038981);
end;

{*******************************************************************************
Procedure LoginScreenMusic(State: Variant);
By: Wizzup?
Description: Takes Boolean(True, False) or Integer(1..5) as arguments.
1 or True = Off, 5 or False = Max.
1 2 3 4 5
<-o---o---o---o---o->
*******************************************************************************}

Procedure LoginScreenMusic(State: Variant);

Var
RealState: Variant;
x: Extended;

Begin
if (LoggedIn) then Exit;
if (CountColor(7750, 346, 356, 416, 369) <> 119) and (GetColor(520, 135) = 4038981) then
begin
TypeByte(vk_Escape);
Wait(100);
end;
if (CountColor(7750, 346, 356, 416, 369) <> 119) then Exit;
Case VarType(State) Of
11: RealState := (State + 1) * 4;
3: If InRange(State, 1, 5) Then
RealState := State - 1;
Else
RealState := 0;
End;
x := (425.0 - 337.0) * RealState / 4.0 + 339.0;
If CountColorTolerance(1647966, Round(x) - 5, 375, Round(x) + 5, 385, 20) < 5 Then
If CountColorTolerance(991349, Round(x) - 5, 375, Round(x) + 5, 385, 20) < 5 Then
Mouse(Round(x), RandomRange(375, 385), 0, 0, True);

End;

{*******************************************************************************
procedure Login_SetAudio(Volume, SFX, Area: Integer; SMSetting: (Stereo, Mono, NoChange) );
By: ZephyrsFury
Description: Sets audio options through the login screen.
Use: Enter the desired Setting for the desired Option. Make option 0 for no change.
EG. Login_SetAudio(1, 5, 2, NoChange);

1 2 3 4 5
Volume, SFX, Area: <-o---o---o---o---o->
*******************************************************************************}

procedure Login_SetAudio(Volume, SFX, Area: Integer; SMSetting: TSMSetting);
var
II, Tx, Ty, T: Integer;
Pts: TIntegerArray;
begin
if (LoggedIn) then Exit;
TypeByte(vk_Escape);
T := GetSystemTime;
while (CountColor(7750, 346, 373, 416, 386) <> 119) and (GetSystemTime - T < 5000) do
Wait(100);
if (CountColor(7750, 346, 373, 416, 386) = 119) then
MouseBox(334, 362, 426, 371, 1)
else
Exit;
Wait(100);
Pts := [Volume, SFX, Area];
for II := 0 to 2 do
begin
if (Pts[II] = 0) then Continue;
if (not(InRange(Pts[II], 0, 5))) then
begin
srl_Warn('Login_SetAudio', 'Points must be between 0 and 5', warn_AllVersions);
Continue;
end;
Tx := 337 + Round((425 - 337) * (Pts[II] - 1) / 4);
Ty := Round(3.5 * II * II + 46.5 * II + 245);
if (GetColor(Tx, Ty) <> 1121100) then
Mouse(Tx + 2, Ty - 14, 0, 0, True);
Wait(50);
end;
if (GetColor(337, 389) = 181) and (SMSetting = Stereo) then
Mouse(421, 385, 10, 10, True)
else
if (GetColor(426, 389) = 181) and (SMSetting = Mono) then
Mouse(332, 385, 10, 10, True);
Wait(100);
TypeByte(vk_Escape);
end;

{*******************************************************************************
procedure Login_SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fe, gt, cs: string);
By: ZephyrsFury
Description: Sets graphic options in the login screen.
Use: Enter the desired Setting for the desired Option.
Leave as 0 for no change of brightness and '' for no change in anything else.

Parameter Option Setting
Brightness Brightness 1 - 4 (0 for no change)
vl Visible Levels Current / All
rr Remove Roofs Always / Selectively
gd Ground Decoration Off / On
td Texture Detail Low / High
ia Idle Animations Few / Many
fe Flickering Effects Off / On
gt Ground Textures Few / Many
cs Chracter Shadows Off / On

1 2 3 4
Brightness: <---o---o---o---o--->

EG. Login_SetGraphics(2, 'current', '', 'off', 'low', 'few', '', 'few', 'off');

For Autoing:
Login_SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
*******************************************************************************}

procedure Login_SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fe, gt, cs: string);
var
Settings, PosSettings, OptionName: TStringArray;
II, T, W, tCol, x, y, mSpeed: Integer;
TB: TBox;
P: TPoint;
begin
if (LoggedIn) then Exit;
Settings := [vl, rr, gd, td, ia, fe, gt, cs];
PosSettings := ['Current', 'All', 'Always', 'Selectively', 'Off', 'On', 'Low',
'High', 'Few', 'Many', 'Off', 'On', 'Few', 'Many', 'Off', 'On'];
OptionName := ['Visible levels', 'Remove roofs', 'Ground decoration', 'Texture detail',
'Idle animations', 'Flickering effects', 'Ground textures', 'Character shadows'];
TypeByte(vk_Escape);
T := GetSystemTime;
while (CountColor(7750, 346, 373, 416, 386) <> 119) and (GetSystemTime - T < 5000) do
Wait(100);
if (CountColor(7750, 346, 373, 416, 386) = 119) then
MouseBox(321, 338, 443, 346, 1)
else
Exit;
mSpeed := MouseSpeed;
MouseSpeed := 25;
Wait(100);
if (Brightness > 4) then
srl_Warn('Login_SetGraphics', 'Brightness must be between 0 and 4', warn_AllVersions)
else
if (Brightness <> 0) then
begin
P := Point(89 + (Brightness - 1) * 21, 266);
if (GetColor(P.x, P.y) <> 1121100) then
Mouse(P.x - 3, P.y - 17, 6, 6, True);
end;
for II := 0 to 7 do
begin
TB.x1 := 67 + 130 * ((II + 1) mod 5);
TB.y1 := 245 + 60 * ((II + 1) div 5);
TB.x2 := TB.x1 + 109;
TB.y2 := TB.y1 + 15;
if (not(InStrArrEx(Capitalize(Settings[II]), [PosSettings[II * 2], PosSettings[II * 2 + 1]], W))) then
begin
srl_Warn('Login_SetGraphics', 'Invalid Setting: ' + Settings[II] + ' for Option: ' + OptionName[II] + '.', warn_AllVersions);
Continue;
end;
tCol := (W mod 2) * 16777088 + 127;
if (not(FindColor(x, y, tCol, TB.x1, TB.y1, TB.x2, TB.y2))) then
begin
Mouse(TB.x1 + 10, TB.y1 + 3, 10, 7, True);
if (FindColor(x, y, tCol, TB.x1, TB.y2 + 1, TB.x2, TB.y2 + 1 + 51)) then
Mouse(x, y, 10, 7, True)
else
MouseBox(TB.x1 + 10, TB.y1 + 3, TB.x2 - 40, TB.y2 - 3, 1);
end;
end;
Wait(100);
TypeByte(vk_Escape);
MouseSpeed := mSpeed;
end;

{*******************************************************************************
procedure SetAudioOff;
By: ZephyrsFury
Description: Sets the Audio to off (1 for each bar). Works logged in and out.
*******************************************************************************}

procedure SetAudioOff;
begin
if (LoggedIn) then
SetAudio(1, 1, 1, NoChange)
else
Login_SetAudio(1, 1, 1, NoChange);
end;

{*******************************************************************************
procedure SetAutoingDefaults;
By: ZephyrsFury
Description: Sets the graphic options for best SRL compatibility. Works both logged in and out.
*******************************************************************************}

procedure SetAutoingDefaults;
begin
if (LoggedIn) then
SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off')
else
Login_SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
end;

{*******************************************************************************
procedure Logout;
By: Starblaster100 / Raymond
Description: Logs you out.
*******************************************************************************}

function Logout: Boolean;
var
c, i: Integer;
begin
Result := (not (LoggedIn));
if Result = True then
Exit;
if GameTab(14) = False then
Exit;
Wait(200 + Random(100));
while (LoggedIn) and (c < 10) do
begin
Inc(c);
if(ClickText('here', UpChars, MIX1, MIY1, MIX2, MIY2, True))then
for i := 0 to 10 do
begin
Wait(1000);
if not(LoggedIn)then
begin
Result := True;
Exit;
end;
end;
end;
end;

{*******************************************************************************
procedure LoginPlayer;
By: SRL Developers
Description: Logs in the Player[CurrentPlayer]. Detects most Client Login Errors
*******************************************************************************}

procedure LoginPlayer;
var
Mark, Attempts: Integer;
Actions: TVariantArray;
RetryLogin: Boolean;
label
ProcStart;
begin
ActivateClient;
Wait(100);

if (GetColor(212, 327) = 238301) then //At Click To Play screen
begin
Wait(1000 + Random(3000));
MouseBox(227, 337, 555, 364, 1);
MarkTime(Mark);
while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
Wait(1000 + Random(1000));
end;
if (not(RSReady)) then
begin
MarkTime(Mark);
while (not(RSReady)) do
begin
Wait(100);
if (TimeFromMark(Mark) > 120000) then
begin
WriteLn('It has been 2 minutes and Runescape is not yet ready... Terminating.');
TerminateScript;
end;
end;
WriteLn('Welcome to Runescape.');
end;

LoginScreenMusic(True);
if (not(GraphicsSet)) then
begin
SetAutoingDefaults;
GraphicsSet := True;
end;
ProcStart:

if (not(LoggedIn)) then
begin
if (not(Players[CurrentPlayer].Active)) then
begin
WriteLn('Player is not Active...');
NextPlayer(False);
Exit;
end;
Wait(900 + random(60));

//Click 'Log In' on main menu
while (GetColor(343, 174) <> 7750) do
begin
MouseBox(360, 180, 400, 185, 1);
Wait(100 + Random(100));
end;

//Type Username
Mouse(315, 272, 10, 5, True);
while (CountColor(7750, 311, 269, 452, 284) > 13) do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
for Mark := 0 to 3 do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
Wait(100 + Random(200));
WriteLn(Capitalize(Players[CurrentPlayer].Name));
TypeSend(Players[CurrentPlayer].Name);
Wait(100+random(50));

//Type Password
Mouse(315, 334, 10, 5, True);
while (CountColor(7750, 311, 337, 452, 352) > 13) do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
for Mark := 0 to 3 do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
Wait(100 + Random(200));
TypeSend(Players[CurrentPlayer].Pass);
Wait(500 + Random(300));

if (not(FindTextTPA(12509695, 0, 288, 205, 475, 247, 'login', StatChars, Nothing))) then //If 'enter' from typesend didn't log us in
begin
MouseBox(355, 359, 403, 372, 1); //Click 'login' login screen
Wait(250 + random(100));
end;

MarkTime(Mark);
repeat
SetLength(Actions, 0);

if (TimeFromMark(Mark) > 60000) then
Actions := ['One minute has passed...', 0, 2, 'NextPlayer', 'Login Failed']
else
case (CountColor(12509695, 288, 205, 475, 247)) of //Number of text colour points
// Actions := ['WriteLn Text', TimeToWait, NumberOfRetries, 'FinalAction', 'PlayerStatus'];
760: Actions := ['Too many incorrect logins.', 5 * 60000, 2, 'NextPlayer', ''];
536: Actions := ['Login limit exceeded. Please wait 1 minute and try again.', 60000, 2, 'NextPlayer', ''];
711: Actions := ['Your account has been disabled', 0, 0, 'NextPlayer', 'Acc Disabled'];
598: Actions := ['Invalid Username \ Password', 0, 2, 'NextPlayer', 'Wrong User/Pass'];
787: Actions := ['You need a members account for this world.', 0, 0, 'NextPlayer', 'Non-member'];
408: Actions := ['World is full.', 5000, -1, 'Terminate', ''];
623: Actions := ['Your account is already logged in', 5000, 0, 'RandomNextPlayer', ''];
555: Actions := ['The Server is being updated.', 60000, 4, 'Terminate', 'Server Updating'];
218: Actions := ['Error Connecting.', 20000, 9, 'Terminate', 'Error Connecting'];
335: Actions := ['Unable to connect Login Server offline.',(20000) + Random(6000), 4, 'Terminate', 'Login Server Offline'];
512: Actions := ['RuneScape has been updated. Script Terminated.', 0, 0, 'Terminate', 'RS Updated'];
489: Actions := ['Connection timed out.', 0, 4, 'Terminate', 'Connection Timed Out'];
737: Actions := ['You are standing in a members-only area.', 0, 0, 'NextPlayer', 'In Mems-Only Area'];
//10: Actions := ['Error loading your profile.', 5000, 10, 'NextPlayer', 'Profile Loading Failed']; // Error loading your profile. Will attempt to re-login 5 more times.)
//11: Actions := ['Login server rejected session.', 1000, 10, 'NextPlayer', 'Login Serv. Rejected']; // Login server rejected session.
end;

if (Length(Actions) > 0) then
begin
WriteLn(Actions[0]);
Wait(Actions[1] + Random(100));
if (Actions[2] <> 0) then
if (Attempts < Actions[2]) or (Actions[2] = -1) then
begin
RetryLogin := True;
Break;
end;
if (Actions[4] <> '') then
Players[CurrentPlayer].Loc := Actions[4];
case Actions[3] of
'NextPlayer': NextPlayer(False);
'RandomNextPlayer': RandomNextPlayer(True);
'Terminate': TerminateScript;
end;
Exit;
end;
Wait(100);
until(GetColor(212, 327) = 238301);

if (RetryLogin) then
begin
RetryLogin := False;
Inc(Attempts);
goto ProcStart;
end;

if (GetColor(212, 327) = 238301) then
begin
Wait(1000 + Random(2000));
MouseBox(227, 337, 555, 364, 1);
end;
MarkTime(Mark);
while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
Wait(1000 + Random(1000));
end;

if (LoggedIn) then
begin
PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
if Length(Players[CurrentPlayer].NickTPA) < 2 then
begin;
Writeln('Creating the NickTPA.');
if Players[CurrentPlayer].Nick <> '' then
Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars)
else
begin;
Writeln('Nickname isn''t set, taking the username instead..');
Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Name, UpChars);
end;
end;
AddToSRLLog('Current player: ' + Capitalize(Players[CurrentPlayer].Name));
end;
end;

{*******************************************************************************
procedure RandomNextPlayer(Active: Boolean);
By: Dankness based on WT-Fawki's NextPlayer and modified by Ron and by Raymond
Description: Picks Random Player that is Active and Logs in
*******************************************************************************}

procedure RandomNextPlayer(Active: Boolean);
var
LastPlayer: Integer;
begin
WriteLn('NextPlayer');
LastPlayer := CurrentPlayer;
Players[CurrentPlayer].Active := Active;
Logout;
PlayerCurTime := (GetSystemTime div 1000);
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
((PlayerCurTime - PlayerStartTime) / 60);
repeat
if (AllPlayersInactive) then Wait(60000);
if (PlayersActive = 1) then Break;
CurrentPlayer := Random(HowManyPlayers);
Wait(100);
until (Players[CurrentPlayer].Active) and (LastPlayer <> CurrentPlayer);
SRL_Logs := SRL_Logs + 1;
LoginPlayer;
end;

{*******************************************************************************
procedure NextPlayer(Active: Boolean);
By: Dankness and modified by Ron and by Raymond
Description: Logs in the next player.
Boolean: True - Current player is ok. False - Current player is false.
*******************************************************************************}

procedure NextPlayer(Active: Boolean);
begin
if RandomPlayer then
RandomNextPlayer(Active)
else
begin
WriteLn('NextPlayer(Active: ' + BoolToStr(Active)+ ');');
Players[CurrentPlayer].Active := Active;
Logout;
PlayerCurTime := (GetSystemTime div 1000);
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
((PlayerCurTime - PlayerStartTime) / 60);
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
if (AllPlayersInactive) then Wait(60000); // Everybody False. Endless Loop.
end;
SRL_Logs := SRL_Logs + 1;
LoginPlayer;
end;
end;

{*******************************************************************************
procedure CheckUserNicks;
By: Sumilion / Raymond
Description: Checks if all nicks are set correct.
*******************************************************************************}

procedure CheckUserNicks;
var
CorrectString: string;
i: Integer;
Wrong : Boolean;
Str : String;
begin
for i := 0 to HowManyPlayers - 1 do
begin
if (not(Players[CurrentPlayer].Active)) then Continue;
Wrong := False;
if (Players[i].Nick = '') then
begin
Wrong := True;
Str := 'WARNING : Please fill in your nickname.';
end;
if (Players[i].Nick <> LowerCase(Players[i].Nick)) then
begin
Wrong := True;
Str := 'WARNING : Please Uncapitalise your nickname.';
end;
if (pos(Players[i].Nick, LowerCase(Players[i].Name)) = 1) then
begin
Wrong := True;
Str := 'WARNING : Dont use the first letter in your nick.';
end;
if (pos(' ', Players[i].Nick) > 0) then
begin
Wrong := True;
Str := 'WARNING : Dont use spaces in your Nick.';
end;
CorrectString := Capitalize(Players[i].Name);
if not (Pos(LowerCase(Players[i].Nick), CorrectString) > 0) then
begin
Wrong := true;
Str := 'WARNING : Nick does NOT match the name.';
end;
if Wrong then
begin;
Writeln('--');
Writeln(Str);
if (Length(Players[i].Name) > 0) then
Writeln('Warning occured with player : ' + Players[i].Name);
Writeln('For more information, visit http://www.villavu.com/forum/showthread.php?t=5410');
end;
end;
end;

New GameTab.scar, replace all of GameTab.scar with this:

//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- » GameTab Routines I --//
//-----------------------------------------------------------------//

// * GameTab 1 = Fightmode
// * GameTab 2 = Statistic
// * GameTab 3 = Quest
// * GameTab 4 = Inventory (see Inventory.scar)
// * GameTab 5 = Wield
// * GameTab 6 = Prayer
// * GameTab 7 = Mage
// * GameTab 8 = Add Friend
// * GameTab 9 = Del Friend
// * GameTab 10 = ClanChat
// * GameTab 11 = Run/Tools
// * GameTab 12 = Emotes
// * GameTab 13 = Music
// * GameTab 14 = LogOut
// * GameTab 15 = Summoning
//****************************************************************************//

// * function GetCurrentTab: Integer; // * by Wizzup?
// * function TabExists(TabNumber: Integer): Boolean; // * by Flyboy
// * function GameTab(tabnumber: Integer): Boolean; // * by Starblaster100
// * function SetFightMode(oFightMode: Integer): Boolean; // * Nielsie95
// * function GetCombatLevel: Integer; // * by Nielsie95
// * procedure Retaliate(AutoRet:Boolean); // * By WT-Fakawi & n3ss3s
// * function SkillCoords(row, column: Integer): TPoint; // * by RsN
// * function SkillToCoords(skill: String): TPoint; // * by Masquerader extended by Cheesehunk
// * function GetSkillInfo: Integer; // * by: Raymond
// * function GetMMLevels: integer; // * by Raymond
// * function GetXP(Skill: String): Integer; // * by Nielsie95
// * function XpTillNextLevel(Skill: String): Integer; // * by Nielsie95
// * function HpPercent: Integer; // * by Wizzup?
// * procedure GetAllLevels; // * by WT-Fakawi
// * function CurrentWorld: Integer; // * by Cheesehunk and modified by Ron
// * function EquipmentCoords(i : Integer) : TPoint; // * by RsN
// * function WearingItem(i: Integer): Boolean; // * by RsN
// * procedure TakeOff(i: Integer); // * by RsN
// * function CheckEquipItems(number: Integer): Boolean; // * by SDcit
// * procedure SetRun(run: Boolean); // * by Wizzup?
// * procedure RunControl(Run: Boolean); // * by Wizzup?
// * procedure SetGraphics(Brightness: Integer; vl, rr, gd, td, id, fl, gt, cs: string); // * by ZephyrsFury
// * procedure SetAudio(Volume, SFX, Area: Integer; SMSetting: (Stereo, Mono, NoChange) ); // * by ZephyrsFury
// * procedure SetBar(Brightness, Volume, SFX, Area: Integer); // * by ZephyrsFury
// * procedure DoEmote(EmoteNumber: Integer); // * by Sumilion

type
TSMSetting = (Stereo, Mono, NoChange);

Function InStrArrEx(S: String; StrArr: TStringArray; Var Where: Integer): Boolean; forward;
function CloseWindow: Boolean; forward;
{*******************************************************************************
function GetCurrentTab: Integer;
By: Wizzup?
Description: Returns current tab
*******************************************************************************}

function GetCurrentTab: Integer;
var
i: Integer;
b: Boolean;
begin
b := False;
Result := 0;
for i := 1 to 15 do
begin
case i of
1: b := (GetColor(543, 178) = 1580634);
2: b := (GetColor(570, 179) = 1778795);
3: b := (GetColor(604, 174) = 1910385);
4: b := (GetColor(632, 172) = 1910385);
5: b := (GetColor(666, 182) = 1647204);
6: b := (GetColor(699, 177) = 1910385);
7: b := (GetColor(735, 177) = 1778795);
8: b := (GetColor(569, 471) = 1910385);
9: b := (GetColor(598, 471) = 1910385);
10: b := (GetColor(633, 478) = 1778795);
11: b := (GetColor(668, 476) = 1778795);
12: b := (GetColor(703, 481) = 1580634);
13: b := (GetColor(740, 471) = 1778795);
14: b := (GetColor(555, 275) = 2070783);
15: b := (GetColor(533, 475) = 1581150);
end;
if b then
begin
Result := i;
Exit;
end;
end;
end;

{*******************************************************************************
function TabExists(TabNumber: Integer): Boolean;
By: Flyboy
Description: Returns true if tab exists.
Very useful for tutorial Is. as well as a simple double check to make sure
your fully logged in.
*******************************************************************************}

function TabExists(TabNumber: Integer): Boolean;
begin
case TabNumber of
1: Result := (GetColor(533, 177) = 65536);
2: Result := (GetColor(565, 175) = 65536);
3: Result := (GetColor(609, 175) = 1052432);
4: Result := (GetColor(638, 174) = 65536);
5: Result := (GetColor(670, 176) = 65536);
6: Result := (GetColor(708, 171) = 65536);
7: Result := (GetColor(740, 175) = 65536);
8: Result := (GetColor(575, 474) = 65536);
9: Result := (GetColor(605, 474) = 65536);
10: Result := (GetColor(640, 472) = 65536);
11: Result := (GetColor(680, 472) = 65536);
12: Result := (GetColor(710, 470) = 65536);
13: Result := (GetColor(735, 473) = 65536);
14: Result := (GetColor(743, 1) = 65536);
15: Result := (GetColor(537, 477) = 65536);
end;
end;


{*******************************************************************************
function GameTab(tabnumber: Integer): Boolean;
By: Starblaster100
Description: Switches between tabs.
*******************************************************************************}

function GameTab(tabnumber: Integer): Boolean;
var
c: Integer;
Coords: TPoint;
begin
if ((Tabnumber < 1) or (TabNumber > 15)) then
begin
srl_Warn('GameTab', IntToStr(tabnumber) + ' is no valid GameTab', warn_AllVersions);
Result := False;
Exit;
end;
if not TabExists(tabnumber) then
begin
srl_Warn('GameTab', IntToStr(tabnumber) + ' does not exist', warn_Notice);
Result := False;
Exit;
end;
if (tabnumber = 14) then
Coords := Point(752, 12)
else if (tabnumber = 15) then
Coords := Point(538, 485)
else if (tabnumber <= 7) then
Coords := Point(540 + ((tabnumber -1) * 33), 185)
else
Coords := Point(540 + ((tabnumber mod 7) * 33), 485);
while not(GetCurrentTab = tabnumber) and (c < 4) do
Begin
Mouse(Coords.x, Coords.y, 8, 8, true);
Inc(c);
end;
Result := (GetCurrentTab = tabnumber);
end;

//****************************************************************************//
// * GameTab 1 Related Functions.
//****************************************************************************//
{*******************************************************************************
function SetFightMode(oFightMode: Integer): Boolean;
By: Nielsie95 tweaked by Timer
Description: Sets fight mode. Returns false if failed to set desired mode.
*******************************************************************************}

function SetFightMode(oFightMode: Integer): Boolean;
var
i, x, y: Integer;
b: TBox;
Begin
if not(Loggedin)then Exit;
if (GetCurrentTab <> 1) then
begin
GameTab(1);
Wait(200 + Random(777));
end;
case oFightMode of
1: b := IntToBox(575, 255, 630, 290);
2: b := IntToBox(660, 255, 710, 290);
3: b := IntToBox(575, 310, 630, 345);
4: b := IntToBox(660, 310, 710, 345);
else Exit;
end;
while (i < 4) and (not FindColorTolerance(x, y, 1777020, b.x1, b.y1, b.x2, b.y2, 2)) do
begin
Mouse(RandomRange(b.x1, b.x2), RandomRange(b.y1, b.y2), 0, 0, True);
Wait(200 + Random(300));
Inc(i);
end;
Result := FindColorTolerance(x, y, 1777020, b.x1, b.y1, b.x2, b.y2, 2);
if (not Result) and (oFightMode = 4) then
SetFightMode(3);
end;

{*******************************************************************************
function GetCombatLevel: Integer;
By: Nielsie95
Description: Returns the players combat level.
*******************************************************************************}

function GetCombatLevel: Integer;
var
x, y: Integer;
begin
Gametab(1);
Wait(100 + Random(100));
if IsTextInAreaEx(590, 225, 690, 245, x, y, 'Combat', 0, StatChars, False,
False, 0, 2, 2070783) then
try
Result := StrToInt(Trim(GetTextAtEx(x, y, 0, StatChars, False, False, 0,
2, 2070783, 20, True, tr_Digits)));
except
srl_Warn('GetCombatLevel', 'Exception, could not get combat level', warn_AllVersions);
end
end;

{*******************************************************************************
procedure Retaliate(RetTrue: Boolean);
By: WT-Fakawi & n3ss3s, slight mod by EvilChicken!
Description: Set's Auto Retaliate ON of OFF.
*******************************************************************************}

procedure Retaliate(RetTrue: Boolean);
Var
X, Y: Integer;
Begin
GameTab(1);
If RetTrue Xor FindColor(X, Y, 1777020, 624, 385, 719, 396) Then
MouseBox(624, 385, 719, 396, 1);
End;

//****************************************************************************//
// * GameTab 2 Related Functions.
//****************************************************************************//
{*******************************************************************************
function SkillCoords(row, column: Integer): TPoint;
By: RsN fixed by dark sniper and fixed by Raymond
Description: Returns Coords of Skill's Row and Column (Used for GetSkill functions)
*******************************************************************************}

function SkillCoords(row, column: Integer): TPoint;
begin
case Column of
1: Result.x := 577;
2: Result.x := 631;
3: Result.x := 687;
end;
case row of
1: Result.y := 228;
2: Result.y := 260;
3: Result.y := 293;
4: Result.y := 324;
5: Result.y := 356;
6: Result.y := 388;
7: Result.y := 420;
8: Result.y := 419;
end;
end;

{*******************************************************************************
function SkillToCoords(skill: string; var Scroll : Boolean): TPoint;
By: Masquerader, Cheesehunk, Raymond and Wizzup?
Description: Turns skill string into tpoint.
If Scroll returns true then you must scroll down.
*******************************************************************************}

function SkillToCoords(ScrollDownIfNeeded : Boolean; skill: string): TPoint;
var
Scroll : Variant;
Timer : Integer;
ScrollTP : TPoint;
begin
case LowerCase(skill) of
'attack': Result := SkillCoords(1, 1);
'hitpoints','hp': Result := SkillCoords(1, 2);
'mining': Result := SkillCoords(1, 3);
'strength': Result := SkillCoords(2, 1);
'agility': Result := SkillCoords(2, 2);
'smithing': Result := SkillCoords(2, 3);
'defence': Result := SkillCoords(3, 1);
'herblore': Result := SkillCoords(3, 2);
'fishing': Result := SkillCoords(3, 3);
'range','ranged': Result := SkillCoords(4, 1);
'thieving': Result := SkillCoords(4, 2);
'cooking': Result := SkillCoords(4, 3);
'prayer': Result := SkillCoords(5, 1);
'crafting': Result := SkillCoords(5, 2);
'firemaking': Result := SkillCoords(5, 3);
'magic': Result := SkillCoords(6, 1);
'fletching': Result := SkillCoords(6, 2);
'woodcutting': Result := SkillCoords(6, 3);
'runecrafting': Result := SkillCoords(7, 1);
'slayer': Result := SkillCoords(7, 2);
'farming': Result := SkillCoords(7, 3);
'construction': Result := SkillCoords(8, 1);
'hunting', 'hunter': Result := SkillCoords(8, 2);
'summoning': Result := SkillCoords(8, 3);
else
begin;
//writeln('invalid skill: ' + skill);
srl_Warn('SkillToCoords', skill + ' is not a valid skill', warn_AllVersions);
Result := Point(0,0);
exit;
end;
end;
Scroll := False;
case LowerCase(skill) of
'construction','hunting', 'hunter','summoning': Scroll := True;
end;
ScrollTP := Point(724, Variant(250 + 173 * (not (scroll) + 1)));

GameTab(2);

if FindColorSpiralTolerance(ScrollTP.x,ScrollTP.y,1646629,719, 245 + Variant(169 * (not (scroll) + 1)),
728, 255 - Variant(169 * ((scroll) + 1)) ,10) then
begin
ScrollTP := Point(724, 423);
if FindColorSpiralTolerance(ScrollTP.x,ScrollTP.y,1646629,719, 245 + Variant(169 * (not (scroll) + 1)),
728, 255 - Variant(169 * ((scroll) + 1)) ,10) then
begin
Mouse(ScrollTP.x,ScrollTP.y,2,2,True);
Timer := GetSystemTime;
Repeat
Wait(100 + Random(50));
until ((GetSystemTime - Timer) > 10000) or (not FindColorSpiralTolerance(ScrollTP.x,ScrollTP.y,1646629,719, 245 + Variant(169 * (not (scroll) + 1)),
728, 255 - Variant(169 * ((scroll) + 1)) ,10))
end;
end;
end;

{*******************************************************************************
function GetSkillInfo(skill: string; Amount : Boolean): Integer;
By: Raymond
Description: Gets the amount / level of a skill.
E.G.
0/15
Amount = True will return 0.
Amount = False will return 15 (The actual level).
*******************************************************************************}

function GetSkillInfo(skill: string; Amount : Boolean): Integer;
var
TP: TPoint;
Box : TBox;
TPA : TPointArray;
Cts : Integer;
begin
GameTab(2);
TP := SkillToCoords(True,skill);
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(0);
if not Amount then
TP := Point(TP.x + 7,TP.y + 13);
FindColorsTolerance(TPA,65535,TP.x - 2,TP.y - 2, TP.x + 15,TP.y + 15,0);
Box := GetTPABounds(TPA);
Result := StrToIntDef(GetNumbers(GetTextAtEx(Box.x1-2, Box.y1 -1, 100,
StatChars, False, True, 0, 5,65535, 2, True, tr_Digits)),0);
ColorToleranceSpeed(CTS);
end;

Function GetSkillLevel(skill: string): Integer;

Begin
Result := GetSkillInfo(skill, False);
End;

{*******************************************************************************
Function GetMMLevels(LevelType : String;var ColorSign : String): integer;
By: Raymond / Wizzup
Description: Returns the level shown next to the minimap.
Colorsign returns the color of the text (Green,Yellow,Orange,Red).
Returns -1 if failed.
*******************************************************************************}

Function GetMMLevels(LevelType : String; var ColorSign : String): integer;
var
TP : TPoint;
I: Integer;
Colors : TIntegerArray;
P: TPointArray;
B: TBox;
Signs : TStringArray;
begin;
Result := -1;
ColorSign := '';
Case LowerCase(Leveltype) of
'health','hp','hitpoints' : TP := Point(729,29);
'prayer','pray' : TP := Point(746,68);
'run','energy' : TP := Point(740,107);
else
begin;
srl_Warn('GetMMLevels', 'Invalid LevelType: ''' + LevelType + '', warn_AllVersions);
Exit;
end;
end;
Colors := [65280,65535,2070783,255];
Signs := ['Green','Yellow','Orange','Red'];
For I := 0 to 3 do
Begin
FindColorsTolerance(P, Colors[I], TP.X - 5, TP.Y - 5, TP.X + 40, TP.Y + 20, 0);
If Length(P) < 1 Then
Continue;
B := GetTPABounds(P);
Result := StrToIntDef(GetNumbers(GetTextAtEx(B.X1 - 1 , B.Y1 - 1, 0, statChars,
False, False, 0, 4, Colors[I], 20, False, tr_Digits)), 1);
ColorSign := Signs[I];
End;
end;

{*******************************************************************************
function GetXP(Skill: String): Integer;
By: Nielsie95
Description: Returns current xp for a skill. Returns -1 if failed.
*******************************************************************************}

function GetXp(skill: string): Integer;
var
p: TPoint;
i, tx, ty, x, y: Integer;
begin
Result := -1;
if (not LoggedIn) or (not TabExists(2)) then Exit;
GameTab(2);
if (GetCurrentTab <> 2) then Exit;
p := SkillToCoords(True,Skill);
if (p.x < 1) then Exit;
MMouse(p.x, p.y +5, 12, 4);
while (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) and (i < 50) do
begin
Wait(100);
Inc(i);
end;
Wait(200 + Random(150));
if (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) then Exit;
if IsTextInAreaEx(x, y, x + 60, y + 60, tx, ty, 'urrent', 0, SmallChars, False, False, 0, 1, 0) then
Result := StrToIntDef(GetNumbers(GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars)), -1);
end;

{*******************************************************************************
function XpTillNextLevel(Skill: String): Integer;
By: Nielsie95
Description: Returns current xp til you level up in a skill.
Returns -1 if failed.
*******************************************************************************}

function XpTillNextLevel(Skill: string): Integer;
var
p: TPoint;
i, tx, ty, x, y: Integer;
begin
Result := -1;
if (not LoggedIn) or (not TabExists(2)) then Exit;
GameTab(2);
if (GetCurrentTab <> 2) then Exit;
p := SkillToCoords(True,Skill);
if (p.x < 1) then Exit;
MMouse(p.x, p.y +5, 12, 4);
while (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) and (i < 50) do
begin
Wait(100);
Inc(i);
end;
Wait(200 + Random(150));
if (not FindColor(x, y, 10551295, MIX1, MIY1, MIX2, MIY2)) then Exit;
if IsTextInAreaEx(x, y, x + 60, y + 60, tx, ty, 'ainder', 0, SmallChars, False, False, 0, 1, 0) then
Result := StrToIntDef(GetNumbers(GetTextAtEx(tx, ty, 0, SmallChars, False, True, 0, 1, 0, 50, False, tr_AllChars)), -1);
end;

{*******************************************************************************
function HpPercent: Integer;
By: Wizzup?
Description: Returns Hp left as a percentage.
If The HP level is set, it does not switch tabs.
*******************************************************************************}

function HPPercent: Integer;

Var
ColorString: String;
Begin
If Players[CurrentPlayer].Level[8] < 1 Then
Players[CurrentPlayer].Level[8] := Max(1, GetSkillInfo('hitpoints', False));

Result := Round(GetMMLevels('hp', ColorString) * 100 / Players[CurrentPlayer].Level[8]);
End;

{****************************************************************************//
procedure GetAllLevels;
By: WT-Fakawi
Description: Sets all 21 skilllevels to Players.Level[21]

* 1 8 15
* 2 9 16
* 3 10 17
* 4 11 18
* 5 12 19
* 6 13 20
* 7 14 21
* 22 23 24

* 1 = attack
* 2 = strength
* 3 = defence
* 4 = range
* 5 = prayer
* 6 = magic
* 7 = runecrafting
* 8 = hitpoints
* 9 = agility
* 10 = herblore
* 11 = thieving
* 12 = crafting
* 13 = fletching
* 14 = slayer
* 15 = mining
* 16 = smithing
* 17 = fishing
* 18 = cooking
* 19 = firemaking
* 20 = woodcutting
* 21 = farming
* 22 = construction
* 23 = hunting
* 24 = summoning
*******************************************************************************}

procedure GetAllLevels;
begin
try
Players[CurrentPlayer].level[1] := GetSkillInfo('attack',False);
Players[CurrentPlayer].level[2] := GetSkillInfo('strength',False);
Players[CurrentPlayer].level[3] := GetSkillInfo('defence',False);
Players[CurrentPlayer].level[4] := GetSkillInfo('range',False);
Players[CurrentPlayer].level[5] := GetSkillInfo('prayer',False);
Players[CurrentPlayer].level[6] := GetSkillInfo('magic',False);
Players[CurrentPlayer].level[7] := GetSkillInfo('runecrafting',False);
Players[CurrentPlayer].level[8] := GetSkillInfo('hitpoints',False);
Players[CurrentPlayer].level[9] := GetSkillInfo('agility',False);
Players[CurrentPlayer].level[10] := GetSkillInfo('herblore',False);
Players[CurrentPlayer].level[11] := GetSkillInfo('thieving',False);
Players[CurrentPlayer].level[12] := GetSkillInfo('crafting',False);
Players[CurrentPlayer].level[13] := GetSkillInfo('fletching',False);
Players[CurrentPlayer].level[14] := GetSkillInfo('slayer',False);
Players[CurrentPlayer].level[15] := GetSkillInfo('mining',False);
Players[CurrentPlayer].level[16] := GetSkillInfo('smithing',False);
Players[CurrentPlayer].level[17] := GetSkillInfo('fishing',False);
Players[CurrentPlayer].level[18] := GetSkillInfo('cooking',False);
Players[CurrentPlayer].level[19] := GetSkillInfo('firemaking',False);
Players[CurrentPlayer].level[20] := GetSkillInfo('woodcutting',False);
Players[CurrentPlayer].level[21] := GetSkillInfo('farming',False);
// Players[CurrentPlayer].level[22] := GetSkillLevel('construction');
// Players[CurrentPlayer].level[23] := GetSkillLevel('hunting');
// Players[CurrentPlayer].level[24] := GetSkillLevel('summoning');
except
WriteLn('Could not get all skill levels');
Exit;
end;
end;

//****************************************************************************//
// * GameTab 4 Related Functions. SEE ALSO INVENTORY.SCAR
//****************************************************************************//

//****************************************************************************//
// * GameTab 5 Related Functions.
//****************************************************************************//

{*******************************************************************************
function EquipmentCoords(i : Integer) : TPoint;
By: RsN modded by WT-Fakawi and Nielsie95
Description: Returns X and Y of the coordinates of the specified equipment item
*******************************************************************************}

function EquipmentCoords(i: Integer): TPoint;
begin
case i of
1: Result := IntToPoint(640, 225);
2: Result := IntToPoint(600, 266);
3: Result := IntToPoint(640, 266);
4: Result := IntToPoint(684, 266);
5: Result := IntToPoint(588, 304);
6: Result := IntToPoint(644, 304);
7: Result := IntToPoint(700, 304);
8: Result := IntToPoint(642, 343);
9: Result := IntToPoint(588, 384);
10: Result := IntToPoint(643, 384);
11: Result := IntToPoint(700, 384);
end;
end;

{*******************************************************************************
function WearingItem(i: Integer): Boolean;
By: RsN
Description: Results True if an item is equiped at i
*******************************************************************************}

function WearingItem(i: Integer): Boolean;
var
x, y:Integer;
T: TPoint;
begin
GameTab(5);
T := EquipmentCoords(i);
If FindColor(x, y, 65536, T.x - 8, T.y - 8, T.x + 8, T.y + 8 ) then
Result := True;
end;

{*******************************************************************************
procedure TakeOff(i: Integer);
By: RsN
Description: UnEquips Item specified in i.
*******************************************************************************}

procedure TakeOff(i: Integer);
var
T: TPoint;
begin
GameTab(5);
T := EquipmentCoords(i);
if (WearingItem(i)) then
begin
Mouse(T.x, T.y, 5, 5, True);
Wait(200 + Random(100));
end;
end;

{*******************************************************************************
function CheckEquipItems(number: Integer): Boolean;
By: SDcit
Description: Sees if there are number items equiped and returns true if yes.
*******************************************************************************}

function CheckEquipItems(number: Integer): Boolean;
// Sees if there are number items.
var
CheckCoords: Integer;
x: integer;
begin
x := 0;
begin
for CheckCoords := 1 to 11 do
begin
if WearingItem(CheckCoords) then
x := x + 1;
end;
if (x > number) then
begin
WriteLn('ERROR : You have more than ' + IntToStr(number) +
' items equiped.');
WriteLn(' You have : ' + IntToStr(x) + ' Items equiped');
Result := False;
end else
Result := True;
end;
end;

//****************************************************************************//
// * GameTab 6 Related Functions.
//****************************************************************************//

//****************************************************************************//
// * GameTab 7 Related Functions.
//****************************************************************************//

//****************************************************************************//
// * GameTab 8 Related Functions.
//****************************************************************************//

{*******************************************************************************
function CurrentWorld: Integer;
By: Cheesehunk, Ron and fixed by ZephyrsFury
Description: Returns the current world you are on.
*******************************************************************************}

function CurrentWorld: Integer;
var
TextX, TextY: Integer;
begin
Result := -1;
if (GetCurrentTab <> 8) then
begin
GameTab(8);
Wait(50 + Random(50));
end;
if (IsTextInAreaEx(635, 205, 727, 226, TextX, TextY, 'RuneSca', 0, SmallChars, False, False, 0, 0, -1)) then
Result := StrToIntDef(Trim(GetTextAtEx(TextX + 65, TextY, 0, SmallChars, True,
False, 0, 0, -1, 3, False, tr_AllChars)), -1);
if (Result = -1) then
WriteLn('Could not get Current World.');
end;

//****************************************************************************//
// * GameTab 9 Related Functions.
//****************************************************************************//

//****************************************************************************//
// * GameTab 10 Related Functions.
//****************************************************************************//

//****************************************************************************//
// * GameTab 11 Related Functions.
//****************************************************************************//
{*******************************************************************************
procedure SetRun(run: Boolean);
By: Wizzup? & EvilChicken!
Description: Sets Run on or off.
*******************************************************************************}

Procedure SetRun(Run: Boolean);
Var
TPA: TPointArray;
Begin
FindColorsTolerance(TPA, 5753055, 715, 105, 731, 110, 30);
If (Length(TPA) > 10) Xor Run Then
Mouse(715, 95, 10, 10, True);
End;

{*******************************************************************************
procedure RunControl(Run: Boolean);
By: Wizzup?
Description: Sets Run on or off, using control, DOES NOT stack with SetRun(),
Use them seperately.
*******************************************************************************}

procedure RunControl(Run: Boolean);
begin
Wait(10 + Random(20));
if Run then
KeyDown(17)
else
KeyUp(17);
Wait(10 + Random(20));
end;

{*******************************************************************************
procedure SetGraphics(Brightness: Integer; vl, rr, gd, td, id, fe, gt, cs: string);
By: ZephyrsFury
Description: Sets graphic options through the Graphics Screen in GameTab 11.
Use: Enter the desired Setting for the desired Option. Leave as '' for no change

Parameter Option Setting
vl Visible Levels Current / All
rr Remove Roofs Always / Selectively
gd Ground Decoration Off / On
td Texture Detail Low / High
ia Idle Animations Few / Many
fe Flickering Effects Off / On
gt Ground Textures Few / Many
cs Character Shadows Off / On
1 2 3 4
Brightness: <---o---o---o---o--->

EG. SetGraphics(2, 'current', '', 'off', 'low', 'few', '', 'few', 'off');
For Autoing: SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
*******************************************************************************}

procedure SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fe, gt, cs: string);
var
Settings, PosSettings, OptionName, tArr: TStringArray;
TB: TBox;
II, Tx, Ty, Col, Where: Integer;
P: TPoint;
begin
if (not(LoggedIn)) then Exit;
II := 0;
while (CountColor(2070753, 201, 28, 317, 46) <> 367) and (LoggedIn) do
begin
GameTab(11);
MouseBox(605, 258, 623, 277, 1);
Wait(500 + Random(200));
Inc(II);
if (II > 3) then
begin
WriteLn('Could not open Graphics Options screen.');
Exit;
end;
end;
if (not(InRange(Brightness, 0, 4))) then
srl_Warn('Login_SetGraphics', 'Brightness must be between 0 and 4', warn_AllVersions)
else
if (Brightness <> 0) then
begin
P := Point(140 + ((Brightness - 1) * 31), 185);
if (GetColor(P.x, P.y) = 65536) then
Mouse(P.x - 2, P.y - 2, 5, 5, True);
end;
PosSettings := ['Current', 'All', 'Always', 'Selectively', 'Off', 'On', 'Low',
'High', 'Few', 'Many', 'Off', 'On', 'Few', 'Many', 'Off', 'On'];
OptionName := ['Visible Levels', 'Remove Roofs', 'Ground Decoration', 'Texture Detail',
'Idle Animations', 'Flickering Effects', 'Ground Textures', 'Character Shadows'];
Settings := [vl, rr, gd, td, ia, fe, gt, cs];
for II := 0 to High(Settings) do
begin
if (Settings[II] = '') then Continue;
TB.x1 := 149 + ((II + 1) div 7) * 239;
TB.y1 := 173 + ((II + 1) mod 7) * 17;
TB.x2 := TB.x1 + 104;
TB.y2 := TB.y1 + 14;
tArr := [PosSettings[II * 2], PosSettings[II * 2 + 1]];
if (not(InStrArrEx(Capitalize(Settings[II]), tArr, Where))) then
begin
srl_Warn('SetGraphics', 'Setting: ' + Settings[II] + ' is not valid for Option: ' + OptionName[II], warn_AllVersions);
Continue;
end;
Col := Where * 16777008 + 207;
if (FindColor(Tx, Ty, Col, TB.x1, TB.y1, TB.x2, TB.y2)) then
Continue;
Mouse(TB.x1 + 10, TB.y1 + 3, 10, 5, True);
Wait(50);
if (FindColor(Tx, Ty, Col , TB.x1, TB.y2 + 1, TB.x2, TB.y2 + 1 + 51)) then
begin
Mouse(Tx, Ty, 10, 5, True);
Wait(50);
while (CountColor(16777215, 5, 5, 161, 35) = 522) do Wait(100);
end else
Mouse(TB.x1 + 10, TB.y1 + 3, 10, 5, True);
end;
MouseBox(490, 30, 499, 42, 1);
end;

{*******************************************************************************
procedure SetAudio(Volume, SFX, Area: Integer; SMSetting: (Stereo, Mono, NoChange) );
By: ZephyrsFury
Description: Sets audio options through the Audio screen in GameTab 11
Use: Enter the desired Setting AS A POINT for the desired Option. Make option 0
for no change.
1 2 3 4 5
Volume, SFX, Area: <--o---o---o---o---o-->

EG. SetAudio(1, 4, 0, Stereo);
*******************************************************************************}

procedure SetAudio(Volume, SFX, Area: Integer; SMSetting: TSMSetting);
var
Settings: TIntegerArray;
OptionName: TStringArray;
II, C: Integer;
P: TPoint;
begin
if (not(LoggedIn)) then Exit;
Settings := [Volume, SFX, Area];
OptionName := ['Volume', 'SFX', 'Area'];
C := 0;
while (CountColor(2070753, 201, 46, 296, 65) <> 309) and (LoggedIn) do
begin
GameTab(11);
MouseBox(654, 252, 677, 278, 1);
Wait(500 + Random(200));
Inc(C);
if (C > 3) then
begin
WriteLn('Could not open Graphics Options screen.');
Exit;
end;
end;
for II := 0 to 2 do
begin
if (not(InRange(Settings[II], 0, 5))) then
begin
srl_Warn('SetAudio', IntToStr(Settings[II]) + ' is not a valid setting ' +
'for: ' + OptionName[II] + '. Must be between 0 and 5', warn_AllVersions);
Continue;
end;
if (Settings[II] = 0) then Continue;
P.x := Round(201.0 + 25.5 * (Settings[II] - 1));
P.y := Round(1.5 * II * II + 54.5 * II + 118.0);
if (GetColor(P.x, P.y) <> 16777215) then
Mouse(P.x - 6, P.y, 0, 5, True);
Wait(10);
end;
if (GetColor(238, 268) = 181) and (SMSetting = Stereo) then
Mouse(302, 265, 7, 7, True)
else
if (GetColor(305, 268) = 181) and (SMSetting = Mono) then
Mouse(235, 265, 7, 7, True);
CloseWindow;
end;

{*******************************************************************************
procedure SetBar(Brightness, Volume, SFX, Area: Integer);
By: ZephyrsFury
Description: Sets each bar to the specific point. 1-4 for Brightness, 1-5 for
others. For no change in the value make the respective parameter 0.
*******************************************************************************}

procedure SetBar(Brightness, Volume, SFX, Area: Integer);
var
Settings: TIntegerArray;
Names: TStringArray;
II, K: Integer;
begin
Settings := [Brightness, Volume, SFX, Area];
Names := ['Brightness', 'Volume', 'SFX', 'Area'];
for II := 0 to 3 do
begin
if (II = 0) then K := 4
else K := 5;
if (not(InRange(Settings[II], 0, K))) then
srl_Warn('SetBar', 'Setting: ' + IntToStr(Settings[II]) + ' is not valid for Bar: ' + Names[II] + '.', warn_AllVersions);
end;
SetGraphics(Brightness, '', '', '', '', '', '', '', '');
Wait(100 + Random(500));
SetAudio(Volume, SFX, Area, NoChange);
end;

//****************************************************************************//
// * GameTab 12 Related Functions.
//****************************************************************************//

{*******************************************************************************
procedure DoEmote(EmoteNumber: Integer);
By: Sumilion
Description: Clicks on an emote specified by EmoteNumber (1 to 37)
*******************************************************************************}

procedure DoEmote(EmoteNumber: Integer);
var
row, X1, Y1, X2, Y2, Others: Integer;
begin
if (not(InRange(EmoteNumber, 1, 37))) then
begin
srl_Warn('DoEmote', 'Invalid EmoteNumber: ' + IntToStr(EmoteNumber) + ', Valid Emotes: 1..37', warn_AllVersions);
Exit;
end;
GameTab(12);
if (EmoteNumber > 20) then
begin
if (GetColor(734, 442) = 1777699) then
Mouse(734, 442, 10, 10, True);
Others := 10;
end else if (GetColor(733, 224) = 1777699) then
Mouse(733, 224, 10, 10, True);
if (EmoteNumber > 4) then
begin
repeat;
row := row + 1;
EmoteNumber := EmoteNumber - 4;
until (EmoteNumber <= 4) or (row = 10)
end;
if (row >= 5) then
row := row - 5;
EmoteNumber := EmoteNumber - 1;
X1 := 554 + (43 * EmoteNumber);
Y1 := 211 + (49 * row) + Others;
X2 := 592 + (43 * EmoteNumber);
Y2 := 257 + (49 * row) + Others;
MouseBox(X1 + 10, Y1 + 10, X2 - 10, Y2 - 10, 1);
end;

Thanks,

Zeph.

NiCbaZ

2008-10-16 06:01:59

Very nice job, any idea until ben fixes SMART?

Hugolord

2008-10-16 06:10:12

rep ++ and @ NiCbaZ, nah Ben is just gona get us to beg for a few days so he feels good about himself so let's wait a bit ^^.

Tniffoc

2008-10-16 06:37:06

From: NiCbaZ
Very nice job, any idea until ben fixes SMART?


I was on IRC and it was really un-clear, but it looked to me like Ben wasn't going to fix it. :eek:

Hugolord

2008-10-16 06:39:05

From: tniffoc
I was on IRC and it was really un-clear, but it looked to me like Ben wasn't going to fix it. :eek:


He will fix it, trust me, he only does this to get attention. :(

Seroko

2008-10-16 06:41:48

Very nice and fast work, will have to test it myself as soon as I wake up a little more.

From: NiCbaZ
Very nice job, any idea until ben fixes SMART?


Lets say him on IRC didn't work out too good and a few people stepped way over the line and SMART isn't looking that great for a quick fix but there will be something show up soon I'm sure :) Hopefully Ben will do it for the community.

ZephyrsFury

2008-10-16 07:22:00

SMART is Ben's plugin and it was a gift from Ben to the SRL Community. You can't expect him to leave everything he's doing to fix SMART just cos RS got updated. Back in the day when SMART wasn't available people still managed to auto - its not like autoing will die cos SMART is broken.

Lee Lok Hin

2008-10-16 07:26:39

/me boots up VMWare :p

Oh well, I suppose BLand will do it when he has time.

Hugolord

2008-10-16 07:33:12

From: ZephyrsFury
SMART is Ben's plugin and it was a gift from Ben to the SRL Community. You can't expect him to leave everything he's doing to fix SMART just cos RS got updated. Back in the day when SMART wasn't available people still managed to auto - its not like autoing will die cos SMART is broken.


nah VMWare ftw.

and something that Ben could do if he cbf to fix it every time is gives a little help on making our own SMART, not do it for us, just give us a little help.

Naike

2008-10-16 07:43:11

Well, if you ask him nicely and not spam him he will propely fix it in this month :)

Hugolord

2008-10-16 07:54:17

From: N1ke!
Well, if you ask him nicely and not spam him he will propely fix it in this month :)


I'd rather him help us understand how to make one than him just fixing, open source or it's fail mostly.

Nava2

2008-10-16 08:16:05

From: Hugolord
I'd rather him help us understand how to make one then him just fixing, open source or it's fail mostly.


I agree, but more than likely, he won't.

Back on topic, thanks zeph :)

simen236

2008-10-16 08:43:51

Nice fix. Between I really hope Ben will fix it. It's not that great without SMART.

Tniffoc

2008-10-16 08:55:20

Well… The auto-login doesn't seem to be working.. Zeph, any ideas? Mine just sits there and doesn't do anything…

mastaraymond

2008-10-16 09:38:21

Someone create your own smart please? ^^

P1nky

2008-10-16 10:46:37

isnt it possible for a experience guy to update SMART? (Freddy1990? :P)
or is it really complicated?


otherwise , Hello…. www.Runescape.com :) lol

btw dude, that means the world switching functions are broken too :( aww shuck, just made 1 for "Lesser Hassler".
:S ill try to make my own funcs for it than.

btw thanks zeph for the updated loginscreen.

Dracody

2008-10-16 10:52:25

Thanks a lot Zeph!:D
Im trying to get Ben to feel good so he fixes smart ;) showing him the support he has here.

TViYH

2008-10-16 15:29:55

Zeph, can you tell me exactly what you had to update? I'd like to know for future reference.

Nava2

2008-10-16 16:12:07

The CloseWindow in SetGraphics needs to be: MouseBox(490, 30, 499, 42, 1); As it currently misses.

Also, if all of the graphics settings are fine, maybe make sure there is at least a 750ish ms wait? Its inhumanly fast.

Scaper

2008-10-16 17:38:13

w00t thanx man for the temp fix thanx nava for telling me were to look on msn;)

bullzeye95

2008-10-16 18:44:11

From: ~~Joker~~
isnt it possible for a experience guy to update SMART? (Freddy1990? :P)


SMART != Delphi.

P1nky

2008-10-16 18:46:00

From: bullzeye95
SMART != Delphi.


ooooooo lol, who knows Delphi :P?

thought Freddy did.

Boreas

2008-10-16 19:23:58

He does, but SMART does not equal Delphi.

Dracody

2008-10-16 20:24:02

SMART is Java… correct me if im wrong please:)

TViYH

2008-10-16 20:52:04

I think SMART is ran in Delphi but called with Java.

Correct me if I'm wrong.

Widget

2008-10-16 21:11:54

Smart is a C++ plugin that uses the JNI to load a JVM and access the methods remotely as to interact with the Runescape that it loads. The line that needs to be fixed looks something like this:
String jsInfoPage = downloadHTML((new StringBuilder()).append("http://").append(server).append(".runescape.com/plugin.js?lowmem=").append(hidetail ? "0" : "1").append("&plugin=").append(signed ? "0" : "2").toString());
, but only Ben can fix it :(

P1nky

2008-10-16 21:39:58

unless we get a outsider C++?

or no?

Dracody

2008-10-17 00:10:54

I am using Scar on the RS client, but, why sometimes it wont let it type anything? or rotate the screen? :eek::confused:

Boreas

2008-10-17 00:34:50

From: Dracody
I am using Scar on the RS client, but, why sometimes it wont let it type anything? or rotate the screen? :eek::confused:


You calling ActivateClient or clicking in it first?

Dracody

2008-10-17 00:42:26

From: Boreas
You calling ActivateClient or clicking in it first?


I call activateClient, and it works good for a while, and then it just wont let me type anything or rotate screen, just as it happened when We used SMART and use the Disable Smart, to move it to our convenience.

Very weird I thought that only happened on Smart…

And also when it compiles and tries to log in , it wont let it type…It happened sometimes before but now it happens very often:confused:

joelster134

2008-10-17 02:01:52

Failed when compiling
Line 137: [Error] (137:1): Unknown identifier 'srl_Warn' in script C:\Program Files\SCAR 3.15\Includes\SRL\SRL\core\GameTab.scar


this is in the GameTab.Scar file…

Simtoon

2008-10-17 02:38:30

Let me say this good work and very fast!

Narcle

2008-10-17 04:10:01

From: Widget
Smart is a C++ plugin that uses the JNI to load a JVM and access the methods remotely as to interact with the Runescape that it loads. The line that needs to be fixed looks something like this:
String jsInfoPage = downloadHTML((new StringBuilder()).append("http://").append(server).append(".runescape.com/plugin.js?lowmem=").append(hidetail ? "0" : "1").append("&plugin=").append(signed ? "0" : "2").toString());
, but only Ben can fix it :(


WTB .class file pst.

ZephyrsFury

2008-10-17 04:30:16

From: TheVoiceInYourHead
Zeph, can you tell me exactly what you had to update? I'd like to know for future reference.

Well, the login screen changed so I had to change some of the coords. The graphics options screen both logged in and out were changed. SetAudio for both logged in and out had altered coordinates.

From: Nava2
The CloseWindow in SetGraphics needs to be: MouseBox(490, 30, 499, 42, 1); As it currently misses.

Also, if all of the graphics settings are fine, maybe make sure there is at least a 750ish ms wait? Its inhumanly fast.


Ah I forgot that CloseWindow was fixed in the dev srl. :duh: Oh and I'll add the wait.

From: joelster134
Failed when compiling
Line 137: [Error] (137:1): Unknown identifier 'srl_Warn' in script C:\Program Files\SCAR 3.15\Includes\SRL\SRL\core\GameTab.scar


this is in the GameTab.Scar file…


I think you may have an older revision of SRL. I suggest you update to the latest revision using subversion then applying these fixes.

Simtoon

2008-10-17 04:44:48

Can anyone tell me what has to be done to fix smart i have a mate that might be able to do it since his he has very good experience with c++ and works with c++ at his work

BobboHobbo

2008-10-17 04:55:14

This kid is like tha sex.

joelster134

2008-10-17 05:10:36

Thanks will try now :)

Failed when compiling
Line 36: [Error] (36:12): Unknown identifier 'LoggedIn' in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Core\Login.scar


wtf?

(in the login.scar…)

BTW I HAVE LATEST REV!

HyperSecret

2008-10-17 12:47:47

From: simtoon
Can anyone tell me what has to be done to fix smart i have a mate that might be able to do it since his he has very good experience with c++ and works with c++ at his work


It's not that we don't have people that couldn't fix it. It is just that the SMART plugin is in a .dll file and we can't decompile that to fix it. BenLand is the only person with the source of the files that can directly fix the problem.

Just wait and don't be stupid. *cough* ;)

randy marsh

2008-10-17 14:01:38

why give something to a community which can only be fixed by him?
Is he to proud to make it open source?

Hugolord

2008-10-17 14:13:00

From: djcheater
why give something to a community which can only be fixed by him?
Is he to proud to make it open source?


Yes, he is, but he likes to call it "wanting the SRL community to make their own SMART by themselves".

simen236

2008-10-17 14:38:11

I really hope he will give the source to somebody, or fix it by himself.

randy marsh

2008-10-17 15:36:57

Well there are so many gifted scripters here i am sure they could!

Blumblebee

2008-10-17 16:06:21

[offtopic] hey DJCheat havent seen u around srl in a while [/offtopic]

My guess is that BenLand Will eventually fix SMART, i think he fees unappreciated, then when we need it again, we whine and complain to him. I think its more of a lesson to be thankful for whatcha got :p

joelster134

2008-10-17 17:13:47

34.function RSReady: Boolean;
35.begin
36 .Result := (LoggedIn) or (GetColor(520, 146) = 4038981);
37.end;


Failed when compiling
Line 36: [Error] (36:12): Unknown identifier 'LoggedIn' in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Core\Login.scar

What am i doing wrong the one zeph posted come up wif that error.

NiCbaZ

2008-10-17 21:29:50

all works fine, but nextplayer doesnt work when it goes into the graphic options it doesnt click out of it and tries to click login button when graphics options are open

Hugolord

2008-10-18 05:50:24

Yeah the skip advert and choosing the graphics when he's logged in both don't work :S

ZephyrsFury

2008-10-18 05:58:57

SRL doesn't skip the advert for you so you'll have to do it yourself if it appears. :) Mind telling me whats wrong with SetGraphics?

NiCbaZ

2008-10-18 06:08:07

SetGfx when logged in 2 bugs…

1: Sometimes it will open it and just trying to keep opening it….
2: doesnt close properly missclick's

When NextPlayer happens ( this may be just me) , it goes to type in my username and deubugs it , but it doesnt type then goes to type pass but it doesnt type) so im not sure if its me or not.

ZephyrsFury

2008-10-18 06:59:41

From: NiCbaZ
SetGfx when logged in 2 bugs…

1: Sometimes it will open it and just trying to keep opening it….
2: doesnt close properly missclick's

When NextPlayer happens ( this may be just me) , it goes to type in my username and deubugs it , but it doesnt type then goes to type pass but it doesnt type) so im not sure if its me or not.


I'll have a look at SetGraphics, I know the problem with misclicking is caused by the CloseWindow in the Pub SRL being outdated. The first might be cause the screen got updated since I last had a look at it. Not sure about the problem with the username and pass though, it seems for some reason the text isn't being typed. This is probably the same reason for the problem with closing the graphics screen (login) which presses Esc to exit.

NiCbaZ

2008-10-18 07:17:49

Yes its very wired…. it only does it on NextPlayer and not the first login, but NextPlayer uses Login so im confused, ive tryed placing in more waits, clicking on the box twice ect.. i cannot run multiplayer scripts atm .. aww well…

Nava2

2008-10-18 09:52:59

Just switch the closeWindow in setgraphics with my mousebox I posted on the first page. It works :).

I also noticed that it doesn't recognize when Chat interfaces are open, nor when a ms interface is open. :(

BenLand100

2008-10-18 10:53:38

From: Widget
Smart is a C++ plugin that uses the JNI to load a JVM and access the methods remotely as to interact with the Runescape that it loads. The line that needs to be fixed looks something like this:
String jsInfoPage = downloadHTML((new StringBuilder()).append("http://").append(server).append(".runescape.com/plugin.js?lowmem=").append(hidetail ? "0" : "1").append("&plugin=").append(signed ? "0" : "2").toString());
, but only Ben can fix it :(


Whatever decompiler gave you that blasphemy deserves total inhalation, thats horrible code. Anyway, posting that line as the "line to fix" just goes to show that even though you can decompile an ancient version of it, you still have no clue what to do.

From: Hugolord
Yes, he is, but he likes to call it "wanting the SRL community to make their own SMART by themselves".

From: Hugolord
rep ++ and @ NiCbaZ, nah Ben is just gona get us to beg for a few days so he feels good about himself so let's wait a bit ^^.

From: Hugolord
He will fix it, trust me, he only does this to get attention. :(

FYI I've already fixed it. I really don't appreciate being insulted by you. I could care less about attention from srl, you think you're a lot more special than you are if you think I want you to beg for it, and I never said ANYTHING about wanting you to make your own SMART, so putting that in quotes is slander. If you weren't completely retarded and didn't get all worked up over smart not working for a few days, you might have realize that I haven't been here to do anything about it, and I have better things to do than cater to a community of leachers such as yourself.

Would it kill you to show some respect? I seriously doubt anyone here could even figure out the process to build SMART from source, much less maintain it, so releasing the source would only cater to your leaching nature.

Nava2

2008-10-18 11:00:16

From: BenLand100
Whatever decompiler gave you that blasphemy deserves total inhalation, thats horrible code. Anyway, posting that line as the "line to fix" just goes to show that even though you can decompile an ancient version of it, you still have no clue what to do.




FYI I've already fixed it. I really don't appreciate being insulted by you. I could care less about attention from srl, you think you're a lot more special than you are if you think I want you to beg for it, and I never said ANYTHING about wanting you to make your own SMART, so putting that in quotes is slander. If you weren't completely retarded and didn't get all worked up over smart not working for a few days, you might have realize that I haven't been here to do anything about it, and I have better things to do than cater to a community of leachers such as yourself.

Would it kill you to show some respect? I seriously doubt anyone here could even figure out the process to build SMART from source, much less maintain it, so releasing the source would only cater to your leaching nature.


Thanks for updating :)

Hugolord

2008-10-18 11:42:02

From: BenLand100
Whatever decompiler gave you that blasphemy deserves total inhalation, thats horrible code. Anyway, posting that line as the "line to fix" just goes to show that even though you can decompile an ancient version of it, you still have no clue what to do.




FYI I've already fixed it. I really don't appreciate being insulted by you. I could care less about attention from srl, you think you're a lot more special than you are if you think I want you to beg for it, and I never said ANYTHING about wanting you to make your own SMART, so putting that in quotes is slander. If you weren't completely retarded and didn't get all worked up over smart not working for a few days, you might have realize that I haven't been here to do anything about it, and I have better things to do than cater to a community of leachers such as yourself.

Would it kill you to show some respect? I seriously doubt anyone here could even figure out the process to build SMART from source, much less maintain it, so releasing the source would only cater to your leaching nature.

oh yeah? Well if you are so "busy" you should just post the source and let us TRY to figure out how you do it.
Secondly, I don't give a fuck about SMART to be honest, if it's there then good I can use it.If it's not there I'll just use VMs which work just as well.
The thing I don't like about your SMART is that no one knows how it was made exactly, no one else can make it but YOU and even though this community is all about open source and LEARNING you give us neither.

So thanks for updating it but I would prefer to have the source-code of the BROKEN ANCIENT one anyway.

Naum

2008-10-18 12:47:30

Ben, we can wait a few days. If it is going to be released - show a bit of respect to Ben. If it isn't, still show some respect.

bobng

2008-10-18 13:01:40

From: BenLand100

Would it kill you to show some respect? I seriously doubt anyone here could even figure out the process to build SMART from source, much less maintain it, so releasing the source would only cater to your leaching nature.


He's got a point.

BenLand100

2008-10-18 13:03:32

From: Hugolord
oh yeah? Well if you are so "busy" you should just post the source and let us TRY to figure out how you do it.
Secondly, I don't give a fuck about SMART to be honest, if it's there then good I can use it.If it's not there I'll just use VMs which work just as well.
The thing I don't like about your SMART is that no one knows how it was made exactly, no one else can make it but YOU and even though this community is all about open source and LEARNING you give us neither.

So thanks for updating it but I would prefer to have the source-code of the BROKEN ANCIENT one anyway.

If you don't "give a fuck" then go stick your head back up your ass where it belongs and leave me alone. Continuing to post and begging for the source just proves that you care, so get your head on straight or stop whining about everything being sideways. I have absolutely no use for the moral supremacy you claim to have. "The thing I don't like about your SMART is that no one knows how it was made exactly" That is possibly the most hypocritical and retarded thing you have ever said. Do you know how anything on your computer is made or much less how it works? Didn't think so, go away please.

Hugolord

2008-10-18 13:11:17

From: BenLand100
If you don't "give a fuck" then go stick your head back up your ass where it belongs and leave me alone. Continuing to post and begging for the source just proves that you care, so get your head on straight or stop whining about everything being sideways. I have absolutely no use for the moral supremacy you claim to have. "The thing I don't like about your SMART is that no one knows how it was made exactly" That is possibly the most hypocritical and retarded thing you have ever said. Do you know how anything on your computer is made or much less how it works? Didn't think so, go away please.


Now where did I beg you for SMART's source?
Anyway, what I meant here "The thing I don't like about your SMART is that no one knows how it was made exactly" is that no one knows what you did, sure you used C(++), java and delphi or w.e like it says on the wiki but nobody knows how to make SMART because you won't post the source out anywhere.
Why not post the source? (I'm not telling you to post it) What are you hiding?
and if the answer is "No one would understand it" or " You would just ask more questions about it after" then it's bs sir.
I know you aren't going to post the source anytime soon, I just feel like sharing my views on your "SMART".
(maybe when runescape dies some day you will release it but I doubt it) ;)

BUT

Ok, almighty one. I take back everything I said on this thread.You are a great guy and I'm sure your intentions are good.

bobng

2008-10-18 13:30:55

From: BenLand100
If you don't "give a fuck" then go stick your head back up your ass where it belongs and leave me alone. Continuing to post and begging for the source just proves that you care, so get your head on straight or stop whining about everything being sideways. I have absolutely no use for the moral supremacy you claim to have. "The thing I don't like about your SMART is that no one knows how it was made exactly" That is possibly the most hypocritical and retarded thing you have ever said. Do you know how anything on your computer is made or much less how it works? Didn't think so, go away please.


I know what you are trying to do, but it won't work. Nobody will invest the time to re-code an alternative SMART, and if they do it will be a cobbled/hacked together mess which is only JUST functional. The best thing you could do would be to fix it, and release it, then say "you lot fix it if it breaks, bye!".

To put it in another perspective, if you don't update it, won't it have been a giant waste of time?

simen236

2008-10-18 13:35:40

I'm so fucking sick of this retarded begging and fighting and so on!!

OMG!! You fixed it Ben!! You are the man. Everyone that says they don't need SMART, can just fuck the Hell off!!

Sorry for saying this, but I had to. It was a burdon. I just needed to release it from my soul.

aernout5

2008-10-18 15:49:40

From: BenLand100
If you don't "give a fuck" then go stick your head back up your ass where it belongs and leave me alone. Continuing to post and begging for the source just proves that you care, so get your head on straight or stop whining about everything being sideways. I have absolutely no use for the moral supremacy you claim to have. "The thing I don't like about your SMART is that no one knows how it was made exactly" That is possibly the most hypocritical and retarded thing you have ever said. Do you know how anything on your computer is made or much less how it works? Didn't think so, go away please.


well its updated but sorry for the noob question but how do I update it on my own pc? btw I think your doing a great job rep++ :)

simen236

2008-10-18 18:05:02

It doesn't log me in to my chosen world. I chose world 14. It uses the auto world select feature. Please fix this!

siege turtle

2008-10-18 19:38:54

So we just change the two files to those, and after saving it, it should work? Sorry, I'm new to all this stuff.

in2it

2008-10-19 01:01:47

Nice man :P very helpful now i can get 99 fletching lol

BenLand100

2008-10-19 01:07:25

From: Hugolord
Now where did I beg you for SMART's source?
Anyway, what I meant here "The thing I don't like about your SMART is that no one knows how it was made exactly" is that no one knows what you did, sure you used C(++), java and delphi or w.e like it says on the wiki but nobody knows how to make SMART because you won't post the source out anywhere.
Why not post the source? (I'm not telling you to post it) What are you hiding?
and if the answer is "No one would understand it" or " You would just ask more questions about it after" then it's bs sir.
I know you aren't going to post the source anytime soon, I just feel like sharing my views on your "SMART".
(maybe when runescape dies some day you will release it but I doubt it) ;)

BUT

Ok, almighty one. I take back everything I said on this thread.You are a great guy and I'm sure your intentions are good.

You are impossible. You don't know anymore about how colors appear on your screen than you do about SMART, but you don't complain about that. Quit being greedy. It is extremely insulting that you are attacking me for absolutely no reason. I am in no way obligated to release the source to SMART, just as Microsoft and Freddy aren't required to release the source to Windows or Scar. So, if you really have nothing better to do than be an annoyance to someone that is doing the whole community a favor, then please, continue to post and pm me. And if you don't agree with SMART, don't use it. Its pathetic that you feel obligated to ruin everything.

I think it is absolutely hilarious that you are so paranoid to think I'm hiding something in a program that hundreds of people have used without incident. If I'm going to invest countless hours of my time into making a program that no one else has been able to make, I'm not going to tell you how I did it, simply because it was MY effort that was put forth. not yours. Do something on your own for a change and quit relying on the rest of the world to wipe your ass. If you want to know how SMART works, figure it out the same way I did, don't be a leach.

Do you know c++ or java? can you write in asm? do you have any idea how to use dynamic link libraries? do you know jni like the back of your hand? Have you gone through the entire java rendering api (including the undocumented parts) as well as the event api (undocumented as well)? Do you understand the java.io.net package? Do you know how to load classes and override classes from the jvm? Do you even have any clue how the JVM works? Do you know how the RS client works? If you answer yes to any of those i'm surprised. If all of them, I'll give you the entire SMART source. Otherwise, go somewhere else. You are the most greedy, malevolent, and sadistic person I have seen recently. Lose the drama, life isn't as interesting as you are trying to make it.

Edit: I just checked all of your recent posts, nothing but you talking, no useful or helpful information, you just want to get your say in. I have news for you, buddy, this is an internet community, meaning if you have time to just post whatever comes to mind and spam up the place, your priorities might be a little off-kilter.

Blumblebee

2008-10-19 01:10:15

If you answer yes to any of those i'm surprised. If all of them, I'll give you the entire SMART source. Otherwise, go somewhere else. You are the most greedy, malevolent, and sadistic person I have seen recently. Lose the drama, life isn't as interesting as you are trying to make it.



too much to read, but i caught the funnny parts ;)

pwnaz0r

2008-10-19 01:15:53

Ben, forget him. I looked at you replying to this thread, looked at his posts on first page, and thought "oh god, here is a guy that's going to jeopardize this wonderful thing for us all". He doesn't speak on behalf of the rest of us, and as long as I have been here, you have been, probably at least the most experienced scripter I have personally talked to. I love SMART, and I hope that you can find time soon to fix whatever is wrong because of the current update.

Greatest respect,
Pwnaz0r

EDIT: and the point below, I agree with that

bullzeye95

2008-10-19 01:22:47

From: BenLand100
Do you know c++ or java? can you write in asm? do you have any idea how to use dynamic link libraries? do you know jni like the back of your hand? Have you gone through the entire java rendering api (including the undocumented parts) as well as the event api (undocumented as well)? Do you understand the java.io.net package? Do you know how to load classes and override classes from the jvm? Do you even have any clue how the JVM works? Do you know how the RS client works? If you answer yes to any of those i'm surprised. If all of them, I'll give you the entire SMART source. Otherwise, go somewhere else. You are the most greedy, malevolent, and sadistic person I have seen recently. Lose the drama, life isn't as interesting as you are trying to make it.


The reason that people (at least me) want to see the source is to learn how that stuff works. What would be the point in looking through the source if you already know how to write it?

BenLand100

2008-10-19 01:30:30

From: bullzeye95
The reason that people (at least me) want to see the source is to learn how that stuff works. What would be the point in looking through the source if you already know how to write it?

That's the point? The only reason you would want to look at SMART is to write your own. If your interest is learning, you'd do better just learning how than you would looking at a highly specialized implementation.

Boreas

2008-10-19 01:37:00

Yea I think at least 99% of scripters here learned by reading tuts before learning from really complicated scripts.

pwnaz0r

2008-10-19 01:37:19

From: BenLand100
That's the point? The only reason you would want to look at SMART is to write your own. If your interest is learning, you'd do better just learning how than you would looking at a highly specialized implementation.


Just to bring up a point, let's say he did write his own. So? It's not like it would matter. The Rest of the SRL community would not say "Oh, I think I will abandon SMART and go to *Bullzeye's versions name here*". I doubt he would release it even if he did make one, and personally, I don't think he would put in all that hard work for something that has already been done…very well…

mastaraymond

2008-10-19 04:53:16

From: pwnaz0r
Just to bring up a point, let's say he did write his own. So? It's not like it would matter. The Rest of the SRL community would not say "Oh, I think I will abandon SMART and go to *Bullzeye's versions name here*". I doubt he would release it even if he did make one, and personally, I don't think he would put in all that hard work for something that has already been done…very well…

Not everyone around here is that paranoid, some people actually just read the code and be like "cuwl".

Hugolord

2008-10-19 05:24:15

From: pwnaz0r
Just to bring up a point, let's say he did write his own. So? It's not like it would matter. The Rest of the SRL community would not say "Oh, I think I will abandon SMART and go to *Bullzeye's versions name here*". I doubt he would release it even if he did make one, and personally, I don't think he would put in all that hard work for something that has already been done…very well…


pwnaz0r, it's not about writing your own SMART, it's learning how it was written.
Ben I think you are not "grasping" the reason I would like the source code written.Hell, I would probably not understand it but that is why you would not be releasing it only to me but to this community as a whole, I am 100% sure that if you released it to SRL-forums at least ONE person would understand it who might then, just might, explain it to the rest of us.Also, you keep calling me a "leach" well to my understanding, and the reason why I even brought this up, is because I feel that I am being one when I use your SMART.The whole reason why I even got into the whole cheating thing was to LEARN, not bot or be famous by creating my own "SMART" or get my own geepee.Lastly, you were the one sending me threatening pms, not me.@Boreas, needless to say that Ben would not write a tutorial, showing us the source would be the easiest thing for Ben and it does not require any work from him to do so.
And, I'd rather you didn't mock me for not knowing Java/C++ etc, we all started out somewhere Ben, even you.
Go ahead and close this thread if you want Ben.

Nava2

2008-10-19 10:24:06

From: Hugolord
pwnaz0r, it's not about writing your own SMART, it's learning how it was written.
Ben I think you are not "grasping" the reason I would like the source code written.Hell, I would probably not understand it but that is why you would not be releasing it only to me but to this community as a whole, I am 100% sure that if you released it to SRL-forums at least ONE person would understand it who might then, just might, explain it to the rest of us.Also, you keep calling me a "leach" well to my understanding, and the reason why I even brought this up, is because I feel that I am being one when I use your SMART.The whole reason why I even got into the whole cheating thing was to LEARN, not bot or be famous by creating my own "SMART" or get my own geepee.Lastly, you were the one sending me threatening pms, not me.@Boreas, needless to say that Ben would not write a tutorial, showing us the source would be the easiest thing for Ben and it does not require any work from him to do so.
And, I'd rather you didn't mock me for not knowing Java/C++ etc, we all started out somewhere Ben, even you.
Go ahead and close this thread if you want Ben.


Must you ALWAYS ****ING FLAME!? Seriously, all I have seen you do recently is flame about KYAB and SMART, seriously. It was a gift from benland, and a beautiful tool. If you don't like it, then why go against the supreme agreement of all of us?

DONT WASTE YOUR LIFE!



God damn.


P.S. Benland, I thank you. I also would love to see the source, not any time soon, but once I can begin to understand more advanced programing languages. It is an awesome client and I would love to see its internal workings. But for now, thank you for updating. :)

Boreas

2008-10-19 11:49:37

From: Hugolord
pwnaz0r, it's not about writing your own SMART, it's learning how it was written.
Ben I think you are not "grasping" the reason I would like the source code written.Hell, I would probably not understand it but that is why you would not be releasing it only to me but to this community as a whole, I am 100% sure that if you released it to SRL-forums at least ONE person would understand it who might then, just might, explain it to the rest of us.Also, you keep calling me a "leach" well to my understanding, and the reason why I even brought this up, is because I feel that I am being one when I use your SMART.The whole reason why I even got into the whole cheating thing was to LEARN, not bot or be famous by creating my own "SMART" or get my own geepee.Lastly, you were the one sending me threatening pms, not me.@Boreas, needless to say that Ben would not write a tutorial, showing us the source would be the easiest thing for Ben and it does not require any work from him to do so.
And, I'd rather you didn't mock me for not knowing Java/C++ etc, we all started out somewhere Ben, even you.
Go ahead and close this thread if you want Ben.


Sorry I should have made analogy clear.

Trying to learn from SMART source without knowing those parts Ben listed is like trying to learn from just looking at the most advanced script without knowing any scripting techniques.
Learning what DDTMs, TPAs, etc are from tutorials first (not from a tutorial called 'how to make script XYZ') is like learning about all the things that Ben listed, from whatever places he learned them (not from a tutorial written by Ben called 'how to make smart').

In both cases, if you know the parts first, looking at the source can help you learn how to use them. Without that base of knowledge though, it's not a way to learn.

BenLand100

2008-10-19 14:40:29

From: Hugolord
pwnaz0r, it's not about writing your own SMART, it's learning how it was written.
Ben I think you are not "grasping" the reason I would like the source code written.Hell, I would probably not understand it but that is why you would not be releasing it only to me but to this community as a whole, I am 100% sure that if you released it to SRL-forums at least ONE person would understand it who might then, just might, explain it to the rest of us.Also, you keep calling me a "leach" well to my understanding, and the reason why I even brought this up, is because I feel that I am being one when I use your SMART.The whole reason why I even got into the whole cheating thing was to LEARN, not bot or be famous by creating my own "SMART" or get my own geepee.Lastly, you were the one sending me threatening pms, not me.@Boreas, needless to say that Ben would not write a tutorial, showing us the source would be the easiest thing for Ben and it does not require any work from him to do so.
And, I'd rather you didn't mock me for not knowing Java/C++ etc, we all started out somewhere Ben, even you.
Go ahead and close this thread if you want Ben.

So, you basically just said you are arguing for no reason. The source will do you no good, but you want it anyway. That makes perfect sense. If you want to start somewhere, looking at SMART's source code is not the place to start. You can't use the argument that you want to learn if you don't even know the languages it was written in, sorry. That would be like trying to learn Chinese by picking up a non-translated Chinese book and guessing until you got it right, but you have no way of knowing if its right. All you want is the source for some greedy reason you've cooked up in your head, and its not my life's goal to satisfy your greed.

Edit: Would you carry around a book written in Chinese just to look like you know Chinese? There's a deeper meaning in there I'm sure.

bobng

2008-10-19 14:53:19

I think its time for a group hug

Gu3st...

2008-10-19 15:32:25

From: bobng
I think its time for a group hug


+1…
Please stop hating eatchother! :(

*Hugs*

noodlesalan

2008-10-19 18:59:17

I think the graphics options check should be a tad bit longer.

If crapex can see what we do before we log in, and everytime we log in, we "flicker" the graphics options, that'll show them we are getting into something.

I recommend a longer wait time, like 2 secs plus a random half second.

P1nky

2008-10-19 19:52:06

From: Hugolord
pwnaz0r, it's not about writing your own SMART, it's learning how it was written.
Ben I think you are not "grasping" the reason I would like the source code written.Hell, I would probably not understand it but that is why you would not be releasing it only to me but to this community as a whole, I am 100% sure that if you released it to SRL-forums at least ONE person would understand it who might then, just might, explain it to the rest of us.Also, you keep calling me a "leach" well to my understanding, and the reason why I even brought this up, is because I feel that I am being one when I use your SMART.The whole reason why I even got into the whole cheating thing was to LEARN, not bot or be famous by creating my own "SMART" or get my own geepee.Lastly, you were the one sending me threatening pms, not me.@Boreas, needless to say that Ben would not write a tutorial, showing us the source would be the easiest thing for Ben and it does not require any work from him to do so.
And, I'd rather you didn't mock me for not knowing Java/C++ etc, we all started out somewhere Ben, even you.
Go ahead and close this thread if you want Ben.


dude chill out , dont post anymore in this thread.
its like your arguing with Bill Gates or 1 of his devs. Its Ben choise to release or not, he wants to keep it private . And not give it out. goodness.

NiCbaZ

2008-10-19 21:00:47

BenLand100 is

He gave us SMART as a gift.

So Hugolord quit it?

cause

2008-10-20 01:46:28

Sorry to interject, but here's what I think. If anyone cares.
I've been around since the end of Kaitnieks and the beginning of SRL. The only reason that this community is still running is because intelligent people gave of their own time to the community. There is no obligation. There is no reward. (not counting moral gains if that's your thing). So, although nobody in this community really deserves SMART, it would be great to have it. But life will go on if we don't have it. Ok, so this is pretty much a neutral post, it's what I think.

guyver

2008-10-20 04:07:17

Thnx for the fixes!! Keep up the great work. My scripting can go on W00T!!:spot:

Magiic

2008-10-20 14:57:09

program new;
{.include srl/srl.scar}
var
zephyrsl337level, godsl337level:integer;
begin
SetupSRL;
Inc(zephyrsl337level);
if (zephyrsl337level) > (godsl337level) then
WriteLn(' zephyr pwns you god!');
end.
Successfully compiled (1563 ms)
SRL Compiled in 16 msec
zephyr pwns you god!
Successfully executed

Naum

2008-10-20 15:15:40

Lol :

program new;
{.include srl/srl.scar}
var
zephyrsl337level, godsl337level:integer;
ChuckNorris : Boolean;

begin
SetupSRL;
ChuckNorris := True;
Inc(zephyrsl337level);
if (zephyrsl337level) > (godsl337level) then
If ChuckNorris = True Then
WriteLn('Only one wins!');
end.

Zephy wins but Chuck Norris always wins

Shuttleu

2008-10-20 15:21:58

:p
program new;
var
zephyrsl337level, godsl337level:integer;
ChuckNorris : Boolean;

begin
ChuckNorris := True;
Inc(zephyrsl337level);
if (zephyrsl337level) > (godsl337level) then
Writeln('zeph pwnz god :D');
if ChuckNorris = True then
WriteLn('but Chuck Norris ownz zeph :p');
end.
no need for srl :duh:

~shut

NCDS

2008-10-20 21:29:30

ahh thank you!
i couldnt figure out why Narcles auto fighter wasnt working :)
thanks again!

rkroxpunk

2008-10-21 09:19:16

This is what the "epic" SRL community has come to…….How sad, it used to be good. :'(

Naum

2008-10-21 12:02:57

Well currently we aren't as good. But im sure we will regain strength again and have jagex on the back foot again :)

randy marsh

2008-10-21 12:43:36

lol all this over a botting program, get a life people, go outside!
This aint then end of the world,

by the way you are using a program that u get for free and ben probaly spent ages of his own time making smart , so be gratefull!

nazcan

2008-10-21 15:30:06

Isn't there something wrong also in math.scar? Does this:

[Runtime Error] : Exception: in line 46 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Math.scar

And here's the lines 44-48:

begin;
TempBMP := CreateBitmapMaskFromText(Txt,Chars);
Result := CreateTPAFromBMP( GetBitmapDC(TempBMP));
FreeBitmap(TempBMP);
end;

davidwang95

2008-10-21 15:40:38

[Runtime Error] : Exception: Access violation at address 006165B1 in module 'scar.exe'. Read of address 00000000 in line 604 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Login.scar

noidea

2008-10-21 15:41:47

Thanks Zyph is works for me.

Tniffoc

2008-10-21 18:07:27

From: noidea
Thanks Zyph is works for me.


How does this work for everybody but me!!!!!???? :( :weneedacryingsmile:

ZephyrsFury

2008-10-22 05:02:36

From: nazcan
Isn't there something wrong also in math.scar? Does this:

[Runtime Error] : Exception: in line 46 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Math.scar

And here's the lines 44-48:

begin;
TempBMP := CreateBitmapMaskFromText(Txt,Chars);
Result := CreateTPAFromBMP( GetBitmapDC(TempBMP));
FreeBitmap(TempBMP);
end;


I think you need to setup your players properly with the correct nicknames etc.

From: davidwang95
[Runtime Error] : Exception: Access violation at address 006165B1 in module 'scar.exe'. Read of address 00000000 in line 604 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Login.scar


You sure you copied the file properly. My Login.scar only goes up to Line 576.

From: tniffoc
How does this work for everybody but me!!!!!???? :( :weneedacryingsmile:


Hmm, I'll try solve it over IRC with you.

nazcan

2008-10-22 08:24:23

Thanks zephyr, it works :p

slackeru

2008-10-23 15:24:12

finally, thx alot!

Nose Smasher

2008-10-24 13:10:49

works ;)

rep++

davidwang95

2008-10-24 17:25:14

From: ZephyrsFury
I think you need to setup your players properly with the correct nicknames etc.



You sure you copied the file properly. My Login.scar only goes up to Line 576.



Hmm, I'll try solve it over IRC with you.



I'm sorry, but I'm still getting
[Runtime Error] : Exception: Access violation at address 006165B1 in module 'scar.exe'. Read of address 00000000 in line 561 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Login.scar

and line 561 says CorrectString := Capitalize(Players.Name);

Is it because my nickname is wrong? I put (not exact to avoid ban, but same set up~name+number) Jeff761, and the nick was eff. Help is appreciated.

mormonman

2008-10-24 17:36:04

eff should work… you just need 3 or 4 letters of the username for the nickname

Gardeon

2008-10-25 09:43:15

umm… i get this for the Loggin thing: Failed when compiling
Line 36: [Error] (36:12): Unknown identifier 'LoggedIn' in script C:\Program Files\SCAR 3.15\Includes\SRL\SRL\core\Login.scar

and this for the gametab thing: Failed when compiling
Line 137: [Error] (137:1): Unknown identifier 'srl_Warn' in script C:\Program Files\SCAR 3.15\Includes\SRL\SRL\core\GameTab.scar

ZephyrsFury

2008-10-25 10:47:59

The fixes on this thread are not longer required with the release of SRL Rev 28. All fixes are implemented and no further modifications are needed for SRL to be compatible with RS.

Thanks.

Gardeon

2008-10-25 10:48:28

but when i try to run the script it says to use rev 25…

ZephyrsFury

2008-10-25 10:50:36

From: Gardeon
but when i try to run the script it says to use rev 25…


You'll have to post on the script's thread for more info. Sorry.