JAD
2009-10-11 11:41:55
I was just looking through Sabzi's scripts, and they are really great work. He uses a lot of advanced concepts, and has released 3 scripts + his own include:
Sabzi's AirCrafter:
His newest, Sabzi's Kharid Smelter:
You can also look in his signature for his (beta) Karamja fisher, and his include is with all his scripts downloads.
Sabzi's AirCrafter:
program AirCrafter;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/Users.scar}
{.include SRL/SRL/Misc/Reports.scar}
{.include Sabzinclude.scar}
{.include SRL/SRL/Misc/FindXP.scar}
{Instructions:
* Download Sabzinclude and place it right into the include folder found in your scar folder.
* Have something with you can enter the altar.(tiara equiped, talisman in FIRST INVENTORY SLOT, runecrafting staff wielded)
* It doesn't really matter where is your essence in your bank but you should got enough.
* Fill out DeclarePlayers set up consts, press play.
* If you don't know the boxrewards take a look at here: [url]http://www.villavu.com/forum/showthread.php?t=44245[/url]
* Time before switching/breaking will determinate how long a player should work without breaking/switching.
After the account worked enough if you got more then one player the script will switch to the next player
else it will take a break(time to break) +- 10%, the player remain active.
* Goal is default 99
* You can change line 1010 if you want. (CTRL + g)
* Line 1004, RandomTool, [url]http://www.villavu.com/forum/showthread.php?t=48538[/url]
* Post proggies, feedback, bugs, problems, questions.}
const
World = 135; //smart server to load;
// if you leave it 0 a random world will be chosen AND
// a new SMART will always loads at script startup
Signed = True; //True = Signed SMART Flase = Unsigned SMART;
//if False then SMART will load up the desired world
LSkill = 'runecrafting'; // You will get xp for this skill from a reward lamp.
WAEA = 2000; //Waiting time in milisecunds after entering the altar.
//Change it if you are not satisfied after the first few load.
procedure DeclarePlayers;
begin
CurrentPlayer:= 0; //First player.
NumberOfPlayers(1); //How many players you got?
with Players[0] do
begin
Name := 'username';
Pass := 'pass';
Nick := 'ick'; //example: name is 'janos' then nick is 'ano' (3-4 char from your name)
Pin := '';
BoxRewards := ['XP', 'mote', 'ostume']
Active := True;
Booleans[0] := False; //Set audio off?
Booleans[1] := True; //Tiara = True Tallysman = False
Integers[0] := 20; //Loads to do?
Integers[1] := 60; //Time before switching/breaking?(mins)
Integers[2] := 12; //If singleplayer time to break?(mins)
Integers[3] := 8; //Maxtime?(hours)
Integers[4] := 60; //Goal level?
end;
{ with Players[1] do
begin
Name := 'username';
Pass := 'pass';
Nick := 'ick';
Pin := '';
BoxRewards := ['XP', 'mote', 'ostume']
Active := True;
Booleans[0] := False; //Set audio off?
Booleans[1] := True; //Tiara = True Tallysman = False
Integers[0] := 20; //Loads to do?
Integers[1] := 60; //Time before switching/breaking?(mins)
Integers[2] := 12; //If singleplayer time to break?(mins)
Integers[3] := 8; //Maxtime?(hours)
Integers[4] := 60; //Goal level?
end;
with Players[2] do
begin
Name := 'username';
Pass := 'pass';
Nick := 'ick';
Pin := '';
BoxRewards := ['XP', 'mote', 'ostume']
Active := True;
Booleans[0] := False; //Set audio off?
Booleans[1] := True; //Tiara = True Tallysman = False
Integers[0] := 20; //Loads to do?
Integers[1] := 60; //Time before switching/breaking?(mins)
Integers[2] := 12; //If singleplayer time to break?(mins)
Integers[3] := 8; //Maxtime?(hours)
Integers[4] := 60; //Goal level?
end;
with Players[3] do
begin
Name := 'username';
Pass := 'pass';
Nick := 'ick';
Pin := '';
BoxRewards := ['XP', 'mote', 'ostume']
Active := True;
Booleans[0] := False; //Set audio off?
Booleans[1] := True; //Tiara = True Tallysman = False
Integers[0] := 20; //Loads to do?
Integers[1] := 60; //Time before switching/breaking?(mins)
Integers[2] := 12; //If singleplayer time to break?(mins)
Integers[3] := 8; //Maxtime?(hours)
Integers[4] := 60; //Goal level?
end;
with Players[4] do
begin
Name := 'username';
Pass := 'pass';
Nick := 'ick';
Pin := '';
BoxRewards := ['XP', 'mote', 'ostume']
Active := True;
Booleans[0] := False; //Set audio off?
Booleans[1] := True; //Tiara = True Tallysman = False
Integers[0] := 20; //Loads to do?
Integers[1] := 60; //Time before switching/breaking?(mins)
Integers[2] := 12; //If singleplayer time to break?(mins)
Integers[3] := 8; //Maxtime?(hours)
Integers[4] := 60; //Goal level?
end;}
end;
{###############################################################################
DO NOT TOUCH BELOW THIS IF YOU DON'T KNOW WHAT ARE YOU DOING!!!!
###############################################################################}
function FindAltarColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 6251620, MSX1, MSY1, MSX2, MSY2, 17);
if (Length(arP) = 0) then
begin
Writeln('Failed to find altarcolor, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 90) and (R <= 110) and (G >= 89) and (G <= 110) and (B >= 85) and (B <= 105) then
begin
Result := arC[i];
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding altar color.');
end;
function FindPortalColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 9749962, MSX1, MSY1, MSX2, MSY2, 25);
if (Length(arP) = 0) then
begin
Writeln('Failed to find PortalColor, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 188) and (R <= 215) and (G >= 182) and (G <= 211) and (B >= 135) and (B <= 161) then
begin
Result := arC[i];
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding Portalcolor.');
end;
function FindGlowingColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(0);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 9272680, MSX1, MSY1, MSX2, MSY2, 12);
if (Length(arP) = 0) then
begin
Writeln('Failed to find GlowColor, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 99) and (R <= 108) and (G >= 117) and (G <= 133) and (B >= 128) and (B <= 154) then
begin
Result := arC[i];
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding GlowColor.');
end;
function FindBankerColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.48, 0.96);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 5188665, MSX1, MSY1, MSX2, MSY2, 1);
if (Length(arP) = 0) then
begin
Writeln('Failed to find banker 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
ColorToRGB(arC[i], R, G, B);
if (R >= 55) and (R <= 60) and (G >= 41) and (G <= 46) and (B >= 76) and (B <= 82) then
begin
Result := arC[i];
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding banker color.');
end;
function FindVrrk: Integer; // Thanks noidea! <3
var
Col, ii, i, c, n, w: Integer;
TestColours: TIntegerArray;
TPA: TPointArray;
x, y, z: Extended;
r, g, b: Integer;
BlackList, ResultArr: TIntegerArray;
begin
FindColorsSpiralTolerance(mmcx, mmcy, tpa, 8881291, mmx1, mmy1, mmx2, mmy2, 70);
if length(tpa) > 0 then
begin
c := high(TPA);
TestColours := GetColors(TPA);
for i := 0 to c do
begin
ColorToRGB(TestColours[i], r, g, b);
ColorToXYZ(TestColours[i], x, y, z);
if not InIntArray(blacklist, TestColours[i]) then
if InRange(R - B, -5, 13) then
if InRange(R - G, -7, 10) then
if InRange(G - B, -5, 9) then
if ((x > 22.5) and (x < 26.5)) then
if ((y > 22.5) and (y < 27.8)) then
if ((z > 23.5) and (z < 28.7)) then
begin
n := high(ResultArr);
SetArrayLength(ResultArr, n + 2);
ResultArr[n+1] := TestColours[i];
end;
w := high(blacklist);
SetArrayLength(BlackList, w + 2);
BlackList[w+1] := TestColours[i];
end;
end;
if length(resultarr) < 1 then
begin
result := -1;
writeln('Could not find Varrock road color!');
exit;
end;
w := high(resultArr);
col := resultarr[0];
n := countcolor(col, mmx1, mmy1, mmx2, mmy2);
for i := 1 to w do
begin
ii := CountColor(resultarr[i], mmx1, mmy1, mmx2, mmy2);
if ii > n then
begin
n := ii;
col := resultarr[i];
end;
end;
result := col;
end;
procedure Proggy(fin: Boolean); forward;
procedure Mainloop; forward;
procedure AntiBans(what: Integer);
begin
case what of
0: if RBool then
HoverSkill('runecrafting', false);
1: if RBool then
if Random(10) < 6 then PickUpMouse;
else
if RBoolEx(3) then BoredHuman;
end;
end;
procedure SStatus(s: string);
begin
try
Status(s + ' [' + IntToStr(Players[CurrentPlayer].Integers[6]) + '/' + IntToStr(Players[CurrentPlayer].Integers[0]) + ']');
Disguise(s + ' [' + IntToStr(Players[CurrentPlayer].Integers[6]) + '/' + IntToStr(Players[CurrentPlayer].Integers[0]) + ']');
except
Status(s);
Disguise(s);
end;
end;
procedure HandlePlayer2(Reason, Location : string);
begin
if HandlePlayer(Reason, Location, False) then
MainLoop
else
begin
Proggy(True);
TerminateScript;
end;
end;
procedure SwitchandBreak;
var
Timer: Integer;
begin
Timer := GetSystemTime - (Players[CurrentPlayer].Worked - Players[CurrentPlayer].Integers[5]);
if Players[CurrentPlayer].Integers[6] >= Players[CurrentPlayer].Integers[0] then Exit;
if TimeFromMark(Players[CurrentPlayer].Worked) > Players[CurrentPlayer].Integers[3] * 3600000 then
HandlePlayer2('Maxtime reached.', 'At bank.');
case MultiPlayer of
True:
if Switch(Timer, Players[CurrentPlayer].Integers[1]) then
begin
Players[CurrentPlayer].Integers[5] := Players[CurrentPlayer].Worked;
Inc(Players[currentPlayer].Integers[7]);
Proggy(False);
MainLoop;
end;
False:
if Breakz(Timer, Players[CurrentPlayer].Integers[1], Players[CurrentPlayer].Integers[2]) then
begin
Players[CurrentPlayer].Integers[5] := Players[CurrentPlayer].Worked;
Inc(Players[CurrentPlayer].Integers[8]);
Proggy(False);
MainLoop;
end;
end;
end;
function FindAltarOut(var x, y: Integer) : Boolean;
var
GlowColors: TPointArray;
GlowColor: T2DPointArray;
i, ArrayLength, fst: Integer;
begin
SetAngle(True);
FindColorsTolerance(GlowColors, FindGlowingColor, MSX1, MSY1, MSX2, MSY2, 15);
GlowColor := TPAToATPA(GlowColors, 100);
if Length(GlowColor) = 0 then HandlePlayer2('Glowing color was not found.', 'Stucket outside of altar.');
SortATPASize(GlowColor, True);
ArrayLength := High(GlowColor);
MarkTime(fst);
for i := 0 to ArrayLength do
begin
AntiR;
if TimeFromMark(fst) > 5000 then Break;
MiddleTPAEx(GlowColor[i], x, y);
MMouse(x, y, 5, 5);
if WaitUpTextMulti(['yster', 'nter', 'ruin', 'rious'], 800) then
begin
Result := True;
GetMousePos(x, y);
Exit;
end;
end;
Result := False;
end;
function FindAltarIn(var x, y: Integer) : Boolean;
var
AltarColors: TPointArray;
AltarColor: T2DPointArray;
i, ArrayLength, fst: Integer;
begin
FindColorsSpiralTolerance(MSCX, MSCY, AltarColors, FindAltarColor, MSX1, MSY1, MSX2, MSY2, 10);
AltarColor := SplitTPA(AltarColors, 10);
if Length(AltarColor) = 0 then HandlePlayer2('Altarcolor was not found', 'Stucked inside the altar.');
SortATPAFromFirstPoint(AltarColor, Point(MSCX + 100, MSCY - 150));
ArrayLength := High(AltarColor);
MarkTime(fst);
for i := 0 to ArrayLength do
begin
AntiR;
if TimeFromMark(fst) > 5000 then Break;
MiddleTPAEx(AltarColor[i], x, y);
MMouse(x, y, 5, 5);
if WaitUpTextMulti(['raft', 'rune', 'ltar'], 800) then
begin
Result := True;
GetMousePos(x, y);
Exit;
end;
end;
Result := False;
end;
function FindPortal(var x, y: Integer) : Boolean;
var
PortalColors: TPointArray;
PortalColor: T2DPointArray;
i, ArrayLength, fst: Integer;
Fund: Boolean;
begin
MarkTime(fst);
while (TimeFromMark(fst) < 6000) do
begin
FindColorsSpiralTolerance(MSCX, MSCY, PortalColors, FindPortalColor, MSX1, MSY1 + 70, MSCX - 10, MSCY - 10, 30);
if Length(PortalColors) >= 60 then
begin
Fund := True;
Break;
end;
Wait(200);
end;
if not Fund then Exit;
PortalColor := TPAtoATPA(PortalColors, 30);
SortATPASize(PortalColor, True);
ArrayLength := High(PortalColor);
MarkTime(fst);
for i := 0 to ArrayLength do
begin
AntiR;
if TimeFromMark(fst) > 5000 then Break;
MiddleTPAEx(PortalColor[i], x, y);
MMouse(x, y, 2, 2);
if WaitUpTextMulti(['ortal', 'nter'], 800) then
begin
Result := True;
GetMousePos(x, y);
Exit;
end;
end;
end;
function FindLvlUp : Boolean;
var
TDP: TDebugParams;
x, y: Integer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'In altar.');
if IsTextInAreaEx(MCX1, MCY1, MCX2, MCY2, x, y, 'advanced', 1, NPCChars, False, False, 0, 0, -1) then
begin
Result := True;
TDP := GetDebugParams;
TDP.Name := 'Comic Sans MS';
TDP.Color := 16776960;
TDP.BackColor := clYellow;
TDP.Style := [FSBold];
SetDebugParams(TDP);
WriteLn('Yay! We have gained one level!!!');
HoverSkill('runecrafting', True);
Inc(Players[CurrentPlayer].Integers[17]);
Inc(Players[CurrentPlayer].Integers[10]);
case Players[CurrentPlayer].Integers[10] of
1..10: Players[CurrentPlayer].Integers[11] := 1;
11..21: Players[CurrentPlayer].Integers[11] := 2;
22..32: Players[CurrentPlayer].Integers[11] := 3;
33..43: Players[CurrentPlayer].Integers[11] := 4;
44..54: Players[CurrentPlayer].Integers[11] := 5;
55..65: Players[CurrentPlayer].Integers[11] := 6;
66..76: Players[CurrentPlayer].Integers[11] := 7;
77..87: Players[CurrentPlayer].Integers[11] := 8;
88..98: Players[CurrentPlayer].Integers[11] := 9;
99: Players[CurrentPlayer].Integers[11] := 10;
end;
end;
end;
function LeaveAltar : Boolean;
var
x, y, i: Integer;
begin
repeat
AntiR;
Result := FindPortal(x, y);
if Result then
begin
Mouse(x, y, 0, 0, False);
if WaitOption('nter', 500) then Exit;
end;
Inc(i);
until Result or (i >= 4);
end;
function LoadBmpEss : Integer;
begin
Result := BitmapFromString(5, 5, 'beNpzdfVwdfVyd4cgXy9PN2cn' +
'oAhcEMhFFnF2cAAiuKCjnR1cxAMADIgUOg==');
end;
function CheckEss : Boolean;
var
bmpEss, EssCount: Integer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Bank?');
SStatus('Checking if we got enough essence or not.');
bmpEss := LoadBmpEss;
GameTab(tab_Inv);
Wait(RandomRange(150, 300));
EssCount := CountItems('bmp', bmpEss, [5, 0]);
WriteLn('We got ' + InttoStr(EssCount) + ' essence.');
if EssCount = Players[CurrentPlayer].Integers[9] then Result := True
else
Result := False;
try
FreeBitmap(bmpEss);
except end;
end;
procedure SearchBankFS;
var
BBox: TBox;
begin
WriteLn('Bitmap was not found. Trying to search for the essence.');
SearchBank('ssence');
Wait(RandoMRange(500, 800));
BBox := BankIndexToMSBox(1);
MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
WaitOptionMulti(['Withdraw-All', 'draw-All'], 500)
if InvCount <> 28 then HandlePlayer2('Failed at banking.', 'bank.');
WriteLn('Sucesfully banked!');
Antibans(0);
end;
function OpenVWB: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
x, y, i, H, fs: Integer;
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, FindBankerColor, MSX1, MSY1, MSCX, MSY2, 5);
if Length(TPA) < 1 then
begin
Result := False;
Exit;
end;
ATPA := SplitTPA(TPA, 10);
H := High(ATPA);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
MarkTime(fs);
for i := 0 to H do
begin
if Length(TPA) > 20 then
begin
if TimeFromMark(fs) >= 10000 then Break;
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);
if WaitUpTextMulti(['to B', 'anker', 'Talk'], 1000) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
WaitOption('ank B', 500);
Exit;
end;
end;
end;
end;
function WaitBank: Boolean;
var
fs: Integer;
begin
MarkTime(fs);
repeat
Wait(100);
until BankScreen or PinScreen or (TimeFromMark(fs) >= 7000);
Result := BankScreen or PinScreen;
if PinScreen then InPin(Players[CurrentPlayer].Pin);
end;
procedure Bank;
var
bmpEss, x, y, TabCount, i: Integer;
Foundd: Boolean;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Bank?');
SStatus('Banking.');
AntiR;
if not OpenVWB then HandlePlayer2('Failed while banking.', 'Bank?');
if not WaitBank then HandlePlayer2('Failed while banking.', 'Bank?');
if not Players[CurrentPlayer].Booleans[1] then Deposit(2, 28, True)
else
if InvCount <> 0 then DepositAll;
bmpEss := LoadBmpEss;
FixBank;
while ExistsBankTab(TabCount + 1) do Inc(TabCount);
WriteLn('We got ' + IntToStr(TabCount) + ' banktab.');
for i := 1 to TabCount do
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Bank?');
BankTab(i);
if i > 1 then
begin
GetMousePos(x, y);
MMouse(x, y + 40, 20, 10);
Wait(RandomRange(300, 600));
end;
if FindBitmapToleranceIn(bmpEss, x, y, MBX1, MBY1, MBX2, MBY2, 10) then
begin
Foundd := True;
Break;
end;
end;
FreeBitmap(bmpEss);
if Foundd then
begin
MMouse(x + 5, y, 5, 5);
if WaitUpTextMulti(['ssence', 'une e'], 1000) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
WaitOption('ll', 500);
WriteLn('Sucesfully banked!');
Wait(RandomRange(200, 400));
CloseBank;
Antibans(0);
Exit;
end else SearchBankFS;
end else SearchBankFS;
end;
procedure CheckRun;
begin
if not RunEnergy(50) then
begin
SStatus('Resting ...');
RestUntil(100);
end;
SetRun(True);
end;
function Walk(which: Integer) : Boolean;
var
dtmBank, x, y: Integer;
begin
AntiR;
case which of
0: Result := RadialWalk(FindVrrk, 210, 255, 70, 1, -1);
1: Result := RadialWalk(FindVrrk, 210, 265, 70, 1, -1);
2: Result := RadialWalk(FindVrrk, 240, 298, 65, 1, -1);
3:
begin
Result := RadialWalk(FindRockColor, 220, 270, 70, 1, -1);
if not Result then
if RadialRoadWalk(FindRoadColor, 290, 240, 70, 1, -1) then
Result := RadialWalk(FindRockColor, 290, 240, 70, 1, -1);
end;
4:
begin
Result := True;
MouseMM(680, 50, 2, 2);
FFlag(10);
end;
5: Result := RadialWalk(FindVrrk, 58, 105, 70, -1, 1);
6: Result := RadialWalk(FindVrrk, 67, 35, 63, -1, 1);
7:
begin
Result := RadialWalk(FindVrrk, 50, 110, 55, -1, 1);
Flag;
Wait(RandomRange(1000, 1500));
end;
8:
begin
dtmBank := DTMFromString('78DA636C616260306040013505AE0C3A8C0C0' +
'C40C4F01F08182B806AD420728C50357FFE30A1F0192B817C4702' +
'6A1603F99644A831C4AF0600CA251117');
Result := DTMRotated(dtmBank, x, y, MMX1, MMY1, MMX2, MMY2);
if Result then
MouseFlag(x - 2, y - 2, 0, 0, 0);
FreeDTM(dtmBank);
end;
end;
end;
procedure WalkTo;
var
i: Integer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Bank.');
AntiR;
CheckRun;
for i := 0 to 3 do
begin
SStatus('Walking to altar. [' + IntToStr(i + 1) + '/4]');
if not Walk(i) then HandlePlayer2('Walking failed.', 'Between bank -> the altar. [' + IntToStr(i + 1) + '/4]');
end;
Flag;
Wait(RandomRange(200, 400));
end;
procedure WalkFrom;
var
i: Integer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Stucked outside the altar(after runes crafted).');
AntiR;
CheckRun;
ClickNorth(True);
for i:= 4 to 8 do
begin
SStatus('Walking to bank. [' + IntToStr(i - 3) + '/5]');
if not Walk(i) then HandlePlayer2('Walking failed.', 'Betweem the altar -> bank. [' + IntToStr(i -3) + '/5]');
end;
Flag;
Wait(RandomRange(400, 600));
Players[CurrentPlayer].Loc := 'Bank.';
end;
procedure Proggy(fin: Boolean);
var
Loadz, Switched, ActivePlayers, o, I, II, III: Integer;
begin
for o := 0 to High(Players) do
begin
if Players[o].Active then Inc(ActivePlayers);
IncEx(Loadz, Players[o].Integers[6]);
IncEx(Switched, Players[o].Integers[7]);
end;
Players[CurrentPlayer].Integers[12] := Round(Players[CurrentPlayer].Integers[6] / (TimeFromMark(Players[CurrentPlayer].Worked) / 3600000.0)); //loads/hr
PLayers[CurrentPlayer].Integers[13] := Players[CurrentPlayer].Integers[6] * Players[CurrentPlayer].Integers[9] * 5; //xp gained
Players[CurrentPlayer].Integers[14] := Round(Players[CurrentPlayer].Integers[13] / (TimeFromMark(Players[CurrentPlayer].Worked) / 3600000.0)); //xp/hr
Players[CurrentPlayer].Integers[15] := Players[CurrentPlayer].Integers[6] * Players[CurrentPlayer].Integers[9] * Players[CurrentPlayer].Integers[11]; //airs crafted
Players[CurrentPlayer].Integers[16] := Round(Players[CurrentPlayer].Integers[15] / (TimeFromMark(Players[CurrentPlayer].Worked) / 3600000.0)); //airs/hr
DecEx(Players[CurrentPlayer].Integers[18], Players[CurrentPlayer].Integers[9] * 5); //xp to goal
if Players[CurrentPlayer].Integers[6] <> 0 then Players[CurrentPlayer].Integers[19] := Round(Players[CurrentPlayer].Integers[18] / Players[CurrentPlayer].Integers[14]); //hours to goal
if fin then
begin
I := RewriteFile(ScriptPath + '[SAC]\' + TheDate(3) + '_ProgressReport_' + Replace(Left(TheTime, 8), ':', '_') + '.txt', True);
if I > -1 then
WriteFileString(I, SRLProgressReport(
ResultString, '[SAC] Sabzi''s AirCrafter', 'Sabzi', 'v1',
['Time Running', 'Loads Done', 'Switches done', 'Active Players'],
[TimeRunning, Loadz, Switched, ActivePlayers])) else WriteLn('Failed opening the file.(1)');
try
CloseFile(I);
except end;
II := RewriteFile(ScriptPath + '[SAC]\' + TheDate(3) + '_PlayerReport_' + Replace(Left(TheTime, 8), ':', '_') + '.txt', True);
if II > -1 then
WriteFileString(II, SRLPlayerReport(ResultString, 0, True,
[True, False, False, True, False, False],
['Tiara', 'Loads', 'Loads/hr', 'Xp Gained', 'Xp/hr', 'Lvlups', 'Xp to goal', 'Hours to goal', 'Airs Crafted', 'Airs/hr', 'Breaks'],
[1], [6, 12, 13, 14, 17, 18, 19, 15, 16, 8], [], [])) else WriteLn('Failed opening the file.(2)');
try
CloseFile(II);
except end;
III := RewriteFile(ScriptPath + '[SAC]\' + TheDate(3) + '_Debug_' + Replace(Left(TheTime, 8), ':', '_') + '.txt', True);
if III > -1 then
WriteFileString(III, GetDebugText) else WriteLn('Failed opening the file.(3)');
try
CloseFile(III);
except end;
WriteLn('Things saved to ' + ScriptPath + '[SAC]');
end else
begin
ClearReport;
SRLProgressReport(
ResultReportBox, '[SAC] Sabzi''s AirCrafter', 'Sabzi', 'v1',
['Time Running', 'Loads Done', 'Switches done', 'Active Players'],
[TimeRunning, Loadz, Switched, ActivePlayers]);
SRLPlayerReport(
ResultDebugBox, 0, True,
[True, False, False, True, False, False],
['Tiara', 'Loads', 'Loads/hr', 'Xp Gained', 'Xp/hr', 'Lvlups', 'Xp to goal', 'Hours to goal', 'Airs Crafted', 'Airs/hr', 'Breaks'],
[1], [6, 12, 13, 14, 17, 18, 19, 15, 16, 8], [], []);
end;
end;
function FindBlackChatMessageArr(Text: TStringArray) : Boolean;
var
i, o: Integer;
begin
o := High(Text);
for i := 0 to o do
if FindBlackChatMessage(Text[i]) then
begin
Result := True;
Exit;
end;
end;
function WaitBlackText(Text: TStringArray; MaxTime: Integer) : Boolean;
var
fs: Integer;
begin
MarkTime(fs);
repeat
AntiR;
Result := FindBlackChatMessageArr(Text)
Wait(RandomRange(50, 100));
until Result or (TimeFromMark(fs) >= MaxTime);
end;
procedure ProjectCraft;
var
x, y, LeaveTime: Integer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Outside of the altar.');
AntiR;
SStatus('Entering altar.');
if not Players[CurrentPlayer].Booleans[1] then MouseItem(1, True);
if not FindAltarOut(x, y) then HandlePlayer2('AltarOut was not found.', 'Outside of the altar.');
Mouse(x, y, 0, 0, True);
AntiR;
if not WaitBlackText(['eel', 'ower', 'orce'], 5000) then HandlePlayer2('We could not enter the altar.', 'Outside of the altar.');
AntiR;
Wait(WAEA + Random(500));
if not FindAltarIn(x, y) then HandlePlayer2('AltarIn was not found.', 'In altar.');
AntiR;
Mouse(x, y, 0, 0, True);
SStatus('Altar found! Crafting runes.');
if not WaitBlackText(['bind', 'temple', 'into', 'sparkles', 'umbridge'], 5000) then HandlePlayer2('We could not craft runes.', 'In altar.');
SStatus('Runes Crafted! Leaving altar. Searching portal. Yeah pretty much here.' +
'And I am sure you can''t read it through.');
MarkTime(LeaveTime);
Wait(RandomRange(2000, 2500));
AntiR;
if not FindLvlUp then
begin
AntiBans(1);
AntiBans(0);
end;
while (TimeFromMark(LeaveTime) <= RandomRange(3500, 4000)) do
begin
Wait(100);
AntiR;
end;
MakeCompass('w');
if not LeaveAltar then HandlePlayer2('Stucked in altar.', 'In altar.');
SStatus('Leaving altar. Portal found.');
if not WaitBlackText(['step', 'hrough'], 10000) then HandlePlayer2('We could not leave the altar.', 'In altar.');
Flag;
Wait(RandomRange(700, 1300));
SStatus('Altar left');
end;
procedure SetupPlayer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Start.');
if Players[CurrentPlayer].Booleans[1] then Players[CurrentPlayer].Integers[9] := 28
else
Players[CurrentPlayer].Integers[9] := 27;
Players[CurrentPlayer].Integers[10] := GetSkillLevel(skill_Runecrafting);
WriteLn('Our runecrafting level is: ' + IntToStr(Players[CurrentPlayer].Integers[10]));
if Players[CurrentPlayer].Integers[10] >= Players[CurrentPlayer].Integers[4] then
Players[CurrentPlayer].Integers[4] := 99;
Players[CurrentPlayer].Integers[18] := ConvertLvlToXp(Players[CurrentPlayer].Integers[4] - 1) - ConvertLvlToXp(Players[CurrentPlayer].Integers[10] - 1);
WriteLn('Remaining experience until goal: ' + IntToStr(Players[CurrentPlayer].Integers[18]));
case Players[CurrentPlayer].Integers[10] of
1..10: Players[CurrentPlayer].Integers[11] := 1;
11..21: Players[CurrentPlayer].Integers[11] := 2;
22..32: Players[CurrentPlayer].Integers[11] := 3;
33..43: Players[CurrentPlayer].Integers[11] := 4;
44..54: Players[CurrentPlayer].Integers[11] := 5;
55..65: Players[CurrentPlayer].Integers[11] := 6;
66..76: Players[CurrentPlayer].Integers[11] := 7;
77..87: Players[CurrentPlayer].Integers[11] := 8;
88..98: Players[CurrentPlayer].Integers[11] := 9;
99: Players[CurrentPlayer].Integers[11] := 10;
else
WriteLn('Runecrafting level was not found. Proggy will be messed up.');
end;
end;
procedure Setup;
begin
ChangeReportWidth(350);
Smart_Server := World;
Smart_Signed := Signed;
DeclarePlayers;
SetupRandomTool(60000, 12, ''); //YOU CAN TOUCH THIS
SStatus('SMART loading.');
SetupSrl;
LampSkill := LSkill;
while not RSReady do Wait(300);
if MultiPlayer then WriteLn('Multiplayer ftw!') else WriteLn('Singleplayer ftw!');
WaitToUser(10, 12); //YOU CAN TOUCH THIS, Timeout is in seconds.
if not LoggedIn then LoginWorld(World);
end;
procedure MainLoop;
var
i, Worked: Integer;
begin
if Players[CurrentPlayer].Booleans[0] then SetAudioOff;
SetupPlayer;
for i := Players[CurrentPlayer].Integers[6] to (Players[CurrentPlayer].Integers[0] - 1) do
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Start/Bank.');
MarkTime(Worked);
AntiR;
SetChat('all', 0);
Players[CurrentPlayer].Loc := 'bank.';
MakeCompass('n');
SetAngle(True);
if not CheckEss then Bank;
WalkTo;
ProjectCraft;
WalkFrom;
Inc(Players[CurrentPlayer].Integers[6]);
IncEx(Players[CurrentPlayer].Worked, TimeFromMark(Worked));
SwitchandBreak;
Proggy(False);
end;
HandlePlayer2('Loads have done!', 'Bank.');
end;
begin
Setup;
MainLoop;
end.
{player vars:
Booleans[0] - Set audio off?
Booleans[1] - Tiara = True Tallysman = False
Integers[0] - Loads to do?
Integers[1] - Time before switching/breaking?(mins)
Integers[2] - If singleplayer time to break?(mins)
Integers[3] - Maxtime?(hours)
Integers[4] - Goal level?
Integers[5] - substrackt from worktime
Integers[6] - loads done
Integers[7] - switched from player
Integers[8] - breaks done
Integers[9] - essence we should got
Integers[10] - runecrafting lvl
Integers[11] - multiplier
Integers[12] - loads/hr
Integers[13] - xp gained
Integers[14] - xp/hr
Integers[15] - airs crafted
Integers[16] - airs/hr
Integers[17] - lups
Integers[18] - xp until next lvl
Integers[19] - hours to goal
}
His newest, Sabzi's Kharid Smelter:
program Smelter;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include Sabzinclude.scar}
{.include SRL/SRL/Skill/Smithing.scar}
{.include SRL/SRL/Misc/FindXP.scar}
{.include SRL/SRL/Misc/Reports.scar}
{.include SRL/SRL/Misc/QuickChat.scar}
{Instructions:
[*]Place your character in Al-Kharid bank, your primary ore in the first bank slot and the secondary(if there's any) in the second.
[*]Download Sabzinclude and place it right into the include folder found in your scar folder.
[*]If you don't know the boxrewards take a look at here: [url]http://www.villavu.com/forum/showthread.php?t=44245[/url]
[*]Time before switching/breaking will determinate how long a player should work without breaking/switching.
After the account worked enough if you got more then one player the script will switch to the next player
else it will take a break(time to break) +- 10%, the player remain active.
[*]Goal is default 99
[*]You can change line 553 if you want. (CTRL + g)
[*]Line 546, RandomTool, [url]http://www.villavu.com/forum/showthread.php?t=48538[/url]
[*]Fill out DeclarePlayers set up consts, press play.
[*]Post proggies, feedback, bugs, problems, questions.
}
const
World = 135; //smart server to load;
// if you leave it 0 a random world will be chosen AND
// a new SMART will always loads at script startup
Signed = True; //True = Signed SMART Flase = Unsigned SMART;
//if False then SMART will load up the desired world
LSkill = 'smithing'; // You will get xp for this skill from a reward lamp.
procedure DeclarePlayers;
begin
CurrentPlayer:= 0; //First player.
NumberOfPlayers(1); //How many players you got?
with Players[0] do
begin
Name := 'username';
Pass := 'pass';
Nick := 'ick'; //example: name is 'janos' then nick is 'ano' (3-4 char from your name)
Pin := '';
BoxRewards := ['XP', 'mote', 'ostume']
Active := True;
Booleans[0] := False; //Set audio off?
Integers[0] := 350; //Loads to do.
Integers[1] := 60; //Time before switching/breaking?(mins)
Integers[2] := 12; //If singleplayer time to break?(mins)
Integers[3] := 8; //Maxtime?(hours)
Integers[4] := 85; //Goal level?
Strings[0] := 'steel'; //what bar to make? bronze, blurite, iron, silver, steel, gold, mithril, adamant, runite
end;
end;
function FindBBoothColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(1.39, 0.10);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 5002072, MSX1, MSY1, MSX2, MSY2, 3);
if (Length(arP) = 0) then
begin
Writeln('Failed to find bbooth 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
ColorToRGB(arC[i], R, G, B);
if (R >= 86) and (R <= 90) and (G >= 80) and (G <= 84) and (B >= 74) and (B <= 78) then
begin
Result := arC[i];
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding bbooth color.');
end;
procedure MainLoop; forward;
procedure SStatus(s: string);
begin
try
Status(s + ' [' + IntToStr(Players[CurrentPlayer].Integers[7]) + '/' + IntToStr(Players[CurrentPlayer].Integers[0]) + ']');
Disguise(s + ' [' + IntToStr(Players[CurrentPlayer].Integers[7]) + '/' + IntToStr(Players[CurrentPlayer].Integers[0]) + ']');
except
Status(s);
Disguise(s);
end;
end;
procedure HandlePlayer2(Reason, Location : string);
begin
SStatus('Oh, my god!');
if HandlePlayer(Reason, Location, True) then
MainLoop;
end;
procedure CheckRun;
begin
if not RunEnergy(30) then
begin
SStatus('Resting ...');
RestUntil(100);
end;
end;
function BankDTM: Integer;
begin
Result := DTMFromString('78DA63EC63666038C480020E2DCF63D061646' +
'0002286FF40C0980D54F30222C70855F3E70F130A1FACE609116A' +
'1E12A1E62E7E350065C2148C');
end;
function DTMWalk(where: Integer): Boolean;
var
TehDTM, x, y: Integer;
begin
AntiR;
case where of
0:
begin
TehDTM := BankDTM;
Result := DTMRotated(TehDTM, x, y, MMX1, MMY1, MMX2, MMY2);
if Result then
MouseFlag(x, y, 3, 3, 15);
FreeDTM(TehDTM);
end;
1:
begin
TehDTM := BankDTM;
Result := DTMRotated(TehDTM, x, y, MMX1, MMY1, MMX2, MMY2);
if Result then
MouseFlag(x - 5, y - 37, 2, 2, 0);
FreeDTM(TehDTM);
Flag;
Wait(RandomRange(1000, 1300));
end;
2:
begin
Result := True;
MouseMM(636, 126, 5, 5);
FFlag(15);
end;
3:
begin
TehDTM := BankDTM;
Result := DTMRotated(TehDTM, x, y, MMX1, MMY1, MMX2, MMY2);
if Result then
MouseFlag(x - 22, y + 23, 2, 2, 0);
FreeDTM(TehDTM);
Flag;
Wait(RandomRange(1000, 1500));
end;
end;
end;
procedure WalkTo;
var
i: Integer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Bank.');
AntiR;
CheckRun;
for i := 0 to 1 do
begin
SStatus('Walking to furnace. [' + IntToStr(i + 1) + '/2]');
if not DTMWalk(i) then HandlePlayer2('Walking failed.', 'Between bank -> furnace. [' + IntToStr(i + 1) + '/2]');
end;
end;
procedure WalkFrom;
var
i: Integer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Furnace.');
AntiR;
for i := 2 to 3 do
begin
SStatus('Walking to Bank. [' + IntToStr(i - 1) + '/2]');
if not DTMWalk(i) then HandlePlayer2('Walking failed.', 'Between furnace -> bank. [' + IntToStr(i - 1) + '/2]');
end;
Players[CurrentPlayer].Loc := 'bank';
end;
function OpenAKB: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
i, H, o, x, y, fs: Integer;
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, FindBBoothColor, MSX1, MSY1, MSCX, MSY2, 10);
if Length(TPA) < 1 then
begin
Result := False;
Exit;
end;
ATPA := TpaToATPAEx(TPA, 10, 30);
H := High(ATPA);
for i := 0 to H do
if Length(ATPA[i]) > 100 then
begin
ATPA[o] := ATPA[i];
Inc(o);
end;
SetLength(ATPA, o);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY - 50));
MarkTime(fs);
for i := 0 to o - 1 do
begin
if TimeFromMark(fs) >= 5000 then Exit;
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);
if WaitUpTextMulti(['booth', 'ank b', 'oot', 'se B'], 300) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
if not WaitOption('uickly', 500) then
Result := False
else
Exit;
end;
end;
end;
function WaitBank: Boolean;
var
fs: Integer;
begin
MarkTime(fs);
repeat
Wait(100);
until BankScreen or PinScreen or (TimeFromMark(fs) >= 7000);
Result := BankScreen or PinScreen;
if PinScreen then InPin(Players[CurrentPlayer].Pin);
end;
procedure Bank;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Bank?');
SStatus('Banking.');
AntiR;
if OpenAKB then
if not WaitBank then
HandlePlayer2('Failed while banking.(no screen)', 'Bank?') else null
else
if not OpenBankNPC then
if not OpenBankFast('akb') then
HandlePlayer2('Failed while banking.', 'Bank?');
Wait(RandomRange(500, 1000));
if InvCount > 0 then DepositAll;
WithDraw(0, 0, Players[CurrentPlayer].Integers[8]);
Wait(RandomRange(150, 300));
if Players[CurrentPlayer].Booleans[1] then WithDraw(1, 0, 0);
Wait(RandomRange(150, 300));
end;
procedure AntiBan;
var
Done: Boolean;
begin
case Random(300) of
0..8:
begin
SStatus('Antiban: HoverSkill.');
HoverSkill('smithing', False);
Wait(RandomRange(0, 2500));
Done := True;
end;
10..25:
begin
SStatus('Antiban: PickUpMouse.');
PickUpMouse;
Wait(RandomRange(1000, 2500));
Done := True;
end;
30..49:
begin
SStatus('Antiban: SleepAndMoveMouse.');
SleepAndMoveMouse(RandomRange(1500, 4000));
Done := True;
end;
50..54:
begin
SStatus('Antiban: RandomRClick.');
RandomRClick;
Done := True;
end;
55:
begin
SStatus('Antiban: SayCurrentLevels.');
QCSayLevel('smithing');
Done := True;
end;
60..79:
begin
SStatus('Just waiting ...');
Wait(RandomRange(1500, 4500));
end;
end;
GameTab(tab_Inv);
SStatus('Smelting.');
Wait(500 + Integer(Done) * 1000);
end;
procedure InLoop;
begin
if LevelUp then Inc(Players[CurrentPlayer].Integers[11]);
AntiBan;
AntiR;
end;
procedure WaitWhileSmelting;
var
dtmBar, C: Integer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Furnace');
SStatus('Smelting.');
dtmBar := DTMFromString('78DA630C67626028636440064971710C3A402' +
'190E87F2060F402AAA9415503918591403A02A8A685809A24A09A' +
'6A026A62806A0A08A80902AA29C6AF060039960A48');
if Players[CurrentPlayer].Strings[0] <> 'iron' then
while CountItems('dtm', dtmBar, []) < Players[CurrentPlayer].Integers[8] do
InLoop
else
begin
while C < InvCount do
begin
C := CountItems('dtm', dtmBar, []);
InLoop;
end;
IncEx(Players[CurrentPlayer].Integers[13], C);
end;
end;
{*******************************************************************************
Function FindFurnace(Var X, Y: Integer): Boolean;
By: n3ss3s, modified by me
Description: Finds a furnace and stores the coordinates into X and Y.
*******************************************************************************}
Function FindFurnaceS(Var X, Y: Integer): Boolean;
Var
TPAA: T2DPointArray;
TPA: TPointArray;
CTS, I: Integer;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3815998, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
TPAA := TPAToATPAEx(TPA, 50, 50);
SortATPASize(TPAA, True);
For I := 0 To High(TPAA) Do
If GetArraylength(TPAA[i]) > 150 Then
Begin
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 5, 5);
If WaitUpTextMulti(['urnac', 'melt', 'nace', 'rnac'], 500) Then
Begin
Result := True;
GetMousePos(X, Y);
Break;
End;
End;
End;
{*******************************************************************************
Function OpenFurnace: Boolean;
By: n3ss3s, modified by me
Description: Returns true if managed to open the bar selection in chatbox.
*******************************************************************************}
Function OpenFurnaceS: Boolean;
Var
X, Y, Z: Integer;
Begin
If SmeltingScreen Then
Begin
Result := True;
Exit;
End;
If FindFurnaceS(X, Y) Then
Begin
Mouse(X, Y, 0, 0, False);
If Not ChooseOption('melt') Then Exit;
Z := GetSystemTime;
Repeat
If Random(80) = 0 Then MMouse(MSX1, MSY1, MIX2, MIY2);
If GetSystemTime - Z >= 20000 Then Break;
If FindNormalRandoms Then Break;
Wait(500);
If SmeltingScreen Then
Begin
Result := True;
Break;
End;
Until(Not(LoggedIn));
End;
End;
procedure SmithEmAll;
var
fs, i: Integer;
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Furnace');
AntiR;
SStatus('Arrived to furnace, start smelting.');
MarkTime(fs);
for i := 0 to 3 do
begin
if OpenFurnaceS then Break;
if TimeFromMark(fs) >= 10000 then HandlePlayer2('Smelting mucked up.(timeout)', 'Furnace.');
Wait(200);
end;
if not SmeltingScreen then HandlePlayer2('Smelting mucked up.(furnace not found)', 'Furnace.');
Wait(RandomRange(200, 800));
if Smelt(Players[CurrentPlayer].Strings[0], Players[CurrentPlayer].Strings[1]) then
begin
WaitWhileSmelting;
end else
HandlePlayer2('Smelting mucked up.(smelting)', 'Furnace.');
end;
procedure Proggy;
begin
ClearDebug;
WriteLn('Script runtime: ' + TimeRunning);
if Players[CurrentPlayer].Strings[10] <> 'iron' then
Players[CurrentPlayer].Integers[13] := Players[CurrentPlayer].Integers[7] * Players[CurrentPlayer].Integers[8];
Players[CurrentPlayer].Integers[9] := Round(Players[CurrentPlayer].Integers[13] * GetSmeltingXP(LowerCase(Players[CurrentPlayer].Strings[0])));
Players[CurrentPlayer].Integers[10] := Round(Players[CurrentPlayer].Integers[9] / (Players[CurrentPlayer].Worked / 3600000.0));
Players[CurrentPlayer].Integers[12] := Players[CurrentPlayer].Integers[6] / Players[CurrentPlayer].Integers[10];
Players[CurrentPlayer].Integers[14] := Round(Players[CurrentPlayer].Integers[13] / (Players[CurrentPlayer].Worked / 3600000.0));
SRLPlayerReport(
ResultDebugBox, 0, True,
[True, False, False, True, False, False],
['Loads', 'XP gained', 'XP/hr', 'Lvlups', 'Xp to goal',
'Hours to goal', 'Bars made', 'Bars/hr', 'Breaks done', 'Smelting'],
[], [7, 9, 10, 11, 6, 12, 13, 14, 15], [0], []
);
end;
procedure SwitchandBreak;
var
Timer: Integer;
begin
Timer := GetSystemTime - (Players[CurrentPlayer].Worked - Players[CurrentPlayer].Integers[16]);
if Players[CurrentPlayer].Integers[7] >= Players[CurrentPlayer].Integers[0] then Exit;
if TimeFromMark(Timer) > Players[CurrentPlayer].Integers[8] * 3600000 then
HandlePlayer2('Maxtime reached.', 'At bank.');
case MultiPlayer of
True:
if Switch(Timer, Players[CurrentPlayer].Integers[1]) then
begin
Players[CurrentPlayer].Integers[16] := Players[CurrentPlayer].Worked;
MainLoop;
end;
False:
if Breakz(Timer, Players[CurrentPlayer].Integers[1], Players[CurrentPlayer].Integers[2]) then
begin
Players[CurrentPlayer].Integers[16] := Players[CurrentPlayer].Worked;
Inc(Players[CurrentPlayer].Integers[15]);
end;
end;
end;
procedure SetupPlayer;
begin
SStatus('Seting up player.');
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Start.');
Players[CurrentPlayer].Integers[5] := GetSkillLevel(skill_Smithing);
WriteLn('Our smithing level is: ' + IntToStr(Players[CurrentPlayer].Integers[5]));
if Players[CurrentPlayer].Integers[5] >= Players[CurrentPlayer].Integers[4] then
Players[CurrentPlayer].Integers[4] := 99;
Players[CurrentPlayer].Integers[6] := ConvertLvlToXp(Players[CurrentPlayer].Integers[4] - 1) - ConvertLvlToXp(Players[CurrentPlayer].Integers[5] - 1);
WriteLn('Remaining experience until goal: ' + IntToStr(Players[CurrentPlayer].Integers[6]));
end;
procedure Setup;
begin
Smart_Server := World;
Smart_Signed := Signed;
DeclarePlayers;
SetupRandomTool(60000, 12, ''); //YOU CAN TOUCH THIS
SStatus('SMART loading.');
SetupSrl;
SStatus('SMART loaded.');
LampSkill := LSkill;
while not RSReady do Wait(300);
if MultiPlayer then WriteLn('Multiplayer ftw!') else WriteLn('Singleplayer ftw!');
WaitToUser(10, 12); //YOU CAN TOUCH THIS, Timeout is in seconds.
if not LoggedIn then LoginWorld(World);
ClickNorth(True);
end;
procedure SetupNumbers;
var
i, H: Integer;
begin
H := High(Players);
for i := 0 to H do
begin
case LowerCase(Players[i].Strings[0]) of
'bronze':
begin
Players[i].Booleans[1] := True;
Players[i].Integers[8] := 14;
Players[i].Strings[1] := IntToStr(RandomRange(14, 99));
end;
'blurite', 'iron', 'silver', 'gold':
begin
Players[i].Booleans[1] := False;
Players[i].Integers[8] := 28;
Players[i].Strings[1] := IntToStr(RandomRange(28, 99));
end;
'steel':
begin
Players[i].Booleans[1] := True;
Players[i].Integers[8] := 9;
Players[i].Strings[1] := '10';
end;
'mithril':
begin
Players[i].Booleans[1] := True;
Players[i].Integers[8] := 5;
Players[i].Strings[1] := IntToStr((Random(2) + 1) * 5);
end;
'adamant':
begin
Players[i].Booleans[1] := True;
Players[i].Integers[8] := 4;
Players[i].Strings[1] := IntToStr((Random(2) + 1) * 5);
end;
'runite':
begin
Players[i].Booleans[1] := True;
Players[i].Integers[8] := 3;
Players[i].Strings[1] := IntToStr((Random(2) + 1) * 5);
end;
end;
end;
end;
procedure MainLoop;
var
i, Worked: Integer;
begin
if Players[CurrentPlayer].Booleans[0] then SetAudioOff;
SetupPlayer;
for i := Players[CurrentPlayer].Integers[7] to Players[CurrentPlayer].Integers[0] - 1 do
begin
if not LoggedIn then HandlePlayer2('Player found logged out.', 'Start/Bank.');
MarkTime(Worked);
AntiR;
Players[CurrentPlayer].Loc := 'bank';
Bank;
WalkTo;
SmithEmAll;
WalkFrom;
Inc(Players[CurrentPlayer].Integers[7]);
IncEx(Players[CurrentPlayer].Worked, TimeFromMark(Worked));
Proggy;
SwitchandBreak;
end;
HandlePlayer2('Loads have done!', 'Bank.');
end;
begin
Setup;
SetupNumbers;
MainLoop;
end.
{Player variables:
- Booleans[1] - multy ored bar?
- Integers[5] - smithing lvl
- Integers[6] - remaining xp until next lvl
- Integers[7] - Loads done.
- Integers[8] - bar number thingy.
- Integers[9] - xp gained
- Integers[10]- xp/hr
- Integers[11]- lvl ups
- Integers[12]- hours to goal
- Integers[13]- bars made
- Integers[14]- bars/hr
- Integers[15]- breaks done
- Strings[1] - how many to smith?
}
You can also look in his signature for his (beta) Karamja fisher, and his include is with all his scripts downloads.