SRL Archive - First Scripts

IronPowerMiner! by Laimonas171


Laimonas171

2008-12-05 13:26:57

IronPowerMiner, Tested in rimington,
like first script whithout a lot knowledge works fine.

i it is usefull Press REP+ Button :) thank you

^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Consider, and the fact what here is my
FIRST AUTOING SCRIPT by SCAR
START LOGED OUT
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SirPa

2008-12-05 14:10:18

Looks like a pretty nice first script, but there is allot of room for improvements.

Let me start here:


// oooooooooooo0000 < Laimonas171 First IronPowerMiner > 0000ooooooooooooo \\
Procedure Prisijungimas; //login procedure
begin
cleardebug;
Mouse (401,186,1,1,true);
wait(750+Random(1200));
WriteLn('Wait a second scar trying to login... :P')
Mouse (444,285,1,1,true);
Wait(750+Random(1200));
TypeSend(username);
wait(1000+Random(200));
TypeSend(password);
wait(4000+Random(2000));
Mouse (377,330,1,1,true);

This can simplified allot, using the following function in your mainloop / setup:


DeclarePlayers;
LoginPlayer;


Next thing, the mining procedure:


begin
FindColor(X, Y, OreColor, 3, 3, 516, 337);
Mouse(X, Y, 3, 3, False);
Wait(300 + Random(200));
ChooseOption('Mine');

end;

Pretty much nothing wrong here, except the colors in rs change allot, thats why you need a Tolerance in finding the colors. Like so:


begin
FindColorTolerance(X, Y, OreColor, MSX1, MSY1, MSX2 ,MSY2, 5); // ALso select the main RS screen, so no more coordinates ;)
Mouse(X, Y, 3, 3, False);
Wait(300 + Random(200));
ChooseOption('Mine');

end;

On to the antirandoms.
You are using the (old) FindFastRandoms function. However you can use the following function to also do everything that FindFastRandoms does, and more.

 FindNormalRandoms:


As a final thing you should change your mainloop a little, maybe like this


procedure mainloop;

begin
SetUpSRL;
Disguise('-=IronPowerMiner by Laimonas171=-')
ClearDeBug;
Parasas;
ActivateClient;
DeclarePlayers;
LoginPlayer;
Pradzia;
repeat
Kasineja;
FindNormalRandoms;
ZmogausJudesys;
Wait(1500 + Random(2200));
If (InvFull) then
MetoRuda;
Wait(1000);
until (false)
end;

Glad to help :)

~Sir

Laimonas171

2008-12-05 15:05:31

From: SirPa
Looks like a pretty nice first script, but there is allot of room for improvements.

Let me start here:


// oooooooooooo0000 < Laimonas171 First IronPowerMiner > 0000ooooooooooooo \\
Procedure Prisijungimas; //login procedure
begin
cleardebug;
Mouse (401,186,1,1,true);
wait(750+Random(1200));
WriteLn('Wait a second scar trying to login... :P')
Mouse (444,285,1,1,true);
Wait(750+Random(1200));
TypeSend(username);
wait(1000+Random(200));
TypeSend(password);
wait(4000+Random(2000));
Mouse (377,330,1,1,true);

This can simplified allot, using the following function in your mainloop / setup:


DeclarePlayers;
LoginPlayer;


Next thing, the mining procedure:


begin
FindColor(X, Y, OreColor, 3, 3, 516, 337);
Mouse(X, Y, 3, 3, False);
Wait(300 + Random(200));
ChooseOption('Mine');

end;

Pretty much nothing wrong here, except the colors in rs change allot, thats why you need a Tolerance in finding the colors. Like so:


begin
FindColorTolerance(X, Y, OreColor, MSX1, MSY1, MSX2 ,MSY2, 5); // ALso select the main RS screen, so no more coordinates ;)
Mouse(X, Y, 3, 3, False);
Wait(300 + Random(200));
ChooseOption('Mine');

end;

On to the antirandoms.
You are using the (old) FindFastRandoms function. However you can use the following function to also do everything that FindFastRandoms does, and more.

 FindNormalRandoms:


As a final thing you should change your mainloop a little, maybe like this


procedure mainloop;

begin
SetUpSRL;
Disguise('-=IronPowerMiner by Laimonas171=-')
ClearDeBug;
Parasas;
ActivateClient;
DeclarePlayers;
LoginPlayer;
Pradzia;
repeat
Kasineja;
FindNormalRandoms;
ZmogausJudesys;
Wait(1500 + Random(2200));
If (InvFull) then
MetoRuda;
Wait(1000);
until (false)
end;

