SRL Archive - Archive

SantWrong - SRL Member Application


SantWrong

2012-01-29 07:08:34

How Long have You Played Runescape?
10 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
PHP, Pascal


Are you a member of any other communities?
Was member of RSBot, but not active;
member of velomanai.lt and kulturizmas.net, but these forums are in my native language, you won't understand a word.


Tell us about yourself…
From: SantWrong
I am student of Economics from Lithuania, These year are my last at university (the fourth year of studying). I work as accountant. I like skiing, cycling, bodybuilding, making food.



Please show us one (or multiple) of your scripts.
program Con2.1;
{$define SMART}
{$i srl/srl.scar}
//At the end of script (line 170), where until(sr=10), set sr to how many ladders you want to make
var
xSer, ySer, x, y, sr, LarderCount :integer;
LoadBack :Boolean;
procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
End;
End;

procedure Startup;
begin
Smart_Server := 6;
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
LogInPlayer;
wait(100+random(100));
end;

Procedure Setup;
begin
ToggleXPBar( True);
Wait(500);
LoadBack:= False;
LarderCount:=0;
end;

Procedure SRock;
var xSR, ySR:integer;
Begin
if FindObjEx(xSR, ySR, ['trange'], [7171954], 15, 30, 570, 210, 720, 460) then
Begin
Mouse(xSR, ySR, 2, 2, false);
Wait(RandomRange(100,200));
ChooseOption('estroy');
Wait(RandomRange(100,200));
Mouse(RandomRange(345,405), RandomRange(395,410), 2, 2, True);
end;
end;

Procedure Servant;
begin
Wait(100);
Mouse(xSer, ySer, 2, 2, false);
Wait(RandomRange(100,200));
ChooseOption('etch');
Wait(RandomRange(600,800));
If FindNPCChatText('If', Nothing) then
begin
ClickToContinue;
Wait(RandomRange(800,1000));
FindNPCChatText ('coins.', ClickLeft);
Wait(RandomRange(190,290));
Mouse(xSer, ySer, 2, 2, false);
Wait(RandomRange(400,700));
ChooseOption('etch');
Wait(600);
end;
If not FindNPCChatText ('etch', nothing) then
begin
Wait(RandomRange(100,200));
FindNPCChatText ('Oak', ClickLeft);
Wait(500)
TypeSend('20');
end;
FindNPCChatText ('etch', ClickLeft);
LoadBack:=False;
Wait(500 + Random(300));
end;

Procedure FServant;
var SColors: TIntegerArray;
i: integer;
begin
SColors:= [989748, 1451339, 2174831, 1845343, 1779290];
For i:=0 to 4 do
begin
FreeSRLBitmaps;
If FindObjTPA(xSer, ySer, SColors[i], 30, -1, 10, 15, 1, ['utler', 'Butler']) then
begin
Servant;
Break;
end;
end;
end;


Procedure FLadder;
var LColors:TIntegerArray;
t:integer;
begin
Inc(x); Inc(y);
LColors:=[4613503, 2838371, 2574426];
Writeln('Search ladder');
if FindObjCustom(x, y, ['earch', 'Larder'], [2904421, 8423046], 5)then
begin
Mouse(x, y, 2, 2, false);
Wait(RandomRange(100,150));
ChooseOptionMultiEx(['Remove','emove'], 'Object', ClickLeft);
Wait(RandomRange(750,850));
FindNPCChatText ('Yes', ClickLeft);
Wait(RandomRange(830,1000));
end;
end;

Procedure Build;
var OXP, NXP:integer;
begin
Inc(x); Inc(y);
Mouse(x, y, 2, 2, false);
Wait(RandomRange(150,250));
ChooseOptionMultiEx(['Build','uild'], 'Object', ClickLeft);
Wait(RandomRange(600,700));
Mouse(RandomRange(105,115), RandomRange(135,145) , 2, 2, True);
Wait(RandomRange(450,600));
end;

