skvatboy
2009-07-16 22:40:23
My second try I hope i have improve to get the `yes´http://www.villavu.com/forum/showthread.php?t=47452
How Long have You Played Runescape?
4 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
none
Are you a member of any other communities?
No
Tell us about yourself…
From: skvatboy
Am a 20 years
a communicate expert in denmark
and i like the open source commuter in here
the freedom of share
Please show us one (or multiple) of your scripts.
program EoNewtB;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/misc/FaladorColorFinder.scar}
const
SmartWorldNo = 120;
Signed = True;
Amount = 200;
procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Name := ''; //Player username
Players[0].Pass := ''; //Player password
Players[0].Nick := ''; //Player nickname - 3-4 letters of Player usernamne.
Players[0].Active := True; //Is the player active (do you want to auto on this acc)?
Players[0].Pin := ''; //Bank Pink, leave as '' for no bank pin... MUST BE A STRING!
Players[0].BoxRewards := ['XP', 'ostume', 'Gem', 'ithril', 'oal', 'une', 'mote', 'oins'];
end;
function DTMWalks(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..4] of TDTMPointDef;
TempTDTM: TDTM;
x, y, i, t, Tole: Integer;
begin
case WalkNumber of
1:begin
repeat
Tole:= Tole + 5;
dtmMainPoint.x := 625;
dtmMainPoint.y := 91;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 10206142;
dtmMainPoint.Tolerance := Tole;
dtmSubPoints[0].x := 625;
dtmSubPoints[0].y := 91;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 10206142;
dtmSubPoints[0].Tolerance := Tole;
dtmSubPoints[1].x := 633;
dtmSubPoints[1].y := 60;
dtmSubPoints[2].x := 604;
dtmSubPoints[2].y := 74;
dtmSubPoints[3].x := 605;
dtmSubPoints[3].y := 54;
dtmSubPoints[4].x := 598;
dtmSubPoints[4].y := 95;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
for t := 1 to 4 do
with dtmSubPoints[t] do
begin
AreaSize := 0;
AreaShape := 0;
Color := FindFallyRoadColor;
Tolerance := tole;
end;
Result := AddDTM(TempTDTM);
if DTMRotated(Result, x, y, MMX1, MMY1, MMX2, MMY2) then Exit;
try
FreeDTM(i);
except
end;
until(tole > 50)
end;
end;
end;
function OpenFWBBank: Boolean;
var
x, y, BankSpot : Integer;
Begin
If(Not(LoggedIn)) Then Exit;
FindNormalRandoms;
FindBank('fwb');
if BankScreen then
Result := true
else
Writeln('Not Found by (FindBand)');
BankSpot := DTMWalks(1);
if FindDTM(BankSpot, X, Y, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(X, Y, 8, 8, True);
Writeln('Found by DDTM');
Result := OpenBank('fwb', False, False);
end;
Result := False;
FreeDTM(BankSpot);
end;
Procedure CheckGetCash;
var
x, y : Integer;
Begin
If(Not(LoggedIn)) Then Exit;
gametab(tab_Inv);
IF (CoinAmount('inv') > 50) Then Exit;
if not BankScreen then OpenFWBBank;
FindCoins(X, Y, 'bank');
begin
Mouse(x, y, 4, 4,false);
Wait(150 + random(200));
if (Amount > 0) then
begin
ChooseOption('Withdraw-X')
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount));
end;
if (Amount = 0) then
ChooseOption('ll');
end;
Deposit(2, 28, True);
CloseBank;
end;
Procedure DoorClosed;
Var
TPA: TPointArray;
I: Integer;
Begin
If(Not(LoggedIn)) Then Exit;
FindColorsTolerance(TPA, 3891047, msx1, msy1, mscx, msy2, 5);
For I := 0 To High(TPA) Do
begin
MMouse(TPA[i].x, TPA[i].y,2,2);
Wait(100 + Random(200));
If Isuptext('los')then Exit;
If Isuptext('ett')then
begin;
Mouse(TPA[i].x, TPA[i].y, 2, 2, True);
Writeln('Door clik');
Break;
end;
Writeln('Door open');
end;
end;
function MageShopFloor: Integer;
var
FloorColor, c, TX, TY, MageShopbit : Integer;
begin
MageShopbit := BitmapFromString(4, 4, 'beNorKH739sV/JMRXU' +
'AxB77CyAR4+HBM=');
while (c <= 80) do
begin
c := c + 5;
if (FindTransparentBitmapTolerance(MageShopbit, TX, TY, clBlack, MMX1, MMY1, MMX2, MMY2, c)) then
begin
FloorColor := GetColor(TX, TY);
Result := FloorColor;
break;
end;
end;
if (Result = 0) then
WriteLn('FloorColor NOT Found');
FreeBitmap(MageShopbit);
end;
procedure WalkToMagic;
var
x, y, sp1, sp2 : Integer;
begin
sp1 := DTMFromString('78DA63AC65666088636440065159320C46401' +
'A24FA1F0818BB816A32206A602A9DD4B8189491F88CE54035D904' +
'D4B420EC828919CB73A0A80100D3180A63');
sp2 := DTMFromString('78DA636C66626058C98002F2D323185280342' +
'310FF0702C68940352B20724C50356FBFBC601081AA0101C64CA0' +
'CC7C026A8A81323D5036544CDF930B450D009F951060');
If(Not(LoggedIn)) Then Exit;
FindNormalRandoms;
MakeCompass('n');
SetRun(true);
begin
if not RadialWalk(FindFallyRoadColor, 200 , 230, 50, 2, 2) then
RadialWalk(FindFallyRoadColor, 190 , 240, 50, 2, 2);
repeat
RadialWalk(FindFallyRoadColor, 165, 195, 63, 2, 2)
Until FindSymbol(x, y, 'tree') or ((FindFallyRoadColor) > 0);
WriteLn('Find tree');
repeat
if not RadialWalk(FindRoadColor, 165, 195, 70, 2, 2) then
RadialWalk(FindRoadColor, 155, 200, 70, 2, 2);
FFlag(0);
until ((MageShopFloor) > 0) or FindSymbol(x, y, 'resting spot');
WriteLn('resting spot or shop flor');
if FindDTM(sp1, X, Y, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(X, Y, 8, 8, True);
WriteLn('Walk to sp1');
FFlag(10);
end;
if FindDTM(sp2, X, Y, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(X, Y, 8, 8, True);
WriteLn('Walk to door or sp2');
FFlag(10);
end;
end;
FreeDTM(sp1);
FreeDTM(sp2);
end;
Procedure WalkToBank;
var
x, y, sp1, C: Integer;
begin
If(Not(LoggedIn)) Then Exit;
sp1 := DTMFromString('78DA63AC65666088636440065159320C46401' +
'A24FA1F0818BB816A32206A602A9DD4B8189491F88CE54035D904' +
'D4B420EC828919CB73A0A80100D3180A63');
if FindDTM(sp1, X, Y, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(X, Y, 8, 8, True);
WriteLn('Walk to sp1');
FFlag(10);
end;
repeat
WriteLn('walk');
if not RadialRoadWalk(FindRoadColor, 345, 370, 65, 2, 2) then
RadialWalk(FindRoadColor, 350, 375, 70, 2, 2);
FFlag(0);
Until (FindFallyRoadColor) > 0;
C := 0;
repeat
if (C > 0) then
WriteLn('walkFallyRoad');
if not RadialRoadWalk(FindRoadColor, 355,390, 65, 2, 2) then
RadialRoadWalk(FindFallyRoadColor, 350,390, 65, 2, 2);
FFlag(2);
Inc(C);
until FindSymbol(x, y, 'bank') or (C > 10);
end;
Procedure FindBrtty;
Var
TPA: TPointArray;
I: Integer;
Begin
FindColorsTolerance(TPA, 4336963, msx1, msy1, msx2, msy2, 5);
For I := 0 To High(TPA) Do
Begin
MMouse(TPA[i].x, TPA[i].y, 2, 2);
Wait(100 + Random(200));
If Isuptext('ett')then
begin;
Mouse(TPA[i].x, TPA[i].y, 2, 2, False);
ChooseOption('Trade')
Break;
end;
end;
end;
procedure ByNewts;
var
x, y, Newt: Integer;
begin
Newt := BitmapFromString(5, 9, 'beNqbN+/q+fNXzp3bv3Xr8tmze5q' +
'a7t++LSazTVRqlbDEvAVTp4jL7heT2SkqLAxE03t7Prx7B2ED0cy+vicPH965' +
'fv3y2TOnDx+eO2kinHt8/75F06ZBuBdOnTy8a9fmFSuA3FtXr545ehRo1/rFi' +
'4Hc6xcvnjhwYPfGDasAVkNUxw==');
If(Not(LoggedIn)) Then Exit;
if not(ShopScreen) then Exit;
if(FindBitmapIn(Newt, x, y, msx1, msy1, msx2, msy2))then
begin
Writeln('News');
MMouse(x, y, 5, 5);;
If Isuptext('ye of')then
Mouse(x, y, 1, 1, False);
ChooseOption('X');
begin
Wait(100 + Random(1000));
TypeSend('28');
if InvFull then
closewindow;
end;
end;
FreeBitmap(Newt);
end;
Procedure ChatsSetUp;
Begin
If(Not(LoggedIn)) Then Exit;
setrun(true)
gametab(4);
MakeCompass('n');
FindNormalRandoms;
SetAllChats('all', 'on', 'off', '', '', '');
SetAngle(True);
end;
procedure SetupScript;
begin
{$IFDEF SRL_SMART}
Smart_Server := SmartWorldNo;
Smart_Signed := Signed;
{$ENDIF}
SetupSRL;
DeclarePlayers;
SetAudioOff;
If (Not(LoggedIn)) then LoginPlayer;
end;
begin
SetupScript;
ChatsSetUp;
repeat
CheckGetCash;
WalkToMagic;
DoorClosed;
FindBrtty;
ByNewts;
WalkToBank;
OpenFWBBank;
until(not(LoggedIn));
end.