SRL Archive - RS3 Utility Scripts

C.W.I [Console Walking Include]


Home

2012-05-28 13:12:31

Console Walking Include



The Console Walking Include was created to help developers use Runescape's Console Command called "getcamerapos"

Console Walking is fast and very accurate, very similar to SPS / Reflection walking.


YoutTube Video

An Example script.


program new;
{$i srl/srl.simba}
{$i CWI/CWI.simba}



var
TPA :TPointArray;


begin
SetupSRL;
ActivateClient;
Wait(1000);
CONSOLE_KEY := 'ยง'; //This is my Console Key

//WriteLn(C_GetPos); Uncomment to get your current Location.
TPA := [Point(3286, 3421),Point(3279, 3423),Point(3269, 3422),Point(3264, 3418),Point(3262, 3412),Point(3257, 3402),Point(3253, 3392)];
If C_WalkPath(TPA) then
WriteLn('Path Walked Succesfully');
end.


All what user must do is, set "CONSOLE_KEY" to your own key (Key that you use to open Runescape Console).
And make sure that Compass is North when Creating a path and walking it (Function will rotate it automatically)

I use GitHub to manage CWI, so everyone can fork it as much as they please, and help developing it.


GitHub https://github.com/HomeSRL/CWI

Direct Download https://github.com/HomeSRL/CWI/zipball/master

Extract to Simba/Includes folder.

Enjoy!



~Home

Runaway

2012-05-28 13:14:55

Awesome! I'll definitely try this out in some scenarios and give some feedback :)

E: I'm happy to see that you included the path management without having to use the console after every point! Have you thought of adding an option to check the position after arriving at the last point to verify the walking worked properly?

Home

2012-05-28 13:22:25

From: Runaway
Awesome! I'll definitely try this out in some scenarios and give some feedback :)

E: I'm happy to see that you included the path management without having to use the console after every point! Have you thought of adding an option to check the position after arriving at the last point to verify the walking worked properly?


It will use console.. But it's fast and smart. Trust me ;)

Well people can create an C_BlindWalk(Path). But I think it's up to scripter.


~Home

Mat

2012-05-28 13:43:22

I like this idea the only thing I'm a bit uhh on is the, Opening Console every time. Bit Bot like, but meh were all botting :P

Runaway

2012-05-28 13:51:40

From: Home
It will use console.. But it's fast and smart. Trust me ;)

Well people can create an C_BlindWalk(Path). But I think it's up to scripter.


~Home


Oh, guess I missed something in the code 0.0

I'll write up a C_BlindWalk() when I get the chance. I'm fine with a generated path rather than a precise path ;)

Home

2012-05-28 15:35:18

Added video in to the fist post how it walks. (I made it walk around Varrock area before going to Bank)


~Home

Wreck

2012-05-28 16:25:29

This may sound silly but, is the spam opening/closing of the console 'detectable'?
Also im about to try walking for the first time do you recommend this or SPS?

kevin33

2012-05-28 16:28:23

Wow this looks so cool. I will be following this for sure. Love to see what you will be able to do with it.

@Runaway… Love the new avatar, it looks sick :)

Abu

2012-05-28 16:37:27

How do I get the points to walk to?

Do I keep calling GetCameraPos while making the path and recording the points - then put them into the path?


EDIT - doesn't compile for me. There are an invlaid number of parameters in the SendKeys function in this function:
function C_OpenConsole :Boolean;
begin
If C_ConsoleOpen then
begin
Result := True;
Exit;
end;
SendKeys(CONSOLE_KEY, RandomRange(10, 50));// <-- This line, should be three values instead of two
Result := WaitFunc(@C_ConsoleOpen, 10, 4000);
end;

honeyhoney

2012-05-28 18:06:18

Don't like the path walking, love the point walking though!

I had 6 or 7 point path which after seeing how it worked, I cut down to 3 points. Unfortunately (unfortunately in my case anyway) it tries to get to the furthest point away even if this means it's still within a building (and ends up looking at the wall of the building).

This was resolved by forcing it to walk to each point individually.

Home

2012-05-29 02:19:37

From: honeyhoney
Don't like the path walking, love the point walking though!

I had 6 or 7 point path which after seeing how it worked, I cut down to 3 points. Unfortunately (unfortunately in my case anyway) it tries to get to the furthest point away even if this means it's still within a building (and ends up looking at the wall of the building).

This was resolved by forcing it to walk to each point individually.


That's how the path walking works :)

And for, the other guy. It should compile, what version of Simba you have?


For getting current position. Call WriteLn(C_CurrentPos);

~Home

Justin

2012-05-29 02:43:30

Very nice Home. Keep up the good work!

spin3x

2012-05-29 02:46:18

