SRL Archive - FAQ

Where do i add this snippet?


Sin

2011-12-15 16:03:53

Function FindNPCChatText_F(Option: String; Action: fnct_ActionOptions): Boolean;
var
X,Y: Integer;
begin
Result := False;

if Option = '' then
begin
srl_Warn('FindNPCChatText', 'txt is empty', warn_AllVersions);
Exit;
end;

if FindText(X, Y, Option, UpChars, MCX1, MCY1, MCX2, MCY2) then
begin
Result := True;
case Action of
Move: MMouse(X, Y + 2, Random(Length(Option) * 5), 4);
ClickLeft: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, True);
ClickRight: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, False);
end;
end;
end;
Need to add that somewhere so that the Gilded Altar bot will work :S

Brandon

2011-12-15 16:14:55

Learn scripting.. no one is going to spoon feed you and tell you exactly what to do to get every script working..

The sooner you learn, the sooner you can edit scripts and write your own.. Copy pasting is not the way to go. Oh and besides that snippet looks as though it was made for an include.

Sin

2011-12-15 16:16:49

Why the hell do you think I just spent my whole lunch in the library learning Pascal.
I'm obviously not experienced in Pascal and simply asking for some help…

Home

2011-12-15 16:38:35

C:\Simba\Includes\srl\SRL\core\Text.scar

From there replace:


function FindNPCChatText(txt: string; Action: fnct_ActionOptions): Boolean;
var
tx, ty, S: Integer;
begin
Result := False;
if txt = '' then
begin
srl_Warn('FindNPCChatText', 'txt is empty', warn_AllVersions);
Exit;
end;
S := CreateBitmapMaskFromText(txt, NPCChars);
if FindBitmapMaskTolerance(S, tx, ty, 9, 348, 523, 471, 50, 10) then
begin
Result := True;
case Action of
Move: MMouse(tx, ty + 2, Random(Length(txt) * 5), 4);
ClickLeft: Mouse(tx, ty + 2, Random(Length(txt) * 5), 4, True);
ClickRight: Mouse(tx, ty + 2, Random(Length(txt) * 5), 4, False);
end;
end;
FreeBitmap(S);
end;

With this

Function FindNPCChatText(Option: String; Action: fnct_ActionOptions): Boolean;
var
X,Y: Integer;
begin
Result := False;

if Option = '' then
begin
srl_Warn('FindNPCChatText', 'txt is empty', warn_AllVersions);
Exit;
end;

if FindText(X, Y, Option, UpChars, MCX1, MCY1, MCX2, MCY2) then
begin
Result := True;
case Action of
Move: MMouse(X, Y + 2, Random(Length(Option) * 5), 4);
ClickLeft: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, True);
ClickRight: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, False);
end;
end;
end;

~Home

Sin

2011-12-15 16:40:58

From: Home
C:\Simba\Includes\srl\SRL\core\Text.scar

From there replace:


function FindNPCChatText(txt: string; Action: fnct_ActionOptions): Boolean;
var
tx, ty, S: Integer;
begin
Result := False;
if txt = '' then
begin
srl_Warn('FindNPCChatText', 'txt is empty', warn_AllVersions);
Exit;
end;
S := CreateBitmapMaskFromText(txt, NPCChars);
if FindBitmapMaskTolerance(S, tx, ty, 9, 348, 523, 471, 50, 10) then
begin
Result := True;
case Action of
Move: MMouse(tx, ty + 2, Random(Length(txt) * 5), 4);
ClickLeft: Mouse(tx, ty + 2, Random(Length(txt) * 5), 4, True);
ClickRight: Mouse(tx, ty + 2, Random(Length(txt) * 5), 4, False);
end;
end;
FreeBitmap(S);
end;

With this

Function FindNPCChatText(Option: String; Action: fnct_ActionOptions): Boolean;
var
X,Y: Integer;
begin
Result := False;

if Option = '' then
begin
srl_Warn('FindNPCChatText', 'txt is empty', warn_AllVersions);
Exit;
end;

