SRL Archive - MSI Suggestions

Walking...


nickrules

2010-08-24 19:29:54

… from one location to another, farther away one. I dont think MSI does this, but I haven't checked. which means this could be a really pointless thread.

Anyway, we obviously wouldn't make a path from somewhere like draynor to varrock - that would be too far, and have little use. We probably would however make a path from draynor to lumb., and then from there to varrock, for one reason or another.

So what if, the player could be in any supported location, and then through some figuring and such, it could walk from point a, to point b, then, walk from b, to the destination; c.

At this point in time, we dont have too many paths(?), so this would be a bit unreasonable, but, with the pathmaker and such, we could at least make reflection paths without too much trouble.

Realistic situation:
  • Im in the mining guild
  • I want to be in draynor village
  • It calculates that the fastest rout is: guild > bank > PS > draynor
  • Then it walks to each location in order, and ta-da, the bot is in draynor, and it begins to run the players script.
Idk, Its just a thought….

Timer

2010-08-24 20:18:22

I would just like to say something. This is easily done and I have done it via reflection, walk anywhere to anywhere. Build a web and learn about how to generate paths off the fly.

Coh3n

2010-08-25 00:47:44

From: Timer
I would just like to say something. This is easily done and I have done it via reflection, walk anywhere to anywhere. Build a web and learn about how to generate paths off the fly.

You make it sound easy. :p There are a lot of things you'd have to consider such as areas you can't walk, etc.

Nick, this is what we would eventually like MSI to do. There have been several attempts at making systems like this with both color and reflection. I don't know if any have been 100% completed, but it's something that needs to be done eventually for MSI if we want multiple script support. It would make things 100x easier.

I don't have time to find the threads right now, but I'm sure if you searched a little you'll find them. ;)

Timer

2010-08-25 14:52:14

From: Coh3n
You make it sound easy. :p There are a lot of things you'd have to consider such as areas you can't walk, etc.

Nick, this is what we would eventually like MSI to do. There have been several attempts at making systems like this with both color and reflection. I don't know if any have been 100% completed, but it's something that needs to be done eventually for MSI if we want multiple script support. It would make things 100x easier.

I don't have time to find the threads right now, but I'm sure if you searched a little you'll find them. ;)


It is simply achievable with a nice build web function and custom types. Like I said, I did it. Pretty easy. :p

3Garrett3

2010-08-25 15:04:57

From: Timer
It is simply achievable with a nice build web function and custom types. Like I said, I did it. Pretty easy. :p


But we'd rather do it with colour, reflection is still relatively unstable.

Timer

2010-08-25 15:07:13

Not really. Talk on MSN pl0x.

3Garrett3

2010-08-25 15:08:05

In the updatealwayshappensreallysoon kinda way, in case anyone else was confused.

E: And the *able to find fishing spots* kinda way, in case I've never told anyone more than 15 times how it still can't figure out how to find a fishing spot.

Timer

2010-08-25 15:09:10

From: 3Garrett3
In the updatealwayshappensreallysoon kinda way, in case anyone else was confused.

E: And the *able to find fishing spots* kinda way, in case I've never told anyone more than 15 times how it still can't figure out how to find a fishing spot.


It can be updated in like 5 seconds.

3Garrett3

2010-08-25 15:14:27

From: Timer
It can be updated in like 5 seconds.


Then do it? ;)

Timer

2010-08-25 15:44:01

I do..?

3Garrett3

2010-08-25 15:45:54

From: Timer
I do..?


And yet my reflection isn't fixed

Frement

2010-08-25 15:49:23

To lumbridge you could always use the Home teleport?

Timer

2010-08-25 16:22:10

From: 3Garrett3
And yet my reflection isn't fixed


I dont have permissions to reflection SVN? They kicked me out last time I checked.
EDIT: Why would I wanna contribute to SRL anyway.

Naum

2010-08-25 16:53:28

From: Timer

EDIT: Why would I wanna contribute to SRL anyway.


Because you love the helpful community?
(Worth a shot, I know)

NCDS

2010-08-25 17:04:02

From: Timer