Procedure AntiBan;
Begin
case Random(2000)of
0: HoverSkill('Construction', False);
1: SleepAndMoveMouse(7000 + Random(500));
2: RandomMovement;
3: PickUpMouse;
4: BoredHuman;
5..15: MakeCompass( RandomRange( -360, 360));
16..60: Wait( Random( 3000));
End;
End;

begin
Startup;
sr:=1;
Inc(x); Inc(y);
repeat
If CountItemsArea ('inv')<16 then FServant;
Wait(RandomRange(500,700));
if CountItemsArea ('inv')>7 then
begin
FLadder;
Wait(RandomRange(300,500));
Build;
Wait(600);
SRock;
AntiBan;
end;
If Not LoadBack then
begin
Repeat
Wait(1000)
if CountItemsArea ('inv')>19 then LoadBack:= True;
Until(LoadBack);
end;
sr:=sr+1;
until(sr=100);
end.program new;
begin
end.

SantWrong

2012-02-01 08:31:07

Edit 2012/02/01:
I add another script of mine, it works, just hasn't tested well, since I got porblem buying suplies
It's SuperGlass Maker at SoulWars. About 50k crafting and 30k magic XP with tiny profit.

program SGM;

{$I SRL/SRL/Misc/Smart.simba}
{$I SRL/SRL.simba}

var Casts, MGlassDTM, SpellDTM, ColSand, RowSand, ColSec, RowSec :integer;

procedure SetDTM;
begin
MGlassDTM := DTMFromString('mWAAAAHicY2FgYLBiYWDQBWI7ILYE4hpGBoYSIC4F4gYgvteSxHAzz5nhZHkUw5ZMKQZWoB5kzIiGQQAA27sJEw==');
SpellDTM := DTMFromString('mQwAAAHicY2ZgYBBiZWAQZIXQ3YwMDDOAuBWIs1iYgLKMDK9fv2LgArJgmBEJAwEAxaAFRQ==');
end;

procedure DeclarePlayers;
begin
ColSand :=0; // Collum and Row of sand NOTE You have to minus 1
RowSand :=0;
ColSec :=1; //Collum and Row of secondary item: Swamp weed Seaweed or Soda Ash NOTE You have to minus 1
RowSec :=0;

HowManyPlayers := 4; //How many players in the script. (No Need To Touch. For Those Players What You Don't Wan't To Use Put Active := False;)
CurrentPlayer := 0; //Current player in the Players array.
NumberOfPlayers(HowManyPlayers); //Don't change.
with Players[0] do
begin
Name := ''; {Player Username}
Pass := ''; {Player Password}
Pin := ''; {Player Bank Pin}
Active := True; {Use This Player?}
end;
end;

procedure StartUp;
begin
Smart_Server := 6;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
FTab(28);
Casts:=0;
Wait(3000);
//SetSpellMode(False, False, True, False);
end;

procedure ReportProgress;
begin
writeLn('Time Running: ' + TimeRunning);
Writeln('Casts made' + IntToStr(Casts));
Writeln('Magic XP gained' + IntToStr(Casts*78));
Writeln('Crafting XP gained' + IntToStr(Casts*130));
end;

function WaitBank :Boolean;
begin
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
Result:= True;
end;
if BankScreen then
Result:=True
end;

procedure FindBankSGM;
var xB, yB:integer;
begin
If OpenBankChest(SRL_BANK_SW) then
begin
If not WaitFunc(@WaitBank, RandomRange(100,250), 4000) then
begin
Writeln('Could not find bank');
TerminateScript;
end;
end;
end;

procedure WithdrawBankSGM;
var xS, yS, xSec, ySec, xMG, yMG :integer;
begin
Deposit(5, 5, True);
Withdraw(ColSand, RowSand, 13);
Withdraw(ColSec, RowSec, 13);
CloseBank;
end;

