SRL Archive - First Scripts

Gemcutter


Whakey

2008-05-12 15:04:51

Well i was bored so i decided to start scripting ;p This is my first script ever.

What it does? It cut gems in any f2p bank, banks and withdraws more!

Well test it :P


{ Simple Gem Cutter by Whakey (Deban) }
{ Version = 0.1 FIRST RELEASE! }
{ What it does: Withdraws uncute sapphires from bank, cuts and repeats! }
{ Start in any f2p bank and setup lines 12-14 and 22-29 }


program GemCutter;
{.include Srl/SRL.scar}

const
Wutbank = ''; //Set to right bank (Veb=Varrock east, vwb = varrock west feb= falador east and so on)
UrPin = ''; //Ur pin, 0000 if none
Wheretorun = ''; //Where to run if it founs an fight


var
Uncutsaph, Chisel, x, y : integer;

procedure declarePlayers;
begin
HowManyPlayers := 1; //Switch according to how many players you are going to use
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username(helps anti-randoms)
Players[0].Active := True;

// Players[0].Name := ''; //username
// Players[0].Pass := ''; //password
// Players[0].Nick := ''; //3-4 letters from your username(helps anti-randoms)
// Players[0].Active := True;

end;

procedure AntiRandoms; // mickaliscious
begin
if not LoggedIn then Exit;
FindNormalRandoms; // find random events
if FindFight then RunTo(Wheretorun,True); // if a fight is found, run to the north and run far (will run back automatically)
end;

procedure Clrscr;
begin
Cleardebug; ClearReport;
end;

procedure LoadBitmaps;

begin
UncutSaph := BitmapFromString(21, 22, 'beNqV1MEKgkAQBmD3UAd' +
'1dZXsJXqiIIIuQSBdIgh6gy4FvXCj446z66xuy4948PtBZneTZGmp' +
'JGopMblpY2y1/ebmKibVe8yMrZpP9wyUUINUZbltsD3tmPKMieRF/' +
'XAaLKfI3DYAdxpcm+oDm0iQUwN8zy1ktd7JvG8gjg3EdXWL52bzGl' +
'6aN7eYkXPbBy1xDP5FHH96ycpTVhy9RHKw3f4pLxOuFvlge+410Ph' +
'CDaO1nDfMc8cyTg0zHOKfHcaxgd8GHMKIKSEO4edWtDzd7FimJ7+o' +
'76F4VuShHiKTLff37edcnj+qN7uJ');

Chisel := BitmapFromString(19, 26, 'beNq11LkKwkAUhWED7tsD2F' +
'gIWogoRJSI+xb3lbiEoKiFhYWFha/vMQMjWJ0RvPyFgXxeI0M8nn+' +
'OtppM0A/Qms9kuHSj4Ha5/Iqzmr1eI2djIX4jvh/3n2z74jj0j3wP' +
'ngvrjrudkpqaJv5P+qE+M+p156OhotK6jcZvsFWtmu22EkFlXa8bh' +
'souLZ3womKhoKSKKX8u6ZPxsJIJwIqwl1TNbADBCs4f5n4+iCQnT/' +
'JYD4mEJZVlhBelEJKchPtaGFZwbCTVoRlB0uIDCc+dqLSuoubaiwJ' +
'Ki0sS3gYxaXmFuY9jSPDHLK76Bnwu4q6iT/ULIGdGSA==');
end;

procedure Banking;

begin
if OpenBankFast(wutbank) then
begin
InPin(UrPin);
FixBank;
Withdraw(1,1, true);
CloseBank;
end;
end;

procedure Depositting;

begin
if OpenBankFast(wutbank) then
begin
FixBank;
Deposit(2, 28, True);
end;
end;



procedure CutGems;

begin
if(findbitmaptolerancein(Chisel, x, y, MIX1, MIY1, MIX2, MIY2, 0)) then
begin
Mouse(x, y, 5, 5, true);
end;
if(findbitmaptolerancein(UncutSaph, x, y, MIX1, MIY1, MIX2, MIY2, 0)) then
begin
mouse(x, y, 5, 5, true);
end;
begin
Wait(RandomRange(500, 800));
Mouse(258, 409, 5, 5, false);
ChooseOption('ll');
end;
end;

