i pro leechin'
2008-06-27 13:57:50
i pro leechin' - SRL Member Application Form
i pro leechin'
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
Programming Knowledge
n0ne
Other Communitys
none
How Long have You Played Runescape
month or so
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
i like to play guitar and stuff like tad
i just like to do things wif rinds.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
program vialbuyer;
{.include SRL/SRL.Scar}
var
x, y, i, a, world, timer, starting, hours, minutes, seconds, sleeps,
spent, vials, gained, antibans, worldchanges, responds,dtm, running,
runningfails,laddercolor,cash: integer;
const
loads = 1;
worldhopping = True; // If false, world hopping does not occur
sleeping = True; // If false, Sleeping will not occur (Part of antiban)
Debugs = true; // Debug
watacolour = 11438190; // Temp water colour -- WHEN I WAS TESTING THE AUTO COLOUR IS SRL FAILED
// PLEASE DON'T TELL ME TO CHANGE TO THAT -.-
// bad way to set up
color1 = 15789808;
color2 = 11905717;
color3 = 15131366;
procedure declares;
begin
DTM := DTMFromString('78DA63E4676060906040012B561F61F80FA41' +
'981F83F10308A0319E20C6880118904D26C404296801A3E20C14A' +
'408D20116A406E56C2AF06009D3607F6');
cash := DTMFromString('78DA638C636060F06340010FB6CB32FC02D28' +
'C40FC1F0818FD810C5F0634C0884402E96020E149404D3690F022' +
'A026174844A2AA305050405513082422F09B0300E4AF0B33');
end;
procedure Declareplayers;
begin
NumberOfPlayers(2);
CurrentPlayer := 0;
// Multi player not used, this is for single script usage, ie, just a main... (like fight caver etc)
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
end;
// Auto water colour doesn't appear to work so.. :\ (this was to allow use of custom selected water colour)
function WaterWalkEx(StartRadial, EndRadial: Integer; Radius, FFlagBreakOut: Integer; Xoff, Yoff, Xmod, Ymod: Integer): Boolean;
var
tpa: TPointArray;
i: Integer;
begin
Result := False;
if RadialWalkEx(tpa, MMCX, MMCY, watacolour, 0, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x + Xoff, tpa[i].y + Yoff, Xmod, Ymod) then
begin
FFLag(FFlagBreakOut);
Result := True;
Break;
end;
end;
procedure debug(text: String);
begin
if(debugs = true) then
Writeln(text);
end;
procedure sleepin;
begin
if sleeping = False then
Exit;
if LoggedIn then
Logout;
case Random(3) of
0: Timer := randomrange(10000, 100000);
1: Timer := randomrange(20000, 1000400);
2: Timer := randomrange(1000000, 10000000);
end;
Marktime(starting);
ConvertTime(Timer, Hours, Minutes, Seconds);
WriteLn('Sleeping for: ' + inttostr(Hours) + ' Hours, ' + InttoStr(Minutes) +
' Minutes, and ' + IntTostr(Seconds) + ' Seconds')
repeat
ConvertTime(Round(Timer - TimeFromMark(starting)), Hours, minutes, Seconds);
wait(100000);
writeln('Sleeping commenced at' + IntToStr(starting) + '');
writeln('Sleep ' + IntToStr(hours) + 'hours, ' + IntToStr(minutes) +
'minutes remaining.' + IntToStr(Seconds) + 'seconds remaining');
until (TimeFromMark(starting) >= Timer);
Writeln('Sleeping Finished');
cleardebug;
sleeps := sleeps + 1;
end;
//Stolen completely from VWM {munk} ftw :P
function findLadderColorEx: integer;
var
i, len: integer;
h, s, l: extended;
cols: TIntegerArray;
p: TpointArray;
pp: T2DpointArray;
begin
if findColor(x, y, ladderColor, mmx1, mmy1, mmx2, mmy2) then
begin
result := ladderColor;
exit;
end;
if flagpresent then
begin
fflag(0);
wait(1000);
end;
FindColorsSpiralTolerance(mmcx, mmcy, p, 10317, mmx1, mmy1, mmx2, mmy2, 46);
pp := splitTPA(p, 1);
len := high(pp);
for i := 0 to len do
begin
// writeln(inttostr(length(pp[i])));
if rs_onMinimap(pp[i][0].x, pp[i][0].y) then
if inRange(length(pp[i]), 26, 42) then
begin
setArrayLength(cols, 0);
cols := GetColors(pp[i]);
ClearSameIntegers(cols);
// writeln(' cols '+inttostr(length(cols)));
if length(cols) = 1 then
begin
colorToHSL(cols[0], h, s, l);
if (h < 12) and (h > 2) then
if (s > 50) and (l < 30) then
begin
result := cols[0];
laddercolor := cols[0];
writeln('laddercolor = ' + inttostr(cols[0]));
exit;
end;
end;
end;
end;
result := findLadderColor;
if result = 0 then
writeln('ERROR: laddercolor not found!')
else
ladderColor := result;
end;
function FindThePeople(var cx, cy: Integer; Text: TStringArray; Color: // old srl func
TIntegerArray; Tolerance: Integer): Boolean;
var
a, b, c, i, x1, y1, x2, y2, x3, y3: Integer;
Start: Boolean;
begin
if (not (LoggedIn)) then
exit;
for b := 0 to (GetArrayLength(Color) - 1) do
if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2,
Tolerance)) then
begin
Start := True;
Break;
end;
if (Start) then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if not (LoggedIn) then
break;
a := a + 1;
if (a = 1) then
c := c + 1
else if (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end
else if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end
else if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end
else if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
for b := 0 to (GetArrayLength(Color) - 1) do
begin
if (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, tolerance))
then
if not FindColorTolerance(x3, y3, Color3, (cx - 5), (cy - 5), (cx + 5), (cy + 5), 5) then
Result := False
else
begin
MMouse(cx, cy, 0, 0);
Wait(50 + random(100));
if (IsUpTextMultiCustom(Text)) then
begin
Result := True;
Exit;
end;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
function lost(place: string; dis: integer): boolean;
begin
i := 0;
repeat
i := i + 1;
if (FindSymbol(X, Y, place)) then
begin
if distance(mmcx, mmcy, x, y) >= dis then
begin
mouse(x, y, 10, 10, true);
i := distance(mmcx, mmcy, x, y);
flag();
debug('Found ' + inttostr(i) + ' away. Clicking ' + place);
exit;
end
else
begin
i := distance(mmcx, mmcy, x, y);
debug('inside / near ' + place + 'Found ' + inttostr(i) + ' Away');
//debug('attempt new walking i suppose ;p');
exit;
end;
end;
until (i > 10) or not (loggedin);
if (i >= 10) then
{
begin
debug('Found water, retry lost');
lost('transportation', 10);
exit;
end; }
begin
debug('Okay we''re not near ' + place + ' something happened');
debug('Logging out just incase');
logout;
terminatescript; // will change this to find out better where i am :\
end;
end;
function MightRun(Percent, Chance: Integer; where: boolean): Boolean;
var
Energy: Integer;
C0lor: string;
begin
// Flip round chance
if (not (LoggedIn)) then
Exit;
Energy := GetMMLevels('run', C0lor);
if Energy > Percent then
begin
case Random(Chance) of
1, 2, 3: SetRun(where);
// Method of 1,2,3,4 to have failing occur, or 'forgetting'
end; // SetRun is succesful!!
end;
end;
procedure Antiban;
begin
case Random(40) of
0:
begin
randommovement;
MakeCompass('N');
SetAngle(true);
end;
1: GameTab(1 + random(10));
2: HoverSkill('random', false);
3, 4:
begin
GameTab(2 + random(10));
Wait(1000 + random(5000));
GameTab(4);
end;
5: SleepAndMoveMouse(1232 + random(857));
end;
end;
function BuyStuff: boolean;
begin
if (not (LoggedIn)) then
exit;
a := 0;
repeat
a := a + 1;
wait(500 + random(500));
if shopscreen then
break;
until (a > 10);
if (a > 10) then
begin
debug('Cant even fucking trade, logging epic fail');
result := false;
exit;
end;
begin
wait(500 + random(1000));
if(FindDTM(DTM,x,y,280,8,MSX2,MSY2)) then
Mouse(x,y,10,10,false);
if ChooseOption('Buy X') then
begin
wait(1000 + random(400));
i := (30 + random(70));
typesend(inttostr(i));
Wait(1000 + Random(500));
// Closes shop window
mouse(485, 40, 7, 7, true);
FindNormalRandoms;
spent := spent + 308;
antiban;
wait(300+random(300));
result := true;
end else
begin
debug('getting item failed ... wierd');
result := false;
exit;
end;
end;
end;
function middlebank: boolean; //Get middle of bank between the two ladders....
var
bankpoint: tpointarray;
begin
if not LoggedIn then
exit;
FindColorsTolerance(bankpoint, findLadderColorEx, MMX1, MMY1, MMX2, MMY2, 0);
//k := High(bankpoint);
//For I:= 0 to k do
//begin
debug('clicked middle of bank okay?');
MiddleTPAEx(bankpoint, x, y);
Mouse(x, y, 8, 8, true);
Wait(150 + Random(200));
findnormalrandoms;
antiban;
result := true;
exit;
// end;
end;
function findbanker: Boolean;
var
bankpoints: tpointarray;
h, l, cts: integer;
pointbank: T2DPointArray;
begin
if (not LoggedIn) then
exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.10, 25);
FindColorsTolerance(bankpoints, 7303288, MSX1, MSY1, MSX2, MSY2, 5);
pointbank := TPAtoATPAEx(bankpoints, 10, 10);
h := High(pointbank);
for i := 0 to h do
begin
if(bankscreen) then
begin
debug('Laggy fail safe found');
result := true;
exit;
end;
wait(30 + random(70));
MiddleTPAEx(pointbank[i], x, y);
MMouse(x, y, 8, 8);
wait(200 + random(300));
if (pos('ank', rs_GetUpText) > 0) then
begin
GetMousePos(x, y);
wait(300 + random(500));
mouse(x, y, 5, 5, false);
wait(300 + random(400));
if ChooseOption('ank') then
begin
debug('banker found');
result := true;
exit;
end;
end;
end;
end;
function findNtrade: boolean;
var
a, NotFoundHIm: integer;
begin
debug('Attempting to find');
a := 0;
if (not (LoggedIn)) then
exit;
repeat
NotFoundHim := NotFoundHim + 1;
a := a + 1;
debug(inttostr(NotFoundHim));
if NotFoundHim mod 5 = 0 then
begin
debug(inttostr(a));
case random(5) of
0: MakeCompass('S');
1: wait(random(100));
2: MakeCompass('W');
3: MakeCompass('N');
4: MakeCompass('E');
5: wait(random(500));
end;
break;
end
else if FindThePeople(x, y, ['Obli', 'bli'], [color1, color2], 6) then
begin
// Trade him
debug('Found the guy');
Mouse(X, Y, 10, 10, false);
Wait(200 + Random(200));
if ChooseOption('rade') then
begin
Wait(300 + Random(200));
debug('Buying stuff?');
Marktime(starting);
repeat
buystuff;
until (buystuff = true) or not (loggedin) or (starting >= 50000);
result := true;
exit;
end;
FindNormalRandoms;
antiban;
end;
until (a >= 10) or (NotFoundHim > 20);
end;
function FindAmount : boolean;
var
mask: integer;
begin
result := FindTextTpa(0, 1, MCX1,MCY1,MCX2,MCY2, 'ount',UpChars, Nothing);//UpChars?
if (not (result)) then
begin
Mask := BitmapFromString(48, 8, 'beNpjYBhw8B8MGAYNwOqe/0gAl' +
'zh+WazmY7JxqcevC42NySCbjd8cXOFAO/fgZ9M/fIaie8iLLyJzAU' +
'FfoyQtAN1lzz8=');
Result := FindBitmapMaskTolerance(Mask, x, y, MCX1, MCY1, MCX2, MCY2, 10, 10);
FreeBitmap(Mask);
end;
end;
function withdrawfailsafe : boolean;
begin
marktime(starting);
repeat
wait(300+random(500));
if (FindAmount) then
begin
debug('cash withdrawn');
wait(100+random(200));
typesend('308');
result:=true;
exit;
end;
until(starting > 3000);
end;
function withdrawcash : boolean;
begin
a:=0;
repeat
a:=a+1;
if(FindDTM(cash,x,y,MSX1,MSY1,MSX2,MSY2)) then
Begin;
Mouse(x,y,10,10,false);
wait(400+random(700));
if(ChooseOption('ithdraw X')) then
if(withdrawfailsafe = true) then
begin
result := true;
debug('withdrew cash');
exit;
end;
end;
until(a > 10);
debug('withdraw cash failed');
result:=false;
end;
function FindDtmVial : boolean;
begin
if(FindDtm(dtm,x,y,MIX1,MIY1,MIX2,MIY2)) then
if bankscreen then
begin
debug('Vials found,banking');
depositall;
wait(300+random(500));
fixbank;
//withdraw(1,1, 308); no offence to creator, but completely shite func
withdrawcash;
a := 0;
repeat
a:=a+1;
if(withdrawcash = true) then
begin
mouse(483, 40, 8, 8, true); // Close shop window. Do people do this? :S
banks:=banks+1;
result := true;
exit;
end;
if(a > 5) then
begin
debug('Money finding, failed.');
terminatescript;
end;
until(a > 6);
end;
end;
function banking: boolean;
begin
a:=0;
if(not (LoggedIn)) then
exit;
if not bankscreen then
repeat
debug('Lol, failed bankscreen. retrying. Attempt ' + inttostr(a));
if bankscreen then
break;
if(findbanker = true) then
break;
a := a + 1;
until(a > 5);
//Dtm kept failing so wierdly?? Had to loop, sorry
a:=0;
repeat
debug('Finding vials : ' + inttostr(a));
a := a + 1;
if(FindDtmVial = true) then
begin
result:=true;
exit;
end;
until(a > 6);
{
if(coinAmount('inv') > 307) then
begin
debug('money found, but no vials. o.O');
result:=true;30
exit;
end;
}
{ this shouldn't occurr so commented while testing. }
if (coinAmount('inv') <= 306) then
begin
debug('Money not found, Vials not found');
fixbank;
wait(300+random(700));
depositall;
wait(30+random(300));
if(withdrawcash = False) then
terminatescript;
wait(30+random(300));
// Purposely didn't close bank =\ Dunno about this >.<
banks:=banks+1;
result:=true;
exit;
end;
end;
function findladder(var TempX, TempY: Integer): boolean;
var
h, posx, posy, col, x2, y2: integer;
ladderpoints: tpointarray;
ladderpoints2: T2DPointArray;
ladder: tpoint;
begin
if (not LoggedIn) then
exit;
col := findladdercolorex;
FindColorsTolerance(ladderpoints, col, MMCX, MMCY + 15, MMX2, MMY2, 0);
ladderpoints2 := TPAtoATPAEx(ladderpoints, 2, 2); // bit useless :p
SortATPAFrom(ladderpoints2, IntToPoint(MMCX, MMCY));
SetLength(ladderpoints, 0);
h := High(ladderpoints2);
for i := 0 to h do
begin
ladder := MiddleTPA(ladderpoints2[i]);
posx := ladder.x;
posy := ladder.y;
if (FindColorTolerance(x2, y2, col, posx - 5, posy - 5, posx + 5, posy + 5, 0)) then
if CountColorTolerance(col, posx - 5, posy - 5, posx + 5, posy + 5, 0) > 5
then
begin
TempX := x2;
TempY := y2;
Result := True;
exit;
end;
end;
end;
procedure ProgressReport;
begin
vials := banks * 28;
gained := ((vials * 90) - spent);
Writeln(' ');
Writeln('|-------------------[My first script]-------------------|');
Writeln('Amount of banks:' + inttostr(banks) + '');
Writeln('Amount of vials:' + inttostr(vials) + '');
Writeln('Money spent:' + inttostr(spent) + '');
Writeln('Money gained:' + inttostr(gained) + '');
if antibans > 0 then
Writeln('Antibans performed:' + inttostr(antibans) + '');
if worldchanges > 0 then
Writeln('World changes:' + inttostr(worldchanges) + '');
if sleeps > 0 then
Writeln('Slept:' + inttostr(sleeps) + ' times');
if minutes > 0 then
Writeln('Slept for:' + inttostr(hours) + ' Minutes:' + inttostr(minutes) + ' Seconds' + inttostr(seconds) + '');
if running > 0 then
Writeln('Ran for:' + inttostr(running) + ' times.');
if runningfails > 0 then
Writeln('Forgot running for:' + inttostr(runningfails) + ' times.');
Writeln('|-----------------[Money gained:' + inttostr(gained) +
'|-----------------');
Writeln('Started ' + (TheTime) + ' Worked for ' + TimeRunning);
SRLRandomsReport;
end;
function watermethod : boolean;
begin
a:= 0;
if(waterWalkEx(330, 360, 78, 15, 20, 20, -2, 2)) then
repeat
debug('Water walking z0mg');
wait(400+random(300));
WaterWalkEx(300,340,30,20,-30,3,-2,1);
wait(400+random(300));
FindNormalRandoms;
if(FindSymbol(x,y,'store')) then
begin
debug('Found the store, woot, clicking');
wait(400+random(600));
mouse( x, y, 5, 5, true);
flag();
wait(300+random(500));
FindNormalRandoms;
result := true;
exit;
end;
a:=a+1;
until(a > 5);
if(a > 5) then
result:=false;
end;
function walktoshop: boolean;
begin
if (not (LoggedIn)) then
exit;
i := 0;
repeat
i := i + 1;
if(findsymbol(x,y, 'transportation')) then
begin
MightRun(90, 5, true);
wait(300 + random(500));
mouse(x, y, 30, 30, true);
flag();
debug('transportation found');
findnormalrandoms;
break;
end;
if(i > 10) then
begin
debug('Transportation, failed water walk');
result:=false;
exit;
end;
until(i > 11);
if not(FindSymbol(x,y,'store')) then
lost('transportation', 10);
if(FindSymbol(x,y,'store')) then
begin
debug('store found');
mightrun(80,4,true);
wait(70+random(600));
mouse(x,y,5,5,true);
flag();
antiban;
result := true;
exit;
end else
result := false;
end;
function walking : boolean;
begin
if (walktoshop = false) then
if (watermethod = false) then
begin
debug('Both walking failed, ending');
result := false;
end;
result:=true;
end;
Function GetIntoBank:Boolean;
Var
TempTpa: TpointArray;
Temp: T2DPointArray;
Between, x, y, CTS, TempX, TempY:Integer;
x1, y1, x2, y2 : integer;
Begin
Result := True;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
If FindSymbol(x, y, 'Bank') then
begin
x1 := x - 30;
y1 := y - 30;
x2 := x + 30;
y2 := y + 30;
end else Result := False;
if Result = false then Exit else FindColorsSpiralTolerance(TempX, TempY, TempTPA, 1201545, X1, Y1, X2, Y2, 12);
Temp:= TPAtoATPAEx(TempTPA, 3, 3);
SortATPASize(Temp, True);
MiddleTPAEx(Temp[0], TempX, TempY);
Between := Distance(x, y, TempX, TempY);
Mouse(TempX, TempY, 5, 5, True);
ColorToleranceSpeed(CTS);
Result := True;
FFlag(2);
End;
function walkhome: boolean;
begin
if (not (LoggedIn)) then
exit;
i := 0;
repeat
i := i + 1;
if (FindSymbol(x, y, 'transportation')) then
begin
MightRun(90, 5, true);
wait(300 + random(500));
mouse(x, y, 30, 30, true);
flag();
if (not (FindLadder(x, y))) then
lost('transportation', 20);
debug('transportation');
findnormalrandoms;
break;
end;
until (i > 10);
if (i > 10) then
begin
flag();
lost('transportation', 10);
end;
i := 0;
repeat
if FindLadder(x, y) then
Mouse(x, y, 5, 5, true);
begin
MightRun(80, 4, true);
wait(500 + random(1000));
flag();
debug('bank ladder found');
Marktime(starting);
repeat
if(GetIntoBank = true) then
exit;
if (middlebank = true) then
exit;
until (starting > 30000);
end;
until (i > 10) or flag();
if (i > 10) then
debug('managed to fail finding ladder');
logout;
end;
var
col, trips: integer;
begin
activateclient;
setupsrl;
declares;
declareplayers;
if (not (LoggedIn)) then
LoginPlayer;
i := 1;
wait(100 + random(400));
COL := findladdercolorex;
if (not (LoggedIn)) then
LoginPlayer;
repeat
case Random(50) of //Maybs more? :S
0: antiban;
end;
findnormalrandoms;
if (banking = false) then
if (banking = false) then
begin
debug('lol epic failed XD');
lost('bank', 10);
logout;
terminatescript;
end;
progressreport;
if (walking) then
if (findntrade) then
if (walkhome) then
debug('success');
trips := trips + 1;
progressreport;
until (trips > loads);
end.——————————————————
<!– END TEMPLATE: formanswers –>