Procedure AntiBan;
Begin
FindNormalRandoms;
case Random(2000)of
0: HoverSkill('Magic', False);
1: SleepAndMoveMouse(7000 + Random(500));
2: RandomMovement;
3: PickUpMouse;
4: BoredHuman;
5: HoverSkill('Crafting', False);
6..60: Wait( RandomRange(3000,5000));
End;
End;

Procedure CastSpell;
var xSpell, ySpell:integer;
begin
If GetCurrentTab=28 then
else
begin
Ftab(28);
Wait(RandomRange(50,100));
end;
If FindDTM(SpellDTM, xSpell, ySpell, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(xSpell, ySpell, 2, 2, True)
Casts:= Casts+1;
end
else
Writeln('Could not cast spell');
Antiban;
ReportProgress;
Wait(1300);
end;
begin
StartUp;
SetDTM;
repeat
FindBankSGM;
WithdrawBankSGM;
Wait(100);
CastSpell;
until(False);
end.

Main

2012-02-01 08:49:39

Hey there bud. Sorry to say but you might wanna consider adding some walking to your script (radial, dtm are all good) to show us the talent you have.

Everything else looks pretty sexy to me, ok standards and maybe lacking some logic to make your script more efficient, but practice can get cha that.

Perhaps keep on working on the one you published, maybe add teleport to bank ? Because that would definitely get the job done. Make sure that you let us get to know you eh? Just post around, be a part of the community and get to know others a bit :)

You can still improve this application before it overs, I'll be sure to keep watch.

SantWrong

2012-02-04 07:28:01

You asked, you get it, Taverley Summoner, BETA version, but I think enough to prove my abilities. WOuld test more, but got no charms.


program SummoningTraverly;
var WTB1, WTB2, WTB3, WTB4, WTB5, WTO1, WTO2, WTO3, WTO4, WTO5, WTB6, x, y, SecRow, SecCol :integer;
aFound: Extended;
{$I SRL/SRL/Misc/Smart.simba}
{$I SRL/SRL.simba}

procedure DeclarePlayers;
begin
//Secondary item place on bank
SecRow:=1; //Row
SecCol:=10;//Collum
HowManyPlayers := 4; //How many players in the script. (No Need To Touch. For Those Players What You Don't Wan't To Use Put Active := False;)
CurrentPlayer := 0; //Current player in the Players array.
NumberOfPlayers(HowManyPlayers); //Don't change.
SecRow:=SecRow-1;
SecCol:=SecCol-1;
with Players[0] do
begin
Name := ''; {Player Username}
Pass := ''; {Player Password}
Pin := ''; {Player Bank Pin}
Active := True; {Use This Player?}
end;
end;

procedure WalkToBankDTM;
begin
WTB1 := DTMFromString('mbQAAAHicY2VgYMhkYWBIBeJuIN4IxOuB+C5QfDMQn2OAsGuBOCQgGI77O7vBmB8ojo4ZsWAwAACMMw0G');
WTB2 := DTMFromString('mWAAAAHicY2FgYChmZmAwBuIDQNwJxIKMDAxHgOKXGCD0FyZ2hq7+BQwTu3sYwoJCGESAYvxQDGIzomEQAAAmyQoQ');
//WTB3 := DTMFromString('mWAAAAHicY2FgYKhiYWDoA+KbQJwJxDOBYhuBuB+Ii4A4LCiEoat/ARyLAMX4kTAjGgYBAGB7CxY=');
//WTB4 := DTMFromString('mbQAAAHicY2VgYIhlYWBIBeKFQLwbiPuAeDZQfAsQHwPiyUCcCsSBoX4MbZNmoWAuoDg6ZsSCwQAAqhYNxg==');
WTB3 := DTMFromString('mbQAAAHicY2VgYAhhYWDoBuJtQOwDxO1AvBwo3gvF+UC8AYhDQ4MZPrOyM3ROXADHkkBxLiDmR8KMWDAYAABlvQzh');
WTB4 := DTMFromString('mbQAAAHicY2VgYPBiYWBIAeKlQFwJxHuAuBcovhCIO4A4HIhLgTg0NJihc+ICOP7Mys4gAhTnR8JcQMyIBYMBAFwmDJ4=');
WTB5 := DTMFromString('mbQAAAHicY2VgYAhlYWDIBOJNQLwHiLOBeDJQ/BAQrwXiWCCeCsRhoeoMbZNmgXFlaw9DSIAFw3+gOBcS5gdiRiwYDACODw1y');
//WTB6 := DTMFromString('mbQAAAHicY2VgYEhlYWCIB2I7II4E4iVAPB8oPheIFwDxCSDeD8TuHioML94yMDT1z4Hj/0BxfjTMiAWDAQCjRg5L');
end;