EDIT: Why would I wanna contribute to SRL anyway.


The same reason why you continue to post here…

Timer

2010-08-25 17:22:02

From: NCDS
The same reason why you continue to post here…


I post here because its funny.

nickrules

2010-08-25 21:25:47

From: Frement
To lumbridge you could always use the Home teleport?


Hmmm, thats a good idea, other than the fact that it can be really unreasonable.


@Timers first post:

Doesn't your walking-thing go in a straight line though? also, this method would work with the current paths. Might be easier, not sure. I've never done either

@Cohen Oops :redface: meh, whatever.

From: Timer
EDIT: Why would I wanna contribute to SRL anyway.
Best be trollin'

Timer

2010-08-25 22:24:34

From: nickrules
Doesn't your walking-thing go in a straight line though? also, this method would work with the current paths. Might be easier, not sure. I've never done either


No, it generates a fully walkable path that goes underground, around objects, and/or use objects. (I.E: Karajam boat)

Coh3n

2010-08-26 00:29:24

From: 3Garrett3
But we'd rather do it with colour, reflection is still relatively unstable.

Reflection is more likely to be achievable for what nick suggested. There could be one reflection point for each location, then have the script calculate a walkable path from the player's position to that location. Would be an awesome system. You've gotten me interested now. :)

CX gamer

2010-08-26 05:16:39

From: nickrules
Hmmm, thats a good idea, other than the fact that it can be really unreasonable.

I wouldn't say that home teleport is that unreasonable.
When you fail a random, it teleports you randomly to a certain spot (ice mountain, falador north wall, …). When you can home teleport and walk back to the spot you're training in, a script could litirally go on forever. :D

nickrules

2010-08-26 06:31:59

From: CX gamer
I wouldn't say that home teleport is that unreasonable.
When you fail a random, it teleports you randomly to a certain spot (ice mountain, falador north wall, …). When you can home teleport and walk back to the spot you're training in, a script could litirally go on forever. :D


I suppose, that would be good, but what about if they're just switching scripts? for example, if you want to go to falador bank, and you're at somewhere like…. the air alter entrance, why would you walk allll the way back.

Also, a ton of new paths would be needed, for lumbridge to location X.

From: Coh3n
Reflection is more likely to be achievable for what nick suggested. There could be one reflection point for each location, then have the script calculate a walkable path from the player's position to that location. Would be an awesome system. You've gotten me interested now. :)

We could use either, once the paths are created. All it would have to do, is generate the path, and then call the walkpath function

oup! gotta go!

CX gamer

2010-08-26 06:51:06

Well you could also create paths to the main f2p cities from lumby, and let the script handle the more specific paths.

3Garrett3

2010-08-26 14:05:14

Well, technically, if I got WalkTPA working perfectly, this would be very easy.

So far it looks like this:

General crap added at the top of the script:


const
Split_TPAtoATPA = 1;
Split_TPAtoATPAEx = 2;
Split_SplitTPA = 3;
Split_SplitTPAEx = 4;

const
Sort_ATPAFrom = 1;
Sort_LargeFirst = 2;
Sort_SmallFirst = 3;

Then the actual type:


tWalkInfo = record
Color, Tolerance :Integer;
XMod, YMod :Integer;
FlagDist :Integer;
SplitMethod, SortMethod :Integer;
CTS2 :Boolean;
HueMod, SatMod :Extended;
Filter :Boolean;
StartRadial, EndRadial :Integer;
MinRadius, MaxRadius :Integer;
SortPoint :TPoint;
SplitDistance :TIntegerArray;
end;

And the function itself:

{*******************************************************************************
function WalkTPA(...) : Boolean;
by: 3Garrett3
Description: Uses TPA methods to walk to a point based on various info.
*******************************************************************************}
Function WalkTPA(WalkInfo : tWalkInfo) : Boolean;
Var
TPA: TPointArray;
TDPA: T2DPointArray;
I, H, X, Y, CTS: Integer;
Begin
If Not LoggedIn Then Exit;

