This is the first script I've written for simba. I'm not sure what the problem is but I can't get the script to actually bury the bones. It will fill the inventory with bones but once it is full, it still tries to pick up bones and never changes procedures to bury them. Any advice would be appreciated.
Simba Code:
program BoneBagAndBury;
{$define SMART}
{$i SRL\SRL.simba}
var
xp : Extended;
numBones, x, y, dtmBones: Integer;
const
SRLStats_Username = ' ';
SRLStats_Password = ' ';
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ' '; // Username
Players[0].Pass := ' '; // Password
Players[0].Nick := ' '; // 4 lowercase letters from your character name
Players[0].Active := True;
end;
procedure AntiBan;
begin
if(not(LoggedIn)) then
Exit;
If FindNormalRandoms Then
begin
Players[CurrentPlayer].Active := False;
NextPlayer(Players[CurrentPlayer].Active);
Exit;
end;
case Random(80) of
20: HoverSkill('prayer', False);
30: PickUpMouse;
40: RandomMovement;
50: BoredHuman;
60: ExamineInv;
end;
end;
procedure FindBones;
begin
if FindObj(x, y, 'Take', 10002613, 5)then
Mouse(x, y, 2, 0, False);
ChooseOption('ones');
end;
procedure BuryBones;
var
a : Integer;
begin
dtmBones:= DTMFromString('mggAAAHicY2NgYJjGxMAwE4gnA3EvEE8C4nlA/Bgodx+I70Hpl0D8FIg3rFjBsHjObIZpEyYAeUwM65YvY1gydy4DLsCIA0MAAAGqElA=');
a := CountItems('dtm', dtmBones, []);
if FindDTM(dtmBones, x, y, MIX1, MIY1, MIX2, MIY2) then
numBones := numBones + a;
Mouse(x, y, 0, 0, True);
end;
procedure StatusReport;
begin
xp := 4.5;
Writeln(' --- ');
Writeln(' BoneBagAndBury ');
Writeln(' Running For: ' + TimeRunning);
Writeln(' Bones Collected/Buried: ' + IntToStr(numBones));
Writeln(' Prayer XP Earned: ' + FloatToStr(numBones * xp));
Writeln(' --- ');
end;
procedure GetBones;
begin
repeat
FindBones;
AntiBan;
Wait(200);
until (InvFull);
WriteLn(' Bones Bagged ');
end;
begin
SRL_SixHourFix := True;
SMART_FixSpeed := True;
ClearDebug;
SetupSRL;
SetupSRLStats(439, SRLStats_Username, SRLStats_Password);
DeclarePlayers;
while (not (AllPlayersInactive)) do
begin
if not LoggedIn then
LoginPlayerToLob;
OpenWorldScreen;
SelectWorld(1);
LoginPlayer;
while(not LoggedIn) do
wait(1000);
MakeCompass(0);
SetAngle(SRL_ANGLE_HIGH);
while (LoggedIn) do
while (InvFull) do
repeat
BuryBones;
ClearDebug;
AntiBan;
Writeln(' Bones Buried ');
Writeln(' --- ');
StatusReport;
until (InvEmpty);
GetBones;
end;
end.