SRL Archive - First Scripts

God's Cowhide Tanner


godspower55

2009-02-28 00:42:06

Hello, this is my second script i am getting a bit better at scripting but for now this is what i came up with, i could have made it more complicated but it would have taken a bit longer.

At the moment it has smart, can login. No multiplayer at the moment and it will continue to tan hides forever unless you manually stop it.. i have to add that later.. Please rate and suggest some better code than the ones i have now

Only can do Regular leather at the moment.

My best time this script has ran for at the moment for me was 15 minutes and it had tanned 250 hides.

Please tell me any bugs

Known Bugs -
doesn't tan some times
Doesn't bank tanned hides and gets out new hides.


Version :
.01 - First release, some anti ban
.05 - Has antiban and works almost flawlessly..

ian.

2009-02-28 00:47:57

Name can't have space in it.. gonna tell you more stuff once I read through it.. but to make it stop just add a const.. LoadsToDo = 10; and in main loop do… repeat
AllTheStuff;
until(LoadsToDo >= LoadsDone);

might be a little confusing.. but.. you can read some tuts about it :)

program GodsTanner;
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}

var
x, y, i, Counter : integer;

procedure DeclarePlayers;
begin
CurrentPlayer := 0;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:= True;

Writeln( IntToStr ( HowManyPlayers ) + ' Player[s]' );
End;

procedure GetHides;
begin
MakeCompass('n');
wait(1000);
FindObjCustom(x, y, ['ban', 'ooth'], [3818057,7435127], 5);
Mouse(x,y,5,5,false);
ChooseOption('uickly');
Wait(1500);
FindObjCustom(x, y, ['ow', 'whid'], [11842750,12106178], 5);
Mouse(x,y,5,5,false);
Wait(300);
ChooseOption('X');
Wait(500);
TypeSend('27');
Wait(300);
CloseBank;
end;

procedure FailSafeHide;
begin
repeat
wait(500);
Inc(Counter);
until FindObjCustom(x, y, ['ow', 'whid'], [11842750,12106178], 5) or (counter=12);
if(counter=12)then
GetHides;
end;

procedure WalkToShop;
begin
mouse(667,56,5,5,true);
wait(200);
Mouse(664,305,5,5,false);
wait(300);
ChooseOption('amine');
Flag;
repeat
wait(500);
Inc(Counter);
until FindSymbol(x,y,'Tanner') or (counter=30);
Mouse(x,y,5,5,true);
wait(500);
HoverSkill('strength',False );
GameTab(4);
Flag;
end;

procedure FindGuy;
begin
repeat
Wait(500);
until FindObjCustom(x, y, ['El', 'llis'], [5406174,2966082], 5) or (counter=20);
mouse(x,y,5,5,false);
Chooseoption('rade');
wait(3950);
FindObjCustom(x, y, ['oft', 'sof'], [12829899,12566471], 5);
mouse(x,y,5,5,false);
ChooseOption('ll');
end;

procedure ToBank;
begin
Mouse(624,152,5,5,true);
Flag;
repeat
wait(500);
counter:=counter+1;
until Findsymbol(x,y,'bank') or (counter=30);
mouse(x,y,5,5,true);
Flag;
FindObjCustom(x, y, ['ban', 'ank'], [3818057,7435127], 5);
Mouse(x,y,5,5,false);
ChooseOption('uickly');
Wait(1500);
Deposit(2,27,true);
wait(1200);
FindObjCustom(x, y, ['ow', 'whid'], [11842750,12106178], 5);
Mouse(x,y,5,5,false);
Wait(300);
ChooseOption('X');
Wait(500);
TypeSend('27');
Wait(300);
Closebank;
end;

procedure MainLoop;
begin
WalkToShop;
FindGuy;
ToBank;
end;

procedure SetupSmart;
begin
SmartsetupEx(55, false, true, false);
Settargetdc(smartgetdc);
End;

begin
SetupSmart;
SetupSRL;
ActivateClient;
GetHides;
repeat
Inc(i);
MainLoop;
until(i >= 3);
end.

fixed standards.. and you need to add randomness to the waits! :) atm you will get flagged probably.. to add randomness do.. Wait(50+random(100)); or Wait(RandomRange(50, 150)); :)

and you need more fail safes and for things like FindObjCustom you should use an if then statement :)