procedure looppage;
begin
Wait(2500);
Banking;
AntiRandoms;
Wait(RandomRange(1000, 2000));
LoadBitmaps;
Wait(2500);
AntiRandoms;
CutGems;
while findbitmaptolerancein(UncutSaph, x, y, MIX1, MIY1, MIX2, MIY2, 0) do Wait(2000);
Depositting;
end;


begin
SetupSRL;
ActivateClient;
Clrscr;
DeclarePlayers;
if LoggedIn then LogOut;
LoginPlayer;
Wait(RandomRange(1000, 2000));
MakeCompass(IntToStr(RandomRange(330, 390)));
SetAngle(True);
repeat
looppage;
until (false);
end.

Still to add:

AntiBan
Other gems (:P)
Tell me if u know something nice

Harry

2008-05-12 15:25:19


procedure CutGems;

begin
if(findbitmaptolerancein(Chisel, x, y, MIX1, MIY1, MIX2, MIY2, 0)) then
begin
Mouse(x, y, 5, 5, true);
end;
if(findbitmaptolerancein(UncutSaph, x, y, MIX1, MIY1, MIX2, MIY2, 0)) then
begin
mouse(x, y, 5, 5, true);
end;
begin
Wait(RandomRange(500, 800));
Mouse(258, 409, 5, 5, false);
ChooseOption('ll');
end;
end;
Make a GetColor or a DTM of the "Enter amount" thing, so if your RS lags it will still click it correctly :D

Also another suggestion, make a procedure called "ScriptTerminate;" and call to Free the bitmaps in it - when the user kills the script, the BMPs get free'd, which is important.

Other than those things and a few other small things, looks nice, keep it up :)

Kalle

2008-05-15 12:00:59

Well didnt work for me, i think bitmaps are wrong

insanomano

2008-05-15 16:09:15

Doesnt look bad, im at a diff comp without my flashdrive so i cant run it lol but it looks like a well written script and want to test ASAP lol. Im still learning SCAR myself but good job I could probably learn something from this.

skilld u

2008-05-15 16:30:43

try making dtms for the objects instead of bitmaps, there is a link in my sig to a really good tut. :p

Awkwardsaw

2008-05-15 22:25:45

here, you can have my anti ban and anti randoms
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Crafting', False);
3: RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;
end;
procedure AntiRandoms;
begin
If(FindFight)then
RunAway('N', True, 1, 15000);
FindNormalRandoms;
FindBox;
OpenBox;
SolveBox;
FindMod;
FindDead;
FindFrogCave;
SolveFrogSwamp;
SolveQuiz;
SolveSandWich;

FindLamp('Crafting');
end;

make sure to credit if you use

haha i almost forgot to say what i was gonna say, that is a NICE SCRIPT for a first scripter.. bitmaps and every thing. its "better" then mine =p

benjaa

2008-05-18 02:42:16

{   Simple Gem Cutter by Whakey (Deban)                                   }
{ Version = 0.1 FIRST RELEASE! }
{ What it does: Withdraws uncute sapphires from bank, cuts and repeats! }
{ Start in any f2p bank and setup lines 12-14 and 22-29 }


program GemCutter;
{.include Srl/SRL.scar}

const
Wutbank = ''; //Set to right bank (Veb=Varrock east, vwb = varrock west feb= falador east and so on)
Wheretorun = ''; //Where to run if it founs an fight


var
Uncutsaph, Chisel, x, y : integer;

procedure declarePlayers;
begin
HowManyPlayers := 1; //Switch according to how many players you are going to use
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username(helps anti-randoms)
Players[0].Active := True; //are you going to use this player
Players[0].Strings[0] := '0000' //Ur pin, 0000 if none

// Players[0].Name := ''; //username
// Players[0].Pass := ''; //password
// Players[0].Nick := ''; //3-4 letters from your username(helps anti-randoms)
// Players[0].Active := True;

end;