if FindText(X, Y, Option, UpChars, MCX1, MCY1, MCX2, MCY2) then
begin
Result := True;
case Action of
Move: MMouse(X, Y + 2, Random(Length(Option) * 5), 4);
ClickLeft: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, True);
ClickRight: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, False);
end;
end;
end;

~Home


+Rep, thanks a ton <3


EDIT*
When i try to run my bot this shows up -
[Error] C:\Simba\Includes\SRL/SRL/core/text.scar(393:8): Unknown identifier 'FindText' at line 392

Kyle Undefined

2011-12-15 16:42:10

From: ggzz
Learn scripting.. no one is going to spoon feed you and tell you exactly what to do to get every script working..

The sooner you learn, the sooner you can edit scripts and write your own.. Copy pasting is not the way to go. Oh and besides that snippet looks as though it was made for an include.


Why did you attack him like that? All he did was ask a question. Even if he didn't explain it well for you to understand, ask him what he means exactly.

Brandon

2011-12-15 16:47:00

From: Camo Developer
Why did you attack him like that? All he did was ask a question. Even if he didn't explain it well for you to understand, ask him what he means exactly.



Are u kidding me? Do you want to take this to the BBQ pit? I see no where in there where I bashed him.. All I said was learn the coding.. That is all.. if I cannot say that because it's considered bashing then you guys are too sensitive..

What's with everyone getting so jumpy now.. not like he is a kid or something. If he is a kid then.. I don't see how I hurt his feelings at all..

BraK

2011-12-15 16:47:23

Please keep the cussing out of the forums. Also treat each other with respect.

Sin

2011-12-15 16:48:47

Wow, now i feel like a dork causing a fight, and the GildedAltar bot still isn't working D:

Kyle Undefined

2011-12-15 17:04:37

You didn't do anything wrong, lol, so don't feel bad. Was only pointing out what I saw.

What does the script do now?

Sin

2011-12-15 17:05:44

From: Camo Developer
You didn't do anything wrong, lol, so don't feel bad. Was only pointing out what I saw.

What does the script do now?


With the snippet above, It gives me an error, i edited it out.
Now it still isn't working after "Deathscythe"'s fix :s

Home

2011-12-15 17:06:38

Please revert your SRL to normal state and use this.

I fixed this in notepad, no idea does it work. But gor for it.

program Gilded_Altar;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
UseFailSafe = True; //READ THIS@@@@@@@@@
//For fail-safes to be effectively used, the user must be on the Ancients Spellbook.
//If you are on Ancients, leave this True. Otherwise, change it to False.
// (it's HIGHLY suggested you are on Ancients!)

var
N, HouseTab, EdgeHome, Marrentil, DragonBones: Integer;

procedure DeclarePlayer;
begin
with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
Strings[0] := 'eb';
BoxRewards := ['Xp'];
LampSkill := 'prayer'; // or change to whatever skill exp you want
end;
end;



Function FindNPCChatText_F(Option: String; Action: fnct_ActionOptions): Boolean;
var
X,Y: Integer;
begin
Result := False;

if Option = '' then
begin
srl_Warn('FindNPCChatText', 'txt is empty', warn_AllVersions);
Exit;
end;

if FindText(X, Y, Option, UpChars, MCX1, MCY1, MCX2, MCY2) then
begin
Result := True;
case Action of
Move: MMouse(X, Y + 2, Random(Length(Option) * 5), 4);
ClickLeft: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, True);
ClickRight: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, False);
end;
end;
end;

procedure RightClickBurner;
var
MyTPA : TPointArray;
MyPoint : TPoint;
x, y, i : Integer;
begin
x := MSCx;
y := MSCy;
FindColorsSpiralTolerance(x, y, MyTPA, 2409460, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) = 0 then
FindColorsSpiralTolerance(x, y, MyTPA, 2078161, MSX1, MSY1, MSX2, MSY2, 10);
for i := 0 to High(MyTPA) do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 12);
if WaitUpTextMulti(['Inc','se bu','ner'], 1000) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
end;
Exit;
end;
end;