cts := GetColorToleranceSpeed;
if WalkInfo.CTS2 then
begin
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(WalkInfo.HueMod, WalkInfo.SatMod);
end else
ColorToleranceSpeed(1);

FindColorsTolerance(TPA, WalkInfo.Color, MMX1, MMY1, MMX2, MMY2, WalkInfo.Tolerance);

If Length(TPA) = 0 Then
begin
Writeln('Didn''t find the colour, quitting walktpa');
Exit;
end;
Writeln('Found colour, length of array = ' + IntToStr(Length(TPA)));

if WalkInfo.Filter then
FilterPointsPie(TPA, WalkInfo.StartRadial, WalkInfo.EndRadial, WalkInfo.MinRadius, WalkInfo.MaxRadius, MMCx, MMCy);

Case WalkInfo.SplitMethod of
Split_TPAtoATPA:
TDPA := TPAToATPA(TPA, WalkInfo.SplitDistance[0]);
Split_TPAtoATPAEx:
TDPA := TPAToATPAEx(TPA, WalkInfo.SplitDistance[0], WalkInfo.SplitDistance[1]);
Split_SplitTPA:
TDPA := SplitTPA(TPA, WalkInfo.SplitDistance[0]);
Split_SplitTPAEx:
TDPA := SplitTPAEx(TPA, WalkInfo.SplitDistance[0], WalkInfo.SplitDistance[1]);
end;

Case WalkInfo.SortMethod of
Sort_ATPAFrom:
SortATPAFromFirstPoint(TDPA, WalkInfo.SortPoint);
Sort_LargeFirst:
SortATPASize(TDPA, True);
Sort_SmallFirst:
SortATPASize(TDPA, False);
end;

Wait(10);
try
DebugATPABounds(TDPA);
except end;
H := High(TDPA);
For i := 0 To H Do
Begin
MiddleTPAEx(TDPA[i], x, y);
If rs_OnMinimap(x,y) Then
Begin
Mouse(x + WalkInfo.XMod , y + WalkInfo.YMod, 2, 2, True);
Wait(RandomRange(200,300));
FFlag(WalkInfo.FlagDist);
Result := True;
Wait(200 + Random(80));
Exit;
End;
End;

Result := False;
End;

It all kinda looks bad and such, but here is how you use it (I got the idea from MSI ;))

Function LoadTPAData(WalkStep : Integer) : tWalkInfo;
begin

Case WalkStep of
0: // First Step to Stiles
with Result do
begin
Color := AutoColorTree;
Tolerance := 1;
XMod := 0;
YMod := 5;
FlagDist := 0;
SplitMethod := Split_TPAtoATPA;
SortMethod := Sort_ATPAFrom;
CTS2 := False;
Filter := True;
StartRadial := 200;
EndRadial := 340;
MinRadius := 30;
MaxRadius := 70;
SortPoint := Point(MMX1, MMCy);
SplitDistance := [20];
end;

1: // Second Step to Stiles
with Result do
begin
Color := AutoColorTree;
Tolerance := 1;
XMod := 0;
YMod := 0;
FlagDist := 0;
SplitMethod := Split_TPAtoATPA;
SortMethod := Sort_ATPAFrom;
SortPoint := Point(MMX1 + 38, MMCy + 38);
CTS2 := False;
Filter := False;
SplitDistance := [25];
end;

2: // Third Step to Stiles
with Result do
begin
Color := 9865091;
Tolerance := 6;
XMod := -25;
YMod := 5;
FlagDist := 0;
SplitMethod := Split_TPAtoATPAEx;
SortMethod := Sort_ATPAFrom;
CTS2 := True;
HueMod := 0.26;
SatMod := 0.52;
Filter := True;
StartRadial := 150;
EndRadial := 270;
MinRadius := 20;
MaxRadius := 70;
SortPoint := Point(MMX1 + 38, MMCy + 38);
SplitDistance := [35,30];
end;

