SRL Archive - First Scripts

[SRL4]AutoAlcher


r4z0rlike

2008-01-27 15:55:21

r4z0rs auto alcher!

Version 1.5


Instructions:
* Have SRL 4.0 and Revision 10 installed.
* Have enough runes to cast High Alchemy.
* Set up the script in lines 37-53
* Go somewhere without randoms! (Duel Arena, Games Room)
* Post proggies and report any bugs please!

JAD

2008-01-27 17:05:57

OK, here we go.

First of all, my eyes!! Please learn proper standards :)


var
x1,y1,x2,y2: Integer;
AlchTimes: Integer;
HighAlch: Integer;
Report: integer;
Log: Integer;

equals


var
x1,y1,x2,y2,AlchTimes,HighAlch,Report,Log: Integer;

just a 4 line code shortener.

Put your then's on the same line as your if's. Makes it less confusing to read through.

I don't completely get your navigation procedure?

if(AntiBan=true)then equals if(AntiBan)then

Your antibanz procedure will never do #5. It random(5) picks random number between 0 and 4. Just subtract 1 from each of the numbers in your case.

same thing with the case within your 5th thing. Fix the numbers.

In your alching procedure, if(not(LoggedIn))then Exit; would be appropriate.

Maybe some more if's in there in case something goes wrong too? The more Fail safes the better.

For your alching procedure I think you should call for a game tab each time too, shouldn't you?

Writeln('Taking a break for '+IntToStr(WaitTime*1000)+'MInutes'); You don't need to *1000 there :p it would say waiting for 5000 minutes when actually it's only going to wait for 5.


If(AntiBan=true)then
begin
case random(15) of
1: AntiBanz;
end;
end;

could be


if(AntiBan)then
if(random(15) = 1)then
AntiBanz

I didn't see you use multi player either?

You could probably use anti randoms too because I'm pretty sure you get randoms when alching.


Mouse(x2, y2, 0, 0, true);
wait(1400+random(70));

That will ban you… 70 milliseconds isn't enough randomness, and 0,0 for the random parameters means it will click in the EXACT same spot EVERY time! 5 minutes of this script will get you banned.



Good job though! Just keep reading and learning, try to fix the things I pointed out and this script is on it's way to perfection! :)

Good luck!

r4z0rlike

2008-01-28 01:59:53

Thanks alot! I'm currently trying to master scripting standards but I still have a long way to go :p.
I fixed the cases and I'm gonna see if I can put more failsafes in it, I also fixed the WaitTime :p.

Perhaps I'm gonna look into Multiplayer in a while, but for now I'm gonna learn the basics first.
* Go somewhere without randoms! (Duel Arena, Games Room)

You really don't get any randoms at those spots. I alched for 1 hour straight at the games room, without any random.

I fixed the random wait times to 200, I hope that that is enough?
As for the clicking. When I alch, I don't move my mouse. I keep clicking on the same spot. I don't know if I actually do move my mouse, but that the difference is just a few pixels? Also, I removed randoms clicking because it kept going to far north, and clicking the wrong spell. Once I have something to alch, I'll try getting the random clicking, without it clicking the spell above.

As for the Navigation procedure:
Procedure Navigation;
begin
Gametab(7); //Opens Gametab 7 (The mage book)
HighAlch := BitmapFromString(8, 7, 'z78DA8D8C410E80300' +
'804BF4401518F4ACBFF9FA4662F18522387095966594CBB323DD3' +
'868D35EC74672710F96DA86CE0CC0485BCC9AB559D6C66A205D6E' +
'43FE30823CFAC57EC9D3BD35EFDD907F8DFAD0B7B9148EE');
if FindBitmapToleranceIn(HighAlch, x1, y1, MIX1, MIY1, MIX2, MIY2, 50)
then Cleardebug else //I changed this part. It now doesn't clear the debug box every time.
begin
TerminateScript;
writeln('High Alchemy button not found!')//terminates script when it can't find the high alch button.
end;
MMouse(x1,y1,5,5);//Moves the mouse to a random location on the high alch button.
FreeBitMap(HighAlch);//We don't need the bitmap anymore.
GetMousePos(x2,y2);//gets the mouse position, so we can click on the same spot everytime. (I'll look into this)
end;

JAD

2008-01-28 17:11:39

K yeah, you were right with the mouse clicking being 0,0 then :p forgot this was an alching script.

r4z0rlike

2008-02-01 07:49:42

|==================================|
|Worked for: 42 Minutes and 41 Seconds
|Items Alched: 635
|Mage Experience gained: 41275
|Items per hour: 892
|Exp per hour: 57980
|We rested:0 times
|==================================|

|==================================|
|Worked for: 23 Minutes and 6 Seconds
|Items Alched: 299
|Mage Experience gained: 19435
|Items per hour: 776
|Exp per hour: 50440
|We rested: 1 times
|We responded: 0 times
|==================================|
Please post your progress report!
Successfully executed

Now with autorespond!

Richard

2008-02-01 17:27:32

It looked a very good script as I was reading through it and I it looks quite good for a first time script. I actually sort of cheated with my first script in here as it actually is my second :P.

I'll test it as soon as I can get credit for my phone and pay for more members.

Until then, good luck with scripting!

Jamiee

2008-03-16 12:53:19

The error I get is "cannot find highalch button" Or something along those lines..:duh:
Any advice?
(I log in fine and everything like that)

Oh and will this get me banned or has it got anti-ban?:rolleyes:

Richard

2008-03-16 13:30:13

Old script, please don't post on old thread.

Runite

2008-03-19 04:47:40

Seems simple, but good. I'll test it out when I get the chance.

Richard

2008-03-19 04:51:36

From: Runite
Seems simple, but good. I'll test it out when I get the chance.


Did you not read my post, this is old, please don't gravedig.

jack_nosp

2008-03-21 20:56:32

will this work with scar 3.14?

Pikachu4

2008-08-17 18:23:04

What am I doing wrong? The script just logs me in and off after checking a few settings.

Blumblebee

2008-08-17 19:27:47

omg dude read like 2 posts above, don't gravedig!

Griff

2008-08-17 20:49:41

Try and use castspell() instead of coordinets. This will be safer, and allow you to support low alch if people want it.