SRL Archive - Archive

rice - SRL Member Application


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…
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.

DemiseScythe

2012-03-05 20:12:59

Yes thread

Sin

2012-03-05 20:14:59

Yes, but only thing that concerns me is activity :$

#respect for an adult who games <3

[XoL]

2012-03-05 20:19:21

I think you would make a great member in the future, but as of now I am going to vote no.

Reason:
Activity

You have been here since 2006, even if you just became active again you only have about 75 posts since Jan 25th (The first time you logged in since 2006).

I would really like you to work on that, as your bio really makes you seem like a great person I would love for you to be a SRL member.

rice

2012-03-06 03:59:08

Thank you guys for voting so far, I will work hard trying to be more active.

'Toxin

2012-03-09 09:32:05

From: rice
Thank you guys for voting so far, I will work hard trying to be more active.


That's all we ask, and being friendly and helping others around the forums!

footballjds

2012-03-09 09:36:50

YES

standards are a bit off
some of the logic is off and things need to be failsafed

overall it's good, and welcome back (:

rice

2012-03-10 01:26:56

[QUOTE='Toxin;955581]That's all we ask, and being friendly and helping others around the forums!

Thank you for your feedback 'Toxin I'll do that.

From: footballjds
YES

standards are a bit off
some of the logic is off and things need to be failsafed

overall it's good, and welcome back (:


Footballjds, thank you. Everyday I'm always looking for ways to increase my knowledge in SRL scripting and I will continue that onward into the future.

Jagex_Fagex

2012-03-10 02:05:42


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;

If it failed, why would result be true?


procedure LetsGoBank;
begin
teleportback;
flag;
RWBank
Wait(Random(1500));
iBank;
if not LoggedIn then ShutDown;
end;
Why did you decide to make RWBank a function instead of a procedure? You don't even check for the result.

 
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;


You set the result at the start, then in iBank;



if not (oBank) then
begin
Ricebank;
flag;
end;

if not (RiceBank) then
begin
FailBank;
Flag;
end;

First you call RiceBank like a procedure, then, RiceBank can never be false, so these lines are useless.

Sorry mate, no from me. You're on the right track, but i think you just need a bit more practice.

Harry

2012-03-10 02:17:24

MMouse(747, 192, 1, 1);

MMouse(x, y, 0, 0);

MMouse(x, y, 0, 0);

MMouse(490, 34, 2, 2);

List goes on, you find stuff at an exact point, add no randomness, using such a direct click on something that could have a lot more randomness, etc.

begin
MMouse(X, Y, 1, 1);
if IsUpText('ure') then
MMouse(X, Y, 1, 1);

Why move the mouse again if you're in same spot? You do this quite a few times throughout it.

For your inv clicking, why not get where the dtm points at then find out what invbox it's in, then click invbox? Such constant use of stuff in your inv being used with a dtm instead of the more dynamic use of inv boxes.

I don't get why you use MMouse and then instantly a clickMouse2. Just use Mouse.

I am really close to no for your overuse of coords. I am really picky about use of coords. Improve this stuff! :D

rice

2012-03-10 05:06:04

From: Jagex_Fagex

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;

If it failed, why would result be true?


procedure LetsGoBank;
begin
teleportback;
flag;
RWBank
Wait(Random(1500));
iBank;
if not LoggedIn then ShutDown;
end;
Why did you decide to make RWBank a function instead of a procedure? You don't even check for the result.

 
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;


You set the result at the start, then in iBank;



if not (oBank) then
begin
Ricebank;
flag;
end;

if not (RiceBank) then
begin
FailBank;
Flag;
end;

First you call RiceBank like a procedure, then, RiceBank can never be false, so these lines are useless.

Sorry mate, no from me. You're on the right track, but i think you just need a bit more practice.



@ Jagex_Fagex:

Dang, I never realized all the 'result' problems i have there. Thank you for pointing that out for me. I will fix that promptly and work on this issue.

From: Harry
List goes on, you find stuff at an exact point, add no randomness, using such a direct click on something that could have a lot more randomness, etc.


Why move the mouse again if you're in same spot? You do this quite a few times throughout it.

For your inv clicking, why not get where the dtm points at then find out what invbox it's in, then click invbox? Such constant use of stuff in your inv being used with a dtm instead of the more dynamic use of inv boxes.

I don't get why you use MMouse and then instantly a clickMouse2. Just use Mouse.

I am really close to no for your overuse of coords. I am really picky about use of coords. Improve this stuff! :D


@ Harry

here are the answer to your questions:

1. The randomness will definitely be worked on. I was fearful of miss clicking, that is why I limit my randomness.

2. I didn't notice I had MMouse in the same spot like that. I will be fixing that for sure.

3. As for the MMouse then Clickmouse2 repetitiveness is because when I first started scripting in 06 there was a dispute of Mouse being highly bannable and every at the time was using MMouse and Clickmouse2. I wasn't sure if it was true til this day. I will use Mouse procedure again instead of MMouse Clickmouse2.


Thank you guys for the response.

Jagex_Fagex

2012-03-10 05:31:02

Instead of limiting the randomness, you can always just MMouse to the item with a a bit of randomness, check for uptext, then mouse without randomness. This is the best way to go IMO. If you don't have randomness in the movements, that is a sure fire way to get banned.

Eg.


if(FindColorsTolerance(TPA, 1234567, MSX1, MSY1, MSX2, MSY2, 15))then
begin
if Length(TPA) = 0 then
Exit;
for i := 0 to High(TPA)do
begin
MMouse (TPA[i].x, TPA[i].y, 3, 3); //See randomness on mouse movement
if (IsUpTextMultiCustom(['Take', 'ake', 'ake Co'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False); //No randomness on click, as you already had randomness in the movement. You don't move, then move again and click.
ChooseOption('ake');
Wait(500+random(250));
Exit;
end;
end;
end;

'Toxin

2012-03-12 02:12:37

I also would like to point out that functions such as MMouse are very safe to use even with an offset of 1,1. Many scripters use it, you don't have to use a TPA necessarily but that would help in some cases. Jagex_Fagex's example would work perfectly, and if you read his code comment hopefully you'll see and understand why there will be no offset in that finding, then clicking.

rice

2012-03-12 05:10:49

Yes, I do understand the code. I makes perfect sense to me. Thank you guys for teaching more methods.

Jagex_Fagex

2012-03-12 06:00:52

From: rice
Yes, I do understand the code. I makes perfect sense to me. Thank you guys for teaching more methods.


That's what we're here for :) You can always ask to learn more at villavu.

Silent

2012-03-12 12:25:46

From: rice
Yes, I do understand the code. I makes perfect sense to me. Thank you guys for teaching more methods.


I love your attitude. As others have pointed out you don't have a lot of posts, and your scripting could use just a little bit of work. Having said that you appear to have a great desire to learn and from all the posts I've seen from you appear to be a very nice person. You have my yes.

Sin

2012-03-12 12:31:41

Yes, rice even though he isn't active, his Attitude surpasses most of the other applicants + his script is bang on!
Even if he doesn't make it this time, he DEFINETLY will the next time around, as long as his activity is high :)

cause

2012-03-12 12:43:09

Old guys are dope ;)

rice

2012-03-12 15:49:10

From: Silent SPY
I love your attitude. As others have pointed out you don't have a lot of posts, and your scripting could use just a little bit of work. Having said that you appear to have a great desire to learn and from all the posts I've seen from you appear to be a very nice person. You have my yes.


Yes, I agree. My Father in Law passing away from lung cancer and a lot of issues with my life prevented me from getting back into runescape. My scripts do need work and in a way I'm excited to see what other methods I will learn.


From: Sin
Yes, rice even though he isn't active, his Attitude surpasses most of the other applicants + his script is bang on!
Even if he doesn't make it this time, he DEFINETLY will the next time around, as long as his activity is high :)


I still learning new methods everyday, I'm glad you noticed my activity increased just like I said I was gonna work on that ;).


From: cause
Old guys are dope ;)