procedure FreeWTBDTM;
begin
FreeDTM(WTB1);
FreeDTM(WTB2);
FreeDTM(WTB3);
FreeDTM(WTB4);
FreeDTM(WTB5);
FreeDTM(WTB6);
end;

procedure WalkToObDTM;
begin
WTO1 := DTMFromString('mbQAAAHicY2VgYJBkZWDgBOLDLAwME4F4AxAvBYrvB+ITQDwNiOuAODTQh6GzdyYcdwfrM4gAxfnRMCMWDAYAZrsM4w==');
WTO2 := DTMFromString('mbQAAAHicY2VgYPjLwsDwFIhfA3EbED8H4nVA8YNAPAmIbwDxGiC2d7RhaOqZDsfhLlIMIkBxfjTMiAWDAQAmaw6O');
WTO3 := DTMFromString('mbQAAAHicY2VgYNjOwsBwFIjzgbgYiNcBcQ1QvAskB8R9QDwHiAMCfRg+MDMxtPTOhGMRoDg/GmbEgsEAAJbGDUI=');
WTO4 := DTMFromString('mWAAAAHicY2FgYFjJwsBwFIhjgLgTiOuBYtuAuAOITwNxcFggQ8fkuXDMDxTjQsKMaBgEAG3rC0M=');
WTO5 := DTMFromString('mbQAAAHicY2VgYNBkZmA4zsTAoAGkA4BYF4i9geL5QLwLiGuBOA+IP37+xtA5YQEYT+jtZggNCWb4DxTnR8OMWDAYAACRTw44');
end;

procedure FreeWTODTM;
begin
FreeDTM(WTO1);
FreeDTM(WTO2);
FreeDTM(WTO3);
FreeDTM(WTO4);
FreeDTM(WTO5);
end;

procedure StartUp;
begin
Smart_Server := 6;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
ClickNorth(SRL_ANGLE_HIGH);
Wait(1000);
end;

