Simba Code:
program Onion;
//{$DEFINE SMART}
{$i srl/srl.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
Const
SERVER = 61; // Enter "0" to pick a random server.
MEMBERS = False; // Set to True if using a RS-Members account. False if F2P.
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first char)
Version= '.7';
Var
TooLong: Integer;
X, Y: Integer;
Q: Array [0..1] of Integer;//DTM Declaring procedure.
aFound: Extended;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
end;
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(255) Of
0: HoverSkill('Mining', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;
Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_commit;
Terminatescript;
End;
Procedure Bankit; //Credits to Trickyy and Marpis for the Tut
Var
i : Integer;
Begin
If (Not(LoggedIn)) Then Exit;
For i:=1 To 4 Do
If OpenBank('db', True, True) Then
Break;
End;
Function DepoAll: Boolean;
Begin
If (InvEmpty) Then
Begin
Result := True;
Exit;
End;
QuickDeposit(SRL_DEPOSIT_ALL);
Result := WaitFunc(@InvEmpty, 50, 3000);
End;
function OnionColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 0.11);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 4742480, MSX1, MSY1, MSX2, MSY2, 8);
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
Result := arC[i];
//Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
//Writeln('AutoColor failed in finding the color.');
end;
Function PickOnion: Boolean;
Var
X, Y, PlusOne, OnionCounter: Integer;
Begin
If Not LoggedIn then
Exit;
MarkTime(TooLong);
FindNormalRandoms;
PlusOne:= InvCount +1;
X:=MSCX;
Y:=MSCY;
If (FindObjCustom(X, Y, ['Pick', 'ick'], [OnionColor, OnionColor], 7))Then
Begin
StatsGuise('We found Onion');
GetMousePos(X, Y);
Case Random(2) of
0: Mouse(X, Y, 3, 3, True);
1: Begin
Mouse(X, Y, 3, 3, False);
WaitOption('Pick', 500);
End;
End;
Flag;
MarkTime(OnionCounter);
If (TimeFromMark(Toolong) > 25000) Then
FailSafe('Could not find Onion');
Repeat;
If (TimeFromMark(Toolong) > 25000) Then
FailSafe('Could not find Onion');
FindNormalRandoms;
StatsGuise('AntiBan and Waiting');
Antiban;
Wait(100);
If InvCount=PlusOne Then
Writeln('Onion Picked');
Until (InvCount=PlusOne) or (TimeFromMark(OnionCounter) > 5000)
End;
End;
Procedure ToBank;
Var
cx, cy: Integer;
Begin
If ObjDTM_Find('63:55:6:0:7:55:22:1:7:93:20:1:7:20:76:1:7:110:113:1:7:93:44:10:7:52:61:4:46:45:74:45:78:65:43:65', cx, cy, True) Then
Begin
Writeln('We found it, now lets walk it!');
ObjDTM_Walk('63:55:6:0:7:55:22:1:7:93:20:1:7:20:76:1:7:110:113:1:7:93:44:10:7:52:61:4:46:45:74:45:78:65:43:65', 2, 100, 5, True);
End Else
Writeln('We could not walk here, what a shame');
End;
Procedure SetDTM;//DTM Defining procedure.
Begin
Q[0] := DTMFromString('mlwAAAHicY2dgYNjJxMBwFIjPAPEeIF4JxFOAeAYQMzEyMLwEquEF0vJQzAbEt4FiOUlGDJ8+fWTISfZkWDq1giHSU5Ph439OhmgDDob/QHl+HJgRD4YCAOaQEmM=');
Q[1] := DTMFromString('mlwAAAHicY2dgYNjMxMBwHIjPAvEiIJ4CxDOA+BwQSzMyMLwGquED0sZAzArEd4F8bSC9dGoFw6dPHxlykj0ZlMOFGD7/F2KINuBgsDXnYPgPVMOPAzPiwVAAANxoEfA=');
End;
Procedure FrDTM;//DTM Freeing procedure.
Begin
FreeDTM(Q[0]);
FreeDTM(Q[1]);
End;
begin
Smart_Server := 30;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ObjDTM_Setup;
ClearDebug;
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
SetDTM;
SetupSRLStats(439, SRLStats_Username, SRLStats_Password);
MouseSpeed := RandomRange(15, 25);
If FindDTMRotated(Q[0], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);
Repeat
Wait(50 + Random(25));
Until FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
End;
If FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);
End;
FrDTM;
ToBank;
end.
Simba Code:
If FindDTMRotated(Q[0], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);
Repeat
Wait(50 + Random(25));
Until FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
End;
If FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);
End;