SRL Archive - Help

'Radial walk' Example


rj

2013-01-01 21:18:29

So I went over the thread of Radial walking and it's kind of confusing. So I am going to attempt to post something that looks almost right(no example on the thread.. so I have no idea were to start)

Program Example;
function RadialWalk(2376295: Integer; 2376295, 5395032: Integer; 15: Integer; 4, 4: Integer): Boolean;
Procedure Example;
begin
RadialWalk(2376295,90,180,72,99,99);
end;
Begin
Example;
end.

Does somebody have an example of just like.. clicking 1 spot on the minimap?

Justin

2013-01-01 21:25:22


procedure WalkToBoat_Radial;
begin
if not (LoggedIn) then
Exit;
if not FindNormalRandoms then
begin
if not RunEnergy(25) then
DoRest;
MakeCompass('n');
Writeln('Walking to boat via Radial');
Wait(Random(1000));
begin
RadialWalkTolerance(6451052, 318, 345, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 322, 338, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 315, 333, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 282, 303, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(1795803, 273, 294, 70, -1, 0,15);
Wait(RandomRange(800, 1200));
end;
end;
end;

From my old script.

rj

2013-01-01 21:32:22

From: [J]ustin

procedure WalkToBoat_Radial;
begin
if not (LoggedIn) then
Exit;
if not FindNormalRandoms then
begin
if not RunEnergy(25) then
DoRest;
MakeCompass('n');
Writeln('Walking to boat via Radial');
Wait(Random(1000));
begin
RadialWalkTolerance(6451052, 318, 345, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 322, 338, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 315, 333, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 282, 303, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(1795803, 273, 294, 70, -1, 0,15);
Wait(RandomRange(800, 1200));
end;
end;
end;

From my old script.


{$i srl/srl.simba}
procedure WalkToBoat_Radial;
begin
Writeln('Walking to boat via Radial');
Wait(Random(1000));
begin
RadialWalkTolerance(6451052, 318, 345, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 322, 338, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 315, 333, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 282, 303, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(1795803, 273, 294, 70, -1, 0,15);
Wait(RandomRange(800, 1200));
end;
end;
begin
WalkToBoat_Radial;
end.
Error: Exception: The bitmap[0] does not exist at line 664

And it opens up the globals include

Justin

2013-01-01 21:49:56

Are you calling SetUpSRL; ?

rj

2013-01-01 21:53:08

From: [J]ustin
Are you calling SetUpSRL; ?


oo got it, now it just does not move but thats cuase i need to edit it thanks :D

Can i see were you defined the radial walk?

Justin

2013-01-01 21:58:27

From: rjj95
oo got it, now it just does not move but thats cuase i need to edit it thanks :D

Can i see were you defined the radial walk?


What do you mean 'defined the radial walk'?

rj

2013-01-01 22:00:41

From: [J]ustin
What do you mean 'defined the radial walk'?


I dont get how it walks if it just uses the same color?

Justin

2013-01-01 22:23:29

From: rjj95
I dont get how it walks if it just uses the same color?


It looks for the colour in the selected area on the minimap, if the colour is found it will click it.

E: from mapwalk.simba


(*
RadialWalkTolerance
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function RadialWalkTolerance(Color: Integer; sRadial, eRadial: Variant; r, modX, modY, Tol: Integer): Boolean;

Same as RadialWalk, but with a tolerance.

.. note::

by Coh3n
Last modified: Jan. 08, 2012 by Coh3n

Example:

.. code-block:: pascal

while (RadialWalkTolerance(clRed, 25.5, 60.0, 50, -1, 2, 5)) do
WriteLn('Walking in a ''line''... with tolerance!');

*)

rj

2013-01-01 22:26:48

From: [J]ustin
It looks for the colour in the selected area on the minimap, if the colour is found it will click it.

E: from mapwalk.simba


(*
RadialWalkTolerance
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function RadialWalkTolerance(Color: Integer; sRadial, eRadial: Variant; r, modX, modY, Tol: Integer): Boolean;

Same as RadialWalk, but with a tolerance.

.. note::

by Coh3n
Last modified: Jan. 08, 2012 by Coh3n

Example:

.. code-block:: pascal

while (RadialWalkTolerance(clRed, 25.5, 60.0, 50, -1, 2, 5)) do
WriteLn('Walking in a ''line''... with tolerance!');

*)


So how do i know were on the minimap to make it?

and what is:
72, -1, 0,25);  

Ian

2013-01-01 22:30:43

I'll just leave this here

http://villavu.com/forum/showthread.php?t=70341

rj

2013-01-01 22:33:35

From: BMWxi
I'll just leave this here

http://villavu.com/forum/showthread.php?t=70341


Can't use it because this is for a RSPS :)

Thanks anyway though

Ian

2013-01-01 22:35:21

From: rjj95
Can't use it because this is for a RSPS :)


That's a shame, it really speeds thing up :/

You can still guess, for example say you want to walk north-east, your start radian would be 40 and your end radian would be 50.

Justin

2013-01-01 22:36:26

BMW, I was JUST looking for that hah!

Also give this a read rjj;
http://villavu.com/forum/showthread.php?t=24303&highlight=radial+walk

Ian

2013-01-01 22:38:15

or this one if you like pictures:

http://villavu.com/forum/showthread.php?t=78648 :)

rj

2013-01-01 22:41:56

From: [J]ustin
BMW, I was JUST looking for that hah!

Also give this a read rjj;
http://villavu.com/forum/showthread.php?t=24303&highlight=radial+walk



So I have:

{$i srl/srl.simba}
procedure WalkToBoat_Radial;
begin
Writeln('Walking to boat via Radial');
Wait(Random(1000));
begin
RadialWalkTolerance(2376295, 90, 90, 35, -1, 40,40);
Wait(RandomRange(800, 1200));
end;
end;
begin
SetupSRL;
WalkToBoat_Radial;
end.

And it clicks no were, are there any tools that are not restricted to rs i can use?

Ian

2013-01-01 22:43:55

there is no area between 90 degrees and 90 degrees, try 87 and 93

rj

2013-01-01 22:45:45

From: BMWxi
there is no area between 90 degrees and 90 degrees, try 87 and 93


{$i srl/srl.simba}
procedure WalkToBoat_Radial;
begin
Writeln('Walking to boat via Radial');
Wait(Random(1000));
begin
RadialWalkTolerance(2376295, 1, 93, 65, 5, 5,10);
Wait(RandomRange(800, 1200));
end;
end;
begin
SetupSRL;
WalkToBoat_Radial;
end.

Still does nothing

Justin

2013-01-01 22:46:47

I've just had a look at the RadialWalkTolerance procedure and that uses RadialWalkEx, you might want to include your own since it uses the current RS MMX1 MMY1 MMX2 MMY2

rj

2013-01-01 22:48:32

From: [J]ustin
I've just had a look at the RadialWalkTolerance procedure and that uses RadialWalkEx, you might want to include your own since it uses the current RS MMX1 MMY1 MMX2 MMY2


I think my simba is outdated by a year, and how would i make radialwalk function for my own include?

Justin

2013-01-01 22:55:06

From: rjj95
I think my simba is outdated by a year, and how would i make radialwalk function for my own include?

the SRL include automatically updates unless you have disabled that.
The best way would to find the author of RadialWalk and ask if you can copy-paste and edit the function with credits, if the author is inactive then I guess you can copy-paste with credits

rj

2013-01-01 22:56:46

From: [J]ustin
the SRL include automatically updates unless you have disabled that.
The best way would to find the author of RadialWalk and ask if you can copy-paste and edit the function with credits, if the author is inactive then I guess you can copy-paste with credits


Do you know what file the function is in?

Ian

2013-01-01 22:59:32

Mapwalk I think

rj

2013-01-01 23:03:37

From: BMWxi
Mapwalk I think


1.4k lines of code.. no constants in sight. uhh.. ill just stick to non walking scripts since DTM walking tool only works with RS,Radial walk tool only works with RS rendering it almost useless + having to change include, and SPS walking is centured 100% around rs..

Justin

2013-01-01 23:19:48

From: rjj95
1.4k lines of code.. no constants in sight. uhh.. ill just stick to non walking scripts since DTM walking tool only works with RS,Radial walk tool only works with RS rendering it almost useless + having to change include, and SPS walking is centured 100% around rs..


DTM walking tool? I'm fair sure I would be able to get a DTM walking function working on SS

rj

2013-01-01 23:29:03

From: [J]ustin
DTM walking tool? I'm fair sure I would be able to get a DTM walking function working on SS


Really? Would be really helpful if you could!

Btw do you play SS?

Justin

2013-01-01 23:35:42

From: rjj95
Really? Would be really helpful if you could!

Btw do you play SS?


No I don't. PM me your SS username and the webclient

rj

2013-01-02 00:01:48

By the way is radial walk pretty accurate for the most part?

Justin

2013-01-02 00:13:37

From: rjj95
By the way is radial walk pretty accurate for the most part?


It can be if you chose the correct colour and tolerance

E: Here is a basic DTM walking. Probably wont last long due to my DTMs I made (rushed)


program WalkToLoc;
{$I srl/srl.simba}
var DTM_1, DTM_2, DTM_3 : integer;
begin
MouseSPeed := 18;
DTM_1 := DTMFromString('mwQAAAHic42RgYLjNwsBwC4gPAfFmIF4MxHOBeAkQTwDiZiCeD1QXCcSOQBwCxLlA3AjEy4B4GxB3AXFxdhbDpYtnGJpnnwDTMAwST3VUZqgsKGBgBaojhBmJwHAAACUlGzo=');
DTM_2 := DTMFromString('mlwAAAHicY2dgYFjBxMAwF4i7gLgTiP2BuBaIlwJxClC+BojTgdgOiHuAWByIXYG4ODuLIX/CMjB96eIZhosXToFpEGYFyuPCjHgwFAAAQi8UYw==');
DTM_3 := DTMFromString('mrAAAAHic42BgYJjNxMDQAMTTgDgYiIOAOBOIQ4F4ChBHA9XkArEpEBsAcTEQTwHiSCDuAvGzsxguXTwDp/MnLANjGJ8VqAYfZiSAYQAAw7AVdw==');

ClickDTMRotatedIn(DTM_1, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
Wait(1000); //Server lag
while (IsMoving) do
wait(800);
ClickDTMRotatedIn(DTM_2, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
Wait(1000); //Server lag
while (IsMoving) do
wait(800);
ClickDTMRotatedIn(DTM_3, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
Wait(1000); //Server lag
while (IsMoving) do
wait(800);
FreeDTM(0);
FreeDTM(1);
FreeDTM(2);
end.

Pew

2013-01-03 10:57:31

From: rjj95
1.4k lines of code.. no constants in sight. uhh.. ill just stick to non walking scripts since DTM walking tool only works with RS,Radial walk tool only works with RS rendering it almost useless + having to change include, and SPS walking is centured 100% around rs..


I feel your pain.