procedure AntiRandoms;
//edited by AkwardSaw
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Crafting', False);
3: RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;
FindNormalRandoms;
FindBox;
OpenBox;
SolveBox;
FindMod;
FindDead;
FindFrogCave;
SolveFrogSwamp;
SolveQuiz;
SolveSandWich;

FindLamp('Crafting');
if FindFight then RunTo(Wheretorun,True); // if a fight is found, run to the north and run far (will run back automatically)
end;

procedure Clrscr;
begin
Cleardebug; ClearReport;
end;

procedure LoadBitmaps;

begin
UncutSaph := BitmapFromString(21, 22, 'beNqV1MEKgkAQBmD3UAd' +
'1dZXsJXqiIIIuQSBdIgh6gy4FvXCj446z66xuy4948PtBZneTZGmp' +
'JGopMblpY2y1/ebmKibVe8yMrZpP9wyUUINUZbltsD3tmPKMieRF/' +
'XAaLKfI3DYAdxpcm+oDm0iQUwN8zy1ktd7JvG8gjg3EdXWL52bzGl' +
'6aN7eYkXPbBy1xDP5FHH96ycpTVhy9RHKw3f4pLxOuFvlge+410Ph' +
'CDaO1nDfMc8cyTg0zHOKfHcaxgd8GHMKIKSEO4edWtDzd7FimJ7+o' +
'76F4VuShHiKTLff37edcnj+qN7uJ');

Chisel := BitmapFromString(19, 26, 'beNq11LkKwkAUhWED7tsD2F' +
'gIWogoRJSI+xb3lbiEoKiFhYWFha/vMQMjWJ0RvPyFgXxeI0M8nn+' +
'OtppM0A/Qms9kuHSj4Ha5/Iqzmr1eI2djIX4jvh/3n2z74jj0j3wP' +
'ngvrjrudkpqaJv5P+qE+M+p156OhotK6jcZvsFWtmu22EkFlXa8bh' +
'souLZ3womKhoKSKKX8u6ZPxsJIJwIqwl1TNbADBCs4f5n4+iCQnT/' +
'JYD4mEJZVlhBelEJKchPtaGFZwbCTVoRlB0uIDCc+dqLSuoubaiwJ' +
'Ki0sS3gYxaXmFuY9jSPDHLK76Bnwu4q6iT/ULIGdGSA==');
end;

procedure Banking;
//edited by bEnJaa
begin
if (not LoggedIn) then exit;
if (not BankScreen) or (PinScreen) then OpenBankFast(wutbank);
if (PinScreen) then InPin(Players[CurrentPlayer].Strings[0]);
FixBank;
Withdraw(1,1, 27);
CloseBank;
end;

procedure Depositting;
//edited by bEnJaa
begin
if (not LoggedIn) then exit;
if (not Bankscreen) or (Pinscreen) then OpenBankFast(wutbank);
if (PinScreen) then InPin(Players[CurrentPlayer].Strings[0]);
Deposit(2, 28, True);
end;


procedure CutGems;
begin
if(findbitmaptolerancein(Chisel, x, y, MIX1, MIY1, MIX2, MIY2, 0)) then
begin
Mouse(x, y, 5, 5, true);
end;
if(findbitmaptolerancein(UncutSaph, x, y, MIX1, MIY1, MIX2, MIY2, 0)) then
begin
mouse(x, y, 5, 5, true);
end;
begin
Wait(RandomRange(500, 800));
Mouse(258, 409, 5, 5, false);
ChooseOption('ll');
end;
end;

procedure looppage;
begin
Wait(2500);
Banking;
AntiRandoms;
Wait(RandomRange(1000, 2000));
LoadBitmaps;
Wait(2500);
AntiRandoms;
CutGems;
while findbitmaptolerancein(UncutSaph, x, y, MIX1, MIY1, MIX2, MIY2, 0) do Wait(2000);
Depositting;
end;


begin
SetupSRL;
ActivateClient;
Clrscr;
DeclarePlayers;
if LoggedIn then LogOut;
LoginPlayer;
Wait(RandomRange(1000, 2000));
MakeCompass(IntToStr(RandomRange(330, 390)));
SetAngle(True);
repeat
looppage;
until (false);
end.

Just some little suggestions, but could still do with some work :)