Simba Code:
program new;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
Const
{---SMART Setup Constants---}
WORLD = 61;
MEMBERS = false;
SIGNED = true;
{---------------------------}
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;//Change this accordingly
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
With Players[0] do
Begin
Name :='user'; //Name
Pass :='pass'; //Pass
Active := True; //True if you want this player to be used
End;
End;
Procedure AntiBan(Chance:Integer);
Begin
End;
Procedure MyWait(Time:Integer);
Var Marky:Integer;
Begin
MarkTime(Marky);
Repeat
AntiBan(10000);
Wait(RandomRange(1,30));
Until ( TimeFromMark(Marky) >= Time )
End;
Function FindFishingSpotTPA:Boolean;
Var
MyTPA : TPointArray;
MyATPA : T2DPointArray;
PointT : TPoint;
x,y,i,trys : Integer;
Begin
If Not LoggedIn Then Exit;
Repeat
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.34,1.18);
FindColorsSpiralTolerance(x,y,MyTPA,11576479, MSx1, MSy1, MSx2, MSy2, 4);
Inc(Trys);
Wait(RandomRange(5,95));
Until (Length(MyTPA) > 0) Or (Trys >= 12)
If Trys >= 12 Then
Begin
writeln('Not found colour exiting :(');
Result := False
Exit;
End;
MyATPA := TPAtoATPAEx(MyTPA,15,15);
For i := 0 to High(MyATPA)Do
Begin
PointT := MiddleTPA(MyATPA[i]);
writeln('looking though tpa this is the ' + IntToStr(I) +' time');
MMouse (PointT.x, PointT.y, RandomRange(-5,5), RandomRange(-5,5));
If WaitUptext('age',4500) then
Begin
SetColorToleranceSpeed(1);
writeln('found uptext');
GetMousePos(x, y);
Result := True
If Random(3000) = 5 Then
Begin
writeln('right clciking');
Mouse(x, y, 0, 0, False);
WaitOption('ag',4500);
End Else Begin
Mouse(x,y,0,0,True);
writeln('left clicking');
End;
Exit;
End;
writeln('did not click this was number ' + IntToStr(I) + ' in the array of tpa ');
End;
Wait(RandomRange(250,999));
End; {
Function FindFishingSpotRef:Boolean;
Function WalkToNoteGuyTPA:Boolean; }
Function WalkTo(Who:String):Boolean;//Spot/Guy
Var Path:TTileArray;
Begin
Case Lowercase(Who) Of
'guy' :Path := [ Tile(2924, 3175), Tile(2914, 3163), Tile(2900, 3156),
Tile(2886, 3145), Tile(2874, 3150), Tile(2860, 3149),
Tile(2851, 3145)
];
'spot' :Path := [ Tile(2854, 3144), Tile(2866, 3152), Tile(2880, 3162),
Tile(2895, 3162), Tile(2911, 3166), Tile(2924, 3175)
];
End;
Result := WalkPath(Path)
End;
Function CheckIfFishingColor:Boolean;
Var InvAmount,MarkingTime:Integer;
Begin
InvAmount := InvCount
MarkTime(MarkingTime);
writeln(' entering color fishing loop, this may result in you doing nothing for upto 4 mins ');
Repeat
If InvCount > InvAmount Then
Begin
writeln('More items in inv result true and exiting');
Result := True
Exit;
End;
If TimeFromMark(Markingtime) >= 60000*4 Then
Begin
writeln(' It has been over 4 mins we are now exiting and returning false');
Result := False
Exit;
End;
MyWait(RandomRange(500,5000));
Until(False)
End;
Function CheckIfFishingRef:Boolean;
Begin
If GetAnimation > 0 Then
Begin
Result := True
writeln('Reflection says we are doing something resulting true');
End Else Begin
Result := False
writeln('Reflection says we are not fishing');
End;
End;
{
Function TurnFishToNotesTPA:Boolean;
Var x,y,i:Integer;
MyTPA:TPointArray;
PointT:TPoint;
Begin
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.8,0.18);
FindColorsSpiralTolerance(x,y,MyTPA,3421238, MSx1, MSy1, MSx2, MSy2, 3);
If Length(MyTPA) <= 2 Then
Begin
writeln('Not found the guy');
Result := False
Exit;
End;
While IsMoving DO
Begin
MyWait(500);
End;
Wait(RandomRange(100,300));
For I := 0 To High(MyTPA) Do
Begin
PointT := MyTPA[i]
MMouse(PointT.x,PointT.y,4,4);
If Not WaitUptext('es',RandomRange(3000,6000)) Then
Begin
writeln('COuld not find uptext on note guy');
Result := False
Exit;
End;
GetMousePos(x,y);
Mouse(x,y,0,0,False);
If Not WaitOption('chan',RandomRange(2000,5000)) Then
Begin
writeln('Could not find the option to exchange ');
Result := False
Exit;
End;
Result := True
If InvFull Then
Result := False
End;
End;
}
Function FindAndClickStilesRef:Boolean;
Var Stiles:TNPC;
x,y:Integer;
Begin
If FindNPC(11267,Stiles) Then
Begin
MMouse(Stiles.Pixel.x,Stiles.Pixel.y,3,3);
If WaitUptext('ile',3000+Random(300)) Then
Begin
GetMousePos(x,y);
Mouse(x,y,0,0,False);
If Not WaitOption('xch',RandomRange(1000,3000)) Then
Begin
writeln('Not found Option');
exit;
End;
Result := true
End Else writeln('No uptext :(');
End Else writeln('no npc found');
End;
//Procedure Proggy;
Procedure StartUp;
Begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;
SetupSRL;
SetUpReflectionEx(true);
DeclarePlayers;
LoginPlayer;
End;
//Procedure SmartDebug; //????? Maybe later
Procedure StopPlayer;
Begin
If LoggedIn THen Logout;
NextPlayer(False);
LogInPlayer;
End;
Procedure MainLoop;
Var time:Integer;
Begin
Repeat
If Not LoggedIn Then Exit;
If Not Invfull Then
Repeat
If Not CheckIfFishingRef Or CheckIfFishingColor Then
If FindFishingSpotTPA Then
Begin
MarkTime(time);
Repeat
If Not CheckIfFishingColor Then Break;
If Not CheckIfFishingRef Then Break;
If TimeFromMark(Time) > 1200000 Then Break;
MyWait(RandomRange(50,1000));
Until(False);
End;
If InvFull Then
Begin
If Not WalkTo('Guy') Then
StopPlayer;
If Not FindAndClickStilesRef Then
Begin
//CHeck where we are
//walk web walk somewhere?
StopPlayer;
//stop is not worked after trying again
End;
If Not WalkTo('spot') Then
StopPlayer;
End;
Until(Not LoggedIn {Or player loads(Not sure how to set :('});
NextPlayer(False);
Until(AllPlayersInactive);
End;
Begin
StartUp;
MainLoop;
End.
and the debug