procedure AntiRandoms;
begin
FindNormalRandoms;
LevelUp;
end;

procedure ProgressReport;
begin
ClearDebug;
WriteLn('Running for: ' + TimeRunning);
end;

procedure FailSafe;
var
X, Y: Integer;
begin
if UseFailSafe=False then
begin
Logout;
TerminateScript;
end;
AntiRandoms;
N:=0;
EdgeHome := DTMFromString('mbQAAAHicY2VgYOBggABeIBYAYmYgZgdibiDmA2IWqPy+I58Y2ubcQMFuDJiAEQsGAwBv+wr5');
Writeln('Error, using failsafe!');
begin
repeat
if GameTab(tab_Magic) then
if FindDTM(EdgeHome, X, Y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 5, 5, false);
until ChooseOption('Cast');
end;
Wait(14500 + Random(1000));
begin
SPS_Setup(RUNESCAPE_SURFACE, ['10_6']);
SPS_Continue := true;
SPS_WalkPath([Point(4214, 2686)]);
FFlag(0);
AntiRandoms;
FreeDTM(EdgeHome);
//FreeDTM(Marrentil);
//FreeDTM(DragonBones);
Wait(2200 + Random(400));
end;
end;


procedure AntiBan;
begin
If(not LoggedIn)then Exit;
MouseSpeed := 12 + Random(5);
Case Random(20) of
0: MMouse(Random(MIX2), Random(MIY2), 10, 10);
1: HoverSkill(SKILL_prayer, False);
2: PickUpMouse;
3: GameTab(RandomRange(tab_Combat, tab_Notes));
4: SleepAndMoveMouse(400+Random(Random(4000)));
5: IdleTime(100+random(700), 100+Random(100), 0.2+RandomE/2);
6, 8, 9: MakeCompass(IntToStr(Random(360)));
10:
begin
SetAngle(False);
SetAngle(True);
end;
11, 12, 13, 15, 16: Wait(1000 + Random(800));
17, 18, 19, 20: Exit;
end;
end;

{*******************************************************************************
function OpenBankNPC/UseBankNPC(Modified): Boolean;
By: Home
Description: Modifed to correctly bank at Edge NPC.
*******************************************************************************}
function UseBankNPC: Boolean;
var
bx, by, Speed, ColFace, ColGrey, ColBlue, ColHair, t: Integer;
begin
Result := (LoggedIn) and (BankScreen or PinScreen);
if (Result) then exit;
Speed := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
ColFace := 4468276;
ColGrey := 4995649;
ColBlue := 4468276;
ColHair := 5125177;
if (FindObjThroughMM(bx, by, 'npc', [ColFace, ColBlue, ColGrey, ColHair], [5, 5, 5, 5],
['ounter', 'se Co', 'anke', 'to B', 'Banker', 'nker'], 2, 2)) then
begin
Mouse(bx, by, 0, 0, False);
if (WaitOptionMulti(['kly Co', 'se-qu', 'ank B', 'Bank Banker', 'ank', 'nker'], 750)) then
begin
t := (GetSystemTime + 5000);
repeat
if (BankScreen) or (PinScreen) then
begin
Result := true;
Break;
end;
Wait(50);
until(GetSystemTime > t);
if (Length(Players) > 0) then
if ((PinScreen) and (Players[CurrentPlayer].Pin <> '')) then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
end;
end;
ColorToleranceSpeed(Speed);
end;
{******************************************************************************}

procedure TeleToBank;
var
x, y: Integer;
begin
if (N > 3) then
begin
Failsafe;
Exit;
end;
N:=0;
ClickNorth(True);
AntiRandoms;
begin
repeat
Inc(N);
//if FindObjTPA(x, y, 6982558, 10, 2, 25, 20, w, ['mulet']) then
if FindObjCustom(X, Y, ['mulet','et Gl','lory'], [7114144,6982558], 3) then
GetMousePos(X, Y);
Mouse(x, y, 0, 0, false);
AntiRandoms;
until ChooseOption('Rub') or (N > 5);
end;
if (N > 5) then
begin
FailSafe;
Exit;
end;
Antiban;
FFlag(0);
N:=0;
repeat
Inc(N);
Wait(500);
until FindNpcChatText_F('dgev', ClickLeft) or (N > 10);
//Wait(4912 + Random(957));
begin
SPS_Setup(RUNESCAPE_SURFACE, ['10_6']);
SPS_Continue := true;
SPS_WalkPath([Point(4214, 2686)]);
Antiban;
FFlag(0);
Wait(2500 + Random(200));
AntiRandoms;
N:=0;
end;
end;

