Jethr0x
2009-06-07 00:53:07
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java,Php,Html,Pascal,Srl
Are you a member of any other communities?
Sythe and Saradomin
Tell us about yourself…
From: Jethr0x
Im Jethr0x, DUH! I like scripting and women.
Please show us one (or multiple) of your scripts.
Program VialBuyer;
{ script by Jethr0x}
{.include SRL\SRL.scar}
{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORTANT NOTE!!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
___ _ ____ _ _
| \ | | | | |____ _____ ____ | |
| _ \ ___ ___ ___| | | [] | | _ \ ___ | ___| __ \ | |
| _\ _ \ \\ | | _ | | ___\ _ \ |___| ___\|_|
| |\ \ ___\ o \_ [] | | | | | |__\ \_\ \__ | |__ _
|_| \_|___\\_____\___| |_| |_|____\\_______\__|____\ |_|
DO NOT SELL THE VIALS FOR LOWEST IN GE!!! THESE ARE GREAT FOR TRANSFERRING MONEY!
IF THE PRICE OF VIALS DROPS DRAMTICALLY, I WILL NOT UPDATE THIS SCRIPT!!!!!!!!!
IF YOU MUST SELL IN THE GE, SELL FOR MID PRICE OR HIGHER!!! IT WILL SELL!!!!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~Credits:
1. ZephyrsFury For his ZephFlag.
2. Me.
3. Nicbaz for helping me a little.
4. The SRL-Devs for creating SRL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
var
BankBoothMM : integer;
Walk1DTMM, Walk2DTMM : integer;
x, y, Vials : integer;
const
GEWealth = 90; // Price of Vial in the Grand Exchange
NumVials = 0; // How many Vials do u have already?
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := 'Jagex';
Players[0].Pass := 'you_phail';
Players[0].Nick := 'age';
Players[0].Active := true;
Players[0].loc := '';
end;
Procedure LoadDTMs;
begin
Walk1DTMM := DTMFromString('78DA637CC8C4C050CB8002B2925318B880342' +
'394CF0852D38AAAA6A05A1E55CD5BA09A3A02E6DC06AAA927A0E6' +
'15504D0BAA1A597F2EB89AFF400000E886104D');
Walk2DTMM := DTMFromString('78DA630C66626030614001F9E9E90C5C409A1' +
'188FF03016338508D3DA61A06A81A301D0B54A343408D2F508D01' +
'0135614498E30554638EAA26BE4911554D3C508D35AA9A17AFBFA' +
'0AA01F95D0D554D3A9A39006AA51364');
BankBoothMM := DTMFromString('78DA632C676260086200032608C5D050D3C62' +
'007A41981F83F1030D623D4C0C0DBB7109A11CA67AC00AAF14755' +
'F3E4FD5B543520BB4208A82902AA09445503720FB21A006BB1127' +
'E');
writeln('DTM''s Loaded.')
end;
{------------------------------------------------------------------------------]
[ procedure ZephFlag(Distance: Integer); ]
[ by: ZephyrsFury ]
[ Description: My version of FFlag with AntiRandoms. ]
{------------------------------------------------------------------------------}
procedure ZephFlag(Dist: Integer);
var
Dx, Dy, m, d1, d2: Integer;
begin
while (FindColor(Dx, Dy, 255, MMX1, MMY1, MMX2, MMY2)) do
begin
d1 := Distance(Dx, Dy + 14, MMCX, MMCY);
if (d1 >= Dist) then
begin
Inc(m);
Wait(100);
if (m mod 5 = 0) then FindNormalRandoms; //So that a random doesn't make it
if (m mod 100 = 0) then //get lost.
if (d1 = d2) then
begin
if (FindColor(Dx, Dy, 255, MMX1, MMY1, MMX2, MMY2)) then
Mouse(Dx, Dy + 14, 1, 1, True)
else
Mouse(MMCX, MMCY, 0, 0, True);
end else d2 := d1;
end else Break;
end;
end;
{*******************************************************************************
function OpenBankQuiet(WhichBank: string): Boolean;
By: WT-Fakawi and modified by Ron
Description: Opens any given bank in the free world using
FindDeformedBitmapToleranceIn. Avoids strange mouse movements. Will cause
significant lag (approx. 1 second), but finds the bank with one click.
Edited by : Jethr0x
********************************************************************************}
function OpenBankQuiet2(WhichBank: string): Boolean;
var
TheCounter, dx, dy, tol, Mark2, Mark3: Integer;
acc, accthres : Extended;
begin
case WhichBank of
'asb', 'ardy': TheCounter := BitmapFromString(1, 13, 'beNoLDwr090yJi8hIiQOSceFB4' +
'aFQFBHklRQHZcQBAAxdDUg=');
end;
MarkTime(Mark3);
tol := 1;
accthres := 0.6;
repeat
if BankScreen or PinScreen then
begin
Result := True;
FreeBitmap(TheCounter);
Exit;
end;
if IsUpTextMultiCustom(['ank', 'Bo', 'ot']) then
begin
GetMousePos(dx, dy);
Mouse(dx, dy, 0, 0, False);
if ChooseOption('uickly') then
begin
MarkTime(Mark2);
repeat
Wait(10);
if TimeFromMark(Mark2) > 20000 then
begin
WriteLn('couldnt find the bank. Exiting');
FreeBitmap(TheCounter);
if(FindSymbol(x, y, 'bank')) then
begin
Writeln('[Bank] Found on Minimap.')
Mouse(x, y, 2, 2, true)
Flag;
end;
Exit;
end;
until BankScreen or PinScreen;
Result := True;
FreeBitmap(TheCounter);
Exit;
end;
end;
FindDeformedBitmapToleranceIn(TheCounter, dx, dy, MSX1 + 50, MSY1 + 50, MSX2
- 50, MSY2 - 50, tol, 4, True, acc);
if (acc >= accthres) then
begin
if BankScreen or PinScreen then
begin
Result := True;
FreeBitmap(TheCounter);
Exit;
end;
MMouse(dx, dy, 0, 0);
if IsUpTextMultiCustom(['ank', 'Bo', 'ot']) then
begin
GetMousePos(dx, dy);
Mouse(dx, dy, 0, 0, False);
if ChooseOption('uickly') then
begin
MarkTime(Mark2);
repeat
Wait(10);
if TimeFromMark(Mark2) > 20000 then
begin
WriteLn('couldnt find the bank. Exiting');
FreeBitmap(TheCounter);
Exit;
end;
until BankScreen or PinScreen;
end;
Result := True;
FreeBitmap(TheCounter);
Exit;
end;
end;
Wait(100);
tol := tol + 4;
if tol >= 20 then
begin
tol := 1;
accthres := accthres - 0.1;
if accthres < 0.2 then
begin
WriteLn('couldnt find the bank. Exiting');
FreeBitmap(TheCounter);
Exit;
end;
end;
until TimeFromMark(Mark3) > 60000;
FreeBitmap(TheCounter);
end;
Procedure CheckRun;
var
RunP : integer;
Energy : String;
begin
RunP := GetMMLevels('run', Energy)
CloseBank;
if(Energy = 'green')then
begin
writeln('[Walk] Setting Run on...');
SetRun(True);
end;
end;
Procedure AntiBan;
begin
writeln('[AntiBan] Performing Random AntiBan...');
Case Random(10) of
0: SetRun(True);
1: Gametab(1+random(12));
2: HoverSkill('random', false);
3: wait(1000);
4: wait(1000);
5: wait(1000);
6: FindNormalRandoms;
7: FindNormalRandoms;
end;
end;
Procedure ToStore;
var MMA : Extended;
begin
LoadDTMs;
begin
if(FindDTMRotated(Walk1DTMM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, 0.1, MMA)) then
begin
Writeln('[Walk] DTM Found, #1.');
Mouse(x, y, 0, 0, true);
Players[CurrentPlayer].loc := 'WalkDTM1';
end
else
begin
Writeln('[Walk] Radial Road Walk #1 ');
RadialRoadWalk(FindRoadColor, 270, 310, 72, 0, 0);
FindNormalRandoms;
CheckRun;
ZephFlag(15);
end;
end;
if(FindDTMRotated(Walk2DTMM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, 0.1, MMA)) then
begin
ZephFlag(10);
Writeln('[Walk] DTM Found, #2.');
Mouse(x-15, y, 0, 0, true)
Players[CurrentPlayer].loc := 'WalkDTM2';
Exit;
end
else
begin
Writeln('[Walk] Radial Road Walk #2');
RadialRoadWalk(FindRoadColor, 270, 310, 72, 0, 0);
FindNormalRandoms;
ZephFlag(20);
Exit;
end;
end;
procedure FindKeepers;
var
TMT, Times: Integer;
begin
TMT := 0;
AntiBan;
if not ShopScreen then
begin
wait(2000+random(3000))
FLAG;
Writeln('[Trade] Shop is not Open. Finding Keeper...');
if(FindSymbolIn(x, y, 'store', MMX1, MMY1, MMX2, MMY2)) then
begin
Flag;
Writeln('[Walk] General Store Found.');
Mouse(x, y, 0, 0, true)
Flag;
end;
repeat
Times:=0;
TMT := TMT + 1
if FindObjEx(X, Y, ['emad', 'ortan'], [7510470, 6522541, 7500667],
10, 241, 173, 0.5, 58, 63, 368, 263) then
begin
Wait(50 + Random(20));
Mouse(X, Y, 1, 1, false);
Wait(50 + Random(20));
if ChooseOption('rade') then
begin
Writeln('[Trade] Attempted...');
repeat
Times:= Times + 1
wait(100);
until (ShopScreen) or (Times > 50);
if shopscreen then
begin
writeln('[Trade] Successful');
exit;
end;
end;
end;
until (TMT > 5);
if (not(ShopScreen)) then
begin
if(FindSymbolIn(x, y, 'store', MMX1, MMY1, MMX2, MMY2)) then
begin
ZephFlag(10)
Writeln('[Trade] General Store Found.');
Mouse(x, y, 0, 0, true)
Players[CurrentPlayer].loc := 'Store';
FindKeepers;
end;
end
else
Writeln('[Trade] Could Not Find Keeper.');
end
else
Logout;
end;
Procedure FreeDTMs;
begin
FreeDTM(BankBoothMM);
FreeDTM(Walk1DTMM);
FreeDTM(Walk2DTMM);
end;
Procedure BuyVials;
begin
FindKeepers;
begin
wait(random(2000));
MouseBox(67, 110, 92, 127, 3)
if(IsUpText('Vial'))then
begin
getmousepos(x, y)
wait(100)
Mouse(x,y,0,0,false)
ChooseOption('Buy X')
Wait(1000)
Case Random(8) of
0: TypeSend('28');
1: TypeSend('32');
2: TypeSend('54');
3: TypeSend('55');
4: TypeSend('65');
5: TypeSend('65');
6: TypeSend('98');
7: TypeSend('87');
end;
end
else
begin
MouseBox(50, 70, 116, 79, 1)
wait(random(600))
BuyVials;
end;
Wait(400)
end;
end;
Procedure ToBank;
var MMA : extended;
begin
LoadDTMs;
wait(random(5000))
if(FindDTMRotated(Walk2DTMM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, 0.1, MMA)) then
begin
ZephFlag(10);
Writeln('[Walk] DTM Found, #2.');
Mouse(x-15, y, 0, 0, true)
Players[CurrentPlayer].loc := 'WalkDTM2';
end
else
begin
Writeln('[Walk] Radial Road Walk #2');
RadialRoadWalk(FindRoadColor, 110, 80, 72, 0, 0)
FindNormalRandoms;
ZephFlag(20);
end;
FindNormalRandoms;
if(FindDTMRotated(Walk1DTMM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, 0.1, MMA)) then
begin
Writeln('[Walk] DTM Found, #1.');
Mouse(x, y, 0, 0, true);
Players[CurrentPlayer].loc := 'WalkDTM1';
end
else
begin
Writeln('[Walk] Radial Road Walk #1 ');
RadialRoadWalk(FindRoadColor, 130, 90, 50, 0, 0)
FindNormalRandoms;
CheckRun;
Flag;
end;
if(FindDTMRotated(BankBoothMM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, 0.1, MMA)) then
begin
Writeln('[Bank] Found on Minimap.')
Mouse(x, y, 2, 2, true)
AntiBan;
Flag;
end
else
if(FindSymbol(x, y, 'bank'))then
begin
Writeln('[Bank] Symbol Found.');
Mouse(x, y, 3, 3, true)
AntiBan;
end;
end;
Procedure OpenBankJ;
var tries : integer;
begin
tries := 0;
fLAG;
begin
Repeat
tries := tries + 1;
fLAG;
OpenBankQuiet2('asb');
if (FindSymbol(x, y, 'store'))then ToBank;
wait(200)
until((BankScreen) or (Tries >= 5))
end;
end;
Procedure WithDrawJ;
var MMA : extended;
begin
Flag;
if(Bankscreen)then
begin
FixBank;
DepositAll;
MouseBox(80, 73, 108, 90, 3)
if(isUptext('oin'))then
begin
GetMousePos(x, y)
Mouse(x, y, 0, 0, false)
ChooseOption('X')
wait(1000+random(1000))
TypeSend('280')
wait(random(2000))
Case Random(3) of
0: CheckRun;
1: wait(1000);
end;
end;
end
else
if(FindDTMRotated(BankBoothMM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, 0.1, MMA)) then
begin
Writeln('[Bank] Found on Minimap.')
Mouse(x, y, 2, 2, true)
Flag;
OpenBankJ;
end;
end;
Procedure DepositJ;
begin
if(BankScreen)then
begin
Flag;
DepositAll;
Vials := Vials + 28;
wait(random(2000));
end
else
if(FindSymbol(x, y, 'bank'))then
begin
writeln('Opening Bank...');
OpenBankJ;
end
else
if(FindSymbol(x, y, 'store'))then ToBank;
end;
Procedure SetupJ;
begin
SetupSRL;
Wait(1000)
ActivateClient;
Wait(2000)
DeclarePlayers;
if(not LoggedIn) then LoginPlayer;
wait(1000)
SetAngle(True);
MakeCompass('N');
wait(1000)
end;
Procedure ProgressReport;
var TotalSpent, Profit, GEPrice, RateP, RateV, Sec : integer;
begin
TotalSpent := Vials * 10;
GEPrice := Vials * GEWealth;
Profit := GEPrice - TotalSpent;
Sec := GetTimeRunning div 1000+1;
RateP:= 3600 * Profit / Sec; // by mastaraymond.
RateV := 3600 * Vials / Sec;
begin
Writeln('|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|');
Writeln('||~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~||');
Writeln('|| Jethr0x''s Vial Buyer v0.1 ||');
Writeln('|| Spent: ' + IntToStr(TotalSpent) + 'gp. ||');
Writeln('|| Bought: ' + IntToStr(Vials) + ' vials. [' +IntToStr(RateV)+' Vials per hour.] ||');
Writeln('|| Profit: ' + IntToStr(Profit) + ' gp. [' +IntToStr(RateP)+'GP per hour.] ||');
Writeln('|| Ran For: ' + TimeRunning + ' ||');
Writeln('||~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~||');
writeln('|| Post This or I RAPE you :) ||');
Writeln('|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|');
end;
end;
begin
Vials := NumVials;
SetupJ;
Wait(2000)
OpenBankJ;
repeat
WithDrawJ;
ToStore;
BuyVials;
ToBank;
OpenBankJ;
DepositJ;
ClearDebug;
ProgressReport;
FreeDTMs;
wait(1000)
until(False)
end.