PDA

View Full Version : [Utility] C.W.I [Console Walking Include]



Home
05-28-2012, 05:12 PM
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 (http://www.youtube.com/watch?v=pInIlGiNQxE&feature=youtu.be)

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
05-28-2012, 05:14 PM
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
05-28-2012, 05:22 PM
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
05-28-2012, 05:43 PM
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
05-28-2012, 05:51 PM
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
05-28-2012, 07:35 PM
Added video in to the fist post how it walks. (I made it walk around Varrock area before going to Bank)


~Home

Wreck
05-28-2012, 08:25 PM
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
05-28-2012, 08:28 PM
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
05-28-2012, 08:37 PM
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
05-28-2012, 10:06 PM
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
05-29-2012, 06:19 AM
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
05-29-2012, 06:43 AM
Very nice Home. Keep up the good work!

spin3x
05-29-2012, 06:46 AM
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
05-29-2012, 06:49 AM
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
05-29-2012, 07:28 AM
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
05-29-2012, 07:46 AM
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
05-29-2012, 08:11 AM
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
05-29-2012, 08:22 AM
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
05-29-2012, 08:33 AM
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
05-29-2012, 09:59 AM
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
05-29-2012, 01:37 PM
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)


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.

http://i.imgur.com/YUjKo.png

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
05-29-2012, 04:02 PM
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
05-29-2012, 04:37 PM
(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
05-29-2012, 06:34 PM
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
05-29-2012, 06:49 PM
thanks for the include. looks functional and ill test it later. any scripts using this yet?

Home
05-29-2012, 07:21 PM
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
05-29-2012, 07:26 PM
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
05-29-2012, 07:52 PM
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
05-29-2012, 08:55 PM
Why do I get this error


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

euphemism
05-29-2012, 09:00 PM
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
05-29-2012, 09:31 PM
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:
http://puu.sh/xA3P



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

[XoL]
05-29-2012, 10:28 PM
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
05-29-2012, 11:04 PM
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
05-31-2012, 12:27 AM
Well this is flat out nuts if it becomes widely applied 0_0 Time to integrate and test!

Abu
05-31-2012, 07:02 AM
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
05-31-2012, 07:29 AM
Smart > SendKeys:
SendKeys(const s: string; keywait, keymodwait: integer);

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

Correct me if I'm wrong.

Home
05-31-2012, 01:00 PM
{$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
06-01-2012, 06:34 PM
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
06-03-2012, 07:21 PM
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
06-03-2012, 09:22 PM
Thanks Mat, I will try to add them into GitHub as soon as I get Home :)

~Home

Mat
06-03-2012, 09:31 PM
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
06-12-2012, 06:14 AM
Is this updated yet?

Google
06-12-2012, 09:11 PM
Is this updated yet?

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

frijole
06-19-2012, 05:19 AM
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 (http://villavu.com/forum/showthread.php?t=76919).


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

Usa
06-19-2012, 05:35 AM
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
06-23-2012, 11:44 PM
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
06-27-2012, 09:41 AM
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
06-29-2012, 05:38 AM
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
06-29-2012, 06:12 AM
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
06-29-2012, 06:54 AM
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
07-27-2012, 09:41 AM
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
07-27-2012, 01:12 PM
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