PDA

View Full Version : My Script Skips My DTM Path



S_rose94
11-10-2013, 12:04 AM
My Script Starts up well removes items from the bank as it should, however it for some reason completely skips my DTM Walk Path and moves onto the next step after the walk should have been completed. Why is it doing this? the file compiles fine enough :/

Hazzah
11-10-2013, 12:32 AM
Perhaps if you posted the code we could look at it and explain it too you, however without knowing what it looks like we can't really be sure.

S_rose94
11-10-2013, 12:44 AM
program new;
{$Define Smart8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.simba}
const
AntiFreq = 100;
var
HpBox:TBox;
FirstStep:Integer;
SecondStep:Integer;
ThirdStep:Integer;
FourthStep:Integer;
FithStep:Integer;
SixthStep:Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ';
Pass := '';
Nick := ''; // You have to add your nickname
Pin := '';
Active := True;
end;
HpBox := IntToBox(230,129,289,170);
end;

procedure Bank;
var x, y: Integer;
begin
if findobj(x ,y,'ooth',9475221,15) then
begin
Mouse(x, y, 4, 4, False);
ChooseOption('ooth');
end;
begin
Wait(1000+Random(1000));
DepositAll()
Wait(1000+Random(1000));
Findobj(x,y,'oins',1680585,15);
Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Coins');
Wait(1000+Random(1000));
TypeSend('2700');
Wait(500+Random(500));
FindObjCustom(x, y, ['Emeralds', 'meralds'], [3627636, 3957633,1988217,5213097,5411248], 10);
Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Emeralds');
Wait(1000+Random(1000));
TypeSend('27');
end;
end;
procedure DeclareSteps;
begin
FirstStep := DTMFromString('mggAAAHicY2NgYFBnY2DQAmJdIDYGYgsg/sXKwDAHKDcZiNcB8UYobgLixNhwBkFJcQZHTzcGdX19ME7LEWD ABRhxYAgAAFHRCeY=');
SecondStep := DTMFromString('mrAAAAHic42BgYBBkY2CQAWI5IGYCYgYkmg 2Iu4HMPiCeA8SzgLgLiGuBeBIQLwLikDQrBkU5BgaJQGaG2qoS FPzl+wsGQoCRAIYBANuVDz4=');
ThirdStep := DTMFromString('mlwAAAHicY2dgYJBnY2DgAmIhIOYD4i+sDA yfgFgUyO4ByvcB8TQgbgXiFiCeDMRzgDg0yZLBN86egd+OAYyr y4vAGMTGBxjxYCgAAJMUC+w=');
FourthStep := DTMFromString('mlwAAAHicY2dgYFBkY2DgBmJ1INYCYhUgFg TiP6wMDH1A+UYgngDEa4B4NRDPBeJZQByaZMlgrsbEAAKBHjIM oT5yDMQARjwYCgCTuAjW');
FithStep := DTMFromString('mwQAAAHic42RgYNBiY2BQhWJhIDYFYiMg1g FiFiCWAeJpQHWrgLgHiKcA8Uog3gLEu4B4CRCvAeLYNFWGI+Hc DGziDAzmakwM/HYMDIpyDGAahCUCmRmIAYxEYDgAAMTuC2Y=');
SixthStep := DTMFromString('mrAAAAHic42BgYGBmY2D4wcrAwA6kPwHpz0 AsBGRrAfFzIHsjUM1mIF4MxMuAeBcQnwTinUC8AYhjI3UYElP1 GFZsWMegKMcAxrFJlmBaIpCZgRBgJIBhAABeYg/d');
end;