MtW

2009-02-28 05:22:24

gooodwork, keep going.

rs cheata

2009-02-28 17:54:14

nice script :) works great

OzzyStoned

2009-03-02 05:30:38

does this have anti randoms and stuff?

ShowerThoughts

2009-03-02 05:48:33

From: MtW
gooodwork, keep going.


From: rs cheata
nice script :) works great


From: OzzyStoned
does this have anti randoms and stuff?


Now that is usefull -.-,

Hey this was my first script to.
I can't say it is better than mine, but it's not bad ; add more random to your wait's like the second posts says and the walking hmm could be better.
Fix your scripting standards pl0x :p

GL it's not bad for a second/first script ;)

~Hermpie/Fatheadz

wanted_crisis

2009-03-02 06:19:32

You could have used
OpenBank('akb',true,true);


instead of

MakeCompass('n');
wait(500+random(500));
FindObjCustom(x, y, ['ban', 'ooth'], [3818057,7435127], 5);
Mouse(x,y,5,5,false);
ChooseOption('uickly');
Wait(1500+random(200));

and use DTM's to find cowhides. And try to use RadialWalk to walk. :)

Here is an updated version of your script :D
program GodsTanner;
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}

var
x, y, i, Counter : integer;

procedure DeclarePlayers;
begin
CurrentPlayer := 0;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:= True;

Writeln( IntToStr ( HowManyPlayers ) + ' Player[s]' );
End;

procedure GetHides;
begin
MakeCompass('n');
wait(1000);
OpenBank('akb',true,true);
Wait(1500);
FindObjCustom(x, y, ['ow', 'whid'], [11842750,12106178], 5);
Mouse(x,y,5,5,false);
Wait(300);
ChooseOption('X');
Wait(500);
TypeSend('27');
Wait(300);
CloseBank;
end;

procedure FailSafeHide;
begin
repeat
wait(500);
Inc(Counter);
until FindObjCustom(x, y, ['ow', 'whid'], [11842750,12106178], 5) or (counter=12);
if(counter=12)then
GetHides;
end;

procedure WalkToShop;
begin
mouse(667,56,5,5,true);
wait(200);
Mouse(664,305,5,5,false);
wait(300);
ChooseOption('amine');
Flag;
repeat
wait(500);
Inc(Counter);
until FindSymbol(x,y,'Tanner') or (counter=30);
Mouse(x,y,5,5,true);
wait(500);
HoverSkill('strength',False );
GameTab(4);
Flag;
end;

procedure FindGuy;
begin
repeat
Wait(500);
until FindObjCustom(x, y, ['El', 'llis'], [5406174,2966082], 5) or (counter=20);
mouse(x,y,5,5,false);
Chooseoption('rade');
wait(3950);
FindObjCustom(x, y, ['oft', 'sof'], [12829899,12566471], 5);
mouse(x,y,5,5,false);
ChooseOption('ll');
end;

procedure ToBank;
begin
Mouse(624,152,5,5,true);
Flag;
repeat
wait(500);
counter:=counter+1;
until Findsymbol(x,y,'bank') or (counter=30);
mouse(x,y,5,5,true);
Flag;
FindObjCustom(x, y, ['ban', 'ank'], [3818057,7435127], 5);
Mouse(x,y,5,5,false);
ChooseOption('uickly');
Wait(1500);
Deposit(2,27,true);
wait(1200);
FindObjCustom(x, y, ['ow', 'whid'], [11842750,12106178], 5);
Mouse(x,y,5,5,false);
Wait(300);
ChooseOption('X');
Wait(500);
TypeSend('27');
Wait(300);
Closebank;
end;

procedure MainLoop;
begin
WalkToShop;
FindGuy;
ToBank;
end;

procedure SetupSmart;
begin
SmartsetupEx(55, false, true, false);
Settargetdc(smartgetdc);
End;

begin
SetupSmart;
SetupSRL;
ActivateClient;
GetHides;
repeat
Inc(i);
MainLoop;
until(i >= 3);
end.

godspower55

2009-03-02 21:00:04

Ty wanted, and weird i was pretty sure i updated my script past this, unless i had not uploaded it yet..

ian.

2009-03-03 07:19:08

use OpenBankFast('akb'); not OpenBank ;)