Guys, im new to coding these and was wondering the easiest thing to use for walking. Ive coded 2 very simple scripts which have been for 2hours+ :)

But now I would like to code a script which has walking involved. So what would the easiest thing to use be? (This is for an rsps, idk if that makes a difference)

Abu

2012-05-29 02:49:48

From: Home

And for, the other guy. It should compile, what version of Simba you have?


For getting current position. Call WriteLn(C_CurrentPos);

~Home


The 'other guy'? Real nice :cartman:

Erm, I have like the latest of the latest Simba's from here: http://l0.lt/builders/master

CephaXz

2012-05-29 03:28:09

After all of my path walk testing, I guess I don't really like this walking, although it may be very accurate for the point walking.

Home

2012-05-29 03:46:49

From: CephaXz
After all of my path walk testing, I guess I don't really like this walking, although it may be very accurate for the point walking.


Why people don't like the Path Walking. But you like SPS Walking? (It's same)

And sorry abu_jwka :)

Then it should work :S

I have Simba Rev 984 :)


~Home

Recursive

2012-05-29 04:11:18

Any walking method that is smooth and not laggy (Flight's modification of SPS_walkpath), I

will love to try it out. Don't know much of what this whole thing about console

is, but I'm pretty sure someone will make a tut soon :stirthepot:

P1ng

2012-05-29 04:22:47

Looks really cool and functional, will test this out very shortly! :)

One question, is the constant opening and closing of the console detectable? If so, it's not very human-like. Looks effective though.

Brandon

2012-05-29 04:33:43

Instead of having it open the console everytime it walks a point, you can have it dist from the flag. I just tested it, it's very accurate and also you can leave the console open and click right through it :P

Constantly typing getcamerapos is not something I'd like my account doing :c

I was also testing to see if the getcamerapos information relates to the sextant/cluescroll stuff in anyway.. Meh I can't get the math down right lol.

Home

2012-05-29 05:59:41

From: Brandon
Instead of having it open the console everytime it walks a point, you can have it dist from the flag. I just tested it, it's very accurate and also you can leave the console open and click right through it :P

Constantly typing getcamerapos is not something I'd like my account doing :c

I was also testing to see if the getcamerapos information relates to the sextant/cluescroll stuff in anyway.. Meh I can't get the math down right lol.



Can you fork changes in github?
And I would not like to make it click through Console, mainly because You need to create new Flag functions + They somehow fail a little bit.

~Home

honeyhoney

2012-05-29 09:37:54

From: Home
Why people don't like the Path Walking. But you like SPS Walking? (It's same)


It's not. (I'm not a fan of SPS walking to be honest)

From: Home
That's how the path walking works :)


Do you mean path walking works by trying to walk to the furthest away point first? Or it walks each point individually in their given order?

If you mean it walks each point individually then it doesn't.

I'll draw a crude image to demonstrate my problem.


Key
  • Blue: wall of town/city etc.
  • White: wall of building
  • Red overlay: shows which parts of the minimap cannot be seen
  • Yellow: path

Ok, so basically, with console walking, for me it tried to go to the end point first (which just happened to be a few pixels off the edge of the minimap, which forced my character to chill by the town walls.

When broken up into multiple walking points, I was forcing it to walk from Building B to just outside Building B first.

Hope that explains the problem (I'm assuming it's a problem as you're coming across as if it's not suppose to be doing what it is).

(I personally think it gets less accurate with points further away from your position)

Regardless, I've worked around it and I'm thoroughly impressed.

spin3x

2012-05-29 12:02:39

Guys can anyone answer my previous post?

"Guys, im new to coding these and was wondering the easiest thing to use for walking. Ive coded 2 very simple scripts which have been for 2hours+

But now I would like to code a script which has walking involved. So what would the easiest thing to use be? (This is for an rsps, idk if that makes a difference)"

euphemism

2012-05-29 12:37:06

From: honeyhoney
(I personally think it gets less accurate with points further away from your position).


This seems to be an issue not yet addressed. Whether or not Home's walking function in the include introduces randomness to the clicks, Jagex introduces randomness in minimap clicks to deter clicking hard coded coordinates. Because the console position is only checked at the start, only the initial click is truly accurate. The longer a path is, the more inaccurate it will become as you travel along it and Jagex's randomness causes you to drift.

Home

2012-05-29 14:34:35

From: euphemism
This seems to be an issue not yet addressed. Whether or not Home's walking function in the include introduces randomness to the clicks, Jagex introduces randomness in minimap clicks to deter clicking hard coded coordinates. Because the console position is only checked at the start, only the initial click is truly accurate. The longer a path is, the more inaccurate it will become as you travel along it and Jagex's randomness causes you to drift.


Well, it checks it everytime. Plus if the distance is 10PX from Middle of the Minimap it won't click.

When you take the Points. Have Angle High and Compass North.
The Points will change if the Angle is Low or Middle Etc.

~Home

johnty15

2012-05-29 14:49:49

thanks for the include. looks functional and ill test it later. any scripts using this yet?

Home

2012-05-29 15:21:49

From: johnty15
thanks for the include. looks functional and ill test it later. any scripts using this yet?


At the moment. No I don't think so.. Would be great tho :/

~Home

euphemism

2012-05-29 15:26:34

From: Home
Well, it checks it everytime. Plus if the distance is 10PX from Middle of the Minimap it won't click.

When you take the Points. Have Angle High and Compass North.
The Points will change if the Angle is Low or Middle Etc.

~Home


My apologies, I thought I had read in your initial thread about this method that it only checked your position once at the beginning of a path.

E: Though, it may be possible to implement a way to walk by only checking the initial point.

Home

2012-05-29 15:52:12

From: euphemism
My apologies, I thought I had read in your initial thread about this method that it only checked your position once at the beginning of a path.

E: Though, it may be possible to implement a way to walk by only checking the initial point.


Yes it can be done. And Hopefully will be, but everyone is able to fork my GitHub if any ideas ;)