procedure Walk;
var x, y: Integer;
var FirstStep: Integer;
var SecondStep: Integer;
var ThirdStep: Integer;
var FourthStep: Integer;
var FithStep: Integer;
var SixthStep: Integer;
begin
if finddtm(FirstStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(FirstStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(SecondStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(SecondStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(ThirdStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(ThirdStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(FourthStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(FourthStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(FithStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(FithStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(SixthStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(SixthStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
end;

procedure WipeDTM;
begin
FreeDTM(FirstStep);
FreeDTM(SecondStep);
FreeDTM(ThirdStep);
FreeDTM(FourthStep);
FreeDTM(FithStep);
FreeDTM(SixthStep);
end;


Procedure Antiban;

begin
case random(AntiFreq) of
0: HoverSkill('woodcutting', false);
1: MakeCompass(RandomRange(0,359));
2: BoredHuman;
3: RandomRClick;
end;
end;


begin
DeclarePlayers;
SetupSRL;
LoginPlayer;
ClearDebug;
Repeat
begin
Bank;
Antiban;
DeclareSteps;
Walk;
WipeDTM;
Antiban;
end
until(False)
end.

Flight
11-10-2013, 01:15 AM
Hm give me a minute and I'll clean this up for you.

Hazzah
11-10-2013, 01:20 AM
program new;
{$Define Smart8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.simba}
const
AntiFreq = 100;
var
HpBox:TBox;
FirstStep:Integer;
SecondStep:Integer;
ThirdStep:Integer;
FourthStep:Integer;
FithStep:Integer;
SixthStep:Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ';
Pass := '';
Nick := ''; // You have to add your nickname
Pin := '';
Active := True;
end;
HpBox := IntToBox(230,129,289,170);
end;

procedure Bank;
var x, y: Integer;
begin
if findobj(x ,y,'ooth',9475221,15) then
begin
Mouse(x, y, 4, 4, False);
ChooseOption('ooth');
end;
begin
Wait(1000+Random(1000));
DepositAll()
Wait(1000+Random(1000));
Findobj(x,y,'oins',1680585,15);
Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Coins');
Wait(1000+Random(1000));
TypeSend('2700');
Wait(500+Random(500));
FindObjCustom(x, y, ['Emeralds', 'meralds'], [3627636, 3957633,1988217,5213097,5411248], 10);
Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Emeralds');
Wait(1000+Random(1000));
TypeSend('27');
end;
end;
procedure DeclareSteps;
begin
FirstStep := DTMFromString('mggAAAHicY2NgYFBnY2DQAmJdIDYGYgsg/sXKwDAHKDcZiNcB8UYobgLixNhwBkFJcQZHTzcGdX19ME7LEWD ABRhxYAgAAFHRCeY=');
SecondStep := DTMFromString('mrAAAAHic42BgYBBkY2CQAWI5IGYCYgYkmg 2Iu4HMPiCeA8SzgLgLiGuBeBIQLwLikDQrBkU5BgaJQGaG2qoS FPzl+wsGQoCRAIYBANuVDz4=');
ThirdStep := DTMFromString('mlwAAAHicY2dgYJBnY2DgAmIhIOYD4i+sDA yfgFgUyO4ByvcB8TQgbgXiFiCeDMRzgDg0yZLBN86egd+OAYyr y4vAGMTGBxjxYCgAAJMUC+w=');
FourthStep := DTMFromString('mlwAAAHicY2dgYFBkY2DgBmJ1INYCYhUgFg TiP6wMDH1A+UYgngDEa4B4NRDPBeJZQByaZMlgrsbEAAKBHjIM oT5yDMQARjwYCgCTuAjW');
FithStep := DTMFromString('mwQAAAHic42RgYNBiY2BQhWJhIDYFYiMg1g FiFiCWAeJpQHWrgLgHiKcA8Uog3gLEu4B4CRCvAeLYNFWGI+Hc DGziDAzmakwM/HYMDIpyDGAahCUCmRmIAYxEYDgAAMTuC2Y=');
SixthStep := DTMFromString('mrAAAAHic42BgYGBmY2D4wcrAwA6kPwHpz0 AsBGRrAfFzIHsjUM1mIF4MxMuAeBcQnwTinUC8AYhjI3UYElP1 GFZsWMegKMcAxrFJlmBaIpCZgRBgJIBhAABeYg/d');
end;

procedure Walk;
var x, y: Integer;
var FirstStep: Integer;
var SecondStep: Integer;
var ThirdStep: Integer;
var FourthStep: Integer;
var FithStep: Integer;
var SixthStep: Integer;
begin
if finddtm(FirstStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(FirstStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(SecondStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(SecondStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(ThirdStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(ThirdStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(FourthStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(FourthStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(FithStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(FithStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
if finddtm(SixthStep,x,y,MMX1,MMY1, MMX2,MMY2) then
begin
ClickDTMRotatedIn(SixthStep, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end;
end;

procedure WipeDTM;
begin
FreeDTM(FirstStep);
FreeDTM(SecondStep);
FreeDTM(ThirdStep);
FreeDTM(FourthStep);
FreeDTM(FithStep);
FreeDTM(SixthStep);
end;


Procedure Antiban;

begin
case random(AntiFreq) of
0: HoverSkill('woodcutting', false);
1: MakeCompass(RandomRange(0,359));
2: BoredHuman;
3: RandomRClick;
end;
end;


begin
DeclarePlayers;
SetupSRL;
LoginPlayer;
ClearDebug;
Repeat
begin
Bank;
Antiban;
DeclareSteps;
Walk;
WipeDTM;
Antiban;
end
until(False)
end.

You should use {simba} tags (with normal square brackets) for scripts, it makes it a little easier to read.

S_rose94
11-10-2013, 01:32 AM
You should use {simba} tags (with normal square brackets) for scripts, it makes it a little easier to read.

Sorry first script it may make more sense if you paste it into simba

Flight
11-10-2013, 02:00 AM
Ok, this will tell you if your DTMs are not being found on the MM:


program new;
{$DEFINE Smart8}

{$i SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.simba}

const
AntiFreq = 100;
var
HpBox:TBox;
FirstStep,SecondStep,ThirdStep,
FourthStep,FifthStep,SixthStep :Integer;

Procedure declarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
LampSkill := Skill_Farming;
WorldInfo := [];
Member := True;
Active := True;
end;
end;

procedure Bank;
var
x,y: Integer;
begin
if findobj(x ,y,'ooth',9475221,15) then
begin
Mouse(x, y, 4, 4, False);
ChooseOption('ooth');
end else
begin
Writeln('Failed to find the bank booth');
Exit;
end;

Wait(1000+Random(1000));
DepositAll();
Wait(1000+Random(1000));

if not Findobj(x,y,'oins',1680585,15) then
begin
Writeln('Failed to find coins');
Exit;
end;

Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Coins');
Wait(1000+Random(1000));
TypeSend('2700');
Wait(500+Random(500));

if not FindObjCustom(x, y, ['Emeralds', 'meralds'], [3627636, 3957633,1988217,5213097,5411248], 10) then
begin
Writeln('Failed to find emeralds');
Exit;
end;

Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Emeralds');
Wait(1000+Random(1000));
TypeSend('27');
end;

procedure DeclareSteps;
begin
FirstStep := DTMFromString('mggAAAHicY2NgYFBnY2DQAmJdIDYGYgsg/sXKwDAHKDcZiNcB8UYobgLixNhwBkFJcQZHTzcGdX19ME7LEWD ABRhxYAgAAFHRCeY=');
SecondStep := DTMFromString('mrAAAAHic42BgYBBkY2CQAWI5IGYCYgYkmg 2Iu4HMPiCeA8SzgLgLiGuBeBIQLwLikDQrBkU5BgaJQGaG2qoS FPzl+wsGQoCRAIYBANuVDz4=');
ThirdStep := DTMFromString('mlwAAAHicY2dgYJBnY2DgAmIhIOYD4i+sDA yfgFgUyO4ByvcB8TQgbgXiFiCeDMRzgDg0yZLBN86egd+OAYyr y4vAGMTGBxjxYCgAAJMUC+w=');
FourthStep := DTMFromString('mlwAAAHicY2dgYFBkY2DgBmJ1INYCYhUgFg TiP6wMDH1A+UYgngDEa4B4NRDPBeJZQByaZMlgrsbEAAKBHjIM oT5yDMQARjwYCgCTuAjW');
FifthStep := DTMFromString('mwQAAAHic42RgYNBiY2BQhWJhIDYFYiMg1g FiFiCWAeJpQHWrgLgHiKcA8Uog3gLEu4B4CRCvAeLYNFWGI+Hc DGziDAzmakwM/HYMDIpyDGAahCUCmRmIAYxEYDgAAMTuC2Y=');
SixthStep := DTMFromString('mrAAAAHic42BgYGBmY2D4wcrAwA6kPwHpz0 AsBGRrAfFzIHsjUM1mIF4MxMuAeBcQnwTinUC8AYhjI3UYElP1 GFZsWMegKMcAxrFJlmBaIpCZgRBgJIBhAABeYg/d');
end;

procedure Walk;
var
x,y: Integer;
begin
if finddtm(FirstStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(FirstStep,MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM FirstStep');
Exit;
end;
if finddtm(SecondStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(SecondStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM SecondStep');
Exit;
end;
if finddtm(ThirdStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(ThirdStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM ThridStep');
Exit;
end;
if finddtm(FourthStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(FourthStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM FourthStep');
Exit;
end;
if finddtm(FifthStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(FifthStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM FifthStep');
Exit;
end;
if finddtm(SixthStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(SixthStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM SixthStep');
Exit;
end;
end;

procedure WipeDTM;
begin
FreeDTM(FirstStep);
FreeDTM(SecondStep);
FreeDTM(ThirdStep);
FreeDTM(FourthStep);
FreeDTM(FifthStep);
FreeDTM(SixthStep);
end;


Procedure Antiban;
begin
case random(AntiFreq) of
0: HoverSkill('woodcutting', false);
1: MakeCompass(RandomRange(0,359));
2: BoredHuman;
3: RandomRClick;
end;
end;


begin
DeclarePlayers;
setupSRL();
loginPlayer();
clearDebug();

declareSteps();
addOnTerminate('WipeDTM');

Repeat
Bank;
Antiban;
Walk;
Antiban;
until(False)
end.

S_rose94
11-10-2013, 02:24 AM
program new;
{$DEFINE Smart8}

{$i SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.simba}

const
AntiFreq = 100;
var
HpBox:TBox;
FirstStep,SecondStep,ThirdStep,
FourthStep,FifthStep,SixthStep :Integer;

Procedure declarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
LampSkill := Skill_Farming;
WorldInfo := [];
Member := True;
Active := True;
end;
end;

procedure Bank;
var
x,y: Integer;
begin
if findobj(x ,y,'ooth',9475221,15) then
begin
Mouse(x, y, 4, 4, False);
ChooseOption('ooth');
end else
begin
Writeln('Failed to find the bank booth');
Exit;
end;

Wait(1000+Random(1000));
DepositAll();
Wait(1000+Random(1000));

if not Findobj(x,y,'oins',1680585,15) then
begin
Writeln('Failed to find coins');
Exit;
end;

Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Coins');
Wait(1000+Random(1000));
TypeSend('2700');
Wait(500+Random(500));

if not FindObjCustom(x, y, ['Emeralds', 'meralds'], [1010444,810505], 10) then
begin
Writeln('Failed to find emeralds');
Exit;
end;

Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Emeralds');
Wait(1000+Random(1000));
TypeSend('27');
end;

procedure DeclareSteps;
begin
FirstStep := DTMFromString('mggAAAHicY2NgYFBnY2DQAmJdIDYGYgsg/sXKwDAHKDcZiNcB8UYobgLixNhwBkFJcQZHTzcGdX19ME7LEWD ABRhxYAgAAFHRCeY=');
SecondStep := DTMFromString('mrAAAAHic42BgYBBkY2CQAWI5IGYCYgYkmg 2Iu4HMPiCeA8SzgLgLiGuBeBIQLwLikDQrBkU5BgaJQGaG2qoS FPzl+wsGQoCRAIYBANuVDz4=');
ThirdStep := DTMFromString('mlwAAAHicY2dgYJBnY2DgAmIhIOYD4i+sDA yfgFgUyO4ByvcB8TQgbgXiFiCeDMRzgDg0yZLBN86egd+OAYyr y4vAGMTGBxjxYCgAAJMUC+w=');
FourthStep := DTMFromString('mlwAAAHicY2dgYFBkY2DgBmJ1INYCYhUgFg TiP6wMDH1A+UYgngDEa4B4NRDPBeJZQByaZMlgrsbEAAKBHjIM oT5yDMQARjwYCgCTuAjW');
FifthStep := DTMFromString('mwQAAAHic42RgYNBiY2BQhWJhIDYFYiMg1g FiFiCWAeJpQHWrgLgHiKcA8Uog3gLEu4B4CRCvAeLYNFWGI+Hc DGziDAzmakwM/HYMDIpyDGAahCUCmRmIAYxEYDgAAMTuC2Y=');
SixthStep := DTMFromString('mrAAAAHic42BgYGBmY2D4wcrAwA6kPwHpz0 AsBGRrAfFzIHsjUM1mIF4MxMuAeBcQnwTinUC8AYhjI3UYElP1 GFZsWMegKMcAxrFJlmBaIpCZgRBgJIBhAABeYg/d');
end;

procedure Walk;
var
x,y: Integer;
begin
if finddtm(FirstStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(FirstStep,MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM FirstStep');
Exit;
end;
if finddtm(SecondStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(SecondStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM SecondStep');
Exit;
end;
if finddtm(ThirdStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(ThirdStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM ThridStep');
Exit;
end;
if finddtm(FourthStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(FourthStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM FourthStep');
Exit;
end;
if finddtm(FifthStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(FifthStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM FifthStep');
Exit;
end;
if finddtm(SixthStep,x,y,MMX1,MMY1,MMX2,MMY2) then
begin
ClickDTMRotatedIn(SixthStep, MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
FFlag(0);
end else
begin
Writeln('Failed to find DTM SixthStep');
Exit;
end;
end;

procedure WipeDTM;
begin
FreeDTM(FirstStep);
FreeDTM(SecondStep);
FreeDTM(ThirdStep);
FreeDTM(FourthStep);
FreeDTM(FifthStep);
FreeDTM(SixthStep);
end;


Procedure Antiban;
begin
case random(AntiFreq) of
0: HoverSkill('woodcutting', false);
1: MakeCompass(RandomRange(0,359));
2: BoredHuman;
3: RandomRClick;
end;
end;


begin
DeclarePlayers;
setupSRL();
loginPlayer();
clearDebug();

declareSteps();
addOnTerminate('WipeDTM');

Repeat
Bank;
Antiban;
Walk;
Antiban;
until(False)
end.

For Some Reason It Cant Find The Emeralds This Is The Error I Get It Also Mentions The DTM :/

Failed to find emeralds
Error: Exception: FindDTMs: DTM[] is not valid. at line 92
The following DTMs were not freed: [SRL - Lamp bitmap, SRL - Book of Knowledge, 2, 3, 4, 5, 6, 7]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Minimap Mask bitmap]

Flight
11-10-2013, 03:34 AM
Sorry first script it may make more sense if you paste it into simba

That has nothing to do with the script, he was simply recommending you use the {/Simba] brackets when posting a script on the forum, as I did in my previous post as well as this one.

I've never used the 'ClickDTMRotatedIn' function before so perhaps something went wrong there. Try this:
[simba]
program new;
{$DEFINE Smart8}

{$i SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.simba}

const
AntiFreq = 100;
var
HpBox:TBox;
FirstStep,SecondStep,ThirdStep,
FourthStep,FifthStep,SixthStep :Integer;

Procedure declarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
LampSkill := Skill_Farming;
WorldInfo := [];
Member := True;
Active := True;
end;
end;

procedure Bank;
var
x,y: Integer;
begin
if findobj(x ,y,'ooth',9475221,15) then
begin
Mouse(x, y, 4, 4, False);
ChooseOption('ooth');
end else
begin
Writeln('Failed to find the bank booth');
Exit;
end;

Wait(1000+Random(1000));
DepositAll();
Wait(1000+Random(1000));

if not Findobj(x,y,'oins',1680585,15) then
begin
Writeln('Failed to find coins');
Exit;
end;

Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Coins');
Wait(1000+Random(1000));
TypeSend('2700');
Wait(500+Random(500));

if not FindObjCustom(x, y, ['Emeralds', 'meralds'], [3627636, 3957633,1988217,5213097,5411248], 10) then
begin
Writeln('Failed to find emeralds');
Exit;
end;

Mouse(x, y, 4, 4, False);
Wait(500+Random(500));
ChooseOption('Withdraw-X Emeralds');
Wait(1000+Random(1000));
TypeSend('27');
end;

procedure DeclareSteps;
begin
FirstStep := DTMFromString('mggAAAHicY2NgYFBnY2DQAmJdIDYGYgsg/sXKwDAHKDcZiNcB8UYobgLixNhwBkFJcQZHTzcGdX19ME7LEWD ABRhxYAgAAFHRCeY=');
SecondStep := DTMFromString('mrAAAAHic42BgYBBkY2CQAWI5IGYCYgYkmg 2Iu4HMPiCeA8SzgLgLiGuBeBIQLwLikDQrBkU5BgaJQGaG2qoS FPzl+wsGQoCRAIYBANuVDz4=');
ThirdStep := DTMFromString('mlwAAAHicY2dgYJBnY2DgAmIhIOYD4i+sDA yfgFgUyO4ByvcB8TQgbgXiFiCeDMRzgDg0yZLBN86egd+OAYyr y4vAGMTGBxjxYCgAAJMUC+w=');
FourthStep := DTMFromString('mlwAAAHicY2dgYFBkY2DgBmJ1INYCYhUgFg TiP6wMDH1A+UYgngDEa4B4NRDPBeJZQByaZMlgrsbEAAKBHjIM oT5yDMQARjwYCgCTuAjW');
FifthStep := DTMFromString('mwQAAAHic42RgYNBiY2BQhWJhIDYFYiMg1g FiFiCWAeJpQHWrgLgHiKcA8Uog3gLEu4B4CRCvAeLYNFWGI+Hc DGziDAzmakwM/HYMDIpyDGAahCUCmRmIAYxEYDgAAMTuC2Y=');
SixthStep := DTMFromString('mrAAAAHic42BgYGBmY2D4wcrAwA6kPwHpz0 AsBGRrAfFzIHsjUM1mIF4MxMuAeBcQnwTinUC8AYhjI3UYElP1 GFZsWMegKMcAxrFJlmBaIpCZgRBgJIBhAABeYg/d');
end;

procedure Walk;
var
x,y: Integer;
begin
if ClickDTMRotatedIn(FirstStep,MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left) then
FFlag(0)
else
begin
Writeln('Failed to find DTM FirstStep');
Exit;
end;
if ClickDTMRotatedIn(SecondStep,MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left) then
FFlag(0)
else
begin
Writeln('Failed to find DTM SecondStep');
Exit;
end;
if ClickDTMRotatedIn(ThirdStep,MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left) then
FFlag(0)
else
begin
Writeln('Failed to find DTM ThridStep');
Exit;
end;
if ClickDTMRotatedIn(FourthStep,MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left) then
FFlag(0)
else
begin
Writeln('Failed to find DTM FourthStep');
Exit;
end;
if ClickDTMRotatedIn(FifthStep,MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left) then
FFlag(0)
else
begin
Writeln('Failed to find DTM FifthStep');
Exit;
end;
if ClickDTMRotatedIn(SixthStep,MMX1,MMY1,MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left) then
FFlag(0)
else
begin
Writeln('Failed to find DTM SixthStep');
Exit;
end;
end;

procedure WipeDTM;
begin
FreeDTM(FirstStep);
FreeDTM(SecondStep);
FreeDTM(ThirdStep);
FreeDTM(FourthStep);
FreeDTM(FifthStep);
FreeDTM(SixthStep);
end;


Procedure Antiban;
begin
case random(AntiFreq) of
0: HoverSkill('woodcutting', false);
1: MakeCompass(RandomRange(0,359));
2: BoredHuman;
3: RandomRClick;
end;
end;


begin
DeclarePlayers;
setupSRL();
loginPlayer();
clearDebug();

declareSteps();
addOnTerminate('WipeDTM');

Repeat
Bank;
Antiban;
Walk;
Antiban;
until(False)
end.


Also, look how much space it saves to post a script using [simba] script code here {/Simba].

Hazzah
11-10-2013, 06:09 AM
That has nothing to do with the script, he was simply recommending you use the [Simba]{/Simba] brackets when posting a script on the forum, as I did in my previous post as well as this one.

I've never used the 'ClickDTMRotatedIn' function before so perhaps something went wrong there.

Also, look how much space it saves to post a script using [simba] script code here {/Simba].

It also make it nicer to read when in a post (I no longer have Simba).

S_rose94
11-10-2013, 06:16 PM
Cant Find The DTM it will for a couple of tries when im creating the path but after that nothing, it cant find the firststep DTM is there an easier way to map walk on 07scape?