SRL Archive - Help and Support

Taking account list from page


xtrapsp

2012-10-13 12:32:31

Hey guys,

Recently I made this:

http://minepress.co.uk/accounts.html

and this is my simba script to test it:

program new;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
var
PlayerID :integer;
Squealopen,Subclose, Convert, YesConvert, AddSpins, DoneButton, GreenButton, ClaimButton, NoSpins, Playagain :integer;
emails: string;
Open: Boolean;
TotalGP, Spins, i: integer;
PlayerNames :TStringArray;


procedure DeclarePlayers;
begin
HowManyPlayers := 1; // Number of Players to use
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; // Player to start with, first one is 0
Players[0].Name := PlayerNames[PlayerID];
Writeln(Players[0].Name);
Players[0].Pass := 'passwordhere'; // Password
Players[0].Active := True; // True if you are using this player
Players[0].Pin := ''; // Bank Pin. Leave it if you don't have one.
Players[0].Integers[1] := 10000; // Number of Accounts to sign into
end;

begin
PlayerNames := [getPage('http://minepress.co.uk/accounts.html')];
SetupSRL;
for i := 0 to High(PlayerNames) do
begin
DeclarePlayers;
LoginPlayer;
writeln('log in initiated');
wait(10000);
end;
end.


What it's doing is putting the username in correctly and then putting the password in as a username even though the password in declare players is correct.

Any ideas?


edit: Got it semi-working

PlayerNames := [Between(',',',', getPage('http://minepress.co.uk/accounts.html'))];

litoris

2012-10-13 13:26:19

The problem is probably because you do a plain getpage. You should create an array of strings from the data from the page (use regex or other string handling commands) and then go through them one by one.

Home

2012-10-13 13:26:54

program new;
{$DEFINE SMART}
{$I SRL/SRL.Simba}

var
PlayerNames: TStringArray;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Pass := 'Password';
Players[0].Active := True;
Players[0].Pin := '';
Players[0].Integers[1] := 10000;
end;

function GetNames(Source: string): TStringArray;
begin
Result := Explode(',', GetPage(Source));
end;

var
I :Integer;

begin
PlayerNames := GetNames('http://minepress.co.uk/accounts.html');
SetupSRL;
DeclarePlayers;
for I := 0 to High(PlayerNames) do
begin
Players[CurrentPlayer].Name := PlayerNames[I];
LoginPlayer;
end;
end.

I kinda rewrote it. Merge this with your current script. Hit me up if you don't understand something.
Please note that this works for how is your Website format currently.

~Home

P.S Good luck on spins ;)

J J

2012-10-13 13:32:15

I'm not sure if Home' code works already but here is how far I got. Off to a party now and was just eating and there were some replies inbetween.
program New;
{$DEFINE SMART}
{$i SRL/srl.simba}

var
PlayerNames: Array[0..99] of String;
N: Integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := PlayerNames[N];
Pass := '123456789';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Hitpoints;
Active := True;
end;
end;

procedure GetAccounts;
var
BigString, s: String;
Names: TStringArray;
i, L, Comma1, Comma2: Integer;

begin
BigString := GetPage('http://minepress.co.uk/accounts.html');
writeln(BigString);
for i:=0 to Length(BigString) do
if (BigString[i] = ',') then
begin
L := Length(Names);
SetLength(Names, L+1);
Comma1 := Comma2;
Comma2 := i;
for i:=Comma1 to Comma2 do
s := s + BigString[i];
Names[L] := s;
end;

for i:=0 to high(Names) do
writeln('Name ' + IntToStr(i) + ': ' + Names[i]);
end;


begin
// Setting up Simba
SetupSRL;
GetAccounts;

for N:=0 to High(PlayerNames) do
begin
DeclarePlayers;
LoginPlayer;
Writeln('log in initiated');
Wait(10000);
end;
end.

xtrapsp

2012-10-13 13:35:24

Well tyvm to Home, He provided a fix to my one which wouldn't login to the next account :)

Thanks for JJ for allowing me to see his method :P

and thanks to litoris for explaining a method :)

Thats the reason this community rules


Also a big thanks to Olly for helping me repeatedly with this project :3