SRL Archive - General Botting Help

How to login using SIMBA


twirap

2014-08-05 20:04:04

I am trying to get a fix for the 6 hour botting limit. New to SIMBA so I have been stuck on writing this code from a while with many failed attempts and errors.

Here is what I have so far:

procedure DeclarePlayers;
begin


CurrentPlayer := 0;
Players[0].Name := 'usrname';
Players[0].Pass := 'pass';
Players[0].Pin := '';
Players[0].Active := True;
end;





In main loop:

DeclarePlayers;
Players[0].login();





Error that I get:

Exception in Script: Unknown declaration "Name" at line 257, column 13

Exception in Script: Unknown declaration "LoginPlayer" at line 322, column 11

Exception in Script: Unknown declaration "Name" at line 257, column 13

TylerT

2014-08-05 20:19:45

I use this, its pretty basic but it works.

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'email'; //Change this to your login
password := 'password'; //Change this to your password.
isActive := true;
isMember := false;
end;
currentPlayer := 0;
end;

and in the mainloop:

declarePlayers();
players[currentPlayer].login();
clearDebug();

twirap

2014-08-05 20:32:53

Thank you for the quick help! I was googling around some more after I posted this and got re-routed to Mayor's first tutorial and it had login instructions. I was getting the Rafiki crash problem so further googling revealed the path problem which I fixed…Now it is time to figure out the world switching at 6 hour benchmark. :D

There is one thing that is kind of upsetting…I keep running into – WARNING: bankscreen.withdraw(): Invalid slot 1 but I don't even see smart pointing at the slot 1…What is going on with it?

On second thought, I just realized the darn treasure hunter logo that pops up after login is what was causing that error.

TylerT

2014-08-05 21:03:45

From: twirap
On second thought, I just realized the darn treasure hunter logo that pops up after login is what was causing that error.


Add this to the your script and place it early on in your mainloop, it'll take care of that :)

Function FindNormalRandoms: Boolean;
Begin
Result:= ExitSquealOfFortune Or ClaimSpinTicket;
End;

I stripped that from Mayors VEB Miner but its pretty common in any script.

EDIT: Here is another version of the same thing, from Ashamans Herblore script
Procedure FindNormalRandoms;
Begin
ExitSquealOfFortune;
ClaimSpinTicket;
End;

KeepBotting

2014-08-05 21:32:29

Using the player manager:



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

const
playerNames = ['']; //Put your player's name (or nickname, if you set one) here.
playerFile = 'default'; //Put your playerfile's name here. Default is 'default'.
desiredWorld = 0; //Enter your desired world number here.

procedure initScript();
var
i:integer;
begin
clearDebug();
smartEnableDrawing := true;
smartShowConsole := false;
smartPlugins := ['opengl32', 'd3d9.dll'];
writeLn('Spawning SMART client...');
setupSrl();
disableSrlDebug := true;
players.setup(playerNames, playerFile);
currentPlayer := 0;
for i := 0 to high(players) do
begin
players[i].world := desiredWorld;
players[i].isActive := true;
writeLn('Logging in...');
end;
begin
if (not players[currentPlayer].login()) then exit;
exitTreasure();
writeLn('Setup complete - player is logged in.');
end;
end;

begin
initScript();
end.


twirap

2014-08-05 21:37:33

Thank you all. I got the code working for switching worlds if it is logged out. I felt though that it may not be that safe to switch worlds only when the update logs me out so I used a timer to detect when it is nearly 5 hours since botting (used modulus 18000000 + random time between 30000 and 70000) and it logs out before it hits that mark and changes world then logs in. This way I won't be hitting the update time to switch worlds. Maybe it is safer.

Thanks for all the help!

KeepBotting

2014-08-05 21:42:40

From: twirap
Thank you all. I got the code working for switching worlds if it is logged out. I felt though that it may not be that safe to switch worlds only when the update logs me out so I used a timer to detect when it is nearly 5 hours since botting (used modulus 18000000 + random time between 30000 and 70000) and it logs out before it hits that mark and changes world then logs in. This way I won't be hitting the update time to switch worlds. Maybe it is safer.

Thanks for all the help!
It's perfectly fine to do that, but if you want to use a different way, SRL will automatically reload the client if it tries to login and encounters the "game session ended" login response.

To make this work, just put
is not isLoggedIn() then
exit;
at the start of every procedure, and then
  if (not isLoggedIn()) then
players[currentPlayer].login();
somewhere in your mainloop so that it is called every time it loops

The Mayor

2014-08-05 22:21:54

This won't work atm due to world switching being broken after the lobby update a few days ago, but you can switch worlds using:

players[currentPlayer].switchToWorld(50);

That will logout the player, switch world, and then log them back in, but as I said it won't work until the lobby is fixed.

twirap

2014-08-06 11:20:04

Is there no way for now to get around the logout ? Last night smart's login was working now it will just sit there and wait for client to load even though client is loaded already.


Stuck at

—— Succesfully initialized via spawning a new client
—- initSmart()
—— smartSetupDrawing(): Succesfully setup SMART drawing
—- Waiting up to 5 minutes for RS to load…

twirap

2014-08-08 15:33:18

From: The Mayor
This won't work atm due to world switching being broken after the lobby update a few days ago, but you can switch worlds using:

players[currentPlayer].switchToWorld(50);

That will logout the player, switch world, and then log them back in, but as I said it won't work until the lobby is fixed.


Now they keep giving lobby updates/logout every 2 hours or so….It used to be 6 before.