SRL Archive - Help

New to scripting (My first script!) Help


Panama

2012-11-03 11:47:18

Hey!
I just today started to think of making a clay miner that will bank and mine and repeat ^^

I have this so far:
program New;
{$DEFINE SMART}
{$i srl/srl.simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].BoxRewards := ['oins', 'oins', 'oins'];

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

procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Mining', 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 MineRock;
var x, y: integer;
begin
repeat
if FindObj(x, y, 'lay',7845078,35 ) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('ine');
end;
repeat
Wait(3000+random(250));
Until not IsUpText('ew') or (InvFull);
until(InvFull);
end;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
MineRock;
end.


But I am very new to walking and need some help with walking and banking, If ANYONE could help me it would be awesome!

Thanks

Lalaji

2012-11-03 12:38:03

Here are some walking methods…
SPS: http://villavu.com/forum/showthread.php?t=66266
ObjDTM: http://villavu.com/forum/showthread.php?t=68112&highlight=ObjDTM+tutorial
RadialWalking:http://villavu.com/forum/showthread.php?t=24303
http://villavu.com/forum/showthread.php?t=35494

Read a few tutorials, Pick a method and start working at it. Post questions if you are still having trouble.

You can also try to do a combination of methods just for failsafe.

Panama

2012-11-03 13:02:32

Thanks alot, But whatabout the banking?

Rezozo

2012-11-03 13:18:00

repeat
Wait(3000+random(250));
Until not IsUpText('ew') or (InvFull);

To


repeat
Wait(random(250)); //or take it out entirely
Until not (IsUpText('ew') or (InvFull));

The main part is the Repeat-Until. You don't need the wait. Without the wait, technically, it'll keep checking until it finds the inventory is full, or 'ew' uptext. If the wait is there, it'll wait an extra 3 some seconds, which is kinda 'unhuman' like to me.

Panama

2012-11-03 15:51:06

Mm kk. Btw is that even the right command? to wait until the rock is back ;C

Panama

2012-11-03 16:06:58

Is there any easier walking methods? Cause I dont understand anything about that..
Like moving to the "tile"?

Panama

2012-11-03 16:37:12

bum

Mark

2012-11-03 16:38:58

The methods suggested by lalaji are what you need choose one of them or two and practice.