~Home

spin3x

2012-05-29 16:55:28

Why do I get this error


Exception in Script: Unable to find file 'CWI/CWI.simba' used from ''

euphemism

2012-05-29 17:00:16

From: Home
Yes it can be done. And Hopefully will be, but everyone is able to fork my GitHub if any ideas ;)


~Home


I have ideas, but you can't expect me to use GitHub as I have never figured it out. :/

Nebula

2012-05-29 17:31:20

From: spin3x
Why do I get this error


Exception in Script: Unable to find file 'CWI/CWI.simba' used from ''

You have to rename the file. It should look like this in your folder:



Whenever I try to run it, It opens Flag and says "Exception: Range check error at line 36"

[XoL]

2012-05-29 18:28:31

From: spin3x
Guys can anyone answer my previous post?

"Guys, im new to coding these and was wondering the easiest thing to use for walking. Ive coded 2 very simple scripts which have been for 2hours+

But now I would like to code a script which has walking involved. So what would the easiest thing to use be? (This is for an rsps, idk if that makes a difference)"


SPS, but for an rsps since SPS requires maps I would guess that wouldn't work so try perhaps DTM walking
——-

On topic, this looks amazing I just am wondering how detectable that would be :p

Runaway

2012-05-29 19:04:34

From: euphemism
I have ideas, but you can't expect me to use GitHub as I have never figured it out. :/


I'm going to be adding a C_BlindWalk() when I get around to it. It will check your position initially and then adjust/create a walk path to the end point (without opening the console again) using the supplied points.

Last Legend

2012-05-30 20:27:31

Well this is flat out nuts if it becomes widely applied 0_0 Time to integrate and test!

Abu

2012-05-31 03:02:09

Ok I have no idea if I'm including wrong (I don't think I am) but you're trolling me if you're telling me that SendKeys function is fine.

SendKeys(const s: string; keywait, keymodwait: integer);
See above that SendKeys has three parameters. See below that you have only put in two parameters at Line 25:

SendKeys(CONSOLE_KEY, RandomRange(10, 50));

CephaXz

2012-05-31 03:29:57

Smart > SendKeys:
SendKeys(const s: string; keywait, keymodwait: integer);

Keyboard > SendKeys:
SendKeys(const s: string; keywait: integer);

Correct me if I'm wrong.

Home

2012-05-31 09:00:00

    {$IFDEF SIMBAMAJOR980}
SendKeys(Text[i], 1);
{$ELSE}
SendKeys(Text[i], 1, 0);
{$ENDIF}


I will add that into Include. It should fix the issue.


~Home

ssshhhaaa

2012-06-01 14:34:38

I got this to work and can i say this is amazing as a back up walking method if my ODTM fails, even if its abut bot like as a back up its perfect

+rep for this :)

Mat

2012-06-03 15:21:55

Like SPS_BlindWalk For Console:

function C_BlindWalk(P: TPoint): Boolean;
var
Tries: Integer;
M: TPoint;
ltPoints: TPointArray;
begin
repeat
M := C_GetPos;

if (Length(ctrlPoints) = 0) then
ltPoints := TPABetweenPoints(Point(M.X, M.Y), Point(P.X, P.Y), 10 + Random(5),0);
Inc(Tries);
if (Tries > 20) then
Exit;
Result := C_WalkPath(ltPoints);
until(Result);
end;

Returns a True if a Point is on the MM from your Given Point.

Function C_OnMMEx(P,U :TPoint) :Boolean;
Var
TP:TPoint;
begin
TP := C_PointToMM(P,U);
If rs_OnMinimap(TP.X, TP.Y)then
Result := True;
end;

