SRL Archive - First Scripts

RS Worldz


random2818

2008-09-20 18:26:34

This script is pretty basic I know thats because it's my first (Truly). To make this run the run command shortcut must be directly above the log off, shutdown, I use Windows XP and use the classic start bar. Post any suggestions. Hoping to add a better opener in the future+ option for SMART opener.
Version 0.2 released
Version 0.3 released - bug update thanks to TheVoiceInYouorHead
Version 0.4 released - still has bugs with log in feature, suggestions will be appreciated. Only works for small RS windows.

bugs V0.2 : when you use SMART for no apparent reason it still opens and loads a normal rs window in your default browser any suggestions

bug V0.4 : you get this error we you get to the log in bit
[Runtime Error] : Exception: Access violation at address 6720138A in module 'Embedded SMART.dll'. Read of address 00000820 in line 48 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Misc\SMART.scar

TViYH

2008-09-20 18:33:40

Uber shortened:

program RSWorldz;
const
World = '126';
begin
OpenWebPage('http://world' + World + '.runescape.com/p0');
end.

random2818

2008-09-20 18:39:27

From: TheVoiceInYourHead
Uber shortened:

program RSWorldz;
const
World = '126';
begin
OpenWebPage('http://world' + World + '.runescape.com/p0');
end.


Thanks heaps I had forgotten the OpenWebPage command and spent ages looking for it. =)
Updated in V0.2

random2818

2008-09-20 19:32:38

Anyone have a suggestion on the bug for V 0.2 (posted on first post)?????

TViYH

2008-09-20 20:13:58

Mate, you have to make the script actually implement the stuff in SRL…
I'm fixing it now..

ED: There's no need for script stats if you don't use anything in the script that needs stats.

ED2:

program RSWorldz;
{.include SRL\SRL\Misc\SMART.scar}
{.include SRL\SRL.scar}

const
World = 38; //World number
UseSmart = True; //True if you want to use SMART

function LoadWorld: boolean;
begin
if UseSmart then
begin
begin
SmartSetupEx(World, True, True, False);
SetTargetDC(SmartGetDC);
repeat
Wait(100);
until(RsReady);
Result := True;
end;
end
else
begin
OpenWebPage('http://world' + IntToStr(World) + '.runescape.com/p0,s1');
repeat
Wait(100);
until(RsReady);
Result := True;
end;
end;

procedure Write;
begin
ClearDebug;
WriteLn('RS Worldz');
end;

procedure Setup;
begin
if LoadWorld then
Write;
end;

begin
SetupSRL;
Setup;
end.

random2818

2008-09-20 20:38:59

From: TheVoiceInYourHead
Mate, you have to make the script actually implement the stuff in SRL…
I'm fixing it now..

ED: There's no need for script stats if you don't use anything in the script that needs stats.

ED2:

program RSWorldz;
{.include SRL\SRL\Misc\SMART.scar}
{.include SRL\SRL.scar}

const
World = 38; //World number
UseSmart = True; //True if you want to use SMART

function LoadWorld: boolean;
begin
if UseSmart then
begin
begin
SmartSetupEx(World, True, True, False);
SetTargetDC(SmartGetDC);
repeat
Wait(100);
until(RsReady);
Result := True;
end;
end
else
begin
OpenWebPage('http://world' + IntToStr(World) + '.runescape.com/p0,s1');
repeat
Wait(100);
until(RsReady);
Result := True;
end;
end;

procedure Write;
begin
ClearDebug;
WriteLn('RS Worldz');
end;

procedure Setup;
begin
if LoadWorld then
Write;
end;

begin
SetupSRL;
Setup;
end.


Thanks but I think I might keep the SRL stats in. I'll update in next version.

TViYH

2008-09-20 20:40:44

Lol. You don't even have anything in the script that uses the stats.

You don't have any stats variable, stats sending procedures, anything.

random2818

2008-09-20 21:51:26

From: TheVoiceInYourHead
Lol. You don't even have anything in the script that uses the stats.

You don't have any stats variable, stats sending procedures, anything.


well I like to have it in there because it appeares on my SRL stats as one of my scripts. SO I like to keep it in there to show it's mine.

random2818

2008-09-20 22:12:35

New version released, still bugged, testing and fixing would be much appreciated.

TViYH

2008-09-21 00:46:03


program RSWorldz;

{.include SRL\SRL\Misc\SMART.scar}
{.include SRL\SRL.scar}

const
World = 38; //World number
UseSmart= False; //True to use SMART

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
end;

function LoadWorld: boolean;
begin
if UseSmart then
begin
begin
SMARTSetUpEx(World, True, True, False);
SetTargetDC(SMARTGetDC);
repeat
Wait(250);
until(RsReady);
Result := True;
end;
end
else
begin
OpenWebPage('http://world' + IntToStr(World) + '.runescape.com/p0');
repeat
Wait(250);
until(RsReady);
Result := True;
end;
end;

procedure Write;
begin
ClearDebug;
WriteLn(' __ ');
WriteLn(' __ ____ _____ __ / \ __ ______ __ ____ __ ________ ');
WriteLn(' | | / \ / ___ \ \ \ / /\ \ / / / \ | | / \ | | \____ \ ');
WriteLn(' | |/ \ / / \_\ \ \ / / \ \ / / / \ | |/ \ | | / / ');
WriteLn(' | __ / \ \ \ \ / / \ \ / / / || \ | __ / | | / / ');
WriteLn(' | / \ \ \ \ / / \ \ / / / || \ | / | | / / ');
WriteLn(' | _ / \ \ \ \ / / \ \ / / \ || / | _ / | | / / ');
WriteLn(' | / \ \ \ \ \ \/ / \ \/ / \ || / | / \ \ | | / / ');
WriteLn(' | | \ \ \ \ \ / \ / \ / | | \ \ | |________ \ \_______ ');
WriteLn(' |__| \__\ _____/ / \/ \/ \_______/ |__| \__\ |___________| \_________| ');
WriteLn(' |______/ ');
end;

procedure Setup;
begin
DeclarePlayers;
if PlayersActive>1 then
begin
WriteLn('Only use 1 player in the player array.');
TerminateScript;
end;
if LoadWorld then
Write;
end;

begin
SetUpSRL;
ScriptID := '1018';
Setup;
if UseSmart then
begin
WriteLn('Loaded, thank you for using RS Worldz');
end
else
LoginPlayer;
WriteLn('Loaded, thank you for using RS Worldz');
end.

random2818

2008-09-22 06:44:42

Thanks I'll update script later.

Rich

2008-09-22 16:07:50

TheVoiceInYourHead. Did you just script that yourself? If so, this might as well be your thread.

TViYH

2008-09-22 16:33:14

Lol. Yes, I did.

I just used a little bit of his concept.

Sorry? =/

gamemaste789

2009-04-16 05:46:49

thanks TviYh for the smart opener way faster than IE or firefox, hey how do u make it a free members instead of member

Markus

2009-04-16 14:56:24

09-22-2008, 09:33 PM
gravedig, closed