SRL Archive - First Scripts

Chaos Temple Loot 'n' Bury


Gl3nn IV

2012-02-22 16:16:18

Just like to say i'm not updating this script, i have no idea if it works. I'll come back in 2 months or so and make scripts when i have more time…

This is my first script, so go easy on me guys! ;) I saw it buried on requests, so i thought i'd give it a go.

Loots bones at the chaos temple (level 11 wild) and burys. Simple.

Known Errors:
- Sometimes hovers over bones but doesn't click (only happend to me once, maybe due to lagg?)
- Gets stuck on one bones NE. - Set camera angle to south, ill include in later update..

Any feedback is welcome, like i said. It's my first script ;)

Old Progg:

————————————-
Bones Picked up661
Bones Buried678
Exp Gained3390
————————————-

Hero

2012-02-22 17:27:31

Procedure ProggReport;
Begin
EXPG := (Buried * 5);
Writeln('-------------------------------------');
Writeln('Bones Picked up' + IntToStr( Buried ));//Should be its own thing but I am lazy but do change it. ;)
Writeln('Bones Buried' + IntToStr( Buried ));
Writeln('Exp Gained' + IntToStr( EXPG ));
Writeln('-------------------------------------');
End;

Try that out. You will need a Buried and EXPG global variable. Also add
IncEx(Buried, 1);
after your mouse click that buries the bones.

VillaVuFTW

2012-02-23 13:08:36

Nicely done.. good for pures

Gl3nn IV

2012-02-23 15:52:39

From: Hero
Procedure ProggReport;
Begin
EXPG := (Buried * 5);
Writeln('-------------------------------------');
Writeln('Bones Picked up' + IntToStr( Buried ));//Should be its own thing but I am lazy but do change it. ;)
Writeln('Bones Buried' + IntToStr( Buried ));
Writeln('Exp Gained' + IntToStr( EXPG ));
Writeln('-------------------------------------');
End;

Try that out. You will need a Buried and EXPG global variable. Also add
IncEx(Buried, 1);
after your mouse click that buries the bones.


Added, i'll leave out the looted, afterall it burys the same amount… Ill update soon after a few changes.
For the xp i tried making it 4.5 as thats what the bone xp is. But it comes up with type mismatch, can you not have decimal numbers?

Thanks for the help with the progg :)

Swagger

2012-02-23 16:50:59

Nice idea.

Mark

2012-02-23 17:01:11

i aint looked thought your script yet will do that now but

try this
EXPG:Extended;
instead of
EXPG:integer;

compare this procedure with your own
procedure FindBones;
var
Xi, Yi, X1, Y1, X2, Y2: Integer;
begin
repeat
Writeln('Checking for bones');
if FindObjEx(Xi, Yi, ['ake', 'ke'], BoneColours, 3, 50, 1, 5, 689, 390) then
begin
GetMousePos(Xi, Yi);
Mouse(Xi, Yi, 0, 0, false);
if WaitOptionMulti(['ake Bone', 'ake B'], 200) then
begin
LootCount := LootCount + 1;
writeln('looted bones')
end;
while IsMoving do
begin
Wait(250);
antiban;
end;
until(invfull)
end;
end;

For this to run change your main loop
begin
Smart_Server := 69;
Smart_Members:= false;
Smart_Signed := false;
Smart_SuperDetail := false;
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
BoneColours:= [12303812, 14408933, 13685209, 13553880, 15000804]
Repeat
Antiban;
AntiRandoms;
FindBones;
antiban;
Bury;
ProggReport;
until ( Not LoggedIn);
end.

Gl3nn IV

2012-02-23 17:43:59

The progg report now is basic, counts bones buried and xp, why would you need more than that? ;) However i couldn't put in 4.5xp so i just went for 5.

Alright Cru1z1n, i will do. Thanks for taking the time to look through my script :)

zyxw121

2012-02-25 07:11:11

I haven't tested it, but it looks pretty good.
Some suggestions,
1: Increase the "antiban-prayer", right now it only has a 1/400 chance, a bit low when you're training prayer, no? I would reccomend maybe 30/400.
2: Some of the standards are confusing, make sure to indent properly, leave out blank lines, etc.
3: The InvMouse pattern for burying bones looks odd, it goes left to right on all rows, try to make it alternate. You can check out my script for one method.
4: More failsafes would be good.

if not LoggedIn then
exit
is a simple one.
5: If you want to calculate XP gained, try putting

ToggleXPBar(True);
StartXP := GetXPBarTotal;
this near start of your code, in the main loop is fine, just after logging in.
In the progress bar, add

IntToStr(GetXpBarTotal - StartXP)
(Thanks to Caotom for that!)
Other than those few things, it's looking good!

kingsleyeng

2012-02-27 01:39:25

very good script nice job

catanado15

2012-04-15 07:53:28

it give me some errors…