3: // Fourth Step to Stiles
with Result do
begin
Color := 1265453;
Tolerance := 6;
XMod := 0;
YMod := 0;
FlagDist := 0;
SplitMethod := Split_TPAtoATPA;
SortMethod := Sort_ATPAFrom;
CTS2 := True;
HueMod := 0.61;
SatMod := 1.61;
Filter := True;
StartRadial := 180;
EndRadial := 270;
MinRadius := 40;
MaxRadius := 70;
SortPoint := Point(MMX1, MMY2);
SplitDistance := [10];
end;

4,5: // Fifth, Sixth Step to Stiles
with Result do
begin
Color := AutoColorTree;
Tolerance := 1;
XMod := 5;
YMod := 0;
FlagDist := 0;
SplitMethod := Split_SplitTPA;
SortMethod := Sort_ATPAFrom;
CTS2 := False;
Filter := True;
StartRadial := 180;
EndRadial := 360;
MinRadius := 40;
MaxRadius := 70;
SortPoint := Point(MMX1, MMCy);
SplitDistance := [5];
end;

6: // Last Step to Stiles
with Result do
begin
Color := 1265453;
Tolerance := 6;
XMod := 0;
YMod := 3;
FlagDist := 0;
SplitMethod := Split_TPAtoATPAEx;
SortMethod := Sort_ATPAFrom;
CTS2 := True;
HueMod := 0.61;
SatMod := 1.61;
Filter := True;
StartRadial := 150;
EndRadial := 270;
MinRadius := 20;
MaxRadius := 70;
SortPoint := Point(MMCx, MMY2);
SplitDistance := [10,10];
end;

End;

end;

Function WalkToStiles : Boolean;
var
i : Integer;
begin
for I := 0 to 6 do
begin
Result := WalkTPA(LoadTPAData(i));
if not Result then break;
end;
end;

It's not the best ever, but it really does work well. I've got almost flawless colour walking to Stiles (my KARAMJA script), and it only took about 30 minutes to get all the data and test it. It would take forever to get it all another way.

nickrules

2010-08-27 06:52:54

What exactly does this do? :redface:
Is it just an uncommited walking method?

Coh3n

2010-08-27 16:26:18

