Simba Code:
Program JoesAstralCrafterV2;
//{$DEFINE SMART}
{$i SRL/srl.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
Const
Pouches = True; // Change to False if not using pouches.
GiantPouchSpot = 1; // Giant pouch spot in your inventory, 0 if not using it
LargePouchSpot = 2; // Large pouch spot in your inventory, 0 if not using it
MediumPouchSpot = 3; // Medium pouch spot in your inventory, 0 if not using it
SmallPouchSpot = 0; // Small pouch slot in your inventory, 0 if not using it
EssenceSpot = 1; // Spot of essence in your bank
AstralRuneSpot = 4; // Spot of astral in inventory
CosmicRuneSpot = 3;
LawRuneSpot = 4;
HP = 84; // Your Health Level
Rest = 25; //% run to rest at
Food = 2; // Bank Spot of Sharks
Version = 1.0;
//SRL Stats
SRLStats_Username = '';
SRLStats_Password = '';
//Break settings
BreakIn = 180; //How long before we take a break? (minutes)
BreakFor = 13; //How long will we break for? (minutes)
Bir = 7; //Random minutes to add/subtract from how long until we break
Bfr = 3; //Random minutes to add/subtract from break duration
Var
X, Y, Shark:Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Runecrafting;
Active := True;
end;
end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////DO NOT TOUCH BEYOND THIS POINT//////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure WelcomeMessage;
begin
WriteLn('Welcome to Joes Astral Crafter');
end;
Procedure AntiBan;
Begin
Case Random(500) Of
0: HoverSkill('Runecrafting', True);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: RandomAngle(1);
3: RandomRClick;
4: FindDead();
end;
end;
Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
FindSpinTicket();
TerminateScript;
end;
Procedure DTMs;
Begin
Shark := DTMFromString('m6wAAAHiclcyxCYAwGAXhFy2ziyu4hAsJIQRE02hhIKBO6hV/YRkPvva8pLWXgkk4Uc2OBTMyNifdyAhIOPDgQjER0zhw7xq153749ALTMg2S');
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
LevelUp;
end;
function DecayedPouch: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.30, 0.26);
FindColorsSpiralTolerance(MICX, MICY, arP, 2764080, MIX1, MIY1, MIX2, MIY2, 7);
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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 1.24) and (X <= 4.58) and (Y >= 1.29) and (Y <= 4.77) and (Z >= 1.20) and (Z <= 4.44) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Procedure RepairRunePouch;
Begin
If BankScreen then
If FindObjTPA(X, Y, DecayedPouch, 5, 2, 10, 10, 50, ['Empty']) then
Begin
MouseBankSlot(CosmicRuneSpot, mouse_Left);
MouseBankSlot(LawRuneSpot, mouse_Left);
CloseBank;
Begin
GameTab(Tab_Magic);
MouseBox(698, 476, 712, 489, 1);
Begin
If FindObjTPA(X, Y, DecayedPouch, 5, 2, 10, 10, 50, ['Empty']) then
MMouse(x, y, 5, 5);
ClickMouse2(True);
end;
end;
end;
end;
procedure Eat;
begin
AntiRandoms
AntiBan;
Begin
MouseBankSlot(Food, 0);
ChooseOption('3');
Wait(RandomRange(600, 1000));
repeat
If FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('Eat');
Wait(RandomRange(700,1000));
until (HPPercent = 100);
if FindDTM(Shark, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
repeat
FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2);
Mouse(x, y, 5, 5, mouse_Left);
Wait(1000);
until not FindDTM(Shark, x, y, MIX1, MIY1, MIX2, MIY2);
end;
end;
end;
Function LocateBank:Boolean;
Var
TPAA: T2DPointArray;
TPA: TPointArray;
CTS, I, Retry: Integer;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6057336, MSX1, MSY1, MSX2, MSY2, 1); // Enter the Color and Tolerance Here at the Right place.
ColorToleranceSpeed(CTS);
TPAA := TPAToATPAEx(TPA, 77, 24); //Put the Width and Heigh here
SortATPASize(TPAA, True);
For I := 0 To High(TPAA) Do
If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
Begin
repeat
inc(Retry);
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
if IsUpText('ank ooth') then
Begin
Result := True;
GetMousePos(X, Y);
mouse(x,y,5,5,True);
Break;
End;
until (Retry = 2);
Break;
end;
end;
Procedure WithdrawEssence;
Begin
AntiRandoms;
AntiBan;
Begin
If BankScreen then
MouseBankSlot(EssenceSpot, mouse_Right);
if WaitOption('Withdraw-All',2000) then
begin
ChooseOption('All');
Wait(RandomRange(1000, 1200));
InvMouse(GiantPouchSpot, mouse_Right);
ChooseOption('Fill');
Wait(RandomRange(1000, 1200));
InvMouse(LargePouchSpot,mouse_Right);
ChooseOption('Fill');
MouseBankSlot(EssenceSpot, mouse_Right);
if WaitOption('Withdraw-All', 500) then
ChooseOption('All');
Wait(RandomRange(1000,1200));
InvMouse(MediumPouchSpot, mouse_Right);
ChooseOption('Fill');
MouseBankSlot(EssenceSpot, mouse_Right);
if WaitOption('Withdraw-All', 500) then
ChooseOption('All');
end;
end;
end;
procedure WalkToAltar;
begin
ObjDTM_Walk('131:120:2:0:7:75:127:0:7:98:131:4:124:115:137:115:135:129:128:127', 0, 100, 80, True);
Wait(500);
ObjDTM_Walk('75:142:3:0:7:36:123:0:7:48:91:0:7:102:138:4:68:134:80:136:78:146:67:147', 0, 100, 80, True);
Wait(500);
ObjDTM_Walk('98:136:2:0:7:44:60:0:7:110:75:4:92:130:105:128:104:142:93:141', 0, 100, 80, True);
Wait(500);
ObjDTM_Walk('131:108:2:2:7:101:72:2:7:113:72:4:124:101:136:103:137:114:127:112', 0, 100, 80, True);
Wait(500);
ObjDTM_Walk('113:113:3:2:7:105:123:2:7:94:80:2:7:117:131:4:108:112:118:107:121:119:108:120', 0, 100, 80, True);
Wait(500);
ObjDTM_Walk('146:90:3:2:7:74:92:2:7:86:100:2:7:109:88:4:139:87:147:85:150:96:135:100', 0, 100, 80, True);
Wait(500);
ObjDTM_Walk('122:74:2:2:7:62:76:2:7:38:88:4:117:71:131:68:126:83:115:81', 0, 100, 80, True);
end;
Function FindAltar:Boolean;
Var
TPAA: T2DPointArray;
TPA: TPointArray;
CTS, I, Retry: Integer;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 8025208, MSX1, MSY1, MSX2, MSY2, 1); // Enter the Color and Tolerance Here at the Right place.
ColorToleranceSpeed(CTS);
TPAA := TPAToATPAEx(TPA, 19, 3); //Put the Width and Heigh here
SortATPASize(TPAA, True);
For I := 0 To High(TPAA) Do
If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
Begin
repeat
inc(Retry);
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
if IsUpText('ltar') then // Enter The name of Your NPC or Monster
Begin
Result := True;
GetMousePos(X, Y);
mouse(x,y,3,3,True);
Break;
End;
until (Retry = 2);
Break;
end;
end;
Procedure CraftRunesInPouch;
Begin
If FindAltar then
If Pouches = True then
Begin
Wait(RandomRange(800, 1000));
InvMouse(GiantPouchSpot, mouse_Right);
ChooseOption('Empty');
MMouse(x, y, 5, 5);
ClickMouse2(True);
Wait(RandomRange(1200, 1500));
InvMouse(LargePouchSpot,mouse_Right);
ChooseOption('Empty');
MMouse(x, y, 5, 5);
ClickMouse2(True);
Wait(RandomRange(1200,1500));
InvMouse(MediumPouchSpot,mouse_Right);
ChooseOption('Empty');
MMouse(x, y, 5, 5);
ClickMouse2(True);
Wait(RandomRange(1200,1500));
InvMouse(SmallPouchSpot,mouse_Right);
ChooseOption('Empty');
MMouse(x, y, 5, 5);
ClickMouse2(True);
Wait(RandomRange(1200,1500));
end;
end;
Procedure TeleToIsle;
Begin
AntiRandoms;
AntiBan;
Begin
GameTab(Tab_Magic);
MouseBox(562, 217, 585, 240, mouse_Left);
Begin
Wait(1000);
LodestoneTeleport('Lunar Isle')
ClickMouse2(True);
Wait(18000);
end;
end;
end;
procedure WalkToBank;
begin
ObjDTM_Walk('120:86:2:0:7:99:122:0:7:96:59:4:113:79:126:81:123:93:116:93', 0, 100, 80, True);
Wait(500);
ObjDTM_Walk('95:53:2:0:7:58:50:0:7:96:101:4:88:49:99:50:96:60:91:59', 0, 100, 80, True);
Wait(500);
end;
begin
SetupSRL;
ObjDTM_Setup;
repeat
repeat
If LocateBank then
WithdrawEssence;
until(CloseBank)
//WalkToAltar;
//CraftRunesInPouch;
//TeleToIsle;
//WalkToBank;
until(false);
end.