SRL Archive - Help

Dropping?


HippestTrip

2013-01-27 17:30:24

Heres ye olde script, ive got "dropall" i want.. dropall except first inv. spot how would i do this?



{$DEFINE SMART}
{$i srl/srl.simba}

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

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

procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
end;
end;
end;


procedure ChopTree;
var x, y: integer;
begin
repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3757669, 35) then
Mouse(x, y, 0, 0, false);
ChooseOption('hop');
repeat
wait(1200+random(250));
Until not IsUpText('ak') or (InvFull);
until(InvFull);
if InvFull then
DropAll
end;

begin
SetUpSRL;
Smart_ForceNew := true;
ActivateClient;
DeclarePlayers;
LoginPlayer;
ChopTree;
end.

Sjoe

2013-01-27 17:37:24

Try using
 (Text) 
Simba Brackets next time, it's more convenient :)

and here you are, procedure DropAllExcept(DontDrop: TIntegerArray);

you can find it in the function list

HippestTrip

2013-01-27 17:40:01

where do i add that? can you show me?

Sjoe

2013-01-27 17:42:23

From: HippestTrip
where do i add that? can you show me?


Replace Dropall with DropAllExcept([1]);

The Procedure is included in inventory.simba

HippestTrip

2013-01-27 19:30:21

how do i make this all repeat? like so it does a bunch of loads

Sjoe

2013-01-27 19:54:52

put this in your mainloop

begin
SetUpSRL;
Smart_ForceNew := true;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat // goes into a cycle
if not Loggedin then LoginPlayer; // Making sure we're logged in
ChopTree;
until(false) // Until(false) means it will repeat infinite, until you stop the script.
end.

if u wanna repeat it an amount of times u can use this:


begin
SetUpSRL;
Smart_ForceNew := true;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
if not Loggedin then LoginPlayer;
ChopTree;
Inc(Loads) // Inc adds 1 to loads done
until(LoadsDoing =< Loads) //If Loads is equal or more than LoadsDoing it will break out of the loop and continue with the mainloop.
TerminateScript; // Terminates the script after the loop.
end.

and put this above after {$i srl/srl.simba} and before procedure DeclarePlayers;:

const
LoadsDoing = 459; // does 459 Loads

var
Loads: Integer; // Need to declare the variable , variable is 0 by standard

Ian

2013-01-27 19:58:03

Repeat
ChopTree;
Until(InvFull) or (not LoggedIn);

those last things can be different, those are just some good ones to use :)