Hello guys , this is my first script here. Decided to make it when i got bored of firemaking at maxguild.
The script is obviously not flawless and any criticism is greatly appreciated.
The only bug i found while running the script for few minutes was at 'waiting' part while throwing logs at bonfire
Credits
@Ashaman88 - took alot of stuff and ideas from his script
@The Mayor - for his amazing tutorial
@Coh3n - for his amazing tutorial
ORIGINAL
Simba Code:program MaxGuildBonfire;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
var
logCount: extended;
currentBTime, timeout, reset: TTimeMarker;
w, x, y, z: integer;
logDTM: integer;
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'user';
password := 'pass';
isActive := true;
isMember := true;
end;
currentPlayer := 0;
end;
procedure initScript();
begin
clearDebug();
smartEnableDrawing := true;
smartShowConsole := false;
disableSrlDebug := true;
smartPlugins := ['d3d9.dll'];
setupSRL();
addOnTerminate('terminate');
if not isLoggedIn() then
begin
players[currentPlayer].login();
end;
end;
procedure initPlayer();
begin
minimap.clickCompass;
mainscreen.setAngle(MS_ANGLE_HIGH);
if (not gameTabs.isTabActive(TAB_BACKPACK)) then
gameTabs.openTab(TAB_BACKPACK);
end;
procedure setDTMs;
begin
logDTM := DTMFromString('mwQAAAHic42RgYOAFYmkgFgVibgYI4ILyZYBYEqpGFCrHAlUHEhcDYj4gZgViFx1OIMkIxExImBFJjJEhBaoWH2YkAsMBABO8AjM=');
w := (players[currentPlayer].integers[0] * 60000);
x := (players[currentPlayer].integers[1] * 60000);
y := RandomRange(-13 * 60000, 13 * 60000);
z := RandomRange(-7 * 60000, 7 * 60000);
end;
procedure terminate();
begin
freeDTM(logDTM);
end;
function countLogs: integer;
var
X,Y,I: Integer;
begin
result := tabBackpack.countDTM(LogDTM);
end;
Function maxguildbanking: Boolean;
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit;
repeat
findColorsSpiralTolerance(x, y, TPA, 3776224, mainScreen.getBounds(), 23, colorSetting(2, 0.05, 1.18));
if (Length(TPA) < 1) then
exit;
ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0, 70);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ank chest'], 500) then
begin
fastClick(MOUSE_LEFT);
wait(randomRange(1500, 2500));
smartimage.clear;
break;
end;
end;
until BankScreen.IsOpen();
end;
Function bankPrifddinas: Boolean;
begin
if not IsLoggedIn then
Exit;
repeat
if BankScreen.IsOpen then
begin
typeSend('2', false);
wait(randomrange(500,1000));
end;
Until (TabBackpack.IsItemInSlot(28));
wait(randomrange(500,1000));
end;
Function addLogs: Boolean;
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit;
Result = false;
findColorsSpiralTolerance(x, y, TPA, 4099397, mainScreen.getBounds(), 12, colorSetting(2, 0.96, 1.38));
if (Length(TPA) < 1) then
exit;
ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0, 20);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['Bonfire', 'onfire'], 500) then
begin
fastClick(MOUSE_LEFT);
Result:= TabBackpack.WaitForShift(GaussRangeInt(2000,4000));
smartImage.clear;
break;
end;
end;
end;
Procedure Antiban();
begin
case random(600) of
1..3:
begin
MouseOffClient(Random(4));
Wait(GaussRangeInt(1000,7000));
end;
4..7:
begin
hoverSkill(Skill_Firemaking);
Wait(GaussRangeInt(1000,2000));
TabBackpack.Open;
end;
8..50:
begin
mousemovingobject;
end;
51..200:
begin
SleepAndMoveMouse(GaussRangeInt(1000,2500));
end;
201..400:
begin
MouseOffClient(Random(4));
Wait(GaussRangeInt(1000,7000));
end;
401..600:
begin
Wait(RandomRange(250, 1500));
end;
end;
end;
procedure waiting;
var
inv1, time, inv2: integer;
b: TBox;
t: TTimeMarker;
begin
if not IsLoggedIn then
Exit;
T.Start;
Inv1:= TabBackpack.Count;
Inv2:= GaussRangeInt(0,5);
Time:=GaussRangeInt(3500,5500);
Repeat
Wait(Random(100));
if not IsLoggedIn then
Exit;
//if CountLogs>Inv2 then
//AntiBan;
if Inv1>TabBackPack.Count then
begin
Inv1:=TabBackPack.Count;
T.Start;
Timeout.Start;
Reset.Start;
end;
if (ClaimTicket) Or (not IsLoggedIn) then
Exit;
Until (CountLogs=0) or (T.GetTime>Time);
end;
begin
declarePlayers();
initScript();
initPlayer();
setDTMs();
Antiban();
repeat
maxguildbanking();
bankprifddinas();
repeat
if addLogs then
waiting();
until TabBackpack.IsEmpty();
until false;
terminateScript();
end.
EDITED
Simba Code:program MaxGuildBonfire;
{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files
var
logDTM: integer;
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'user';
password := 'pass';
isActive := true;
isMember := true;
end;
currentPlayer := 0;
end;
procedure initScript();
begin
clearDebug();
smartEnableDrawing := true;
smartShowConsole := false;
disableSrlDebug := true;
smartPlugins := ['d3d9.dll'];
setupSRL();
addOnTerminate('terminate');
if not isLoggedIn() then
begin
players[currentPlayer].login();
end;
end;
procedure initPlayer();
begin
minimap.clickCompass;
mainscreen.setAngle(MS_ANGLE_HIGH);
end;
procedure setDTMs;
begin
logDTM := DTMFromString('mwQAAAHic42RgYOAFYmkgFgVibgYI4ILyZYBYEqpGFCrHAlUHEhcDYj4gZgViFx1OIMkIxExImBFJjJEhBaoWH2YkAsMBABO8AjM=');
end;
procedure terminate();
begin
freeDTM(logDTM);
end;
function countLogs: integer;
var
X,Y,I: Integer;
begin
result := tabBackpack.countDTM(LogDTM);
end;
Function maxguildbanking: Boolean;
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit;
repeat
findColorsSpiralTolerance(x, y, TPA, 3776224, mainScreen.getBounds(), 23, colorSetting(2, 0.05, 1.18));
if (Length(TPA) < 1) then
exit;
ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0, 70);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['ank chest'], 500) then
begin
fastClick(MOUSE_LEFT);
smartimage.clear;
wait(randomRange(1500, 2000));
break;
end;
end;
until BankScreen.IsOpen();
end;
Function bankPrifddinas: Boolean;
begin
if not IsLoggedIn then
Exit;
repeat
if not bankScreen.isOpen() then
break();
if getItemAmount(bankScreen.getBankSlotBox(10)) < 28 then
begin
writeLn('Less than 28 logs left - shutting down');
terminateScript();
end;
bankScreen.clickButton(BANK_BUTTON_PRESET_2)
until tabBackpack.isItemInSlot(28);
wait(randomrange(500,1000));
end;
Function addLogs: Boolean;
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit;
result := false;
findColorsSpiralTolerance(x, y, TPA, 2855021, mainScreen.getBounds(), 15, colorSetting(2, 0.99, 1.42));
if (Length(TPA) < 1) then
exit;
ATPA := TPA.toATPA(70, 70);
ATPA.filterBetween(0, 70);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['Bonfire', 'onfire'], 500) then
begin
fastClick(MOUSE_LEFT);
Result:= TabBackpack.WaitForShift(GaussRangeInt(2500,4500));
smartImage.clear;
break;
end;
end;
end;
Function Antiban: Boolean;
var
r: Integer;
begin
r := random(300)
case r of
1..120:
begin
MouseOffClient(Random(4));
Wait(GaussRangeInt(1000,7000));
Result := True;
end;
121..130:
begin
hoverSkill(Skill_Firemaking);
Wait(GaussRangeInt(1000,2000));
TabBackpack.Open;
Result := True;
end;
131..140:
begin
mousemovingobject;
Result := True;
end;
141..170:
begin
SleepAndMoveMouse(GaussRangeInt(1000,2500));
Result := True;
end;
171..300:
begin
MouseOffClient(Random(4));
Wait(GaussRangeInt(1000,7000));
Result := True;
end;
end;
end;
Function waiting(): Boolean;
var
prevCount, time: Integer;
t: TTimeMarker;
begin
if not isLoggedIn() then
exit();
time := GaussRangeInt(4000,5500);
prevCount := tabBackPack.count();
t.start();
repeat
if not isLoggedIn() or claimTicket() then
exit();
if countLogs > 2 then
Antiban;
if prevCount > tabBackPack.count() then
begin
prevCount := tabBackPack.count();
t.reset(); // each time the count changes, reset timer
t.start();
end;
until (t.getTime() > time) or (countLogs() = 0);
end;
begin
declarePlayers();
initScript();
initPlayer();
setDTMs();
repeat
if (tabBackpack.count >1) then
begin
repeat
if addLogs then
waiting;
until TabBackpack.IsEmpty();
end;
maxguildbanking();
bankprifddinas();
until false;
terminateScript();
end.


ORIGINAL
Reply With Quote







