SRL Archive - Help

mining help


dc686

2012-05-13 01:10:21

Hi im currently working on a mining script for gem rocks to try and become a srl member and im trying to figure out the best way to have it detect you are mining if anyone could help any it would mean a lot thank u

Element17

2012-05-13 02:56:20

pixelshift would be a good way, srl also build in animation detection.

dc686

2012-05-13 03:05:59

do u know where a tut on how to use pixelshift is im trying to learn and im having trouble doing so

Abu

2012-05-13 10:28:17

From: dc686
do u know where a tut on how to use pixelshift is im trying to learn and im having trouble doing so


I know using the Search Button can help at times:

http://villavu.com/forum/search.php?searchid=2028161

dc686

2012-05-13 18:48:59

used it and couldnt find a tut on pixel shifting

Element17

2012-05-13 20:34:09

Check beginner tuts, flight have a tut in there on that.

dc686

2012-05-13 22:01:14

thank u :D

Er1k

2012-05-13 22:10:49

XP gain + inventory change + timeout. Will not be perfect but quite to the point.

P1ng

2012-05-14 00:35:40

This will check for shifting pixels right near the centre of the screen, its part of what i am using along with the points Er1k mentioned for my coal miner. It's just a really simple edit of the 'IsMoving' function in the SRL include -
function IsMining: Boolean;
begin
Result := PixelShift(IntToBox(MSCX-30, MSCY-30, MSCX+30, MSCY+30), 500) > 200;
end;

Then in my mining procedure it has -
While IsMining do
Wait(RandomRange(500,1000));

working quite effectively so far.

Abu

2012-05-14 00:41:31

From: dc686
used it and couldnt find a tut on pixel shifting


You do realise the link I posted was to the tutorial on Pixelshift right? :confused:

dc686

2012-05-14 00:56:52

umm when i clicked it it said not found and right now im having problems even getting my script to free the dtms and place gems in the bag i figured id tackel that first and cant get it to work

program new;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
var
GemBag:integer;
Sapphire:integer;
x,y,x1,y2:integer;
procedure freed;
begin
GemBag := DTMFromString('mrAAAAHic42BgYJjGxMAwGYhnA/ECJgi/F4j7gHgeEBswMjBoArEiEBsDsRUQmwKxLhBbAnHb7GlAU5jwYNyAH4gZCWAYAABW6Qgy');
sapphire := DTMFromString('mwQAAAHic42RgYMhnYmBIAuISIE4D4iIgzgHiFKhYNhA/B6q7B8TvgfgtED+A8p8A8QsgfgfEfAIpDCLifQzcvMEM/EI5DDz80Qy8/MkMwuI9DNw8AWAxYgAjERgOANqzENw=');
end;
procedure freeddtmz;
begin
FreeDtm(GemBag);
FreeDTM(sapphire);
end;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Pin := ''; // Pin
Active := True; // Set to true if you want to use Player 0
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Mining;
end;
end;

procedure BagGem;
var
x, y : Integer;
begin
if FindDTM(GemBag, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln('Hello world!')
if FindDTm(sapphire,x,y,MIX1,MIY1,MIX2,MIY2) then
Mouse(x, y, 0, 0, False);//Remeber that "False" means it will right click.
if ChooseOption('use') then
if FindDTM(GemBag, x, y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x,y,0,0 ,true);
end;
end;



begin
Smart_Server := 86;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL();
ClearDebug();
DeclarePlayers();

if not LoggedIn then
begin
LoginPlayer();
end;
if LoggedIn then
begin
freed;
freeddtmz;

BagGem;
ClickNorth(SRL_ANGLE_HIGH);
BagGem;
end;
end.


thats what i have so far if someone has skype that would help me please pm me your skype im really trying to learn and could use a little guidance

P1ng

2012-05-14 01:02:28

take down your post with the simba script in it, you didnt remove your username and pass

dc686

2012-05-14 01:03:45

opps thanks bro at least i have a pin that wasnt there :P

Abu

2012-05-14 01:32:22

Firstly, your 'freed' procedure should be called 'load', as your not freeing anything.

Secondly, you want to free your DTM's after doing what you want to do not before, it should be in this order:
  
freed; //rename to Load
BagGem;
ClickNorth(SRL_ANGLE_HIGH);
BagGem;
freeddtmz;

dc686

2012-05-14 01:43:23

if anyone has a gem bag and sapphire could u try this script out and see if you can get it to work i cant get it to do anything and idk why even with the freeing dtm correctly now its still not placing the gem in the bag which means it is not finding the bag dtm because its also not doing the writeln unless if i messed something else up

dc686

2012-05-14 02:06:45

got it to bag the sapphire :) had to remake my dtms i messed them up the first time and after reading a few more tuts i figured out my problem was finding the dtms