procedure StartAltar;
var
x, y, T: Integer;
//TPA:TPointArray;
//ATPA: T2DPointArray;
begin
if (N > 3) then
Exit;
N:=0;
ClickNorth(False);
Wait(5500 + Random(200));
begin
repeat
Inc(N);
if FindObjCustom(X, Y, ['oor','Doo'], [4740445,3883076,5400700], 3) then
GetMousePos(X, Y);
Mouse(x, y, 10, 10, false);
AntiRandoms;
until ChooseOption('Open') or (N > 3);
end;
if (N > 3) then
Exit;
SetAngle(True);
FFlag(2);
Wait(900 + Random(100));
Mouse(185, 37, 130, 50, true);
FFlag(2);
Wait(1000 + Random(300));
N:=0;
begin
repeat
Inc(N);
//RightClickBurner;
if FindObjCustom(X, Y, ['Inc','se bu','ner'], [2476026], 6) then
GetMousePos(X, Y);
Mouse(x, y, 3, 5, false);
AntiRandoms;
until WaitOption('Light', 2000) or (N > 3);
end;
if (N > 3) then
Exit;
FFlag(2);
Wait(2000 + Random(300));
N:=0;
begin
repeat
Inc(N);
//RightClickBurner;
if FindObjCustom(X, Y, ['Inc','se bu','ner'], [2476026], 6) then
GetMousePos(X, Y);
Mouse(x, y, 3, 5, false);
AntiRandoms;
until WaitOption('Light', 2000) or (N > 3);
end;
if (N > 3) then
Exit;
InvMouse(5, 2);
ChooseOption('Use');
ProgressReport;
FFlag(0);
Wait(600 + Random(250));
if FindObjCustom(X, Y, ['Alt', 'tar'], [11840684], 3) then
Mouse(x, y, 0, 0, true);
MouseBox(227, 405, 284, 435, 3);
T := GetSystemTime + 44000;
while (GetSystemTime < T) and not(FindColor(x, y, 2070783, 251, 434, 286, 446)) do
Wait(100 + Random(100));
if not(FindColor(x, y, 2070783, 251, 434, 286, 446)) then
Exit;
GetMousePos(x, y);
if not(PointInBox(Point(x, y), IntToBox(227, 405, 284, 435))) then
MouseBox(227, 405, 284, 435, 1)
else
ClickMouse2(True);
while (GetSystemTime < T) do
begin
if LevelUp then
Wait(800 + Random(100));
AntiBan;
AntiRandoms;
end;
end;

procedure BankandTele;
begin
N:=0;
//Marrentil := DTMFromString('mggAAAHicY2NgYJjOyMCwGIjnAfEEIG4H4olAnA2USwXiQiAuAOIsIM4AYp5gPiDJhIFFGLADRhwYAgCsawah');
//DragonBones := DTMFromString('mggAAAHicY2NgYOBlgAAQLQPEbEAsBcRMQMwB5XMBMSNU3fIFC6CyqJifATtgxIEhAADMUAJ+');
AntiRandoms;
begin
repeat
Inc(N);
UseBankNPC;
until BankScreen or (N > 3);
end;
if (N > 3) then
Exit;
begin
//if WithdrawItem(Marrentil, 'dtm', 1, 'lean', []) then
//if WithdrawItem(Marrentil, 'dtm', 1, 'lean', []) then
//WithdrawItem(DragonBones, 'dtm', 25, 'ragon', []) then
if Withdraw(8, 0, 1) then
if Withdraw(8, 0, 1) then
if Withdraw(9, 0, 25) then
if BankScreen then
CloseBank;
Wait(1000 + Random(350))
AntiRandoms;
KeyDown(VK_F1);
Wait(300 + Random(100))
KeyUp(VK_F1);
InvMouse(1, 1);
//FreeDTM(Marrentil);
//FreeDTM(DragonBones);
end;
end;

procedure Main;
begin
repeat
ProgressReport;
BankandTele;
StartAltar;
TeleToBank;
until not(LoggedIn);
end;

begin
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Active:= True;
Smart_Server := S_World;
Smart_Signed := S_Signed;
Smart_Members := S_Member;
Smart_SuperDetail := False;
SetupSRL;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
DeclarePlayer;
if not(LoggedIn) then
begin
LogInPlayer;
Wait(3000 + Random(2000));
AntiRandoms;
end;
SetRun(True);
Main;
end.

P.S I added your function iside the script and replaced old FindNPC.. With yours. (Inside the script)

~Home

Kyle Undefined

2011-12-15 17:06:51

What's the error?

Sin

2011-12-15 18:16:10

From: Home
Please revert your SRL to normal state and use this.

I fixed this in notepad, no idea does it work. But gor for it.

program Gilded_Altar;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
UseFailSafe = True; //READ THIS@@@@@@@@@
//For fail-safes to be effectively used, the user must be on the Ancients Spellbook.
//If you are on Ancients, leave this True. Otherwise, change it to False.
// (it's HIGHLY suggested you are on Ancients!)

var
N, HouseTab, EdgeHome, Marrentil, DragonBones: Integer;

procedure DeclarePlayer;
begin
with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
Strings[0] := 'eb';
BoxRewards := ['Xp'];
LampSkill := 'prayer'; // or change to whatever skill exp you want
end;
end;



Function FindNPCChatText_F(Option: String; Action: fnct_ActionOptions): Boolean;
var
X,Y: Integer;
begin
Result := False;

if Option = '' then
begin
srl_Warn('FindNPCChatText', 'txt is empty', warn_AllVersions);
Exit;
end;

if FindText(X, Y, Option, UpChars, MCX1, MCY1, MCX2, MCY2) then
begin
Result := True;
case Action of
Move: MMouse(X, Y + 2, Random(Length(Option) * 5), 4);
ClickLeft: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, True);
ClickRight: Mouse(X, Y + 2, Random(Length(Option) * 5), 4, False);
end;
end;
end;

procedure RightClickBurner;
var
MyTPA : TPointArray;
MyPoint : TPoint;
x, y, i : Integer;
begin
x := MSCx;
y := MSCy;
FindColorsSpiralTolerance(x, y, MyTPA, 2409460, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) = 0 then
FindColorsSpiralTolerance(x, y, MyTPA, 2078161, MSX1, MSY1, MSX2, MSY2, 10);
for i := 0 to High(MyTPA) do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 12);
if WaitUpTextMulti(['Inc','se bu','ner'], 1000) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
end;
Exit;
end;
end;

procedure AntiRandoms;
begin
FindNormalRandoms;
LevelUp;
end;

procedure ProgressReport;
begin
ClearDebug;
WriteLn('Running for: ' + TimeRunning);
end;

procedure FailSafe;
var
X, Y: Integer;
begin
if UseFailSafe=False then
begin
Logout;
TerminateScript;
end;
AntiRandoms;
N:=0;
EdgeHome := DTMFromString('mbQAAAHicY2VgYOBggABeIBYAYmYgZgdibiDmA2IWqPy+I58Y2ubcQMFuDJiAEQsGAwBv+wr5');
Writeln('Error, using failsafe!');
begin
repeat
if GameTab(tab_Magic) then
if FindDTM(EdgeHome, X, Y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 5, 5, false);
until ChooseOption('Cast');
end;
Wait(14500 + Random(1000));
begin
SPS_Setup(RUNESCAPE_SURFACE, ['10_6']);
SPS_Continue := true;
SPS_WalkPath([Point(4214, 2686)]);
FFlag(0);
AntiRandoms;
FreeDTM(EdgeHome);
//FreeDTM(Marrentil);
//FreeDTM(DragonBones);
Wait(2200 + Random(400));
end;
end;


procedure AntiBan;
begin
If(not LoggedIn)then Exit;
MouseSpeed := 12 + Random(5);
Case Random(20) of
0: MMouse(Random(MIX2), Random(MIY2), 10, 10);
1: HoverSkill(SKILL_prayer, False);
2: PickUpMouse;
3: GameTab(RandomRange(tab_Combat, tab_Notes));
4: SleepAndMoveMouse(400+Random(Random(4000)));
5: IdleTime(100+random(700), 100+Random(100), 0.2+RandomE/2);
6, 8, 9: MakeCompass(IntToStr(Random(360)));
10:
begin
SetAngle(False);
SetAngle(True);
end;
11, 12, 13, 15, 16: Wait(1000 + Random(800));
17, 18, 19, 20: Exit;
end;
end;

{*******************************************************************************
function OpenBankNPC/UseBankNPC(Modified): Boolean;
By: Home
Description: Modifed to correctly bank at Edge NPC.
*******************************************************************************}
function UseBankNPC: Boolean;
var
bx, by, Speed, ColFace, ColGrey, ColBlue, ColHair, t: Integer;
begin
Result := (LoggedIn) and (BankScreen or PinScreen);
if (Result) then exit;
Speed := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
ColFace := 4468276;
ColGrey := 4995649;
ColBlue := 4468276;
ColHair := 5125177;
if (FindObjThroughMM(bx, by, 'npc', [ColFace, ColBlue, ColGrey, ColHair], [5, 5, 5, 5],
['ounter', 'se Co', 'anke', 'to B', 'Banker', 'nker'], 2, 2)) then
begin
Mouse(bx, by, 0, 0, False);
if (WaitOptionMulti(['kly Co', 'se-qu', 'ank B', 'Bank Banker', 'ank', 'nker'], 750)) then
begin
t := (GetSystemTime + 5000);
repeat
if (BankScreen) or (PinScreen) then
begin
Result := true;
Break;
end;
Wait(50);
until(GetSystemTime > t);
if (Length(Players) > 0) then
if ((PinScreen) and (Players[CurrentPlayer].Pin <> '')) then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
end;
end;
ColorToleranceSpeed(Speed);
end;
{******************************************************************************}

procedure TeleToBank;
var
x, y: Integer;
begin
if (N > 3) then
begin
Failsafe;
Exit;
end;
N:=0;
ClickNorth(True);
AntiRandoms;
begin
repeat
Inc(N);
//if FindObjTPA(x, y, 6982558, 10, 2, 25, 20, w, ['mulet']) then
if FindObjCustom(X, Y, ['mulet','et Gl','lory'], [7114144,6982558], 3) then
GetMousePos(X, Y);
Mouse(x, y, 0, 0, false);
AntiRandoms;
until ChooseOption('Rub') or (N > 5);
end;
if (N > 5) then
begin
FailSafe;
Exit;
end;
Antiban;
FFlag(0);
N:=0;
repeat
Inc(N);
Wait(500);
until FindNpcChatText_F('dgev', ClickLeft) or (N > 10);
//Wait(4912 + Random(957));
begin
SPS_Setup(RUNESCAPE_SURFACE, ['10_6']);
SPS_Continue := true;
SPS_WalkPath([Point(4214, 2686)]);
Antiban;
FFlag(0);
Wait(2500 + Random(200));
AntiRandoms;
N:=0;
end;
end;

