PDA

View Full Version : Looking For Help Please - Logging details into S.M.A.R.T



AlwaysConfused
11-21-2018, 07:48 AM
Hi, first off if i'm in the wrong area, my bad. I'm new to these forums and the art of writing this language. I've been following the set-up guides available throughout these forums which are very detailed. I'm having issues getting the code i have to log me in to S.M.A.R.T. I've tried manipulating everything that i can think of. Any help would be greatly appreciated, thanks in advance.... the code i have follows;


program scriptSkeleton;
{$define SMART}
{$I SRL/OSR.simba}
{$I RSWalker/Walker.simba}

//Declare our Constants
const
LOGIN_NAME = '**********'; //Username/Email
LOGIN_PASS = '**********'; //Password
RS_WORLD = -1; //Desired World (-1 = Random)
IS_MEMBER = True; //True if your player is a Member

//Declare our variables
var
Walk: TRSWalker; //Used for RSWalker (to walk paths)

{************************************************* ******************************
Name: declarePlayers();
Function: Sets the proper variables using the constants above to allow
a successful login.
************************************************** *****************************}
procedure declarePlayers();
begin
with Players.New()^ do
begin
LoginName := LOGIN_NAME;
Password := LOGIN_PASS;
IsActive := True;
IsMember := IS_MEMBER;
World := RS_WORLD;
end;
Players.SetCurrent(0);
end;

{************************************************* ******************************
Name: setUp();
Function: Sets up the script by initializing everything and logging player in.
************************************************** *****************************}
function setUp(): boolean;
begin
SRL.Setup([]); //Setup SRL to allow us to access it's functions.
Walk.Init('world.png', -1); //Setup RSWalker by initializing the map we want to use
declarePlayers(); //Declare the player we are using

if (not SRL.isLoggedIn) then //If not logged in then..
begin
Players.LoginCurrent(); //Log player in
MainScreen.setAngle(True); //Sets the camera angle to the highest point
end;

Result := True;
end;

begin //Main
if setUp then
writeln('We are set up and ready to go!');
end.

daileyj93
11-29-2018, 02:25 PM
If Runescape isn't in "Fixed" mode, SMART won't interact with it at all. It just loads Runescape then does nothing. If this sounds like your problem, log in to RS manually, go to settings and set RS to "Fixed" mode. It should save the setting for future logins on that computer until you manually change it back to "Expandable" mode.