SRL Archive - RS3 Outdated / Broken Scripts

Summoning Taverley


SantWrong

2012-02-04 07:26:35

Summoning script which runs from new Taverlay bank (South of White Wolf Mountain). Start script at bank, have charms, pouches and spirit shards in inventory, secondary item must be first item in bank.

APROPRIATE FEEDBACK WELCOMED.
Features:
-Resting
-DTM Walking
-Pretty fast
To Do List:
-Failsaves on DTM walking with Radial Walking
-Suggest?

[ATTACH]13727[/ATTACH]


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.

phamxboa

2012-02-06 21:29:47

The following DTMs were not freed: [2]

sander70

2012-02-07 11:59:35

is it posible to make it so it also create scrolls becouse i dont have so much charms and not realy a charm hunter but realy want 57 sum for graahk for rc so can you maby make it for scrolls? if you need help i can help maby or with testing

sorry for my bad english im dutch:P

greets sander70

SantWrong

2012-02-08 18:11:57

Yeah, i can modify this make scrolls, just now I am on other script, probably on weekend, I ll check it out

bubblesz

2012-02-10 12:30:36

From: phamxboa
The following DTMs were not freed: [2]


gotten same error as u

SantWrong

2012-02-10 14:42:54

But it ran to bank to obelisk or just stood and failed? Strange cause it worked week before for me, maybe walking DTMs outdated. Probably I will map area and make SPS walking

Foefoe

2012-03-17 11:13:34

Yea I got this too.

The following DTMs were not freed: [2]

Adamwaddum

2012-04-03 00:06:30

I'm no scripter, but this script has some issues..

I fixed the initial error (The following DTMs were not freed: [2]) by commenting out line 35, as the "WTB6" DTM is declared, but never actually used. I got the script to work up until it finds the obelisk and clicks "fuse pouches obelisk." Once the window comes up with all of the familiar choices, I get:

The following DTMs were not freed: [2, 3, 4, 5, 6]

Any thoughts, SantWrong?

omar84

2012-04-10 13:40:23

same problem as above. please fix! a script like this is much needed! thanks

Wats

2012-04-11 21:59:07

Will this make pouches that require two tertiaries?

betadanyu

2012-05-09 06:17:17

Well done one your script man, looks great!

Btw i would appreciate if you added scroll support whenever possible ;)

- Betadanyu