SRL Archive - First Scripts

My first Script, SimpleStinger


simsaladin

2009-02-21 08:05:15

This is my first script. It's quite basic stringer, it doesn't (atleast not yet) have antirandoms but it moves mouse and rightclicks randomely while stringing.

//This is my first script so it's quite basic but it works! -Simsaladin
//HOW TO USE: Have the bows(u) and the bowstrings in two first slots in your bank and Set Up line 16

program SimpleStringer;
{.include srl/srl/misc/Smart.scar}
{.include SRL/SRL.scar}

var
x, y, BowCount, Loads:integer;

const
Swordcolor = 10264383; //Used to check is bow combined with string
LoadsToDo = 50; //Declare how many loads you want to do

procedure bank;//Banks all in inv and takes 14 bows and bowstrings
begin
Writeln('banking...')
OpenBankQuiet('veb');//change the bank you are in://'feb' (Falador East Bank)
wait(700+random(200)); //'fwb' (Falador West Bank)
DepositAll; //'veb' (Varrock East Bank)
Withdraw(1,1,14); //'vwb' (Varrock West Bank)
Withdraw(2,1,14); //'db' (Draynor Bank)
CloseBank; //'eb' (Edgeville Bank)
Writeln('Banking done'); //'akb' (Al-Kharid Bank)
end;

procedure stringbow;//strings the bows
begin
repeat
Mouse(576, 229, 5, 5, true);
wait(700+random(200));
Mouse(705, 445, 5, 5, true);
wait(700+random(200));
until(findColorTolerance(x,y,Swordcolor,33, 370,39, 376 ,7));
wait(700+random(200));
Mouse(258, 421, 5, 5, false);
wait(600+random(150));
ChooseOption('All');
writeln('Stringing...');
SleepAndMoveMouse(6000+random(400));
RandomRClick;
SleepAndMoveMouse(11000+random(400));
Writeln('Stringing done');
Loads:= (Loads + 1);
BowCount:= (BowCount + 14);
end;

procedure ProgressReport;//Progress Report
begin
ClearDebug;
Writeln('/\/\/\/\/\ProgressReport/\/\/\/\/\/\/\/\');
Writeln('/\ /\');
Writeln('/\ Time Running | ' + TimeRunning);
Writeln('/\ Loads done | ' + IntToStr(Loads));
Writeln('/\ Bows Strung | ' + IntToStr(BowCount));
Writeln('/\ Exp earned | ' + IntToStr(BowCount * 75));
Writeln('/\ /\');
Writeln('/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\')
end;

begin//Mainloop
SetupSRL;
Smartsetupex(138, true, true, false);
Settargetdc(smartgetdc);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
repeat
bank;
stringbow;
ProgressReport;
until(Loads = LoadsToDo);
end.

ian.

2009-02-21 18:21:25

oh noes! use Mouse instead of MoveMouseSmoothEx and ClickMouse.. those are bannable..

Aser

2009-02-24 22:59:40


begin//Mainloop
SetupSRL;
repeat
ClearDebug;
bank;
stringbow;
BowCount:= (BowCount + 14);
Writeln('Stringed ' + IntToStr(BowCount) + ' bows')
until(false);
end.

That will/should make it display the total number of bows that have been strung.

ClearDebug will clear the text area so that it doesn't get to cluttered with 'stringing…' and 'stringing done'

Try making a cool progress report. There are a few tutorials on doing that.

Like 99_ said, use Mouse instead of ClickMouse or MoveMouse. They will get you banned.

Mouse(x,y,XRandom,YRandom,RClick);

Also like you said, antiban and randoms. Search for a tutorial on cases for the antiban.

…By the way, congratulations on your first script.

simsaladin

2009-02-25 17:27:33

Okay, I added proggy, changed MoveMouseSmoothEx->Mouse and other little things plus made Smart compatible.

I still need to add some antibans and randoms but it's 0:30 am here in finland and school tomorrow so it's bedtime now.

I've also been kind of busy last few days so i haven't had time for scripting or browsing forums:(

runeman666

2009-02-25 19:55:02

Do you have to be a member to use this script?

Aser

2009-02-25 20:25:02

Well because fletching is a members only skill…you would have to have a members account for it to work correctly.

You can try to run it on a free account if you want, but it won't do anything but get you banned.


until(Loads = LoadsToDo);

should be


until((Loads + 1) > LoadsToDo);

This saves you if SCAR some how glitches and doesn't check the until or if it adds more than one. I don't know if this is still a problem but with the older versions of SCAR you had to be careful about it.

Next I would look into DeclarePlayers procedure. This allows you to have multiple accounts or login accounts that get logged out for any reason. It also allows you to do antirandoms.

P.S. Anti randoms are broken right now… so you may have to wait a while.

southpaw63

2009-02-25 20:58:28

i might try it it looks good

ian.

2009-02-28 12:21:59

you don't need Loads + 1.. use until(Loads >= LoadsToDo); or until(Loads >= (RandomRange(LoadsToDo-5, LoadsToDo+5))); for more randomness :)

simsaladin

2009-03-04 03:52:44

How is DeclarePlayers procedure related to Antirandoms?

I'm working on DTMs right now (just learned them:)) and adding more randomness. Also looking for those cases…

ian.

2009-03-04 04:06:15

DeclarePlayers is related to antirandoms because of nicknames.. :)

Scettidunn

2009-03-04 04:09:40

wow man congrats on your first script im still working on mine hope to have it done this week

simsaladin

2009-03-04 04:55:09

Okay, I think i get it, with nick SRL antirandoms can search for talking randoms(correct if im wrong).

Btw, does anyone know when antirandoms get updated? I guess they are quite broken right now..?

Thanks Scettidunn. I have tried to understand scripts and scar for about an year now, but until now I have begun to understand them:o

ian.

2009-03-04 04:58:09

You're right :D

but yes.. randoms are down atm and the biggest problem is GETTING the randoms to do the solvers :\

simsaladin

2009-03-04 05:12:55

yeah, I alched 2k yew longs in one run with very basic alching script and i didn't get a single random… so, on the other hand randoms update is good because you get less randoms:rolleyes: