SRL Archive - First Scripts

PowerMiner


easyas4

2009-07-09 07:25:31

[PHP]program powerminer;
{.Include SRL\SRL.Scar}

const
Iron = 2371661
Loads = 2
Ironinv = 2239817
var
x, y

procedure LoadBmp;
begin
Drop := BitmapFromString(30, 16, 'beNpjYKApOLZjKjKiusmY7FGT' +
'sbIxBdEcgCum8JtMvEry2CPNZPyhijWy6JzXaFE+jJqMEwAAPWXui' +
'g==');
end;

procedure LocateOre;
begin
repeat
FindColorSpiral(x,y,Iron,3,3,514,337);
MoveMouseSmooth(x, y: Integer);
Wait(500+ random(250));
ClickMouse(X, Y, True);
until(false)
end;

procedure DropInv;
begin
Findcolors(x, y, Ironinv, 546, 206, 737, 466);
MoveMouseSmooth(x, y: Integer);
ClickMouse(x, y: Integer; Right: Boolean);

[/PHP]

So im making my first script and its going to be a power miner, and this is what i have so far, (if you see something wrong with it before where i stopped please tell me) i think i have figured it all out up until i need to get the mouse to find the bitmap i uploaded in the beginning. Also i dont know how to get the Procedure LocateOre to repeat until(false) so that it runs until the inv is full or give it a value of like 28 or 27 or w/e depending on if the pick is wielded.

JPHamlett

2009-07-09 08:02:13

for yur until false problem just do

until (invfull)

easyas4

2009-07-09 09:07:18

thanks! :)

JPHamlett

2009-07-09 09:11:27

after looking at your script in detail youll get banned using this script


program powerminer;
{.Include SRLSRL.Scar}

const
Iron = 2371661
Loads = 2
Ironinv = 2239817
var
x, y, drop

procedure LoadBmp;
begin
Drop := BitmapFromString(30, 16, 'beNpjYKApOLZjKjKiusmY7FGT' +
'sbIxBdEcgCum8JtMvEry2CPNZPyhijWy6JzXaFE+jJqMEwAAPWXui' +
'g==');
end;

procedure LocateOre;
begin
repeat
FindColorSpiral(x,y,Iron,3,3,514,337);
Mouse(x, y, 3, 3 true); // move mouse like a real person
until(invfull)// goes till inv is full
end;

procedure DropInv;
begin
Findcolors(x, y, Ironinv, MIX1, MIY1, MIX2, MIY2); // looks in inv
Mouse(x, y, 3, 3, false);
wait(100 + random (20));
chooseoption('drop'); // chooses the drop selection
end;

there you go thats how it should look

you still need some antibans declareplayers anti randoms and some other stuff look at mine for ideas but credit if u take anything

if u have nay other questions

add my msn

[email]jphamlett@live.com[/email]

austin2162

2009-07-09 09:17:46

ok to help find the bit map use findbitmap(bitmapname,x,y) then use your mouse(x,y,2,2,true) to have it click on the bit. make sure you add you vars

program powerminer;
{.Include SRL/SRL.Scar}

const
Iron = 2371661
Loads = 2
Ironinv = 2239817
var
x, y , drop:integer;

procedure LoadBmp;
begin
Drop := BitmapFromString(30, 16, 'beNpjYKApOLZjKjKiusmY7FGT' +
'sbIxBdEcgCum8JtMvEry2CPNZPyhijWy6JzXaFE+jJqMEwAAPWXui' +
'g==');
end;

procedure LocateOre;
begin
repeat
Findbitmap(drop,x,y);
MoveMouseSmooth(x, y: Integer);
Wait(500+ random(250));
ClickMouse(X, Y, True);
until(false)
end;

procedure DropInv;
begin
Findcolors(x, y, Ironinv, 546, 206, 737, 466);
MoveMouseSmooth(x, y: Integer);
ClickMouse(x, y: Integer; Right: Boolean);

thats if drop is your rock

also use better mouse clicks like mouse(x,y,0,0,true) or somthing of the sort

JPHamlett

2009-07-09 09:36:42

u got ninjaed and try to use

 tags

easyas4

2009-07-09 10:08:22

after looking at your script in detail youll get banned using this script

From: J_Pizzle


chooseoption('drop'); // chooses the drop selection
end;




im pretty sure with the new update chooseoption is messeed up, hense me using a new bitmap instead. And i never intended to use this program, only just learn the artform of scripting :D

From: austin2162
ok to help find the bit map use findbitmap(bitmapname,x,y) then use your mouse(x,y,2,2,true) to have it click on the bit. make sure you add you vars

program powerminer;
{.Include SRL/SRL.Scar}

const
Iron = 2371661
Loads = 2
Ironinv = 2239817
var
x, y , drop:integer;

procedure LoadBmp;
begin
Drop := BitmapFromString(30, 16, 'beNpjYKApOLZjKjKiusmY7FGT' +
'sbIxBdEcgCum8JtMvEry2CPNZPyhijWy6JzXaFE+jJqMEwAAPWXui' +
'g==');
end;

procedure LocateOre;
begin
repeat
Findbitmap(drop,x,y); <— not here
MoveMouseSmooth(x, y: Integer);
Wait(500+ random(250));
ClickMouse(X, Y, True);
until(false)
end;

procedure DropInv;
begin
Findcolors(x, y, Ironinv, 546, 206, 737, 466);
MoveMouseSmooth(x, y: Integer);
ClickMouse(x, y: Integer; Right: Boolean);
Findbitmap(drop,x,y); <— here rather, in this procedure
thats if drop is your rock

also use better mouse clicks like mouse(x,y,0,0,true) or somthing of the sort


i wanted the bitmap to be used in the dropinv procedure because the bitmap is of the drop button on the rmb dropdwn menu.

From: J_Pizzle
u got ninjaed and try to use

 tags


lol wut?

JPHamlett

2009-07-09 18:54:12

im pretty sure with the new update chooseoption is messeed up, hense me using a new bitmap instead. And i never intended to use this program, only just learn the artform of scripting


well it is messed up but if u use coods itll get you banned and there a fix out there i believe



and
 tags make the darker box around the text

austin2162

2009-07-10 02:23:24

if your still looking try this

repeat
findbitmap(drop,x,y)
mouse(x,y,0,0,true)
until(invempty)

i think that ^^ will drop all the logs

easyas4

2009-07-10 08:09:47

From: austin2162
if your still looking try this

repeat
findbitmap(drop,x,y)
mouse(x,y,0,0,true)
until(invempty)

i think that ^^ will drop all the logs


its a power miner, and that wouldnt work because it has to find the ores, then rightclick then findbitmap and click and repeat all that until invempty

JPHamlett

2009-07-10 08:53:24

do


repeat
findbitmap(drop,x,y);
mouse(x,y,0,0,false);
wait(100 + random(20));
chooseoption('drop'); //should work after the they reverse the update
until(not findbitmap(drop, x, y)) or (invempty);

and id use a dtm cause its has morem possibilities then bitmap and you can search for a dtm only in a certain area where as for bit map it looks on the whole screen

easyas4

2009-07-10 12:45:17

ok thanks for all the help guys, ill revise it and post it here soon

sapetto

2009-07-10 13:03:38

I cant test it when you are ready with the script. ;)

Smarter Child

2009-07-11 03:39:00

This script isn't meant to be tested, its a first script. And use SCAR TAGS!!!

Btw, there are functions in SRL, such as :

DropAll; //Drops every item in you inventory

You could apply this:

if FindColor(Color of pickaxe_MIX1, MIX2, MIY1, MIY2) then
begin
Drop(2, 28, true);
end
else
DropAll;

Sorry for poor standards etc.. i do not have scar on this computer.

easyas4

2009-07-11 05:24:55

Unfortunately i dont know what scar tags are :o , it really isnt meant to be tested yet, it has 0 anti ban and 0 anti randoms, its more just so i cant learn to script, i will most likely do all the testing on a junk acct just to see if i can get a working script at all.