SRL Archive - First Scripts

Bone Me [srl4][rev16] bank and bury


rader720

2008-05-23 01:11:22

As of now it is a work in progress lots of buggies to work out and such and need to get my dtm more reliable :) but …. it:
uses smart
has multiplayer capability (sketchy)
is actually pretty fast (when it works ^.^)
and has a proggy

i would really appreciate some feedback and suggestions on implementing antiban/randoms, which will be difficult because there will be like 10times as many when raising prayer lol

thanks :)


program BoneMe;
{////////////////////////////////////////////
// Currently a work in progress: //
// -Opens SMART //
// -Logs in character //
// -Burries or opens Bank depending //
// on if you have bones //
// -Gets more out of bank and repeats //
// until out of bones or until //
// the number to do has been reached//
////////////////////////////////////////////}

{.include SRL/SRL/misc/SMART.scar}
{.include srl/srl.scar}

var BoneBank,BoneCount,x,y:integer;

const
WorldToUse=123; //smart world to use

procedure Declaration;

begin

HowManyPlayers := 5; //# of Players Used
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :=''; // username
Players[0].Pass :=''; // password
Players[0].Nick :=''; // 3 letters of username
Players[0].Active:=True;
Players[0].Integers[0] := 50; //Amount of bones
Players[0].Strings[0] := 'vwb'; //bank used
Players[0].Strings[1] := 'Big'; //Big or Regular

end;

Procedure LoadDTM;
begin
case Players[currentplayer].strings[1] of
'Big': BoneBank:= DTMFromString('78DA63EC616060F0654001BB366C00D38C503' +
'EE314201182AAA6A9B212554D3390F04755B375D54A54355331ED' +
'AA2929465503728F07AA9A9DEBD7A1A80100E31B0D63');

'Regular': BoneBank:= DTMFromString('78DA63DCCFC0C0E0C78002BA1A1BC0342394C' +
'FB81D48F8A0AAB977F326AA9AA398E6345556A2AAD909248251D5' +
'CC9E300155CD0120E181AA66E9AC99286A004FC90E64');
end;
end;

procedure BuryDemBones;
var i,bones:integer;
begin
bones:=invcount
for i:= 1 to bones do
begin
if ExistsItem(i) then
begin
MouseItem(i,true);
wait(900+random(200));
bonecount:=bonecount+1;
end;
end;
Players[currentplayer].integers[1]:=bonecount;
//writeln('done burrying');
end;

procedure GetDemBones;
begin
OpenBank(Players[currentplayer].strings[0],true,true);
wait(500+random(200));
if BankScreen then
Begin
fixbank;
wait(1000+random(500));
//writeln('bank should be open');
if FindDTM(BoneBank,x,y,4,8,509,366) then
begin
mouse(x,y,2,2,false);
ChooseOption('ll');
end;
end;
if Not(BankScreen) then
begin
logout;
Players[currentplayer].active:=false;
nextplayer(true);
end;
CloseBank;
end;

Procedure Proggy;
var I:integer;
begin
Writeln('-----------------------------------------');
Writeln('- Bone Me!!! ');
Writeln('- by: Rader720 ');
Writeln('-Worked for ' + TimeRunning);
for i:= 0 to HowManyPlayers - 1 do
Begin
Writeln('-Character: ' + Players[i].Nick +
'; Prayer Level= ' +inttostr(Players[i].level[5]) +
' And burried ' + inttostr(Players[i].integers[1]) + ' bones');
end;
Writeln('-----------------------------------------');
end;


begin
ClearDebug;
SmartSetupEx(WorldToUse, false, false);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
activateclient;
setupsrl;
Declaration;

Repeat
if Players[currentplayer].Active = true Then
begin
BoneCount:=0;
if not(loggedin) then
begin
loginplayer;
Makecompass('N');
SetAngle(True);
end;
if loggedin then
begin
LoadDtm;
Makecompass('N');
SetAngle(True);
repeat
//writeln('into loop');
BuryDemBones;
Wait(1000+random(500));
GetDemBones;
Wait(1000+random(500));
until(bonecount>=Players[currentplayer].integers[0])
Players[currentplayer].active:=false; //you be done
NextPlayer(true);
Freedtm(BoneBank);
end;
end;
until(false)
end.

Hatched.Egg

2008-05-23 05:57:21

Nice first script, I thought id post as nobody else was, maybe add a little instructions for use as to what the Strings[0] represents etc. as it obviously means varrock west bank but try to explain what other possibilities could be used?

~ Hatched.Egg

rader720

2008-05-24 12:50:49

*sigh* Even on srl-forums there are losers who will take every possible means they can to screw somebody over. I made a noob mistake because it was 2 in the morning when i posted this and left my user and pass in the script and now someone changed the password gg guys. which i dont see how that is a feasible means of gaining anything because of the new money system they cant transfer any of the shit and i have recovery questions so they really didnt think it through.
Thanks for the aggravation …

EDIT: btw to Hatched.Egg : thanks for taking time to reply to my first script, i will be putting in a better discription of how to run it in my next release.

Mark

2008-05-24 14:33:48

Nice script gutted about your account tho get the ip when you get it back and see what the guys on here can do not sure if there anything but worth a try lol

CRU1Z1N………

Starblaster100

2008-05-24 18:46:06

Hey, looks like a good script, here are some pointers to help you improve:

[php]
procedure BuryDemBones;
var i,bones:integer;
begin
bones:=invcount
for i:= 1 to bones do
begin
if ExistsItem(i) then
begin
MouseItem(i,true);
wait(900+random(200));
bonecount:=bonecount+1;
end;
end;
Players[currentplayer].integers[1]:=bonecount;
//writeln('done burrying');
end;
[/php]

A nice procedure, but what happens if I have 20 bones in my inventory, but not in the first slots? The script will check from slot 1 to (boneCount) and miss the final row of bones. Any way you can get around this?

Also, do you need that extra variable in there to count? You can easily use:

[php]
Players[currentplayer].integers[1] := Players[currentplayer].integers[1] + 1;
[/php]

which will increase the efficiency of the script.

NextPlayer(true); means that you are switching to the next player, but leaving its active state as true! This defeats the purpose of your Players[currentplayer].active:=false;

You shouldn't keep loading the DTM and freeing it. Keep it loaded instead!

Other than that, nice work!

Keep on scripting

Starblaster100

rader720

2008-05-24 23:23:19

From: Starblaster100
Hey, looks like a good script, here are some pointers to help you improve:

[php]
procedure BuryDemBones;
var i,bones:integer;
begin
bones:=invcount
for i:= 1 to bones do
begin
if ExistsItem(i) then
begin
MouseItem(i,true);
wait(900+random(200));
bonecount:=bonecount+1;
end;
end;
Players[currentplayer].integers[1]:=bonecount;
//writeln('done burrying');
end;
[/php]

A nice procedure, but what happens if I have 20 bones in my inventory, but not in the first slots? The script will check from slot 1 to (boneCount) and miss the final row of bones. Any way you can get around this?



lol the sad thing is that i had already noticed that and fixed it once but then scar had an error and i hadn't saved it so it got put back in there and i forgot to redo it before i posted this :P
but thanks for the tips i will deffinately look into that now :)

o and also, i got my account back, everythings still on it but the meany sold all the bones i had :( now i gotta go buy um again lolz XD

Aaron1520

2008-05-25 14:03:21

Looks good, much neater and better than my first script.

rader720

2008-05-28 00:27:08

New version here
http://www.villavu.com/forum/showthread.php?t=31087

profprof

2008-05-29 12:59:22

it is good

ssaccount

2008-05-30 09:40:06

Nice script.

Im making bone burier too but i cant get my bitmaps working :(