SRL Archive - Help

DTM Walking


Element17

2012-03-05 19:57:58

program VEWAlker;

//{$DEFINE SMART} (Remove // to open smart)
{$i srl/srl.simba}
{$i sps/sps.simba}

Const
SERVER = 61; // Enter "0" to pick a random server.
MEMBERS = False; // Set to True if using a RS-Members account. False if F2P.
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first char)
Version= '1.0'; //Change back to 1 if new script


/////////// {Credits for the DTM walking go to DemiseScythe all the DTM stuff
////////// came from the tut!}

Var
X, Y, I:Integer;
Q: Array [0..4] of Integer;//DTM Declaring procedure.
aFound: Extended;



procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
end;

end;


{Writes lines in the dbug box}

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Mining', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_commit;
Terminatescript;
End;

Procedure Bankit; //Credits to Trickyy and Marpis

Var
i : Integer;
Begin
If (Not(LoggedIn)) Then Exit;
For i:=1 To 4 Do
If OpenBank('veb', True, True) Then
Break;
End;

procedure SetDTM;//DTM Defining procedure.
begin
Q[0] := DTMFromString('mrAAAAHichcqhDkBQGIbhzxTX47YkSRUpTHALprgKii6qNmcz/38OgeYr8nm3p70RgDwEUsqooJY6aiihmc9IA/U00UoPLVTVJUQ2uNviUgPRHacYvC6G2gO+Ao+/D6oKHyA=');
Q[1] := DTMFromString('mlwAAAHicY2dgYJjBzMDQCcTrmSHsYiBeAMRxQLwGKL8ciNcC8TEgfgTFh4G4u6uN4efXNwxfP35i+PL5HQMjEwPD10+PGd59AKnADRjxYCgAABRQGPk=');
Q[2] := DTMFromString('mggAAAHicY2NgYJjMzMAwC4g3A/EKIO4F4iwgXg+UWw7EG4H4NBCfAuLdQBwUEszw6fM7hp8/3zJ8+/6R4dO7pwzfPr9iwAUYcWAIAAAVdxcW');
Q[3] := DTMFromString('mlwAAAHicY2dgYJjNzMDQAcRLgXgLEM8F4h4g7gbiY0D5TUC8FYgfAfEDIL4LxEcYQICRIdpLlyEvM4fhz/MPcPybkZ0BH2DEg6EAAP13FXY=');

end;

procedure FrDTM;//DTM Freeing procedure.
begin
FreeDTM(Q[0]);
FreeDTM(Q[1]);
FreeDTM(Q[2]); StatsGuise('Walking to point' + InToStr(I));
FreeDTM(Q[3]);

end;








begin

Smart_Server := 30;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
SetupSRLStats(439, SRLStats_Username, SRLStats_Password);

DeclarePlayers;
LoginPlayer;
SetDTM; //Set DTM's before code.
MouseSpeed := 18;//This makes it move faster but still undetectable, it makes DTM walking even more human-like.
MakeCompass('n');//We agreed we'd have camera facing North.


If FindDTMRotated(Q[0], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);
Repeat
Wait(50 + Random(25));

Until FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
End;
If FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);

