Xanith
2011-01-19 16:18:01
How Long have You Played Runescape?
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
No
What is your general programming knowledge?
None, Just what I read here on the forums.
Are you a member of any other communities?
No.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
No
What is your general programming knowledge?
None, Just what I read here on the forums.
Are you a member of any other communities?
No.
Tell us about yourself…
From: Xanith
My name is Eric. Currently I am 18 soon to be 19(Jan 30th). I live in a small town in New Jersey about 5 minutes from NYC. My interests are listening to music, going to school(going to become an airplane mechanic), and just hanging out with friends.
Please show us one (or multiple) of your scripts.
program XanithsWillowCutter;
{$i SRl/SRL/misc/SMART.scar}
{$i SRL/SRL.scar}
{$i srl/srl/misc/debug.scar}
{$i reflection\reflection.simba}
{$i srl/srl/misc/PaintSmart.scar}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Player username
Pass := ''; //Player password
Nick := ''; //Player nickname - 3 or 4 letters of your player name (no spaces or capitals).
Active := True; //Is the player active (do you want to auto on this acc)?
Pin := ''; //Bank Pink, leave as '' for no bank pin.
Integers[0] := 5; //Loads
Booleans[0] := True; //Axe Equipped?
Booleans[1] := False; //True for Members, False for Non-Members.
end;
{with Players[1] do
begin
Name := ''; //Player username
Pass := ''; //Player password
Nick := ''; //Player nickname - 3 or 4 letters of your player name (no spaces or capitals).
Active := True; //Is the player active (do you want to auto on this acc)?
Pin := ''; //Bank Pink, leave as '' for no bank pin.
Integers[0] := 5; //Loads
Booleans[0] := True; //Axe Equipped?
Booleans[1] := False; //True for Members, False for Non-Members.
end;
with Players[2] do
begin
Name := ''; //Player username
Pass := ''; //Player password
Nick := ''; //Player nickname - 3 or 4 letters of your player name (no spaces or capitals).
Active := True; //Is the player active (do you want to auto on this acc)?
Pin := ''; //Bank Pink, leave as '' for no bank pin.
Integers[0] := 5; //Loads
Booleans[0] := True; //Axe Equipped?
Booleans[1] := False; //True for Members, False for Non-Members.
end;}
end;
procedure notChopping(waitTime : integer);
var
t : integer;
b : TBox;
begin
t := (GetSystemTime + waitTime);
b := IntToBox(MSCX - 15, MSCY - 50, MSCX + 15, MSCY + 15);
repeat
wait(10);
until not (isMoving) or not (LoggedIn);
while (GetSystemTime < t) do
begin
if PixelShift(b, 300) < 300 then
Exit;
end;
end;
Procedure crudeAntiban;
begin
if(not(LoggedIn))then
exit;
case Random(18) of
0:
begin
HoverSkill('random', false);
Inc(Players[CurrentPlayer].Integers[3]);
end;
1:
begin
PickUpMouse;
Inc(Players[CurrentPlayer].Integers[3]);
end;
2:
begin
RandomMovement;
Inc(Players[CurrentPlayer].Integers[3]);
end;
3:
begin
BoredHuman;
Inc(Players[CurrentPlayer].Integers[3]);
end;
4:
begin
ExamineInv;
Inc(Players[CurrentPlayer].Integers[3]);
end;
5:
begin
RandomAngle(1);
Inc(Players[CurrentPlayer].Integers[3]);
end;
end;
end;
function findAndChop : Boolean;
var
x, y, i : integer;
CTS : integer;
treesTPA : TpointArray;
treeATPA : T2DpointArray;
tempResult : Boolean;
begin
Setangle(True);
repeat
if (InvFull) then
begin
Players[CurrentPlayer].Loc := 'to bank';
exit;
end;
if not (LoggedIn) then
begin
Players[CurrentPlayer].Active := False;
exit;
end;
CTS := GetColorToleranceSpeed;
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.16, 0.89);
FindColorsTolerance(treesTPA, 2509885, MSX1, MSY1, MSX2, MSY2, 10);
SetColorToleranceSpeed(CTS);
if (Length(treesTPA) < 1) then
Exit;
treeATPA := SplitTPA(treesTPA, 10);
SortATPAFromFirstPoint(treeATPA, IntToPoint(MSCX, MSCY));
for i := 0 to high(treeATPA) do
begin
if length(treeATPA[i]) > 100 then
begin
MiddleTPAEx(treeATPA[i], x, y);
MMouse(x - 5, y - 5, 10, 10);
if WaitUpText('illow', 800) then
begin
ClickMouse2(false);
tempResult := WaitOption('hop', 800);
end;
if tempResult then
break
else begin
Players[CurrentPlayer].Active := False;
Logout;
exit;
end;
end;
end;
notChopping(RandomRange(10000, 15000));
Wait(200 + random(100));
FindNormalRandoms;
crudeAntiban;
until(InvFull) or not(LoggedIn);
if InvFull then
result := true;
end;
function findBankTPA : TpointArray;
var
CTS: integer;
initHue, initSat : extended;
TPA : TpointArray;
begin
CTS := GetColorToleranceSpeed;
GetColorspeed2Modifiers(initHue, initSat);
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(7.31, 0.40);
FindColorsTolerance(TPA, 3947832, MMCX, (MMY1 + 20), (MMX2 - 20), (MMCY - 10), 6);
DebugTPA(TPA, 'h');
SMART_DrawBox(inttobox(MMCX, MMY1 + 20, MMX2 - 20, MMCY - 10));
Result := TPA;
end;
function findBankSymbolTPA : TpointArray;
var
CTS: integer;
initHue, initSat : extended;
TPA : TpointArray;
begin
CTS := GetColorToleranceSpeed;
GetColorspeed2Modifiers(initHue, initSat);
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 1.49);
FindColorsTolerance(TPA, 6542813, MMCX, MMY1, MMX2, MMCY, 15);
SetColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(initHue, initSat);
result := TPA;
DebugTPA(result, 'g');
end;
function checkForFloor : boolean;
var
TPA : TpointArray;
CTS: integer;
initHue, initSat : extended;
begin
CTS := GetColorToleranceSpeed;
GetColorspeed2Modifiers(initHue, initSat);
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(2.09, 0.21);
FindColorsTolerance(TPA, 3092529, MSX1, MSY1, MSX2, MSY2, 4)
FilterPointsPie(TPA, 0.0, 360.0, 26.0, 26.2, MSCX, MSCY);
SetColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(initHue, initSat);
if high(TPA) > 5 then
Result := True;
end;
function walkToBank : boolean;
var
i, H : integer;
tempTPA : TpointArray;
bankBox : TBox;
begin
if not LoggedIn then
exit;
if (Length(findBankTPA) < 1) or (Length(findBankSymbolTPA) < 1) then
begin
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
bankBox := GetTPABounds(findBankTPA);
tempTPA := findBankSymbolTPA;
H := High(tempTPA);
for i := 0 to H do
begin
if (PointInBox(tempTPA[i], bankBox)) then
begin
MouseBox(bankBox.x1 + 2 , bankBox.y1 + 2, bankBox.x2 - 2, bankBox.y2 - 2, 1);
Break;
end else begin
Players[CurrentPlayer].Active := False;
Logout;
exit;
end;
end;
wait(100);
repeat
Wait(10);
until not (IsMoving) or not (LoggedIn);
if (checkForFloor) then
begin
result := true;
Players[CurrentPlayer].Loc := 'bank';
end else begin
Players[CurrentPlayer].Active := False;
Logout;
exit;
end;
end;
function findTreesMMTPA(x1, y1, x2, y2 : integer): TPointArray;
var
TPA : TPointArray;
CTS: integer;
initHue, initSat : extended;
begin
CTS := GetColorToleranceSpeed;
GetColorspeed2Modifiers(initHue, initSat);
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(1.08, 1.34);
FindColorsTolerance(TPA, 938807, x1, y1, x2, y2, 12);
SetColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(initHue, initSat);
debugTPA(TPA, 'v');
SMART_DrawBox(inttobox(x1, y1, x2, y2));
Result := TPA;
end;
function walkToTrees : Boolean;
var
x, y, len : integer;
begin
if (length(findTreesMMTPA((MMX1 + 20), MMCY, MMCX, MMY2))) < 1 then
begin
Players[CurrentPlayer].Active := False;
Logout;
exit;
end;
MiddleTPAEx(findTreesMMTPA((MMX1 + 20), MMCY, MMCX, MMY2), x, y);
Mouse(x, y, 0, 0, True);
Wait(300);
repeat
wait(10);
until not (isMoving) or not (LoggedIn);
len := length(findTreesMMTPA(MMCX - 10, MMCY - 10, MMCX + 10 , MMCY + 10));
if (len) < 1 then
begin
Players[CurrentPlayer].Active := False;
Logout;
exit;
end;
if len >= 60 then
begin
result := True;
Players[CurrentPlayer].Loc := 'trees';
end;
end;
procedure progress;
begin
ClearDebug;
Writeln('[----------------------------------------------------]');
Writeln(Padr('||Player: ' + Players[CurrentPlayer].Nick, 52) + '||');
Writeln(Padr('||Loads: ' + ToStr(Players[CurrentPlayer].Integers[2]), 52) + '||');
if Players[CurrentPlayer].Booleans[0] then
Writeln(Padr('||Willows: ' + ToStr(Players[CurrentPlayer].Integers[2] * 28), 52) + '||')
else
Writeln(Padr('||Willows: ' + ToStr(Players[CurrentPlayer].Integers[2] * 27), 52) + '||');
if Players[CurrentPlayer].Booleans[0] then
Writeln(Padr('||Experience: ' + ToStr(Players[CurrentPlayer].Integers[2] * 28 * 67.5), 52) + '||')
else
Writeln(Padr('||Experience: ' + ToStr(Players[CurrentPlayer].Integers[2] * 27 * 67.5), 52) + '||');
Writeln(Padr('||Antiban Used: ' + ToStr(Players[CurrentPlayer].Integers[3]), 52) + '||');
Writeln(Padr('||Time Running: ' + ToStr(TimeRunning), 52) + '||');
Writeln('[----------------------------------------------------]');
end;
function myDeposit : boolean;
var
i, j, CTS : integer;
initHue, InitSat : extended;
TP : TPoint;
TPA : TPointArray;
ATPA : Array of TPointArray;
badBox : TBox;
itemCount : integer;
begin
if not LoggedIn then
exit;
GameTab(tab_Inv);
itemCount := InvCount;
if Players[CurrentPlayer].Booleans[0] then
begin
if itemCount = 0 then
begin
result := True;
Players[CurrentPlayer].Loc := 'to willows';
exit;
end;
end else begin
if itemCount = 1 then
begin
result := True;
Players[CurrentPlayer].Loc := 'to willows';
exit;
end;
end;
badBox := PointToBox(InttoPoint(3092, 3246), inttoPoint(3095, 3245));
if MeInBox(badBox) then
WalkToTile(tile(3094, 3243), 1, 0);
CTS := GetColorToleranceSpeed;
SetColorToleranceSpeed(2);
GetColorspeed2Modifiers(initHue, initSat);
SetColorspeed2Modifiers(0.03, 0.34);
FindColorsTolerance(TPA, 803162, MSX1, MSY1, MSX2, MSY2, 26);
SetColorToleranceSpeed(CTS);
SetColorspeed2Modifiers(initHue, initSat);
ATPA := SplitTPA(TPA, 10);
SortATPAFromSize(ATPA, 900, True);
for i := 0 to high(ATPA) do
begin
TP := MiddleTPA(ATPA[i]);
FilterPointsPie(ATPA[i], 0.0, 360.0, 9.5, 10.9, TP.x, TP.y);
if high(ATPA[i]) > 60 then
begin
MMouse(TP.x - 5, TP.y - 5, 10, 10);
Wait(100);
if IsUpText('epos') then
begin
ClickMouse2(true);
Break;
end else begin
Players[CurrentPlayer].Active := False;
Logout;
exit;
end;
end;
end;
repeat
Wait(10);
until DepositScreen;
j := Random(27) + 1;
MouseBox(DepositItemBox(j).x1 + 11, DepositItemBox(j).y1 + 11, DepositItemBox(j).x2 - 11, DepositItemBox(j).y2 - 11, 3);
Wait(500);
if IsUpText('illow') then
begin
wait(100);
ClickMouse2(false);
wait(500);
ChooseOption('it-All');
Wait(100 + random(25));
end;
CloseWindow;
wait(100 + random(23));
if Players[CurrentPlayer].Booleans[0] then
begin
if itemCount = 0 then
begin
result := True;
Players[CurrentPlayer].Loc := 'to willows';
inc(Players[CurrentPlayer].Integers[2]);
exit;
end;
end else begin
if itemCount = 1 then
begin
result := True;
Players[CurrentPlayer].Loc := 'to willows';
inc(Players[CurrentPlayer].Integers[2]);
exit;
end;
end;
end;
procedure myFindLoc;
begin
if not LoggedIn then
exit;
if checkForFloor then
begin
if Players[CurrentPlayer].Booleans[0] then
begin
if InvCount = 0 then
begin
Players[CurrentPlayer].Loc := 'to willows';
exit;
end else begin
Players[CurrentPlayer].Loc := 'bank';
exit;
end;
end else begin
if InvCount = 1 then
begin
Players[CurrentPlayer].Loc := 'to willows';
exit;
end else begin
Players[CurrentPlayer].Loc := 'bank';
exit;
end;
end;
end else begin
if length(findTreesMMTPA(MMCX - 10, MMCY - 10, MMCX + 10 , MMCY + 10)) > 50 then
if (InvFull) then
begin
Players[CurrentPlayer].Loc := 'to bank';
exit;
end else begin
Players[CurrentPlayer].Loc := 'trees';
end;
end;
end;
procedure mainLoop;
begin
myFindLoc;
repeat
case LowerCase(Players[CurrentPlayer].Loc) of
'bank': begin
if myDeposit then
Players[CurrentPlayer].Loc := 'to willows';
FindNormalRandoms;
crudeAntiban;
progress;
end;
'to willows': begin
if walkToTrees then
Players[CurrentPlayer].Loc := 'trees';
FindNormalRandoms;
crudeAntiban;
end;
'trees': begin
if findAndChop then
Players[CurrentPlayer].Loc := 'to bank';
crudeAntiban;
end;
'to bank': begin
if walkToBank then
Players[CurrentPlayer].Loc := 'bank';
FindNormalRandoms;
crudeAntiban;
end;
end;
until not (LoggedIn) or (Players[CurrentPlayer].Integers[2] >= Players[CurrentPlayer].Integers[0]);
NextPlayer(Players[CurrentPlayer].Active);
end;
begin
DeclarePlayers;
Smart_Members := Players[CurrentPlayer].Booleans[1];
Smart_Server := 40;
Smart_Signed := True;
SetUpSRL;
SetUpReflection;
repeat
mainLoop;
until AllPlayersInactive;
end.