SRL Archive - OSR Help

What is Setupsrl ?


marc2333

2012-12-10 13:43:45

I am making bots for private servers so i need to use alot of positions in my bots, but the positions of things seems to change alot in the main screen and i dont know why.

In fact, i think it is because i dont use SetUpSrl in my script. I have never really used it because the first time i tried scripting with this, all the positions i was getting were wrong (almost always +/-20).

And yes i do use the green cross air on client before getting my positions.

Would it be possible to explain me whats wrong with me ^^

I hope this was clear, if not i'll try explain it in an other way

Marc

The Killer

2012-12-10 13:54:14

{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Last Edit: 22 June 2010 -- Nava2
Description: Sets up all variables needed to run SRL.
*******************************************************************************}

procedure SetupSRL;
var
t: Integer;
begin
{$IFNDEF SMART}
{$IFDEF SIMBA}
if (not IsTargetValid) then
srl_Warn('SetUpSRL', 'Target client is not valid! ' +
'Drag the crosshairs over the target client.', warn_Terminate);
{$ENDIF}
{$ENDIF}
SetupBoxes; //Sets up box variables in globals.simba
t := GetTimeRunning;
MouseSpeed := 15;
{$IFDEF UseLaptopMouse}LMouse_MissChance := 75;{$ENDIF}
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;

// these need to be removed eventually (no longer used)
SRL_OnFindRandomCall := nil;
LampSkill := 'mining';

//SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadSRLBitMaps;
LoadSRLFonts;
{$IFNDEF SRL_RANDOMS_TEST}
_SetRandoms();
{$ENDIF}
SetupSRLAutoResponder;
SRL_RandomScreenShot := False;
UseFindMod := True;
LogoutOnMod := True;
UseFindTrade := True;
UseAutoResponder := True;
GraphicsSet := False;
AllowPVP := False;
SRL_DisableIPLog := false;
SRL_SavePath := includePath + 'SRL/logs/';
SRL_StartTime := theDate(DATE_MONTH)+' at '+theTime;
WarnSensitivity := -2;
SetupAutoColors;

{$IFDEF LoadExtraFonts}
srl_UpdateFonts(srl_FontsUp2date);
{$ENDIF}

AddOnTerminate('FreeSRL');
SetSupressExceptions(true);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning - t) + ' msec');

{$IFDEF SRL_SMART}
{$IFDEF SIMBAMAJOR980}
if (Smart_Server = 0) then
begin
Smart_Server := RandomWorld(Smart_Members, False);
Smart_Signed := True;
Smart_SuperDetail := False;
end;
Writeln('SMART Initialized.' + #10 + 'Loaded: Server ' + IntToStr(Smart_Server) + ', Members: ' + BoolToStr(Smart_Members)
+ ', Signed: ' + BoolToStr(Smart_Signed) + ', Super Detail: ' + BoolToStr(Smart_SuperDetail) + '.');
SmartSetupEx(Smart_Server, Smart_Members, Smart_Signed, Smart_SuperDetail);
SetTargetArray(SmartImageArray, 765, 553);
{$ELSE}
SetupSmart(Smart_ForceNew);
if (SRL_SixHourFix) then
SRL_Procs[srl_OnRSUpdate] := @SixHourFix;
{$ENDIF}

repeat
{$IFNDEF SIMBAMAJOR980}
{$IFDEF SMART}
If Smart_FixSpeed then
FixSmartSpeed;
{$ENDIF}
{$ENDIF}
Wait(100);
if (GetTimeRunning - t) > 120000 then
Break;
until(RSReady);
{$ENDIF}

SetupGauss;
SRL_ResetNavBar;
Proc_WorldSwitcherEnabled
end;

{$ifdef CompileSRL}
begin
SetupSRL;
end.
{$endif}

{$ifdef LAPE}
begin
SetupSRL;
end.
{$endif}
that's what it does to be precise :P It basically sets everything up for botting in runescape. Certain parts are not be requried for Rsps

footballjds

2012-12-10 14:03:03

marc,

If you use the color picker to grab coordinates from runescape you'll need to subtract 50 from the y value.

Olly

2012-12-10 14:57:02

From: footballjds
marc,

If you use the color picker to grab coordinates from runescape you'll need to subtract 50 from the y value.


Actually I believe its -22 because you aren't logged in (lobby offset)

footballjds

2012-12-10 14:58:53

From: Ollybest
Actually I believe its -22 because you aren't logged in (lobby offset)


how you know he wasn't logged in?

marc2333

2012-12-10 15:17:25

From: Ollybest
Actually I believe its -22 because you aren't logged in (lobby offset)


Yea its something like this i found but i wanted to know why this was happening. And if setupsrl would fix my probleme of coordinations that keep changing.

marc2333

2012-12-10 15:18:31

From: footballjds
how you know he wasn't logged in?


Because i am on rsps so i can't use the login thing

riwu

2012-12-16 09:04:15

Don't call SetupSRL if you are scripting for private server/non-official RS stuff, or if you must, call SRL_EnableNavBar after it.

I agree that this is an annoying issue when scripting for official RS and sometimes i forgot to subtract 50 off the manually picked coordinates too. Thankfully i think they removed it in SRL 6 such that you simply use the picked coordinates. (i.e. adding 50/22 to all y-coordinates of srl functions)

marc2333

2012-12-16 19:09:54

Yea, thats what i am doing now..

xtrapsp

2012-12-17 09:37:12

marc, if your unsure of what something means hold ctrl and click it. Chances are it'l open the include :)

DannyRS

2012-12-17 10:06:10

From: xtrapsp
marc, if your unsure of what something means hold ctrl and click it. Chances are it'l open the include :)


you sir, deserve more rep than i can give you. no more searching the functions list for includes >.<

Shortcutzzz!!