Log in

View Full Version : New to scripting (My first script!) Help



Panama
11-03-2012, 03:47 PM
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
11-03-2012, 04:38 PM
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
11-03-2012, 05:02 PM
Thanks alot, But whatabout the banking?

Rezozo
11-03-2012, 05:18 PM
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
11-03-2012, 07:51 PM
Mm kk. Btw is that even the right command? to wait until the rock is back ;C

Panama
11-03-2012, 08:06 PM
Is there any easier walking methods? Cause I dont understand anything about that..
Like moving to the "tile"?

Panama
11-03-2012, 08:37 PM
bum

Mark
11-03-2012, 08:38 PM
The methods suggested by lalaji are what you need choose one of them or two and practice.