Returns a Turn From your Given Location
Function C_OnMM(P :TPoint) :Boolean;
Var
TP,Me:TPoint;
begin
Me := C_GetPos;
Result := C_OnMMEx(TP,Me);
end;

Mat

Home

2012-06-03 17:22:07

Thanks Mat, I will try to add them into GitHub as soon as I get Home :)

~Home

Mat

2012-06-03 17:31:36

From: Home
Thanks Mat, I will try to add them into GitHub as soon as I get Home :)

~Home

Sweet Dude I have changed a few more things in my version to suit me I'll Post the file soon.
I'm using this in My Abyss Script for the First Enter, Wayyy better than SPS for Reliably.
Thanks
Mat

ssshhhaaa

2012-06-12 02:14:26

Is this updated yet?

Google

2012-06-12 17:11:00

From: ssshhhaaa
Is this updated yet?


What do you mean, with blindwalk? Or just in general?

frijole

2012-06-19 01:19:54

I occasionally get an error that terminates my script while walking a path. The only change I've made should not be causing the error as far as I know.


Error: Exception: "?1" is an invalid integer at line 83

My irrelevant? edit is below.

Line 148: FFlag(Integer(I <> (H - 1)) * 15);


Aside from that. Thank you for the greatest walking method, Home.


EDIT:

It appears to be a problem with "GetTextAtExWrap". I'm trying what DemiseScythe suggested in this thread.


Line 83: Result[I] := StrToInt(ExtractFromStr(TSA[I], Numbers));

Usa

2012-06-19 01:35:47

I believe that they way it would be recorded by anti botting software comparing walking normally on minimap to punching the coordinates in the console would be the same or very similar. My only concern is if the opening of the console would be recorded or not.

This is really great though, nice job. Innovative and flawless.

Home

2012-06-23 19:44:34

I'v been extremely busy lately, with IRL and stuff. If people could just fork into GitHub, I could merge them :) Or just post stuff into this thread.

Thanks all!

~Home

ssshhhaaa

2012-06-27 05:41:17

I was wondering if this could be somehow done without opening the console? If it then that would be really good, can someone confirm if it is at all possbile?

euphemism

2012-06-29 01:38:26

From: ssshhhaaa
I was wondering if this could be somehow done without opening the console? If it then that would be really good, can someone confirm if it is at all possbile?


It wouldn't be much of a 'Console Walking Include' then, now would it? Opening the console is how the include finds the current location of the player. Perhaps you are asking if it is possible to open the console only once, at the beginning of a path?

ssshhhaaa

2012-06-29 02:12:33

From: euphemism
It wouldn't be much of a 'Console Walking Include' then, now would it? Opening the console is how the include finds the current location of the player. Perhaps you are asking if it is possible to open the console only once, at the beginning of a path?


Yes, something like what you said, but how would that work? Would it open the console and only check the starting position or would it try to find all the points at the beginning and then walk?

Home

2012-06-29 02:54:38

From: ssshhhaaa
Yes, something like what you said, but how would that work? Would it open the console and only check the starting position or would it try to find all the points at the beginning and then walk?


This would be possible, but the point is that it would loose it's accuracy..

~Home

ssshhhaaa

2012-07-27 05:41:37

I tried using this again with the new simba 0.99 but it comes up with the error :

[Error] C:\Simba\Includes\CWI/CWI.simba(26:45): Invalid number of parameters at line 25

Line 25: SendKeys(CONSOLE_KEY, RandomRange(10, 50));

Do you know why this is happening?

Caotom

2012-07-27 09:12:04

From: ssshhhaaa
I tried using this again with the new simba 0.99 but it comes up with the error :

[Error] C:\Simba\Includes\CWI/CWI.simba(26:45): Invalid number of parameters at line 25

Line 25: SendKeys(CONSOLE_KEY, RandomRange(10, 50));

Do you know why this is happening?


This was part of the 0.99 update, sendkeys was given a third param. A simply way to fix the error would be to replace the sendkeys line at line 25ish and 141ish with
{$IFDEF SIMBAMAJOR980}
SendKeys(CONSOLE_KEY, RandomRange(10, 50));
{$ELSE}
SendKeys(CONSOLE_KEY, RandomRange(10, 50), RandomRange(10, 50));
{$ENDIF}
and the one at around line 52 with
{$IFDEF SIMBAMAJOR980}
SendKeys('getcamerapos', RandomRange(10, 50));
{$ELSE}
SendKeys('getcamerapos', RandomRange(10, 50), RandomRange(10, 50));
{$ENDIF}

Credits to Demise Scythe with the 'fix' she posted here about the send keys issue http://villavu.com/forum/showthread.php?p=1057122#post1057122

~Caotom