SRL Archive - First Scripts

BucketBuyer v.001


mormonman

2008-11-03 02:16:33

This is a very rudimentary Bucket Buyer from the GnomeCopter Place. I made it so that I didn't have to buy buckets myself…

Instructions:
Start with player logged on.
Get color from alvafrim(the general store guy!) and put it in the const at the beginning of the script.
Just turn off script when done buying…

:( I know its not very good, I just need some suggestions of what to work on! :(


Edit: Update to v.0011 (forgot to add repeat)
Edit: Update to v.002(thnx for adding all that stuff!)

mormonman

2008-11-03 02:21:37

lol new update already!

joelster134

2008-11-03 05:34:20

ok i added some stuff in…your walking procedurse look alright…standards are good :)

great try for first script!

added in login/anti-randoms.

enjoy /update your script :)

program BucketBuyer;
{.include SRL/SRL.scar}

const
NPCcolor = 1344272;


procedure DeclarePlayers;
begin
HowManyPlayers := 1; //how many players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //current player

Players[0].Name := '4d'; //username!
Players[0].Pass := 'lp'; //password
Players[0].Nick := 'k1l'; //Nick (3-4 letters of ur name
Players[0].Active := True; //is the player active?

end;

procedure PreparePlayer;
begin
if not LoggedIn then LoginPlayer;
end;

procedure AntiRandoms;
begin
findnormalrandoms;
if findfight=true then
begin
runaway('E',true,1,5000+random(1000));
end;
end;





procedure AntiBan;
begin
case random(60) of
0: RandomRClick;
end;
end;


var
x, y : Integer;
WaterBucketDTM : Integer;
procedure BuyWaterBucket;
begin
WaterBucketDTM := DTMFromString('78DA63F466606070654001C5D1FA0CBF80342' +
'310FF0702C66020C38A010D30229140DA0548F811501302243C09' +
'A8710212F604D480DC1C805F0D00FCCA096D');
Wait(3000+random(1000));
if (FindDTM(WaterBucketDTM, x, y, MSx1, MSy1, MSx2, MSy2)) then
begin
Wait(800+random(150));
Mouse(x, y, 3, 3, False);
Wait(800+random(150));
if ChooseOption('X') then
begin
Wait(800+random(150));
TypeSend('123');
Wait(800+random(150))
end;
end;
end;



procedure WalkToDepositBox;
begin
LoadSymbolBitmapColor('bank')
if FindSymbol(x, y, 'bank') then
begin
Wait(4000+random(150));
Mouse(x,y,4,4, True);
FFlag(1);
Wait(1000+random(150));
end;
end;




procedure OpenDepositBox;
begin
if (FindColorSpiralTolerance(x, y, 6382171, 10, 10, 520, 340, 6)) then
begin
Wait(1000+random(150));
Mouse(x, y, 3, 3, False);
Wait(1000+random(150));
ChooseOption('Deposit');
FFlag(2);
Wait(1000+random(150));
end;
end;


procedure DepositBucket;
begin
WaterBucketDTM := DTMFromString('78DA63F466606070654001C5D1FA0CBF80342' +
'310FF0702C66020C38A010D30229140DA0548F811501302243C09' +
'A8710212F604D480DC1C805F0D00FCCA096D');
if (FindDTM(WaterBucketDTM, x, y, MSx1, MSy1, MSx2, MSy2)) then
begin
Wait(1000+random(150));
Mouse(x,y,3,3, False);
Wait(1000+random(150));
ChooseOption('All');
Wait(1000+random(150));
end;
FreeDTM(WaterBucketDTM);
end;

procedure WalkToTrade;
begin
LoadSymbolBitmapColor('shop');
if FindSymbol(x, y, 'shop') then
begin
Wait(4000+random(150));
Mouse(x,y,4,4, True);
FFlag(1);
Wait(1000+random(150));
end;
end;

procedure Trade;
begin
begin
if FindObj(x,y,'frim',1344272,5) then
Wait(100+random(400));
Mouse(x, y, 2, 2, False);
Wait(100+random(400));
ChooseOption('rade');
end;
end;

procedure MainLoop;
begin
MouseSpeed:= 15+random(3);
ActivateClient;
SetAngle(true);
MakeCompass('n');
if (loggedin) then
begin
Trade;
Antiban;
BuyWaterBucket;
Antiban;
WalkToDepositBox;
Antiban;
OpenDepositBox;
Antiban;
DepositBucket;
Antiban;
WalkToTrade;
Antiban;
end;
end;



begin
SetupSRL;
ActivateClient;
MainLoop;
Wait(1000+random(100));
repeat
until (loggedin=false)
end.

that's all i can think of atm.

mormonman

2008-11-03 15:57:59

thnx… at school right now… will update with that script when i get home!

in2it

2008-11-03 16:28:16

nice script for your first :) keep it up also add anti-randoms :)

mormonman

2008-11-03 16:29:35

i had antibans in it too…. but i took em out right before posting(IDK y)

mormonman

2008-11-03 22:20:37

Update

joelster134

2008-11-03 22:54:49

np :) ill take a look at the update when i get home from my blood test :)

yay me …



freaking doctors stealing my blood :p


anyway good attempt for first script im prolly gunna use for my merchanter to make some soft clay :)

mormonman

2008-11-03 23:34:52

lol woot! thats what i use it for…(well not a merchanter… just to make money on noobs!)

snoker

2008-11-04 03:04:34

thanks. and gl scripting more … do they really buy in G.E ? :P

joelster134

2008-11-04 03:56:10

they sell on GE if u try buy em…dunno if u can sell though…

don't think he was aiming for this script to BE one..

if it was

27x1= 27gp per load

27x 6-7=150/189gp per load

profit = around 150-160gp per load

slow money anyway

Lorken

2008-11-05 02:57:13

why would you need to buy so much buckets?

mormonman

2008-11-05 14:04:16

for my custom clay softener! it just takes out 14 buckets of water and 14 clay and then makes soft clay and banks em!

Lorken

2008-11-05 21:38:08

oh, i never do that sort of stuff though so i wouldnt know.

mormonman

2008-11-05 21:40:26

ya it makes pretty good gp… kinda fast… the best part is it doesn't require any skills…

lowstyle

2008-11-06 01:16:59

nice, i wont use this tho =(
im more of a "auto woodcutter" person ;)

joelster134

2008-11-06 06:47:38

how's it nice?

even if you won';t use it would be nice to test once at least if you bothered looking at the script/posting feedback.