rice
2012-03-05 20:04:10
How Long have You Played Runescape?
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
Mutant Squirrle
What is your general programming knowledge?
Basic pascal, basic ASM, some Java and basic HTML
Are you a member of any other communities?
MMOE, MMGM, and sythe.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
Mutant Squirrle
What is your general programming knowledge?
Basic pascal, basic ASM, some Java and basic HTML
Are you a member of any other communities?
MMOE, MMGM, and sythe.
Tell us about yourself…
From: rice
I am a 24 year old hard working father of 2 kids that are under 2 years of age. I work hard 13 hours a day while supplying all the necessary needs for my family. I enjoy learning new things and always take constructive criticism well. I originally started scripting when Odie3533, GenoDemoN, and Kaitneiks were on the scene of SCAR back in 2006. I have previous experience with old scar Includes like Squidoo and OSI at the time, but life didn't allow me to continue to play games and I had to grow up quickly and move away from Runescape. Til just a few months ago, I decided to play runescape again and wanted to relearn how to script with SCAR/Simba. I know my first script isn't a great script, but I am always learning and improving while time progresses and the more experienced I get. This Astral Crafter script is my first Real attempt at "scripting" in a serious form.
NOTE: I had to remove the Bitmaps because it was too big. If you would like the whole script please feel free to PM me.
Please show us one (or multiple) of your scripts.
program RiceCrafter;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i SRL/SRL/misc/paintsmart.simba}
{Requirements for successful Astral Runs }
{1. Must have all requirements done for Astral}
{ -Lunar Diplomacy Quest }
{ -Dream Mentor Quest }
{ -Optional magic skill of repair pouches }
{ from the livid farm minigame }
{ }
{2. Fill in the const and declare players }
{ }
{3. Have these following items on top of bank }
{ -Pure essence }
{ -Air Runes }
{ -Cosmic Runes }
{ -Astral Runes }
{ -Lobsters, Swordfishs, Monkfishs or Sharks }
{ }
{4. Inventory should have the following }
{ -Pouches on bottom of inventory slot }
{ -Law Runes on the bottom of inventory slot }
{ -Astral Runes Bottom of inventory slot }
{ }
{5. Start in bank }
const
SRLStats_User = ''; // Your SRL Stats ID (if you dont have one then just leave it as it is)
SRLStats_Password = ''; // Your SRL Stats Password (if you dont have one then just leave it as it is)
Food = 'monkfish'; //Lobster, Swordfish, Monkfish, Shark
MakeSmartProggy = 'yes'; //You want to see my SmartProggy?
CanYou75FixPouch= 'yes'; //Can you use level 75 Fix Pouch?, Livid Farming Magic
var
T, W, MoonClan, runs , Large, Medium, Giant, Small, NPCchatBubble: Integer;
Repair, RepairText, DarkMage, AirRunes, Cosmics, Ess, Access: Integer;
X, Y, Count,Astral, Exp, F00D, Photo, Scrollbar, Pouch75, MRepair, Srepair: integer;
Canvas: TCanvas;
info, info2, Time, RXP, TAC, StatX, print: string;
BankWalk, FailSafe1, FailSafe2, FailSafe3:TPointArray;
FailSafe4, FailSafe5, FailSafe6, WeAtAltar, FailSafeDR:TPointArray;
procedure DeclarePlayers;
begin
HowmanyPlayers :=2;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer :=0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active :=True;
Players[0].Integers[1] := 32100;//# of loads to do.
Players[0].Booleans[1] := False; //Take Breaks?
Players[0].Integers[2] := 300; // Time before breaking ( In minutes)
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active := False;
Players[1].Integers[1] := 32100;//# of loads to do.
Players[1].Booleans[1] := False; //Take Breaks?
Players[1].Integers[2] := 300; // Time before breaking ( In minutes)
end;
procedure AntiRandoms;
begin
case Random(1000) of
100: Hoverskill ('Runecrafting', false);
300: RandomRClick;
600: hoverskill ('summoning', false);
800: hoverskill ('Magic', false);
999: pickupmouse;
end;
if FindNormalRandoms then
Logout;
end;
procedure iBreak;
var
s, i, Breaks: Integer;
begin
if (Players[CurrentPlayer].Booleans[1] = True) then
begin
if (s = 0) then
s := Players[CurrentPlayer].Integers[2] * 60000; //+ RandomRange(300000, 600000);
if T = 1 then
begin
W:= GetTimeRunning;
if (W > s) then
begin
Logout;
i:= RandomRange(10, 15);
Writeln('Taking a break for ' + IntToStr(i) + ' minutes');
i:= i * 60000;
Wait(i);
T := 0;
s:= W + s;
Inc(Breaks);
LoginPlayer;
end;
end else
if T = 0 then
begin
T := T + 1;
end;
end;
AntiRandoms;
end;
procedure LoadBitMaps;
begin
end;
function AstralCounter: Integer;
begin
if FindBitMapTolerancein(Astral, X, Y, MIX1, MIY1, MIX2, MIY2, 45) then
Count := GetAmount(X,Y);
Result:= Count;
AntiRandoms;
end;
procedure FreeAllBitMap;
begin
FreeBitmap(MoonClan);
FreeBitmap(Large);
FreeBitmap(Medium);
FreeBitmap(Giant);
FreeBitmap(Small);
FreeBitmap(NPCchatBubble);
FreeBitmap(Repair);
FreeBitmap(RepairText);
FreeBitmap(DarkMage);
FreeBitMap(AirRunes);
FreeBitMap(Cosmics);
FreeBitMap(Ess);
FreeBitmap(Astral);
FreeBitmap(Photo);
FreeBitmap(access);
FreeBitmap(scrollbar);
FreeBitmap(Mrepair);
FreeBitmap(Srepair);
FreeBitmap(Pouch75);
end;
procedure ShutDown;
begin
Writeln('Bot Shutting Down');
Wait(1000+ Random(1000));
CloseBank;
Logout;
FreeAllBitMap;
TerminateScript;
end;
procedure TeleportBack;
begin
MMouse(747, 192, 1, 1);
ClickMouse2(True);
Wait(500)
if (FindBitmapToleranceIn(MoonClan, X, Y, 540, 190, 730, 460, 25)) then
MMouse(X, Y, 1, 1);
ClickMouse2(true);
Wait(3000+ Random(400));
AntiRandoms;
if not LoggedIn then ShutDown;
end;
procedure WalkToBank;
begin
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);
BankWalk := [Point(283, 968), Point(238, 956)];
SPS_WalkPath(BankWalk);
AntiRandoms;
if not LoggedIn then ShutDown;
end;
function RWBank:boolean;
begin
if RadialWalkTolerance(5135203, 303, 274, 60, 1, 1, 18) then
begin
Writeln('Bank Walk');
Result := true;
Exit;
end else
Writeln('RWbank Has Failed WalkToBank');
WalkToBank;
Result := True;
end;
function RWAstral1:boolean;
begin
if RadialWalkTolerance(6331047, 115, 95, 68, 1, 1, 15) then
begin
Writeln('Bank to Obelisk');
Result := true;
Exit;
end else
Writeln('RWAstral1 Has Failed Using Fail Safe 1');
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);
FailSafe1 := [Point(238, 953), Point(288, 975)];
SPS_WalkPath(FailSafe1);
Result := True;
end;
function RWAstral2:boolean;
begin
if RadialWalkTolerance(2701626, 178, 156, 62, 1, 1, 8) then
begin
Writeln('Obelisk to Dirt Ramp');
Result := true;
Exit;
end else
Writeln('RWAstral2 Has Failed Using Fail Safe 2');
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);
FailSafe2 := [Point(287, 974), Point(296, 1013)];
SPS_WalkPath(FailSafe2);
Result := True;
end;
function RWDR:boolean;
begin
if RadialWalkTolerance(1326157, 186, 150, 70, 1, 1, 10) then
begin
Writeln('Dirt Ramp To Bridge');
Result := true;
Exit;
end else
Writeln('RWNearWater Has Failed Using Fail Safe 3');
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);
FailSafeDR := [Point(296, 1013), Point(302, 1058)];
SPS_WalkPath(FailSafeDR);
Result := True;
end;
Function RWAstral3:boolean;
begin
if RadialWalkTolerance(1058364, 165, 114, 75, 1, 1, 17) then
begin
Writeln('Bridge To Tree1');
Result := true;
Exit;
end else
Writeln('RWAstral3 Has Failed Using Fail Safe 3');
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);
FailSafe3 := [Point(302, 1058), Point(329, 1105)];
SPS_WalkPath(FailSafe3);
Result := True;
end;
Function RWAstral4:boolean;
begin
if RadialWalkTolerance(1058364, 114, 160, 75, 1, 1, 17) then
begin
Writeln('Tree1 to Tree2');
Result := true;
Exit;
end else
Writeln('RWAstral4 Has Failed Using Fail Safe 4');
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);
FailSafe4 := [Point(329, 1104), Point(357, 1144)];
SPS_WalkPath(FailSafe4);
Result := True;
end;
Function RWAstral5:boolean;
begin
if RadialWalkTolerance(1718606, 114, 160, 60, 1, 1, 10) then
begin
Writeln('Tree2 to bridge');
Result := true;
Exit;
end else
Writeln('RWAstral5 Has Failed Using Fail Safe 5');
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);
FailSafe5 := [Point(328, 1132), Point(378, 1172)];
SPS_WalkPath(FailSafe5);
Result := True;
end;
Function RWAstral6:boolean;
begin
if RadialWalkTolerance(15263970, 82, 98, 75, 1, 1, 15) then
begin
Writeln('Bridge To Near Altar');
Result := true;
Exit;
end else
Writeln('RWAstral6 Has Failed Using Fail Safe 6');
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);
FailSafe6 := [Point(378, 1172), Point(424, 1177)];
SPS_WalkPath(FailSafe6);
Result := True;
end;
Function WeAtAstralAltar:boolean;
begin
if RadialWalkTolerance(15129814, 82, 90, 75, 1, 1, 10) then
begin
Writeln('We At Altar');
Result := true;
Exit;
end else
Writeln('WeAtAltar Has Failed Using Fail Safe 7');
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);
WeAtAltar := [Point(424, 1177), Point(472, 1171)];
SPS_WalkPath(WeAtAltar);
Result := True;
end;
procedure RWWalk;
begin
RWastral1;
Flag;
RWastral2;
Flag;
RWDR;
Flag;
RWAstral3;
Flag;
RWAstral4;
Flag;
RWAstral5;
RWAstral6;
flag;
WeAtAstralAltar;
end;
procedure SetStatsVars;
begin
StatX:= 'Astral Crafted';
Exp:= 8;
end;
procedure Progress;
begin
print:= 'Astrals';
Stats_Commit;
Stats_IncVariable(StatX, 52);
Stats_IncVariable('Runecrafting EXP(Gained))', Exp);
Writeln('');
SRLRandomsReport;
Writeln('');
Writeln('/=======================================================\')
Writeln('| Finishing Run #' + IntToStr(Runs));
Writeln('| Running for..' + TimeRunning);
Writeln('| ' + print + ' Crafted = ' + IntToStr(AstralCounter));
Writeln('| Experience gained...'+ IntToStr(Runs*52*8));
Writeln('\=======================================================/')
end;
procedure SetUpLogin;
begin
ClearDebug;
Smart_Server := 96;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
SetupSRLStats(810, SRLStats_User, SRLStats_Password);
LoginPlayer; // Logging in...
end;
function OBank: Boolean; //Credit to Kanah! Adjusted By Rice
var
CounterInfo,GlassInfo: TExtendedArray;
CounterTPA,GlassTPA,probBank: TPointArray;
CounterATPA,TempATPA: T2DPointArray;
tmpCTS,i,q,len: Integer;
SearchBox: TBox;
begin
CounterInfo := [3100512,5,0.07,1.52]; //[Color,Tol,HueMod,SatMod]
GlassInfo := [9015447,6,0.60,0.43];
tmpCTS := GetColorToleranceSpeed;
SetColorToleranceSpeed(2);
SetColorspeed2Modifiers(CounterInfo[2],CounterInfo[3]);
if (FindColorsTolerance(CounterTPA,Round(CounterInfo[0]),MSX1,MSY1,MSX2,MSY2,Round(CounterInfo[1]))) then
begin
//Now split it into groups, that are continuous color blocks
SplitTPAWrap(CounterTPA,1,CounterATPA);
len := length(CounterATPA);
SetLength(TempATPA,len);
//DrawDotsMulti(true,CounterATPA);
//loop Through and check the lengths, get rid of short ones
for i := 0 to (len-1) do
begin
if length(CounterATPA[i]) > 180 then
begin
TempATPA[q] := CopyTPA(CounterATPA[i]);
Inc(q);
end;
end;
len := q;
SetLength(TempATPA,len);
CounterATPA := CopyATPA(TempATPA);
SetLength(CounterATPA,len);
//DrawDotsMulti(true,CounterATPA);
//Now lets find the 4 that are close to each other
MergeATPAWrap(CounterATPA,CounterTPA);
//Split it again, this will make that group of 4 into 1
SplitTPAWrap(CounterTPA,50,CounterATPA);
len := length(CounterATPA);
//DrawDotsMulti(true,CounterATPA);
//Grab the biggest one and that is the 4 counters
if not(len = 0) then
begin
SortATPASize(CounterATPA,true);
CounterTPA := CopyTPA(CounterATPA[0]);
SearchBox := GetTPABounds(CounterTPA);
//Expand it a little in the y direction, in case we facing exactly north or south
IncEx(SearchBox.y1,0);//
IncEX(SearchBox.Y2,20);
//Now I'm going to go ahead and seperate the counters back into individual counters; as
// a back in case the glass can't be found
SplitTPAWrap(CounterTPA,1,CounterATPA);
len := length(CounterATPA);
//SMART_DrawBoxEx(false,SearchBox,clRed);
SetLength(probBank,len);
for i := 0 to (len-1) do
begin
probBank[i] := MiddleTPA(CounterATPA[i]);
end;
end;
//Now begins the search for the glass
SetColorspeed2Modifiers(GlassInfo[2],GlassInfo[3]);
if FindColorsTolerance(GlassTPA,Round(GlassInfo[0]),SearchBox.X1,SearchBox.Y1,SearchBox.X2,SearchBox.Y2,Round(GlassInfo[1])) then
begin
//Found some glass points
//SMART_DrawDotsEx(false,GlassTPA,clRed);
Inc(len);
SetLength(probBank,len);
probBank[len-1] := middleTPA(GlassTPA);
end else
writeln('');
//Now i need to mouse over each one and check the uptext
for i := (len-1) downto 0 do
begin
MMouse(probBank[i].x,probBank[i].y,0,0);
if (WaitUptext('ank bo',500)) then
begin
//here goes all the bank stuff
for q := 0 to 3 do
begin
Mouse(probBank[i].x,probBank[i].y,0,0,mouse_right);
wait(100);
ChooseOption('ank Bank');
if (WaitFunc(@BankScreen,100,3000)or(PinScreen)) then
begin
if (PinScreen) then
begin
if not(InPin(Players[CurrentPlayer].Pin)) then
CloseBank;
end;
//Force end the loops
i := -1;
q := 4;
end;
end;
end;
end;
end else
writeln('Failed to find counter colors');
SetColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Result := BankScreen;
if (Result) then
begin
writeln('opened bank');
end else
writeln('failed to open bank');
end;
function RiceBank: Boolean;
begin
result := true;
if (FindColorSpiralTolerance(x, y, 3702375, 10, 10, 400, 201, 24)) then
begin
MMouse(x, y, 0, 0);
ClickMouse2(True);
Flag;
Wait(random(350));
ClickContinue(True, True);
Wait(random(750));
if FindBitmapToleranceIn(Access, x, y, 13, 358, 496, 454, 30) then
MMouse(x, y, 0, 0);
ClickMouse2(true);
AntiRandoms;
end;
end;
function FailBank:boolean;
begin
result := true;
TeleportBack;
WalkToBank;
Flag;
OBank;
end;
function iBank: Boolean;
begin
if not LoggedIn then
ShutDown;
Result:= false;
t := 0;
repeat
Inc(t);
Writeln('Looking For Bank:' + IntToStr(t) + ' out of 6');
if BankScreen then
begin
exit;
end;
if not (oBank) then
begin
Ricebank;
flag;
end;
if BankScreen then
begin
exit;
end;
if not (RiceBank) then
begin
FailBank;
Flag;
end;
if BankScreen then
begin
exit;
end;
if not (Failbank) then
Wait(250);
Flag;
until BankScreen or (t > 5);
end;
procedure EatFood;
begin
if not LoggedIn Then
Exit;
if not BankScreen Then
begin
ibank;
end;
case lowercase(Food) of
'lobster' : F00D := DTMFromString('mbQAAAHicY2VgYOgB4g4g7gPiyUA8FYjPA/F1IL4CxHeA+DQQrw+TAJJMKJiLARMwYsFgAACaUQgl');
'swordfish' : F00D := DTMFromString('mlwAAAHicY2dgYGhmZGDoBuKJQNwHxJ2MELFyIJZhgGAFIFYCYmUglofSzTFdQJIJK+YCknI4MCMeDAUA/+8G2A==');
'monkfish': F00D := DTMFromString('mggAAAHicY2NgYJjEyMAwEYgXQPE8IJ4GxB+Bct+A+A0DhP0diH8AsbejJcP8miogiwkFcwFJEEYHjDgwBAAAZ90L0w==');
'shark' : F00D := DTMFromString('mggAAAHicY2NgYLBjZGAwB2JHIHYHYg8g1gfiEqBcAxBXA3EzEJcCcQsQd+RHAUkmDMzFgB0w4sAQAAAltwXX');
end;
if FindDTM(F00D, X, Y, MSX1, MSY1, MSX2, MSY2) Then
begin
MMouse(X, Y, 2, 2);
ClickMouse2(True);
Wait(Random(1500));
MMouse(490, 34, 2, 2);
ClickMouse2(True);
if FindDTM(F00D, X, Y, 540, 190, 730, 460) Then
begin
MMouse(X, Y, 2, 2);
ClickMouse2(True);
Ibank;
end;
end;
FreeDTM(F00D);
end;
procedure TalkToContinue;
begin
ClickContinue(True, True);
Wait(500+ Random(350));
AntiRandoms;
end;
procedure GetEss;
begin
Wait(600+ Random(500));
if BankScreen then
begin
if FindBitmapToleranceIn(Ess, X, Y, 35, 85, 480, 295, 20) then
begin
MMouse(X, Y, 1, 1);
if IsUpText('ure') then
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Wait(300+ Random(400));
ChooseOption('All');
end else
begin
Writeln('No More Ess');
end;
end else
begin
WriteLn('No Bank Screen');
ShutDown;
end;
AntiRandoms;
end;
procedure WithdrawCosmics;
begin
if FindBitMapTolerancein(Cosmics, x, y, MBX1, MBY1, MBX2, MBY2, 45)then
begin
Writeln('WithDrawing Cosmic For Repairing Pouches');
MMouse(X, y, 1, 1);
if IsUpText('osmic') then
MMouse(X, Y, 1, 1);
CLickMouse2(True);
end else
if not (FindColorSpiralTolerance(x, y, 1953489, 0, 0, 515, 335, 45)) then
begin
Writeln('Trying again Withdrawing Cosmic');
MMouse(X, Y, 0, 0);
if IsUpText('osmic') then
MMouse(X, Y, 1, 1);
ClickMouse2(True);
end else
begin
Writeln('No Cosmic Runes');
ShutDown;
end;
AntiRandoms;
end;
procedure WithdrawAirRunes;
begin
if FindBitMapTolerancein(AirRunes, x, y, MBX1, MBY1, MBX2, MBY2, 45)then
begin
Writeln('WithDrawing AirRunes For Repairing Pouches');
MMOuse(X, y, 1, 1);
if IsUpText('ir R') then
MMouse(X, Y, 1, 1);
ClickMouse2(True);
wait(400+Random(100));
ClickMouse2(True);
end else
if not (FindColorSpiralTolerance(x, y, 13487831, 0, 0, 515, 335, 25)) then
begin
Writeln('Trying again Withdrawing Air Runes');
MMouse(X, Y, 0, 0);
if IsUpText('ir R') then
MMouse(X, Y, 1, 1);
ClickMouse2(True);
end else
begin
Writeln('No Air Runes');
ShutDown;
end;
AntiRandoms;
end;
procedure Repair75;
begin
if (FindBitmapToleranceIn(Repair, X, Y, 540, 190, 730, 460, 10)) Then
begin
if not BankScreen then
begin
iBank;
end;
if BankScreen Then
begin
Writeln('WithDrawing Runes For Repair Pouches');
wait(500);
WithdrawCosmics;
wait(205);
CloseBank;
MMouse(747, 192, 1, 1);
ClickMouse2(True);
Wait(1000+random(500));
end;
if (FindBitmapToleranceIn(pouch75, x, y, 550, 200, 720, 430, 25)) then
begin
Writeln('Clicking 75 Pouch');
wait(500+ Random(250));
MMouse(x, y, 0, 0);
ClickMouse2(true);
wait(500+ random(100));
end;
if (FindBitmapToleranceIn(Repair, X, Y, 540, 190, 730, 460, 10)) Then
begin
wait(500+ Random(250));
MMouse(x, y, 0, 0);
ClickMouse2(true);
Wait(500+ random(100));
ibank;
end;
end;
end;
procedure Repair75M;
begin
if (FindBitmapToleranceIn(MRepair, X, Y, 540, 190, 730, 460, 10)) Then
begin
if not BankScreen then
begin
iBank;
end;
if BankScreen Then
begin
Writeln('WithDrawing Runes For Repair Pouches');
wait(500);
WithdrawCosmics;
wait(205);
CloseBank;
MMouse(747, 192, 1, 1);
ClickMouse2(True);
Wait(1000+random(500));
end;
if (FindBitmapToleranceIn(pouch75, x, y, 550, 200, 720, 430, 25)) then
begin
Writeln('Clicking 75 Pouch');
wait(500+ Random(250));
MMouse(x, y, 0, 0);
ClickMouse2(true);
wait(500+ random(100));
end;
if (FindBitmapToleranceIn(MRepair, X, Y, 540, 190, 730, 460, 10)) Then
begin
wait(500+ Random(250));
MMouse(x, y, 0, 0);
ClickMouse2(true);
Wait(500+ random(100));
ibank;
end;
end;
end;
procedure Repair75S;
begin
if (FindBitmapToleranceIn(SRepair, X, Y, 540, 190, 730, 460, 10)) Then
begin
if not BankScreen then
begin
iBank;
end;
if BankScreen Then
begin
Writeln('WithDrawing Runes For Repair Pouches');
wait(500);
WithdrawCosmics;
wait(205);
CloseBank;
MMouse(747, 192, 1, 1);
ClickMouse2(True);
Wait(1000+random(500));
end;
if (FindBitmapToleranceIn(pouch75, x, y, 550, 200, 720, 430, 25)) then
begin
Writeln('Clicking 75 Pouch');
wait(500+ Random(250));
MMouse(x, y, 0, 0);
ClickMouse2(true);
wait(500+ random(100));
end;
if (FindBitmapToleranceIn(SRepair, X, Y, 540, 190, 730, 460, 10)) Then
begin
wait(500+ Random(250));
MMouse(x, y, 0, 0);
ClickMouse2(true);
Wait(500+ random(100));
ibank;
end;
end;
end;
procedure CheckifRepair;
begin
case lowercase(CanYou75FixPouch) of
'no':
begin
if (FindBitmapToleranceIn(Repair, X, Y, 540, 190, 730, 460, 10)) Then
begin
if not BankScreen then
begin
iBank;
end;
if BankScreen Then
begin
Writeln('WithDrawing Runes For Repair NPC');
wait(500);
WithdrawCosmics;
wait(205);
WithdrawAirRunes;
wait(150);
CloseBank;
MMouse(747, 192, 1, 1);
ClickMouse2(True);
Wait(1000+random(500));
end;
if (FindBitmapToleranceIn(NPCchatBubble, X, Y, 550, 200, 720, 430, 25)) Then
begin
Writeln('Clicking NPC Bubble');
wait(500+ Random(250));
MMouse(x, y, 0, 0);
ClickMouse2(true);
Wait(500+ random(100));
DragMouse(487, 150, 0, 0, 487, 282, 0, 0);
Wait(500);
end;
if (FindBitmapToleranceIn(DarkMage, X, Y, 327, 21, 509, 328, 25)) Then
begin
Writeln('Clicking DarkMage Icon');
MMouse(X, Y, 1, 1);
ClickMouse2(True);
Wait(5000+ Random(250));
Repeat
TalkToContinue;
Until(FindBitmapToleranceIn(RepairText, X, Y, 58, 378, 363, 472, 25));
end;
if(FindBitmapToleranceIn(RepairText, X, Y, 58, 378, 363, 472, 25)) Then
begin
Writeln('Finding Repair Text');
MMouse(X, Y, 0, 0);
ClickMouse2(true);
Wait(500+ Random(250));
TalkToContinue;
TalkToContinue
MMouse(250, 468, 0, 0);
Clickmouse2(true);
GameTab(tab_inv);
iBank;
end;
end;
if (FindColorSpiralTolerance(x, y, 531485, 555, 211, 734, 460, 6)) then
begin
if not BankScreen then
begin
iBank;
end;
if BankScreen Then
begin
Writeln('WithDrawing Runes For Repair NPC');
wait(500);
WithdrawCosmics;
wait(205);
WithdrawAirRunes;
wait(150);
CloseBank;
MMouse(747, 192, 1, 1);
ClickMouse2(True);
Wait(1000+random(500));
end;
if (FindBitmapToleranceIn(NPCchatBubble, X, Y, 550, 200, 720, 430, 25)) Then
begin
Writeln('Clicking NPC Bubble');
wait(500+ Random(250));
MMouse(x, y, 0, 0);
ClickMouse2(true);
Wait(500+ random(100));
DragMouse(461, 105, 0, 0, 461, 160, 0, 0);
Wait(500);
end;
if (FindBitmapToleranceIn(DarkMage, X, Y, 390, 81, 475, 286, 25)) Then
begin
Writeln('Clicking DarkMage Icon');
MMouse(X, Y, 1, 1);
ClickMouse2(True);
Wait(5000+ Random(250));
Repeat
TalkToContinue;
Until(FindBitmapToleranceIn(RepairText, X, Y, 58, 378, 363, 472, 25));
end;
if(FindBitmapToleranceIn(RepairText, X, Y, 58, 378, 363, 472, 25)) Then
begin
Writeln('Finding Repair Text');
MMouse(X, Y, 0, 0);
ClickMouse2(true);
Wait(500+ Random(250));
TalkToContinue;
TalkToContinue
MMouse(250, 468, 0, 0);
Clickmouse2(true);
GameTab(tab_inv);
iBank;
end;
end;
end;
'yes':
begin
if (FindBitmapToleranceIn(Repair, X, Y, 540, 190, 730, 460, 10)) Then
begin
if not BankScreen then
begin
iBank;
end;
Repair75;
end;
if (FindBitmapToleranceIn(MRepair, X, Y, 540, 190, 730, 460, 10)) Then
begin
if not BankScreen then
begin
iBank;
end;
Repair75M;
end;
if (FindBitmapToleranceIn(SRepair, X, Y, 540, 190, 730, 460, 10)) Then
begin
if not BankScreen then
begin
iBank;
end;
Repair75S;
end;
end;
end;
end;
procedure FillPouches1;
begin
if (FindBitmapToleranceIn(Giant, X, Y, 540, 190, 730, 460, 25)) Then
begin
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Wait(300+ Random(400));
ChooseOption('ill');
end;
if (FindBitmapToleranceIn(Small, X, Y, 540, 190, 730, 460, 25)) Then
begin
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Wait(300+ Random(400));
ChooseOption('ill');
end;
AntiRandoms;
if not LoggedIn then ShutDown;
end;
procedure FillPouches2;
begin
if (FindBitmapToleranceIn(Large, X, Y, 540, 190, 730, 460, 25)) Then
begin
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Wait(300+ Random(400));
ChooseOption('ill');
end;
wait(500+ random(500));
Deposit(5, 8, true)
if (FindBitmapToleranceIn(Medium, X, Y, 540, 190, 730, 460, 25)) Then
begin
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Wait(300+ Random(400));
ChooseOption('ill');
end;
AntiRandoms;
if not LoggedIn then Shutdown;
end;
procedure EmptyPouches1;
begin
if (FindBitmapToleranceIn(Giant, X, Y, 540, 190, 730, 460, 25)) Then
begin
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Wait(300+ Random(400));
ChooseOption('mpty');
end;
if (FindBitmapToleranceIn(Small, X, Y, 540, 190, 730, 460, 25)) Then
begin
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Wait(300+ Random(400));
ChooseOption('mpty');
end;
AntiRandoms;
if not LoggedIn then ShutDown;
end;
procedure EmptyPouches2;
begin
if (FindBitmapToleranceIn(Large, X, Y, 540, 190, 730, 460, 25)) Then
begin
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Wait(300+ Random(400));
ChooseOption('mpty');
Wait(200+ Random(200));
end;
if (FindBitmapToleranceIn(Medium, X, Y, 540, 190, 730, 460, 25)) Then
begin
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Wait(300+ Random(400));
ChooseOption('mpty');
end;
AntiRandoms;
if not LoggedIn then ShutDown;
end;
function AltarF1nder(x, y: Integer): Boolean;
var
ColorSpeed, I: Integer;
TheArray: TPointArray;
ATPA: Array of TPointArray;
begin
ColorSpeed := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(11.12, 0.14);
FindColorsSpiralTolerance(MSCX, MSCY, TheArray,6645089, MSX1, MSY1, MSX2, MSY2, 3);
ColorToleranceSpeed(ColorSpeed);
ATPA := TPAToATPAEx(TheArray, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
Wait(200+Random(50));
if(IsUpTextMultiCustom(['Altar'])) then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;
procedure FindTheAltar;
begin
if FindNormalRandoms then
begin
ShutDown;
end else
begin
if AltarF1nder(X,Y) then
begin
Wait(300+Random(50));
if IsUpText('Altar')then
ClickMouse2(True) else
FindTheAltar;
end
else
end;
end;
procedure ClickAltar;
begin
if not LoggedIn then
begin
ShutDown;
end;
FindTheAltar;
end;
procedure LetsGoBank;
begin
teleportback;
flag;
RWBank
Wait(Random(1500));
iBank;
if not LoggedIn then ShutDown;
end;
procedure iEat;
begin
if (HPPercent<50) then
begin
writeln('need food');
EatFood;
ibank;
end;
end;
procedure nScreenProggy;
begin
begin
SmartSetDebug(True);
info := 'Rice Astral Crafter';
info2 := '( by Rice )';
Time := 'Total Time Ran: '+MsToTime(GetTimeRunning, Time_Abbrev)
RXP := 'Runecrafting XP: '' '+IntToStr(Runs*52*8)
TAC := 'Total Astrals Crafted: '' '+IntToStr(AstralCounter)
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Photo, Canvas, 5, 345);
SMART_DrawBitmap(true, Photo, point(5, 345));
SMART_DrawText(50, 355 ,loginChars, info, clblue);
SMART_DrawText(50, 375, loginChars, info2, clblue);
SMART_DrawText(30, 395, loginChars, Time, clblue);
SMART_DrawText(30, 415, loginChars, RXP, clblue);
SMART_DrawText(30, 435, loginChars, TAC, clblue);
end;
end;
procedure OnscreenProggy;
var
Fine: Integer;
begin
case lowercase(MakeSmartProggy) of
'yes':
begin
nScreenProggy;
end;
'no':
begin
repeat
Inc(Fine);
writeln('Rice progress report not good enough?');
writeln('')
until(Fine=1);
end;
end;
end;
procedure AstralBanking;
begin
AntiRandoms;
OnScreenProggy;
iEat
iBreak;
if not BankScreen then
begin
iBank;
end;
Writeln('Starting To Fill Pouches');
Wait(100);
GetEss;
Wait(300+ Random(300));
FillPouches1;
CheckifRepair;
Wait(300+ Random(300));
GetEss;
Wait(300+ Random(300));
FillPouches2;
Wait(200+ Random(300));
GetEss;
Wait(200+ Random(300));
CloseBank;
OnScreenProggy;
if not LoggedIn then ShutDown;
end;
procedure BringUsToAltar;
begin
AntiRandoms;
OnScreenProggy;
MMouse(660, 189, 1, 1);
ClickMouse2(True);
RWWalk;
wait(555);
Flag;
AntiRandoms;
ClickAltar;
Writeln('Lets Start Crafting');
Wait(2950+ Random(500));
Writeln('Start Emptying Pouches');
EmptyPouches1;
ClickAltar;
Wait(2950+ Random(450))
EmptyPouches2;
ClickAltar;
Wait(2900+ Random(250))
WriteLn('Back to Bank');
LetsGoBank;
OnScreenProggy;
RestUntil(60);
end;
begin
ActivateClient;
SetUpLogin;
DeclarePlayers;
Wait(5500);
SetAngle(SRL_ANGLE_HIGH);
LoadBitMaps;
repeat
AntiRandoms;
AstralBanking;
OnScreenProggy;
BringUsToAltar;
OnScreenProggy;
Progress;
AntiRandoms;
Inc(Runs);
until ((Runs = Players[0].Integers[1]) or not (LoggedIn));
FreeAllBitMap;
end.