For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip
Just the DTM I could just give you guys what I have so far and someone could finish the project? If any o e wants too
Current Project: Retired
For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip
NVM I'm done. LOL I didn't even notice I went back to get code and post here but the script was finished (The DTM for the closed door might need work) let me know if it works and if it does I'll release it.
Here:
Simba Code:program GuccisBananaRunner;
{$DEFINE SMART}
{$i srl/srl/misc/smart.simba}
{$loadlib sps}
{$i srl/srl.simba}
{$i sps/sps.simba}
const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True; //False if F2P
NumbOfPlayers = 1;
StartPlayer = 0;
var
x, y, DoorClosed, Found, BananaTimer: integer;
ToBox, ToBanana: TPointArray;
aFound: Extended;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP'];
With Players[0] do
begin
Name := ''; //Username.
Pass := ''; //Password.
Pin := ''; //Bank Pin.
Active := True;
end;
end;
Procedure OpenDoor; // Credit to TehQ
begin
DoorClosed:= DTMFromString('mwQAAAHic42RgYOBiZGAQBeLPQDYjkJYGYjEg/g3kMwNpPiC+DGTvBeJ9QPwIiG8D8XkgvgTE+4H4LhCnxVkyJESYMuQk2zBkJFgxJEWZMRjrsDPYmkuDxUF8YgAjERgOAJCmEW8=');
SetAngle(SRL_ANGLE_HIGH);
Found :=0;
begin
repeat
Inc(Found);
Wait(RandomRange(480,530));
if FindDTMRotatedSE(DoorClosed, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
MMouse(x, y, 1, 1);
until (IsUpText('pen') or (Found=5));
begin
if IsUpText('pen') then
Mouse(x, y, 1, 1, mouse_right);
Wait(RandomRange(480,530));
ChooseOption('pen');
Writeln('Opening door');
Wait(RandomRange(1500,1600));
end;
begin
if IsUptext('lose') then
writeln('Door opened');
end;
end;
FreeDTM(DoorClosed);
WriteLn( '' +TimeRunning);
end;
function Walking(Color, Tolerance: Integer; SortFrom: tpoint): Boolean;// credit to Camaro' for the tutorial and function!
var
i, x, y, rx, ry: Integer;
TPA: TPointArray;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
SortTPAFrom(TPA, SortFrom);
for i := 0 to High(TPA) do
begin
x := TPA[i].x;
y := TPA[i].y;
rx := RandomRange(-6, 6);
ry := RandomRange(-6, 6);
if (not rs_OnMinimap(x + rx, y + ry)) then
Continue;
Mouse(x + rx, y + ry, 0, 0, true);
FFlag(0);
Wait(300 + Random(300));
Result := True;
Break;
end;
end;
procedure FailSafe (Reason:String);
begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
TerminateScript;
end;
function Rest: Boolean;
var
S: String;
begin
if not (LoggedIn) then
Exit;
if (GetMMLevels('Run', S) <= 25) then
RestUntil(RandomRange(75,100));
Result := True
end;
procedure WalkToBox;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['9_9','10_9']);
ToBox := [Point(3894, 3839), Point(3904, 3836), Point(3916, 3834),
Point(3931, 3834), Point(3946, 3813), Point(3947, 3799), Point(3947, 3786),
Point(3947, 3772), Point(3947, 3759), Point(3948, 3738), Point(3947, 3722),
Point(3964, 3716), Point(3983, 3714), Point(4001, 3715), Point(4014, 3714)];
SPS_WalkPath(ToBox);
end;
procedure WalkToBanana;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['10_9','9_9']);
ToBanana := [Point(4017, 3714), Point(4008, 3714), Point(3983, 3716),
Point(3964, 3719), Point(3950, 3719), Point(3949, 3740), Point(3948, 3758),
Point(3948, 3775), Point(3946, 3789), Point(3929, 3789), Point(3913, 3791),
Point(3902, 3792), Point(3902, 3809), Point(3906, 3826), Point(3910, 3838),
Point(3895, 3837)];
SPS_WalkPath(ToBanana)
end;
function BananaColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 4694925, MSX1, MSY1, MSX2, MSY2, 23);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 20.61) and (H <= 20.70) and (S >= 39.32) and (S <= 39.63) and (L >= 41.35) and (L <= 50.02) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 20.09) and (X <= 30.61) and (Y >= 25.73) and (Y <= 39.27) and (Z >= 8.74) and (Z <= 13.00) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function FindBanana: Boolean; //Credit to Nebula
var
MyTPA : TPointArray;
i: Integer;
aPoints: T2DPointArray;
begin
SetLength(MyTPA, 0);
Result := false;
x := MSCX;
y := MSCY;
MarkTime(BananaTimer);
repeat
FindColorsSpiralTolerance(x, y, MyTPA, BananaColor, MSX1, MSY1, MSX2, MSY2, 10);
if Length(MyTPA) < 30 then
FindColorsSpiralTolerance(x, y, MyTPA, BananaColor, MSX1, MSY1, MSX2, MSY2, 15);
aPoints := TPAtoATPAEx(MyTPA, 7, 7);
SortATPAFromFirstpoint(aPoints, Point(MSCX, MSCY));
for i := 0 to 2 do
begin
if (Length(MyTPA) > 30) then
begin
MiddleTPAEx(aPoints[i], x, y);
MMouse(X, Y, 0, 0);
If (WaitUpTextMulti(['ana', 'ban', 'banana', 'ake'], 400)) then
begin
ClickMouse2(False);
if WaitOptionMulti(['earch', 'rate', 'h c'], 400) then
begin
Flag;
wait(RandomRange(10,100));
result := true;
break;
end else
break;
end else
break;
end;
end;
if (Result = true) then
break;
until (TimeFromMark(BananaTimer) > 20000)
end;
procedure Bank;
begin
if (InvFull) then
SPS_WalkPath(ToBox);
begin
if FindObjCustom(x, y, ['eposit', 'box', 'ank'], [5859188, 3687501], 5) then
Mouse(x, y, 0, 0, True);
DepositAll;
end;
end;
procedure GetBananas;
begin
if InvFull then
Bank;
begin
if (FindBanana=True) then
repeat
Mouse(x, y, 0, 0, False);
ChooseOption('earch');
begin
if FindBlackChatMessage('There are a lot of bananas in the crate.') then
Wait(4000);
Mouse(259, 407, 1, 1, True);
end;
until(InvFull)
end;
end;
begin
Smart_Signed := TRUE;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
Smart_Server := 30;
ActivateClient;
SetupSRL;
DeclarePlayers;
if not (LoggedIn) then
LoginPlayer;
Wait(4000+random(400));
Repeat
OpenDoor;
GetBananas;
OpenDoor;
Bank;
Until(False)
end.
Current Project: Retired
For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip
No guarantees guy's this was quick and I didn't have time to test but if I can perfect it then good, it will most likely need a better DTM for the door
Current Project: Retired
where should i start the script because i start it and it keeps repeating autocolour failed in finding colour
There are currently 1 users browsing this thread. (0 members and 1 guests)