Garrett, I'm glad that's been working well. You should try it out with some MSI paths (VE Trees to start, since it's already made). If your system works better I see no reason why we shouldn't use it (we'd still have to vote of course).

As for the rest of the thread. A system like this wouldn't require to use home teleport. It would calculate the path from the player's position to the destination. We wouldn't have to gather any paths, it would all be done automatically. @Timer, is that what your system does?

E: I think I can safely say that this thread's discussion has been moved here.

3Garrett3

2010-08-28 10:02:21

From: nickrules
What exactly does this do? :redface:
Is it just an uncommited walking method?


If you're referring to my method that I posted, it's something that I've been working on for a week or so now, to make the ultimate generic TPA walking

From: Coh3n
Garrett, I'm glad that's been working well. You should try it out with some MSI paths (VE Trees to start, since it's already made). If your system works better I see no reason why we shouldn't use it (we'd still have to vote of course).

As for the rest of the thread. A system like this wouldn't require to use home teleport. It would calculate the path from the player's position to the destination. We wouldn't have to gather any paths, it would all be done automatically. @Timer, is that what your system does?


I'll get on that this weekend, assuming I'll have time.

You wont be getting any answers from Timer btw. He wouldn't have helped you anyway, unless we switched all of MSI to SCAR.

CX gamer

2010-08-28 17:23:44

From: Coh3n
As for the rest of the thread. A system like this wouldn't require to use home teleport. It would calculate the path from the player's position to the destination. We wouldn't have to gather any paths, it would all be done automatically.

Is that even realistic? You would have to detect the obstacles. Would be a checkpoint system be more suited, giving rough directions where to go, around obstacles (like lumby to fally would be 'north of lumb castle, crossing of dranyor roads, crossing south of fally, crossing of fally east, fally center'). Each checkpoint could ofcourse be recycled for other uses.

Coh3n

2010-08-28 18:17:18

From: CX gamer
Is that even realistic? You would have to detect the obstacles. Would be a checkpoint system be more suited, giving rough directions where to go, around obstacles (like lumby to fally would be 'north of lumb castle, crossing of dranyor roads, crossing south of fally, crossing of fally east, fally center'). Each checkpoint could ofcourse be recycled for other uses.

Those are the thinks to consider that I mentioned earlier in the thread. Timer claims to have written a system that bypasses all of this, but by the looks of it he doesn't want to share.

I like the idea people had about doing a home teleport, then walking from there to the proper location. It's a good idea, but a lot of paths would have to be gathered, which wouldn't be too hard, just it's a lot of information.

nickrules

2010-08-29 00:26:06

From: CX gamer
Is that even realistic? You would have to detect the obstacles. Would be a checkpoint system be more suited, giving rough directions where to go, around obstacles (like lumby to fally would be 'north of lumb castle, crossing of dranyor roads, crossing south of fally, crossing of fally east, fally center'). Each checkpoint could ofcourse be recycled for other uses.


I don't think you understand - MSI Has paths, and locations that are supported by MSI. So, if you set declare players location to VEB and you wanted to be in FEB. there is no path to this location, however, there maybe be a path to lumbridge, from lumby to draynor, from draynor to port sarim, and from there to fally.
So the script would figure out the series of paths, and then walk them
Example using above locations
Start at VEB
Walk from VEB to lumbridge
Walk from lumbridge to draynor village
Walk from draynor village to Port sarim
Walk from port sarim to FEB.
At destination: FEB


Therefore, with this system, you can't use LOC_POWER_SKILL, but with all other locations, it would still work.

Unless you're talking about timers system, which is also possible - RSBot did it. They made a huge web of the entire world map, connecting walkable points, but not unwalkable points (eg, a point which is across a river or fence). I imagine one such system would be a ton of work.

Sir R. M8gic1an

2010-08-29 03:05:41

From: nickrules

Unless you're talking about timers system, which is also possible - RSBot did it. They made a huge web of the entire world map, connecting walkable points, but not unwalkable points (eg, a point which is across a river or fence). I imagine one such system would be a ton of work.


Not so much work I'd say. More a question of thinking it through properly first.

Say that a point can only connect to a point that is one step away.

type
WPoint = record
TP: TPoint;
Next: TPointArray;

Use some math to check which point is the next one that goes most in your direction. For more accurate walking, if two points give you similar results you can then check them as well.

Make a WPoint at each crossroad. You might not get all the shortcuts, but you'll definitely get the whole world easily enough.

And then consider this is MSI. Just make the points where we have the scripts . :)

e: you can also make a point close to the unwalkables, that just connects two points, so the character will avoid an obstacle

~RM

nickrules

2010-08-29 22:19:05

So, how would this system be done? What I've come up with is only the theory - I haven't the slightest idea how to make it happen :redface:.

Would anyone like to volunteer to do this? Or perhaps someone can point me in the right direction, and I can give it a go.

Coh3n

2010-08-30 14:55:45

From: nickrules
So, how would this system be done? What I've come up with is only the theory - I haven't the slightest idea how to make it happen :redface:.

Would anyone like to volunteer to do this? Or perhaps someone can point me in the right direction, and I can give it a go.

Although this would be cool, I don't think it's something that needs to be done now. You can, of course still work on it if you wish. You've been doing well on Magic.simba, why not finish that up? ;)

nickrules

2010-08-31 21:36:49

From: Coh3n
Although this would be cool, I don't think it's something that needs to be done now. You can, of course still work on it if you wish. You've been doing well on Magic.simba, why not finish that up? ;)


I see what you did thar :P

Been working on a personal project lately - Vial filler and banker. Finally got it to do what I want it to do, now I just need to add antiban/random, and a loop….
And the fact that I absolutely hate making TItems, is why I have yet to do anything on that.

Coh3n

2010-09-01 00:59:56

From: nickrules
I see what you did thar :P

Been working on a personal project lately - Vial filler and banker. Finally got it to do what I want it to do, now I just need to add antiban/random, and a loop….
And the fact that I absolutely hate making TItems, is why I have yet to do anything on that.

No problem at all. Go ahead and finish your script. And yeah, making TItems is boring, so I don't really blame you. :p