procedure StartAltar;
var
x, y, T: Integer;
//TPA:TPointArray;
//ATPA: T2DPointArray;
begin
if (N > 3) then
Exit;
N:=0;
ClickNorth(False);
Wait(5500 + Random(200));
begin
repeat
Inc(N);
if FindObjCustom(X, Y, ['oor','Doo'], [4740445,3883076,5400700], 3) then
GetMousePos(X, Y);
Mouse(x, y, 10, 10, false);
AntiRandoms;
until ChooseOption('Open') or (N > 3);
end;
if (N > 3) then
Exit;
SetAngle(True);
FFlag(2);
Wait(900 + Random(100));
Mouse(185, 37, 130, 50, true);
FFlag(2);
Wait(1000 + Random(300));
N:=0;
begin
repeat
Inc(N);
//RightClickBurner;
if FindObjCustom(X, Y, ['Inc','se bu','ner'], [2476026], 6) then
GetMousePos(X, Y);
Mouse(x, y, 3, 5, false);
AntiRandoms;
until WaitOption('Light', 2000) or (N > 3);
end;
if (N > 3) then
Exit;
FFlag(2);
Wait(2000 + Random(300));
N:=0;
begin
repeat
Inc(N);
//RightClickBurner;
if FindObjCustom(X, Y, ['Inc','se bu','ner'], [2476026], 6) then
GetMousePos(X, Y);
Mouse(x, y, 3, 5, false);
AntiRandoms;
until WaitOption('Light', 2000) or (N > 3);
end;
if (N > 3) then
Exit;
InvMouse(5, 2);
ChooseOption('Use');
ProgressReport;
FFlag(0);
Wait(600 + Random(250));
if FindObjCustom(X, Y, ['Alt', 'tar'], [11840684], 3) then
Mouse(x, y, 0, 0, true);
MouseBox(227, 405, 284, 435, 3);
T := GetSystemTime + 44000;
while (GetSystemTime < T) and not(FindColor(x, y, 2070783, 251, 434, 286, 446)) do
Wait(100 + Random(100));
if not(FindColor(x, y, 2070783, 251, 434, 286, 446)) then
Exit;
GetMousePos(x, y);
if not(PointInBox(Point(x, y), IntToBox(227, 405, 284, 435))) then
MouseBox(227, 405, 284, 435, 1)
else
ClickMouse2(True);
while (GetSystemTime < T) do
begin
if LevelUp then
Wait(800 + Random(100));
AntiBan;
AntiRandoms;
end;
end;

procedure BankandTele;
begin
N:=0;
//Marrentil := DTMFromString('mggAAAHicY2NgYJjOyMCwGIjnAfEEIG4H4olAnA2USwXiQiAuAOIsIM4AYp5gPiDJhIFFGLADRhwYAgCsawah');
//DragonBones := DTMFromString('mggAAAHicY2NgYOBlgAAQLQPEbEAsBcRMQMwB5XMBMSNU3fIFC6CyqJifATtgxIEhAADMUAJ+');
AntiRandoms;
begin
repeat
Inc(N);
UseBankNPC;
until BankScreen or (N > 3);
end;
if (N > 3) then
Exit;
begin
//if WithdrawItem(Marrentil, 'dtm', 1, 'lean', []) then
//if WithdrawItem(Marrentil, 'dtm', 1, 'lean', []) then
//WithdrawItem(DragonBones, 'dtm', 25, 'ragon', []) then
if Withdraw(8, 0, 1) then
if Withdraw(8, 0, 1) then
if Withdraw(9, 0, 25) then
if BankScreen then
CloseBank;
Wait(1000 + Random(350))
AntiRandoms;
KeyDown(VK_F1);
Wait(300 + Random(100))
KeyUp(VK_F1);
InvMouse(1, 1);
//FreeDTM(Marrentil);
//FreeDTM(DragonBones);
end;
end;

procedure Main;
begin
repeat
ProgressReport;
BankandTele;
StartAltar;
TeleToBank;
until not(LoggedIn);
end;

begin
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Active:= True;
Smart_Server := S_World;
Smart_Signed := S_Signed;
Smart_Members := S_Member;
Smart_SuperDetail := False;
SetupSRL;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
DeclarePlayer;
if not(LoggedIn) then
begin
LogInPlayer;
Wait(3000 + Random(2000));
AntiRandoms;
end;
SetRun(True);
Main;
end.

P.S I added your function iside the script and replaced old FindNPC.. With yours. (Inside the script)

~Home


I'll try this :)
Thanks a ton again :)