Lol, 24 isn't old…. then again I'm the one saying it.

Sin

2012-03-12 15:55:58

From: rice
Yes, I agree. My Father in Law passing away from lung cancer and a lot of issues with my life prevented me from getting back into runescape. My scripts do need work and in a way I'm excited to see what other methods I will learn

Hot dayum, a husband who likes his father in law ._____.
(or is it the other way around? Wife </3 Mother in law?)



Sorry for your loss anywho :s

rice

2012-03-12 16:24:28

My father in law was a great man my wife on the otherhand hates my side of the family LOL

the flea

2012-03-12 17:48:34

yes from me. Whilst there are part that can be improved upon within your script you have shown a good understanding and willingness to continue to improve upon your scripting.

Plus your an old user who has recently got back into this like me so I know where you are coming from trying to play a catch up game learning how things have developed over the last 5 years or so.

rice

2012-03-12 22:11:08

From: the flea
yes from me. Whilst there are part that can be improved upon within your script you have shown a good understanding and willingness to continue to improve upon your scripting.

Plus your an old user who has recently got back into this like me so I know where you are coming from trying to play a catch up game learning how things have developed over the last 5 years or so.


Its kinda fun to see a lot of different methods are used today, like back then we had to manually input in our own colors unless you paid 5 dollars for scarscape. Everyday, I continually learn new functions and practice them. Thank you the Flea

nielsie95

2012-03-24 06:59:12

Welcome in!