Glad to help :)

~Sir

Tnaks alot for correcting :)

Sandstorm

2008-12-05 15:13:48

Another thing. Your procedure names are random stuff right now, try and make them meaningful. It helps to debug the script, as well as easily let's other people browse it :).

SirPa

2008-12-05 15:15:36

I dont think they are random stuff ;)
He is from Lithuania so i think he gave them Lithuanian (sp?) names, so he can remember what they do better :)

~Sir

Sandstorm

2008-12-05 15:25:21

From: SirPa
I dont think they are random stuff ;)
He is from Lithuania so i think he gave them Lithuanian (sp?) names, so he can remember what they do better :)

~Sir


Oh, wow. I didn't know that, I'm so sorry! It looked like nonsense to me, lol :/.

Laimonas171

2008-12-05 15:48:24

From: SirPa
I dont think they are random stuff ;)
He is from Lithuania so i think he gave them Lithuanian (sp?) names, so he can remember what they do better :)

~Sir


yes it is. :) i remmeber and english stuff, but here is people from lithuania so i thinked what they can learn something maybe :)

Tickyy

2008-12-09 12:26:47

SetChat('Off', 1);
SetChat('Off', 2);
SetChat('Off', 3);
SetChat('Off', 4);

I don't Recommend that… it looks very Boty, and rly easy to detect.

Laimonas171

2008-12-09 13:41:06

From: Tickyy
SetChat('Off', 1);
SetChat('Off', 2);
SetChat('Off', 3);
SetChat('Off', 4);

I don't Recommend that… it looks very Boty, and rly easy to detect.


Wizzup? Ess miner script fragment.

 GetAllLevels;
SetChat('on',1);
SetChat('friends',2);
SetChat('on',3);
SetAngle(True);
it looks very Boty, and rly easy to detect.

lol sure.. way not… but anyway i dont think so :P

Blumblebee

2008-12-09 16:34:25

acutally, i think hes refering to you turning off every chat, not the fact that your using setchat.

oh and i have a couple pointers…

1.
Procedure Prisijungimas; //login procedure
begin
cleardebug;
Mouse (401,186,1,1,true);
wait(750+Random(1200));
WriteLn('Wait a second scar trying to login... :P')
Mouse (444,285,1,1,true);
Wait(750+Random(1200));
TypeSend(username);
wait(1000+Random(200));
TypeSend(password);
wait(4000+Random(2000));
Mouse (377,330,1,1,true);

{ Why is this space here? }



end;

that can easily be


begin
if not logged in then
LogInPlayer;
end;

2. Your standards are not good at all. I reccomend working on that, as it makes the script more readable, and looks nicer too ;) Also, theres alot of wasted space in the script, Your coding could be shortened and look more efficient.

3.
function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 5 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
end;
end;
4: RC;
5: Respond;
end;
wait(1);
end;
end;

erm should/can be
findnormalrandoms;

(in otherwords, the procedure is uneeded)

4. I like the fact that you used a mainloop, it looks nicer imo, so gj.

5.
const
username= 'your username' ;// <<-- Type here USERNAME
password= 'your password' ;// <<-- Type here PASSWORD

try using declare players instead. Which would look a little something like…

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

SetVars;

SRLID := mySRLID;
SRLPassword := mySRLPass;

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

SetPlayerNameTPAs;
end;

and remeber to call upon declare players in your mainloop.

6. I like your antiban, but may i suggest you add some other things to it, like randomrightclick; boredhuman; gametab(randomrange(1, 12); or something along those lines.

looks very good for a first script, those are more suggestions and things to consider/improve. I hope some of the things i pointed out havent been said already :/

-Blumblebee

simpalean

2008-12-15 16:27:04

hmm…complicated

deathlord221997

2008-12-15 23:04:41

nice!!
i am new and i really like the forums keep up the good work man!!

scrapmetal

2008-12-16 00:55:40

Does it have to be in rimmington to work properly?

Laimonas171

2009-01-12 11:24:06

From: scrapmetal
Does it have to be in rimmington to work properly?


nope i think just choose color at top scirpt

Sedin Mahmutagic

2009-01-18 01:30:38

Sorry but i cant even get it to work :D