Simba Code:
program GrahamsNeitiznotGoldSmelter;
{$DEFINE SMART}
{$i srl/srl.scar}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Pin := '';
end;
procedure AntiBan;
begin
if (not(LoggedIn)) then
Exit;
case random(100) of
0:
begin
HoverSkill('Smithing', false);
Wait(1000 + random(300));
GameTab(tab_Inv);
end;
1: PickUpMouse;
2:
begin
MakeCompass('rand');
Wait(200 + random(50)) ;
MakeCompass('rand');
Wait(50 + random(100));
ClickNorth(true);
end;
3:
begin
RandomMovement;
ClickNorth(True);
//SetAngle(true);
end;
4: RandomRClick;
end;
end;
function FurnaceColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 3.12);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 6054331, MSX1, MSY1, MSX2, MSY2, 7);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 18.92) and (X <= 33.18) and (Y >= 16.39) and (Y <= 26.22) and (Z >= 7.27) and (Z <= 19.62) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure WalkToFurnace;
var
x, y, FurnaceDTM: Integer;
begin
FurnaceDTM := DTMFromString('m1gAAAHic42JgYGCHYmYGBGAFYg4g5gZiXiDmgYqBACMQswAxFxDzQTEPVD3IjH/lklBV+DETA3GAsEkQjAAAMeYCNw==');
if FindDTM(FurnaceDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y + 20, 5, 5, true);
FreeDTM(FurnaceDTM);
FindNormalRandoms;
end;
end;
procedure FindFurnace;
var
x, y: Integer;
begin
x := MSCX;
y := MSCY;
if FindObjEX(x, y, ['melt'], [FurnaceColor], 5, 30, MSX1, MSY1, MSX2, MSY2) then
begin
FindNormalRandoms;
case random(3) of
0, 1: Mouse(x, y, 2, 2, true);
2:
begin
Mouse(x,y, 3, 3, false);
ChooseOption('melt');
end;
end;
end else
begin
WriteLn('Furnace not found..trying again');
x := MSCX;
y := MSCY;
if FindObjEx(x, y, ['melt'], [FurnaceColor], 20, 50, MSX1, MSY1, MSX2, MSY2) then
begin
FindNormalRandoms;
case random(3) of
0, 1: Mouse(x, y, 2, 2, true);
2:
begin
Mouse(x,y, 3, 3, false);
ChooseOption('melt');
end;
end;
end else
begin
x := MSCX;
y := MSCY;
WriteLn('Furnace still not found..try once more');
if FindObjEx(x, y, ['melt'], [FurnaceColor], 20, 50, MSX1, MSY1, MSX2, MSY2) then
begin
FindNormalRandoms;
case random(3) of
0, 1: Mouse(x, y, 2, 2, true);
2:
begin
Mouse(x,y, 3, 3, false);
ChooseOption('melt');
end;
end;
end else
begin
WriteLn('Furnace still not found..terminating script');
TerminateScript;
end;
end;
end;
Flag;
end;
procedure SmeltGold;
var
x, y, GoldBarDTM: Integer;
begin
GoldBarDTM := DTMFromString('mwQAAAHic42RgYOADYn4gZmWAAEYgZgdiASCWAWIRqJwYEAsDsRAQcyOpB6kVBOJ5taJAkokAhtiFDzASgeEAABwUAjQ=');
// ^^ is different from other gold bar DTM
if FindObjEx(x, y, ['ake'], [1474721], 10, 50, MCX1, MCY1, MCX2, MCY2) then
begin
case random(3) of
0, 1: Mouse(x, y, 2, 2, true);
2:
begin
Mouse(x,y, 3, 3, false);
ChooseOption('ake');
end;
end;
end else
begin
WriteLn('Could not ind smelt button..trying again');
end;
end;
procedure WaitWhileSmelting;
var
x, y, GoldBarDTM: Integer;
SlotBox: TBox;
begin
GoldBarDTM:= DTMFromString('mFQEAAHic42VgYOAHYl4gFgBiYSAWA2JpIJaF8pmBmIMBAhiBmAXKZ0QSYwJibiBmg+oRAmIRqNk8QMwJxPPrxKAqicdGDKQDRjIwCgAACUoCwg==');
SlotBox := InvBox(28);
repeat
Wait(2000);
Antiban;
WriteLn('We are waiting while we smelt!');
FindNormalRandoms;
until FindDTM(GoldBarDTM, x, y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2);
FreeDTM(GoldBarDTM);
Wait(2000 + random(250));
end;
procedure FindChest;
var
x, y: Integer;
begin
if FindObjEx(x, y, ['ank', 'est'], [1786712, 1720661], 5, 50, 0, 230, 85, 277) then
begin
FindNormalRandoms;
case random(3) of
0, 1: Mouse(x, y, 15, 15, true);
2:
begin
Mouse(x,y, 8, 3, false);
ChooseOption('ank');
end;
end;
end else
begin
writeln('Bank was not found..trying again');
if FindObjEx(x, y, ['ank', 'est'], [1786712, 1720661], 5, 50, 0, 230, 85, 277) then
begin
FindNormalRandoms;
case random(3) of
0, 1: Mouse(x, y, 15, 15, true);
2:
begin
Mouse(x,y, 8, 3, false);
ChooseOption('ank');
end;
end;
end else
WriteLn('Still could not find bank chest');
end;
Flag;
Wait(200 + random(100));
end;
procedure DepositAndRetrieve;
var
x, y, GoldOreDTM, DepositAllDTM: Integer;
begin
GoldOreDTM := DTMFromString('mwQAAAHic42RgYBAEYk4glgJieSgtAcQCQMzOAAFcQCwOZbMAMQ8QCwGxKFQ/NxDvmATSyYQXczEQBoxEYDgAAFwyAqE=');
DepositAllDTM := DTMFromString('mggAAAHicY2NgYBABYgkgVgJiIQYIYAdiPqg4D1SMG8ovdpIEkoxYMHaATSVCNQCSAgGc');
if FindDTM(DepositAllDTM, x, y, MBX1, MBY1, MBX2, MBY2) then
begin
Mouse(x, y, 5, 6, true);
WriteLn('Depositing all bars.');
FreeDTM(DepositAllDTM);
end else
begin
WriteLn('Could not find the deposit button..trying again');
Wait(1000 + random(100));
if FindDTM(DepositAllDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 5, 6, true);
WriteLn('Depositing all bars.');
FreeDTM(DepositAllDTM);
end else
begin
WriteLn('Still could not find the deposit button..try one more time');
FreeDTM(DepositAllDTM);
Wait(1000 + random(100));
if FindDTM(DepositAllDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 5, 6, true);
WriteLn('Depositing all bars.');
FreeDTM(DepositAllDTM);
end else
begin
WriteLn('Still could not find the deposit but..terminating script');
FreeDTM(DepositAllDTM);
TerminateScript;
end;
end;
end;
Wait(1000 + random(300));
if FindDTM(GoldOreDTM, x, y, MBX1, MBY1, MBX2, MBY2) then
begin
MMouse(x, y, 5, 6);
Mouse(x, y, 1, 1, false);
Wait(RandomRange(100, 300));
ChooseOption('All');
WriteLn('Withdrawing gold ore.');
FreeDTM(GoldOreDTM);
end else
begin
WriteLn('Could not find gold ore..trying again');
if FindDTM(GoldOreDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 5, 6, true);
ChooseOption('All');
WriteLn('Withdrawing gold ore.');
FreeDTM(GoldOreDTM);
end else
begin
WriteLn('Still could not find gold ore..terminating script');
FreeDTM(DepositAllDTM);
TerminateScript;
end;
end;
CloseBank;
Wait(1000 + random(400));
end;
begin
Smart_Server := 39;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
ActivateClient;
repeat
WalkToFurnace;
Flag;
Wait(6000 + random(100));
FindFurnace;
Flag;
Wait(3000 + random(250));
SmeltGold;
WaitWhileSmelting;
FindChest;
Flag;
Wait(5000 + random(469));
DepositAndRetrieve;
until(false)
end.