Repeat
Wait(50 + Random(25));
Until FindDTMRotated(Q[2], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
End;
If FindDTMRotated(Q[2], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);
Repeat
Wait(50 + Random(25));
Until FindDTMRotated(Q[3], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
End;
If FindDTMRotated(Q[3], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Reached Tree');
FFlag(6);

End;
FrDTM;
end.

I run this and it complies, but when I drag the cross-hair over to the Runescape window it just ask for SRL login information and I say no blah blah and then it just says Successfully executed but does not walk to where it should, it doesn't even walk at all. Any reason why it doesn't? I would try SPS but I heard it is broken and I've tried DDTM but I didn't understand the tutorial completely.

Nebula

2012-03-05 20:01:24

Your DTMs need tolerance. Currently, they do not.

Element17

2012-03-05 20:35:36

I changed the DTM and the tolerance to 15, but it only walks to the first point and then for the second one its takes several seconds any reason for that? Change the tolerance for the other ones?

procedure SetDTM;//DTM Defining procedure.
begin
Q[0] := DTMFromString('mlwAAAHicY2dgYKhjZmDoAOJ8IE4E4mYgngrEK4F4P1B+GRAfBuLbQPwMiI8A8R0g7unrYvj89gcYB/uZwNkgzA+Ux4UZ8WAoAABcnxpe');
Q[1] := DTMFromString('mlwAAAHicY2dgYJjGzMDQDsQbgXg9EBcCcTMQLwHizUD5NUB8AIhXA/EjIP4LxG+AuKOjjeHLl1cMn768ZPjw8Q0DI1Ds9evHDD+/v2LgB7JxYUY8GAoAWjAZzw==');
Q[2] := DTMFromString('mlwAAAHicY2dgYJjOzMAwG4izgHgzEG8B4jYgXgnE24Hyy4B4FxBvAOJzQHwGiN8CsX9IAMOHT28Zfn3/wPD12wuGjx9fMqRF2wLZHxj4gfK4MCMeDAUAbpwaJw==');
Q[3] := DTMFromString('mggAAAHicY2NgYJjNzMCwHoi3A/FMIM4B4g4gPgGU2wnEb4D4OxC/BeJDDCDAyPDn+QcUnBdtysAPlMGGGXFgCAAAursVZQ==');

end;

procedure FrDTM;//DTM Freeing procedure.
begin
FreeDTM(Q[0]);
FreeDTM(Q[1]);
FreeDTM(Q[2]);
FreeDTM(Q[3]);

end;








begin

Smart_Server := 30;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
SetupSRLStats(439, SRLStats_Username, SRLStats_Password);

DeclarePlayers;
LoginPlayer;
SetDTM; //Set DTM's before code.
MouseSpeed := 18;//This makes it move faster but still undetectable, it makes DTM walking even more human-like.
MakeCompass('n');//We agreed we'd have camera facing North.


If FindDTMRotated(Q[0], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);
Repeat
Wait(50 + Random(25));

Until FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
End;
If FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);

Repeat
Wait(50 + Random(25));
Until FindDTMRotated(Q[2], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
End;
If FindDTMRotated(Q[2], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point');
FFlag(6);
Repeat
Wait(50 + Random(25));
Until FindDTMRotated(Q[3], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
End;
If FindDTMRotated(Q[3], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Reached Tree');
FFlag(6);

End;
FrDTM;
end.

Also thank you for helping me at least get it moving ha

Nebula

2012-03-05 21:21:33

Well you could increase the speed by making the rotation (aStep) higher such as pi/20, pi/15, or pi/10.

Also make sure that the main DTM point always has a tolerance of 255, and the sub points are in positions that are unlikely to be covered up.

Element17

2012-03-05 22:56:13

Okay, I had my main point with a tolerance of 15. So make that tolerance 255 and the subpoints 15? I will also lower the astep. I will post tomorrow if it works and I appreciate your help so far man. I will be sure to give you credit in my script if/when I get it working.

Element17

2012-03-08 14:06:11

So I got the first two DTMs to work, but the third and fourth one do not work,should I remake them or just use the first two DTMs and then use a second walking function?

Nebula

2012-03-08 16:07:06

Yeah, remake the second two DTMs. Make sure that the main point has a 255 tolerance, and the sub points are all in spots where NPCs/ Symbols/ Players can't cover them up.

Element17

2012-03-08 16:50:20

[/program VEWAlker;

//{$DEFINE SMART} (Remove // to open smart)
{$i srl/srl.simba}
{$i sps/sps.simba}

Const
SERVER = 61; // Enter "0" to pick a random server.
MEMBERS = False; // Set to True if using a RS-Members account. False if F2P.
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first char)
Version= '1.0'; //Change back to 1 if new script


/////////// Credits for the DTM walking go to DemiseScythe all the DTM stuff
////////// came from the tut!

Var
X, Y:Integer;
Q: Array [0..4] of Integer;//DTM Declaring procedure.
aFound: Extended;
Toolong:Integer;


procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
end;

end;


{Writes lines in the dbug box}

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Mining', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_commit;
Terminatescript;
End;

Procedure Bankit; //Credits to Trickyy and Marpis

Var
i : Integer;
Begin
If (Not(LoggedIn)) Then Exit;
For i:=1 To 4 Do
If OpenBank('veb', True, True) Then
Break;
End;

Function RadialWalkYew: Integer; //Credit to BobboHobbo for Tut and failsafe idea
Var X, Y: Integer;
Begin
FindNormalRandoms;
If RadialRoadWalk(RoadColor, 340, 315, 55, 1, 1) Then
Begin
Writeln('Walking to yew!');
Result:=1;
Exit;
End Else
Writeln('Walking to yew failed'); //FailSafe for RadialWalking
If FindSymbol(X, Y, 'Tree') Then
Begin
Mouse(X, Y, 5, 5, True);
FFlag(0);
Writeln('At yew');
Result:= 1;
End Else
Writeln('Walikng failed');
End;

Function ChopYew: Boolean;
Var
X, Y, PlusOne, LogCounter: Integer;
Begin
If Not LoggedIn then
Exit;
MarkTime(TooLong);
FindNormalRandoms;
PlusOne:= InvCount +1;
X:=MSCX;
Y:=MSCY;
If (FindObjCustom(X, Y, ['Cho', 'ope'], [4454, 45487], 7))Then
Begin
StatsGuise('We found Tree');
GetMousePos(X, Y);

Case Random(2) of
0: Mouse(X, Y, 5, 5, True);
1: Begin
Mouse(X, Y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

Flag;
MarkTime(LogCounter);
If (TimeFromMark(Toolong) > 20000) Then
FailSafe('Could not find Tree');
Repeat;
If (TimeFromMark(Toolong) > 25000) Then
FailSafe('Could not find Tree');
FindNormalRandoms;
StatsGuise('AntiBan and Waiting');
Antiban;
Wait(100);
If InvCount=PlusOne Then
Writeln('Log Cut');
Until (InvCount=PlusOne) or (TimeFromMark(LogCounter) > 5000) or (InvFull)
End;
End;

Function Dsymbol: Boolean;
Var
X, Y: Integer;
Begin
MarkTime(TooLong);
Repeat
Wait(50+random(100))
Until(FindSymbol(x, y, 'dungeon'))
If (TimeFromMark(Toolong) > 20000) Then
FailSafe('Could not find Symbol');
Begin
Mouse(x, y, 5, 5, true)
Flag;
Result:=True;
End;
End;

Function Tsymbol: Boolean;
Var
X, Y: Integer;
Begin
MarkTime(TooLong);
Repeat
Wait(50+random(100))
Until(FindSymbol(x, y, 'Tree'))
If (TimeFromMark(Toolong) > 20000) Then
FailSafe('Could not find Symbol');
Begin
Mouse(x, y, 5, 5, true)
Flag;
Result:=True;
End;
End;


procedure SetDTM;//DTM Defining procedure.
begin
Q[0] := DTMFromString('mggAAAHicY2NgYKhjZmDoAOJuIC4H4jgovRcotxqIDwLxZSC+CcQ7gbinr4vh89sfDMF+JgymFhoM6fH2YP5/oBw/FsyIA0MAAMvEEpc=');
Q[1] := DTMFromString('mbQAAAHicY2VgYJjOzMDQCsTrgXgGEHcB8Qag+DogXg/ER4H4BBD39HQx+HqbMHz5+Irhy+d3DF8/vWX4DxTnR8OMWDAYAAC+tBLC');


end;

procedure FrDTM;//DTM Freeing procedure.
begin
FreeDTM(Q[0]);
FreeDTM(Q[1]);

end;


begin

Smart_Server := 30;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
SetupSRLStats(439, SRLStats_Username, SRLStats_Password);

DeclarePlayers;
LoginPlayer;
SetDTM; //Set DTM's before code.
MouseSpeed := 18;//This makes it move faster but still undetectable, it makes DTM walking even more human-like.
MakeCompass('n');//We agreed we'd have camera facing North.


If FindDTMRotated(Q[0], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/20, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point A');
FFlag(6);
Repeat
Wait(50 + Random(25));
Until FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/20, aFound);
End;
If FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/20, aFound) Then
Begin
Mouse(x, y, 3, 3, True);
StatsGuise('Walking to point B');
FFlag(6);



End;
FrDTM;
Dsymbol;
Tsymbol;
Repeat
ChopYew;
Until(False)
end.


I know this can't be right so I'm asking for help, but how do I use two DTMs to get to my desired point and then use findsymbol to get to the other point?

I want to walk twice and then use the two symbols to end up next to the tree. How do I do that? Sorry for posting so much.

Nebula

2012-03-08 17:08:50

Well for one, the Radial Walking angle measurements have to be in radians not degrees. If you don't know how to use radians, just know that 360 degrees= 2pi.

You will also probably have to increase the FindSymbol tolerance. I do not know the exact way to do it, but it should be in a Symbol Walking tutorial. If not, check coh3n's Aio Scar Scripting tutorial, I know for a fact it's in there.

if you want to DTM Walk Before symbol walking, just move the DTM walking code to above the symbol walking code, I dont understand your issue with that :/

Element17

2012-03-10 19:49:46

Can you walk with DTMS on the main screen? or is it better to use the mini map?

Nebula

2012-03-10 20:49:16

Use the minimap for dtm walking. I'd imagine walking on the mainscreen would be very inaccurate..

Element17

2012-03-10 21:01:40

See I think that was my problem! I've been making my DTMS on the main screen for walking, I'm going to try tonight and make them on the mini map. Hahah I feel so dumb haha. I will let you know if it works and again I will credit you for helping me so much ha.