Simba Code:
program BoltEnchanter;
{$DEFINE SMART}
{$i srl/srl.simba}
/////////////////////////////////////
// SeanStar's Bolt Enchanter //
/////////////////////////////////////
Var
EnchantBolt,BoltCount,XP,XPRates,StartTime,StartingExperience,BoltsPH,XPH,Timeout,Failed: Integer;
Const
BoltType = 7; // 1 for Opal, 2 for Sapphire, 3 for Jade, 4 for Pearl, 5 for Emerald,
//6 for Red Topaz, 7 for Ruby, 8 for Diamond, 9 for Dragonstone, 10 for Onyx
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=''; //Username
Players[0].Pass :=''; //Password
Players[0].Active:=True;
end;
Procedure EnchantBolts;
var
x, y: Integer;
begin
EnchantBolt := DTMFromString('78DA6374606260B80CC448E0CFB749609A1188FF0301A30750FE14AA9AD54D6E703560DA02287F1AB73960DA06287F9D801A905DB709A871C45493E4C687E99E4BF8D50000C886189A');
Wait(350 + RandomRange(200, 324));
repeat
if (not Gametab(Tab_Magic)) then
Gametab(Tab_Magic);
until (Gametab(Tab_Magic));
begin
if WaitFindDTM(x, y, EnchantBolt, 5000) then
Mouse(x, y, 6, 6, mouse_left);
wait(150 + RandomRange(200, 348));
Case BoltType Of
1: begin XPRates := 9; MMouse(70, 118, 8, 9); end;
2: begin XPRates := 17; MMouse(160, 118, 8, 9); end;
3: begin XPRates := 19; MMouse(250, 118, 8, 9); end;
4: begin XPRates := 29; MMouse(340, 118, 8, 9); end;
5: begin XPRates := 37; MMouse(430, 118, 8, 9); end;
6: begin XPRates := 33; MMouse(70, 248, 8, 9); end;
7: begin XPRates := 59; MMouse(160, 248, 8, 9); end;
8: begin XPRates := 67; MMouse(250, 248, 8, 9); end;
9: begin XPRates := 78; MMouse(340, 248, 8, 9); end;
10: begin XPRates := 97; MMouse(430, 248, 8, 9); end;
end;
ClickMouse2(False);
if WaitOptionMulti(['Enchant 10', '10 stacks', 'stacks of'], 500) then
begin
FindNormalRandoms;
Gametab(Tab_Magic);
Wait(20000 + RandomRange(7, 586));
Failed := 0;
end else
begin
Inc(Failed);
WriteLn('Failed selection ' + IntToStr(Failed));
end;
if (Failed = 3) then
begin
WriteLn('Out of bolts/runes, script complete.');
FreeDTM(EnchantBolt);
Logout;
TerminateScript;
end;
end;
FreeDTM(EnchantBolt);
end;
Procedure ProgressReport;
begin
XP := (GetXPBarTotal - StartingExperience);
XPH := Round(XP * (3600.0 / (GetTimeRunning / 1000.0)));
BoltCount := Round((XP) / ((XPRates) / 10.0));
BoltsPH := Round((BoltCount * (3600.0 / (GetTimeRunning / 1000.0))));
Writeln('=========BoltEnchanter==========');
Writeln('Time Running: ' + TimeRunning);
Writeln('Experience Earned: ' + IntToStr(XP));
Writeln('Experience/Hour: ' + IntToStr(XPH));
Writeln('Bolts/H: ' + IntToStr(BoltsPH));
Writeln('Bolts Enchanted: ' + IntToStr(BoltCount));
Writeln('================================');
MarkTime(Timeout);
end;
Procedure FreeDMTs;
begin
FreeDTM(EnchantBolt);
end;
Procedure Setup;
begin
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
SetUpSRL;
AddOnTerminate('FreeDMTs');
DeclarePlayers;
LoginPlayer;
ToggleXPBar(True);
StartingExperience := GetXPBarTotal;
StartTime:=GetSystemTime;
MarkTime(Timeout);
end;
Procedure Antiban;
begin
Case Random(100) Of
1: HoverSkill('magic', False);
2: Boredhuman;
3: Wait(2500 + random(3868));
4: PickUpMouse;
end;
end;
begin
Setup;
repeat
EnchantBolts;
ProgressReport;
Antiban;
until (AllPlayersInactive);
end.