Function WalkToBank:Boolean;
var x, y :integer;
begin
If FindDTMRotated(WTB1, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(6);
repeat
Wait(50 + Random(25));
until (FindDTMRotated(WTB2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
end;
if FindDTMRotated(WTB2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y-3, 3, 3, True);
FFlag(6);
repeat
Wait(50 + Random(25));
until (FindDTMRotated(WTB3, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
end;
if FindDTMRotated(WTB3, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(6);
repeat
Wait(50 + Random(25));
until (FindDTMRotated(WTB4, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
end;
if FindDTMRotated(WTB4, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(6);
repeat
Wait(50 + Random(25));
until (FindDTMRotated(WTB5, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
end;
if FindDTMRotated(WTB5, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y+3, 3, 3, True);
FFlag(1);
Wait(RandomRange(900, 1100));
end;
end;

procedure WalkToObelisk;
var x, y :integer;
begin
If FindDTMRotated(WTO1, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x+5, y, 3, 3, True);
FFlag(6);
repeat
Wait(50 + Random(25));
until (FindDTMRotated(WTO2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
end;
if FindDTMRotated(WTO2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x-3, y, 3, 3, True);
FFlag(6);
repeat
Wait(50 + Random(25));
until (FindDTMRotated(WTO3, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
end;
if FindDTMRotated(WTO3, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(10);
repeat
Wait(50 + Random(25));
until (FindDTMRotated(WTO4, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
end;
if FindDTMRotated(WTO4, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(6);
repeat
Wait(50 + Random(25));
until (FindDTMRotated(WTO5, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
end;
if FindDTMRotated(WTO5, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
Mouse(x, y, 3, 3, True);
FFlag(1);
Wait(RandomRange(900,1100));
end;

Function WaitBank :Boolean;
begin
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
Result:= True;
end;
if BankScreen then
Result:=True
end;

Function WaitObelisk:Boolean;
var x, y:integer;
begin
x:=261;
y:=38;
If WaitFindColor(x, y, 2070783, 255, 37, 436, 48, 10, 4000) then
Result:= True;
end;

Function FindObeliskDTM:Boolean;
var x, y, ObeliskDTM :integer;
begin
ObeliskDTM := DTMFromString('mWAAAAHicY2FgYFjKzMBwEYgXAPFuIPZkZGBQA+JcIJYE4kmTehj+RvoxTJvWz+D5LpFBBKiHH4hFoJgRDYMAAFMzCtE=');
WriteLn('Alternative search of Obelisk');
If FindDTMRotated(ObeliskDTM, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
MMouse(x, y, 3, 3);
Wait(RandomRange(100, 150));
If IsUpText('lisk') then
begin
ClickMouse2(True);
Result:= True;
end
else TerminateScript;
end;
FreeDTM(ObeliskDTM);
end;


function FindObelisk:Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.8, 0.8);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 9409941, MSX1, MSY1, MSX2, MSY2, 15);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
Wait(RandomRange(100,200));
If(IsUpText('belisk')) then
begin
Writeln('Found Obelisk');
ClickMouse2(1);
Result := True;
Break;
end;
end;
end;

Function FindBooth:Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.8, 0.8);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15727354, MSX1, MSY1, MSX2, MSY2, 15);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
Wait(RandomRange(100,200));
If(IsUpText('ounter')) then
begin
Writeln('Found bank booth');
ClickMouse2(1);
If WaitFunc(@WaitBank, 100, 4000) then
begin
Result := True;
Break;
end;
end;
end;
end;

Function FindBoothDTM:boolean;
var BankerDTM, x, y :integer;
begin
BankerDTM := DTMFromString('mWAAAAHicY2FgYLBhhGBrKC0NxGxA/Bsopw6kf/16zxDrbwemly2bzyAJFOcHYhjNiIZBAAAnuAst');
If FindDTMRotated(BankerDTM, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
MMouse(x, y, 3, 3);
Wait(RandomRange(100, 150));
If IsUpText('ounter') then
begin
ClickMouse2(True);
Result:=True;
end
else TerminateScript;
FreeDTM(BankerDTM);
end;

Procedure WithdrawBank;
begin
WaitFunc(@WaitBank, 100, 4000);
Deposit(5, 5, True);
Withdraw(0, 0, 25);
end;

Procedure ObeliskDialog;
begin
MouseBox(46, 68, 86, 110, 0);
WaitOption('Infuse-All', 600)
Wait(RandomRange(1800, 2100));
CloseBank;
end;

Procedure Resting;
begin
If Not RunEnergy(30) then
RestUntil(95);
end;

begin
StartUp;
Repeat
If FindBooth then
WithdrawBank
else begin
If FindBoothDTM then
WithdrawBank
else TerminateScript;
end;
WalkToObDTM;
WalkToObelisk;
Wait(800);
If FindObelisk then
begin
If WaitObelisk then
ObeliskDialog
else begin
If FindObeliskDTM then
begin
If WaitObelisk then
ObeliskDialog
end
else TerminateScript;
end;
end;
WalkToBankDTM;
WalkToBank;
Resting;
until(false);

FreeWTBDTM;
FreeWTODTM;
end.

masterBB

2012-02-04 08:49:32

To get my yes vote I would like some extra logic. You only use procedures, and I think that's a shame. Using functions returning a Boolean could really improve your script. I also miss some failsafes, but those could be added while making some functions.

Also I miss TPointArrays and FindColor… I will hold my vote.

SantWrong

2012-02-04 10:16:07

I used TPA to find bank but it failed a lot. Currently got no charms to test. I'll can tweak just walking. An ideas on good failsaves? Use FindSymbol to check place, but if DTM fails it won't help. How failsafe if DTM fail, use radialwalk?

SantWrong

2012-02-06 14:26:15

Another script Astral crafter
going to realease it to public without resting, pouch support (If I will make one for my self - depends on my apliace) and with home teleport. Purpose of that - make it slow, that leechers won't drop price of astral runes.


program AStralCrafter;
{$I SRL/SRL/Misc/Smart.simba}
{$I SRL/SRL.simba}
{$i sps/sps.simba}

var
AltarPath, BankPath:TPointArray;

procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players in the script.
CurrentPlayer := 0; //Current player in the Players array.
NumberOfPlayers(HowManyPlayers); //Don't change.
with Players[0] do
begin
Name := ''; {Player Username}
Pass := 's'; {Player Password}
Pin := ''; {Player Bank Pin}
Active := True; {Use This Player?}
end;
end;

function CorrectTab(ReqTab:integer):Boolean;
//tab_Inv = 25;
//tab_Magic = 28;
begin
If not (GetCurrentTab=ReqTab) then
begin
FTab(ReqTab);
Wait(RandomRange(100,200));
end;
Result:=True;
end;

procedure StartUp;
begin
Smart_Server := 6;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['0_2','1_2']);
AltarPath := [Point(240, 961), Point(248, 971), Point(266, 972), Point(281, 972), Point(291, 980), Point(293, 1003), Point(293, 1029), Point(295, 1054), Point(298, 1083), Point(305, 1102), Point(317, 1115), Point(335, 1130), Point(350, 1142), Point(370, 1153), Point(376, 1161), Point(377, 1176), Point(385, 1196), Point(404, 1189), Point(427, 1185), Point(454, 1174), Point(474, 1170)];
BankPath := [Point(236, 968), Point(239, 958), Point(237, 953)];
DeclarePlayers;
LoginPlayer;
ClickNorth(SRL_ANGLE_HIGH);
Wait(1000);
CorrectTab(28);
//DebugSpellVars(SPELLBOOK_TELEPORT);
Wait(1000);
FFlag(5);
end;

Function WaitBank :Boolean;
begin
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
Result:= True;
end;
if BankScreen then
Result:=True
end;

Function WithdrawBank :Boolean;
var LawDTM, AstralDTM, x, y :integer;
begin
LawDTM := DTMFromString('mggAAAHicY2NgYHjAzMDwAohvAfFLIH4DxDeBWJKRgUEEimWBmA+IpYFYTvkiHBdkZzMsnTePIcDXh4EVaBYMcyFhRhwYAgCQTw1v');
//AstralDTM := DTMFromString('mWAAAAHicY2FgYEhhZmDIA+IMII4CYjNGBgZzIHYGYjsgPrvxDMOU3l6G+OhoBj8vLwZWoB4uJMyIhkEAANP8CK0=');
If not FindDTM(LawDTM, x, y, MIX1,MIY1, MIX2, MIY2)then
Writeln('Ran out of law runes');
Deposit(5, 5, True);
Wait(RandomRange(200,300));
WithdrawEx(9, 1, 24, ['ure ess', 'ure', 'ess']);
FreeDTM(LawDTM);
//FreeDTM(AstralDTM);
end;

Function FindBooth :Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.8, 0.8);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 8949396, MSX1, MSY1, MSX2, MSY2, 15);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
Wait(RandomRange(100,200));
If(IsUpText('booth')) then
begin
Writeln('Found bank booth');
ClickMouse2(1);
If WaitFunc(@WaitBank, 100, 4000) then
begin
Result := True;
Break;
end;
end;
end;
end;

Function FindBoothAlt:Boolean;
var x, y, BoothDTM :integer;
aFOund:extended;
begin
BoothDTM := DTMFromString('mQwAAAHicY2ZgYPjNyMDwlxFC7wHy1wLxYSAuy4lmmNrfwZARbsXABeTDMCMSBgIAnf8JKQ==');
WriteLn('Alternative search of Bank booth');
If FindDTMRotated(BoothDTM, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
MMouse(x, y, 2, 2);
Wait(RandomRange(100,200));
If(IsUpText('booth')) then
begin
Writeln('Found bank booth');
ClickMouse2(1);
If WaitFunc(@WaitBank, 100, 4000) then
Result := True;
WithdrawBank;
end
else Writeln('Failed to find Bank booth');
end;
FreeDTM(BoothDTM);
end;

function FindAltar:Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.8, 0.8);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 8486015, MSX1, MSY1, MSX2, MSY2, 15);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
Wait(RandomRange(100,200));
If(IsUpText('ltar')) then
begin
Writeln('Found Altar');
ClickMouse2(1);
Result := True;
Break;
end;
end;
end;

function FindAltarAlt:Boolean;
var x, y, AltarDTM :integer;
aFOund:extended;
begin
AltarDTM := DTMFromString('mWAAAAHicY2FgYEhnYmBIBOJUIJ4DxM+AYh+A+CYQ3wfi+ppGhgkTuhj6+joYLt64xcAFFEPGjGgYBACyRgzd');
WriteLn('Alternative search of Altar');
If FindDTMRotated(AltarDTM, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
MMouse(x, y, 2, 2);
Wait(RandomRange(100,200));
If(IsUpText('ltar')) then
begin
Writeln('Found Altar');
ClickMouse2(1);
Result := True;
end
else Writeln('Failed to find Altar');
end;
FreeDTM(AltarDTM);
end;

Function TeleBank:Boolean;
var TeleDTM, x, y :Integer;
begin
TeleDTM := DTMFromString('mQwAAAHicY2ZgYEhnZmBIY4bQQYwMDKFAHAHEDDOAmAHIsO5jYAWyYJgRCQMBAKiAA7c=');
CorrectTab(28);
If FindDTM(TeleDTM, x, y, MIX1,MIY1, MIX2, MIY2)then
Mouse(x, y, 1, 1, 1);
FreeDTM(TeleDTM);
end;

Procedure Resting;
begin
If Not RunEnergy(30) then
RestUntil(95);
end;

begin
StartUp;
Repeat
SPS_WalkPath(BankPath)
Resting;
If FindBooth then
WithdrawBank
else begin
If FindBoothAlt then
WithdrawBank
else TerminateScript;
end;
SPS_WalkPath(AltarPath);
Wait(RandomRange(1200,1500));
If FindAltar then
begin
Wait(RandomRange(2200,2500));
TeleBank;
end
else begin
If FindAltarAlt then
begin
Wait(RandomRange(2200,2500));
TeleBank;
end
else TerminateScript;
end;
Until(False);
end.

Hero

2012-02-06 14:33:52

I love DTMs but you are using them a bit more then an advanced user would. TPAs with autocolor finding etc etc. No from me.

'Toxin

2012-02-06 17:35:15

As Hero previously stated, using DTM's isn't really showing advanced knowledge of SRL, it's really showing the simplest quite frankly. Please integrate some sort of TPA's for next time, and maybe more light will shed upon your application.

Kind regards,

Toxin.

SantWrong

2012-02-07 06:06:15

If you would watch code you would see that there is just one DTM used for checking law runes, other DTM sare used if TPA search fails

Hobbit

2012-02-23 12:35:11

The poll has closed and you didn't quite make it this time. Please take the suggestions made here and read some more in the tutorial section and improve your script. You may reapply in 4 weeks time.


Cheers
Hobbit