Simba Code:
program new;
{$include srl/srl/misc/smart.simba}
{$I SRL/SRL.simba}
{$I srl/srl/misc/debug.simba}
var
StartTime,XPBurn,Burned:Integer;
//Cases
UseProggys,NextLight:Boolean;
TypeOfLogs:String;
procedure DeclarePlayers;
begin
UseProggys := False; //Yes or No * True or False
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Active := True;
Players[0].Pin := '';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;// declare players
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
end;
Procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y,X2,Y2,A,Dist,MP: integer;
begin
A := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
if MP < 0 then
MP := 1;
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX-(A*MP), eX+(A*MP));
Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
WindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := A;
end;
Procedure HumanMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y,X2,Y2,A,Dist,MP: integer;
begin
A := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
if MP < 0 then
MP := 1;
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX-(A*MP), eX+(A*MP));
Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
WindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := A;
ClickMouse2(True);
end;
function FindButler(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.39, 1.37);
if not(FindColorsTolerance(arP, 2174030, 196,79,349,222, 9)) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 1.53) and (X <= 7.94) and (Y >= 1.28) and (Y <= 6.22) and (Z >= 0.91) and (Z <= 3.49) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
HumanMMouse(p.x,p.y,5,5);
Wait(100 + Random(100));
if (IsUpText('emon')) then
begin;
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Exit;
end;
GetMousePos(fx, fy);
end;
function FireColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.13, 0.49);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 1738208, MSX1, MSY1, MSX2, MSY2, 17);
if (Length(arP) = 0) then
begin
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 >= 13.94) and (X <= 58.29) and (Y >= 10.60) and (Y <= 58.15) and (Z >= 2.00) and (Z <= 18.07) then
begin
Result := arC[i];
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
function WaitNPCChatText(Text:String; Time:Integer):Boolean;
var
t:Integer;
begin
MarkTime(t);
repeat
wait(10);
if TimeFromMark(t) > Time then
begin
Result := False;
Exit;
end;
until(FindNPCChatText(Text,Nothing));
Result := True;
end;
procedure StoreUptext;
begin
if ExistsItem(1) then
begin
Mouseitem(1,3);
if IsUpText('ew') then
TypeOfLogs := 'Yew';
if IsUptext('agic') then
TypeofLogs := 'Magic';
if IsUpText('aple') then
TypeOfLogs := 'Maple';
if IsUpText('Oak') then
TypeOfLogs := 'Oak';
if IsUpText('llow') then
TypeOfLogs := 'Willow';
end;
if TypeOfLogs = '' then
writeLn('Failed uptext checking');
writeLn('We are burning: ' + TypeOfLogs);
end;
function WaitInvCountInc(Time:Integer):Boolean;
var
Inv1,Inv2,t:Integer;
begin
MarkTime(t);
Inv1 := InvCount;
repeat
wait(10);
Inv2 := InvCount;
if TimeFromMark(t) > Time then
begin
Result := False;
Exit;
end;
until(Inv2 > Inv1);
Result := True;
end;
procedure Randoms;
begin
if FindNormalRandoms then
if not LoggedIn then
TerminateScript;
end;
function WaitInvCountDec(Time:Integer):Boolean;
var
Inv1,Inv2,t:Integer;
begin
MarkTime(t);
Inv1 := InvCount;
repeat
wait(10);
Inv2 := InvCount;
if TimeFromMark(t) > Time then
begin
Result := False;
Exit;
end;
until(Inv2 < Inv1);
Result := True;
end;
procedure Proggy;
var
//progress variables
XP,XPH,Sec,BPH:Integer;
begin
ClearDebug;
XP := GetXPBarTotal - Players[CurrentPlayer].Integers[0];
Sec:= (1+((Getsystemtime-StartTime)/1000));
XPH := (3600 * XP) / (SeC);
BPH := (3600 * Burned) / (SeC);
writeLn('=============v1.7==================');
writeLn('============S1NFiremaker===========');
writeLn('Time Running: ' + TimeRunning);
writeLn('XP Earned: ' + IntToStr(XP));
writeLn('XP Per Hour: ' + IntToStr(XPH));
writeLn('Logs Burned: ' + IntToStr(Burned));
writeLn('Burned Per Hour: ' + IntToStr(BPH));
writelN('===================================');
writeLn('===================================');
end;
function WaitXPIncrease(Time:Integer):Boolean;
var
First,Second,t:Integer;
begin
First := GetXPBarTotal;
MarkTime(T);
repeat
wait(10);
Second := GetXPBarTotal;
if TimeFromMark(t) > Time then
begin
Result := False;
Exit;
end;
until(Second > First);
Result := True;
end;
function IsFireUnder:Boolean;
var
x,y:Integer;
begin
Result := FindColorSpiralTolerance(x,y,FireColor,242,172,263,181,3);
end;
function GetLogs(Amount:Integer; DoWait:Boolean):Boolean;
var
x,y,t:Integer;
begin
Result := False;
if ExistsItem(1) then
MouseItem(1,1);
if FindButler(x,y) then
begin
ClickMouse2(True);
If WaitNPCChatText('coins',1250) Then
Begin
ClickContinue(True, True);
TypeSendEx('1',False);
Wait(RandomRange(800,1000));
MouseItem(1,1);
if FindButler(x,y) then
ClickMouse2(True);
end;
if WaitNPCChatText('cert',4000) then
begin
TypeSendEx('1',False);
//wait(RandomRange(1500,1700));
If WaitFindColor(X,Y,0,266,397,281,407,1,5000) Then
//if FindColorSpiralTolerance(x,y,9877449,MCX1,MCY1,MCX2,MCY2,38) then
begin
TypeSend('26');
if DoWait then
if WaitInvCountInc(10000) then
Result := True;
end;
end;
end;
end;
function Light(Slot:Integer):Boolean;
begin
If Not NextLight Then
Begin
If Not OptionsExist(['a','g','h'],Nothing) Then
Begin
// Writeln('nooptionfound');
MouseItem(Slot,0);
End;
if WaitOptionMulti(['ight','Lig'],750) then
Begin
// Writeln('foundoptionfound');
Result := True;
End;
Inc(Burned);
End Else
Begin
// Writeln('clicking next spot');
MouseItem(Slot+1,0);
NextLight:=False;
End;
end;
function Relocate:Boolean;
var
x,y,ti:Integer;
begin
MakeCompass(0);
case random(2) of
0:
begin
HumanMouse(688,75,4,4);
FFlag(1);
Wait(RandomRange(650,750));
HumanMouse(671,80,2,2);
Wait(RandomRange(1000,1750));
Repeat
Wait(100);
Until Not IsMoving;
If FlagPresent Then
Begin
HumanMouse(671,80,2,2);
FFlag(1);
Wait(RandomRange(650,750));
End;
end;
1:
begin
HumanMouse(688,95,5,5);
FFlag(1);
Wait(RandomRange(650,750));
HumanMouse(688,80,2,2);
Wait(RandomRange(1000,1750));
Repeat
Wait(100);
Until Not IsMoving;
If FlagPresent Then
Begin
HumanMouse(688,80,2,2);
FFlag(1);
Wait(RandomRange(650,750));
End;
end;
end;
MarkTime(TI);
Repeat
Wait(100);
If TimeFromMark(TI)>6000 Then
Break;
Until InvCount>4;
if InvCount = 1 then
Begin
repeat
wait(10);
until(FindButler(x,y));
GetLogs(26,True);
Exit;
End;
Randoms;
end;
procedure BurnLogs;
var
i,x,y:Integer;
begin
for i := 2 to 28 do
begin
if FindColorSpiralTolerance(x,y,11059400,173,234,201,253,0) Then
Begin
HumanMouse(627,79,5,5);
FFlag(1);
Wait(RandomRange(650,750));
End;
if FindColorSpiralTolerance(x,y,11059400,173,101,201,120,0) Then
Begin
HumanMouse(628,91,5,5);
FFlag(1);
Wait(RandomRange(650,750));
End;
if ExistsItem(i) then
begin
if FIndBlackChatMessage('here') then
begin
case Random(2) of
0:
begin
HumanMouse(627,79,5,5);
FFlag(1);
Wait(RandomRange(650,750));
end;
1:
begin
HumanMouse(628,91,5,5);
FFlag(1);
Wait(RandomRange(650,750));
end;
end;
ExamineInv;
Wait(RandomRange(650,750));
Exit;
end;
Light(i);
Proggy;
NextLight:=True;
Light(i);
WaitXPIncrease(RandomRange(3000,3200));
if (InvCount = 1) And (Not OptionsExist(['a','g','h'],Nothing)) then
begin
GetLogs(26,False);
Relocate;
Randoms;
Exit;
end;
Randoms;
end else
If OptionsExist(['a','g','h'],Nothing) Then
Begin
NextLight:=False;
Light(i);
WaitXPIncrease(RandomRange(3000,3200));
if (InvCount = 1) And (Not OptionsExist(['a','g','h'],Nothing)) then
begin
GetLogs(26,False);
Relocate;
end;
Randoms;
End;
end;
Randoms;
end;
procedure ScriptStart;
var
StartInv,NTW:Integer;
begin
//start with 13 logs + noted, total of 14 items
//StartInv is equal to 14, ntw = 28 - startinv, 14
//Above is just me spouting out the equation, dont bother with it
StartInv := InvCount;
NTW := 28 - StartInv;
if StartInv < 2 then
GetLogs(NTW,True);
end;
begin
ClearDebug;
SetupLogin;
DeclarePlayers;
LoginPlayer;
MouseSpeed := RandomRange(18,20);
writeLn('Changes in 1.7: ');
writeln('Will no longer light the whole row');
writeLn('Wont be a retard anymore. Hopefully.');
NextLight:=False;
Wait(1500);
StartTime:=GetSystemTime;
if (Players[CurrentPlayer].Integers[1] = 0) then
begin
if not IsXPBarOpen then ToggleXPBar(true);
Players[CurrentPlayer].Integers[0] := GetXPBarTotal;
Players[CurrentPlayer].Integers[1] := (Players[CurrentPlayer].Integers[1] + 1);
end;
StoreUptext;
ScriptStart;
repeat
BurnLogs;
until not loggedin;
end.