SRL Archive - RS3 Help

Basic Question


Hitac

2015-03-28 11:58:32

Im pretty new to scripting. I have about 30 min of read time on: https://villavu.com/forum/showthread.php?t=109161 :P
I need your help, i wrote this to simply open bank:

program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}

procedure openbank();
begin
bankScreen.open(BANK_NPC_GREY);
wait(2000);
end;

begin
clearDebug();
setupSRL();
openbank();
end.


I start logged in but i only says this:

[00:00:02]: – setupSRL()
[00:00:02]: —- Setting up SRL…
[00:00:02]: —- attempting to spawn smart, attempt #: 1
[00:00:02]: —- initSmart():
[00:00:02]: —— Attempting to pair to a previously spawned client
[00:00:02]: —— smartPairToExistingClient():
[00:00:02]: ——– Found 1 free client(s), attempting to pair to one…
[00:00:02]: ———- smartSetAsTarget(): Succesfully set SMART[5020] as Simba's target
[00:00:02]: ——– Succesfully paired to a existing client, SMART[5020]
[00:00:02]: —— smartPairToExistingClient(): result = true
[00:00:02]: —— Succesfully initialized via pairing to a previously spawned client
[00:00:02]: —- initSmart()
[00:00:02]: —- Waiting up to 5 minutes for RS to load…
[00:01:02]: —- 1 minute(s) have passed, client is not ready yet

Fitta

2015-03-28 12:00:44

From: srpronto
Im pretty new to scripting. I have about 30 min of read time on: https://villavu.com/forum/showthread.php?t=109161 :P
I need your help, i wrote this to simply open bank:

program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}

procedure openbank();
begin
bankScreen.open(BANK_NPC_GREY);
wait(2000);
end;

begin
clearDebug();
setupSRL();
openbank();
end.

I start logged in but i only says this:

[00:00:02]: – setupSRL()
[00:00:02]: —- Setting up SRL…
[00:00:02]: —- attempting to spawn smart, attempt #: 1
[00:00:02]: —- initSmart():
[00:00:02]: —— Attempting to pair to a previously spawned client
[00:00:02]: —— smartPairToExistingClient():
[00:00:02]: ——– Found 1 free client(s), attempting to pair to one…
[00:00:02]: ———- smartSetAsTarget(): Succesfully set SMART[5020] as Simba's target
[00:00:02]: ——– Succesfully paired to a existing client, SMART[5020]
[00:00:02]: —— smartPairToExistingClient(): result = true
[00:00:02]: —— Succesfully initialized via pairing to a previously spawned client
[00:00:02]: —- initSmart()
[00:00:02]: —- Waiting up to 5 minutes for RS to load…
[00:01:02]: —- 1 minute(s) have passed, client is not ready yet


Wild guess.. Disable SMART before running the script :)

Hitac

2015-03-28 12:04:30

From: Fitta
Wild guess.. Disable SMART before running the script :)


Still not working :P Was that a joke right?

Hitac

2015-03-28 12:08:08

And when im in the lobby it says this:
– TRSBankscreen.__openNPC()
– TRSBankscreen.__openNPC(): result = False
– Succesfully freed SMART[5020]
Successfully executed.

KeepBotting

2015-03-28 12:09:32

Post screenshot of SMART window. If you're starting logged in, it should skip waiting for the client to load.

It's not, meaning it's not recognizing you as logged in. Most likely culprit for that is wrong interface setup.

Hitac

2015-03-28 12:12:12

[ATTACH=CONFIG]25404[/ATTACH]

KeepBotting

2015-03-28 12:13:49

From: srpronto
[ATTACH=CONFIG]25404[/ATTACH]


You need "Slim Headers" enabled, everything else looks right. Enable those and you'll be good to go.
@Fitta; out of curiosity why would disabling SMART before running the script do anything? SRL-6 will just enable SMART when Simba pairs, if it's not enabled already.

Hitac

2015-03-28 12:15:31

From: KeepBotting
You need "Slim Headers" enabled, everything else looks right. Enable those and you'll be good to go.
@Fitta; out of curiosity why would disabling SMART before running the script do anything? SRL-6 will just enable SMART when Simba pairs, if it's not enabled already.


Thanks. I've trying Runemate and i needed to disable Slim Headers and i completly forgot to enable now.

Fitta

2015-03-28 13:28:00

From: KeepBotting
You need "Slim Headers" enabled, everything else looks right. Enable those and you'll be good to go.
@Fitta; out of curiosity why would disabling SMART before running the script do anything? SRL-6 will just enable SMART when Simba pairs, if it's not enabled already.


It sure does not do that for me? Is it suppose to do that? Never have it disabled my SMART without me clicking it?

inb4: Ghost lives within these walls

Harrier

2015-03-28 13:29:11

From: Fitta
It sure does not do that for me? Is it suppose to do that? Never have it disabled my SMART without me clicking it?

There's a method for it, but it's not used in aerolib/reflection includes afaik

KeepBotting

2015-03-28 13:33:25

From: Fitta
It sure does not do that for me? Is it suppose to do that? Never have it disabled my SMART without me clicking it?

inb4: Ghost lives within these walls


Pretty sure it's only SRL-6 that does it, but upon pairing Simba to an instance of SMART, SMART will be enabled if it's not already so.

It won't ever disable without consent, only enable.

Hitac

2015-03-28 14:54:51

From: KeepBotting
Pretty sure it's only SRL-6 that does it, but upon pairing Simba to an instance of SMART, SMART will be enabled if it's not already so.

It won't ever disable without consent, only enable.


I just got home and i wanted to know if i remember anything so i created this:

program Surprise;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}

procedure WithdrawItems();
begin

if bankScreen.open(BANK_NPC_BLUE) then
begin
bankScreen.clickButton (BANK_BUTTON_PRESET_1);

end;

begin
clearDebug();
setupSRL();
WithdrawItems();
end.


But this is not working properly. It opens the bank but it doesn't click '1' for the preset.

KeepBotting

2015-03-28 15:03:45

From: srpronto
I just got home and i wanted to know if i remember anything so i created this:



But this is not working properly. It opens the bank but it doesn't click '1' for the preset.


Try something like this:


program new;
{$define smart}
{$i srl-6/srl.simba}

procedure WithdrawItems();
begin
if bankScreen.open(BANK_NPC_BLUE) then
if bankScreen.isOpen() then
begin
wait(250 + random(100));
bankScreen.clickButton(BANK_BUTTON_PRESET_1); //you had a space before the (
end;
end;

begin
clearDebug();
setupSrl();
withdrawItems();
end.

Also make sure your bankscreen interface is in the default spot (re-choose the Old School interface preset if you're not sure)

Hitac

2015-03-28 15:09:46

The "wait(250 + random(100));" is the same as "randomRange(min, max)" procedure?

Hitac

2015-03-28 15:17:03

From: KeepBotting
Try something like this:


program new;
{$define smart}
{$i srl-6/srl.simba}

procedure WithdrawItems();
begin
if bankScreen.open(BANK_NPC_BLUE) then
if bankScreen.isOpen() then
begin
wait(250 + random(100));
bankScreen.clickButton(BANK_BUTTON_PRESET_1); //you had a space before the (
end;
end;

begin
clearDebug();
setupSrl();
withdrawItems();
end.

Also make sure your bankscreen interface is in the default spot (re-choose the Old School interface preset if you're not sure)


Still doesn't click '1' for the preset i don't know why. Everything is correct in the code but i only opens the bank and stays there.