Chained Navigation

Unofficial support for the creating and editing of metas.
yaroz
Moderator
Posts: 129

Chained Navigation

Post #1 »

Yesterday, I decided to take a look at doing a chained navigation, to get my group of guys to the tent in the Hoshino area, rather than doing a !stonehold, then !beach, then !tent each time I wanted to head there. Doing the initial chain was easy.. but I wanted to build a little bit of logic into it. I started setting everything up in it's own state, and had an issue that if my guys weren't in one of the determined landcells it wouldn't work.. After talking in /vcg Hells mentioned setting a variable for it, and I thought that that would allow me to run the navs in the default state, where the meta could listen for other commands and not locked into the one route (even though I have VCS listening for /f !reset and it does a /loadfile reset that gets me back to the default state).. anyhow.. here's the gist of what I came up with..

Code: Select all

Chat: "\[Fellowship\] (|).* (say|says), \"!hoshtent\"$ -- ExprAct setvar[navHosh,1]  <-- identifies that we're running to the tent
All: {Landcell == 49E4002B, Expr getvar[navHosh]>=1} -- ExprAct clearnav[navHosh]  <-- at the tent
All: {Landcell == 49E60004, Expr getvar[navHosh]>=1} -- All: { LoadNav, setvar[navHosh,2]} <-- running from Desolation Beach to tent
All: {Landcell == 64D5000B, Expr getvar[navHosh]>=1} -- All: { LoadNav, setvar[navHosh,2]} <-- running from Stonehold drop to Desolation Beach portal
All: {Landcell == 00070145, Expr getvar[navHosh]>=1} -- All: { LoadNav, setvar[navHosh,2]} <-- running from TownHall drop to Stonehold
All: {Landcell == F6820033, Expr getvar[navHosh]>=1} -- All: { LoadNav, setvar[navHosh,2]} <-- running from Aphus drop to TownHall

Now.. this is where I had issues... but this works..
All: {
      Expr getvar[navHosh]==1 <-- Not currently running anywhere
      Not Any: 
                {
                 Landcell == 49E4002B
                 Landcell == 49E60004
                 Landcell == 64D5000B
                 Landcell == 00070145
                 Landcell == F6820033
                }
      } -- Load AphusRecall Nav

So.. now I have 7 checks in my default state, that will run my guys to the Hoshino Tent. Basically what I ended up coming up with was setting a variable (navHosh), and having two states for it, 1=start, 2=running. I had to add the 2 in there, because for example, when I was running from the stonehold drop, it would kick off the aphus recall as soon as I exited the landcell I was in.

Also, I tried to use the getplayerlandcell[] != (49E4002B|49E60004|64D5000B|00070145|F6820033) , but that did not work because that's not how that function reports landcells.. that would be much simpler than doing the Not and listing all of the Landcells.

If anyone has any better ideas, I'm all ears.

Dmdtt
Moderator
Posts: 271

Post #2 »

id suggest placing portal recall as first point of the aphus recall nav, incase you just came from desolation beach and are running this command again for w/e reason.

aside from that, if you don't want to use variables at all or even the not any landcell portion you can load the aphus route as an always and place it above the rest of your routes, if you are in any of the landcell points it will override the aphus route and begin running rather than cast the recall. Also if you are placing these in the default state you def want to clearvar[navHosh] once you get to the tent.

in my metas for functions like this I never place routes in my default state, I use a chat message to set meta state to a routing state that will cycle portal recall then aphus and from that point on react off landcell to landcell until it reaches its destination for that state at which point it returns to default. basically the same concept as yours.

yaroz
Moderator
Posts: 129

Post #3 »

How do you handle the portal recall if they're already at the drop off point? Won't it keep casting portal recall? I know that for my portal recall state, I have it casting gkrecall first, then portal recall.

Dmdtt
Moderator
Posts: 271

Post #4 »

yaroz wrote:How do you handle the portal recall if they're already at the drop off point? Won't it keep casting portal recall? I know that for my portal recall state, I have it casting gkrecall first, then portal recall.
the only time I ever have this problem is when I am at the keys and issuing the command and when I am sending commands I always check to make sure that is not the case, never is an issue for me.

and if the drop off point that is one of my listed landcells it never even tries to recall in the first place it goes straight to running the nav route.