How do I stagger the use of npcs between clients?

Unofficial support for the creating and editing of metas.
doog
Posts: 37

How do I stagger the use of npcs between clients?

Post #1 »

I need a toolkit/call of some kind that would help me launch a command to my multi client setup in a staggered fashion.

Here's why: not all NPCs can talk to two characters at once. e.g. getting tasks in the society.

I have a !restock command that will go to my society, run to the vendor, it's relying on Virindi Item Tool to restock comps, mana stones. Love it.

then on that same route I've added to go over to the NPCs for my favorite daily tasks. every time I restock (about daily), I wind up turning in one or two, and refreshing any completed tasks. This also serves as a reminder to do them often.

Now then I also like to recall to GY, run the team o doogs to the NPCs, and get the kill tasks. And of course TouTou tasks, etc.

All these recurring things I do have this in common, I have to tell each client to go do so (I copy/paste a mag tools command).

What I would LIKE to do on my squad leader is type a command (say !delaycmd) that launches a "delay" styled event. but I'd really like to have the delay (say three seconds), available to any number of command/situations. Yes I know I can create a routine on my main that waits for >3 sec, and tells one doog <command>, wait for >6 sec, tell the next doog <command> and so on.

I'm looking for a more graceful way to do this. perhaps an array of fixed characters I build in Default state (char1, char2, etc).

Then issue something like !delaycmd !gytasks -- and have all my guys issued the !gytasks by the leader every three sec, ending with the leader telling himself !gytasks.

Can the be turned into a generic set of statements?

Doog

Dmdtt
Moderator
Posts: 271

Post #2 »

generally how I handle talking to npcs is I setup each npc in a route then trigger off a chat message to move to the next npc and talk to them. the Add portal/npc button will create a never ending route point that will spam the npc every couple seconds trying to talk with them. eventually npc will free up from talking to someone else and say something to that player and load route for next npc or recall.

Almedes
Posts: 15

Post #3 »

I haven't tried this, but...
First you would need to set a variable in default state for doing meta calls, call it sMSCall.
Create a metastate (lets call it WaitTime) where it acts on char name, and if name matches, it runs embedded navroute of say 2 seconds. Next Char is 4 secs, and so on. Add to this state, when navroute is empty return from call sMScall.

Now call this metastate "WaitTime" from the !recomp meta state, (so you can reuse this "WaitTime" State for multiple metastates), and have it return to sMSCall metastate (!recomp).

Good possibility I have something screwed up here, so DM probably has to straighten me out here. Or it just might be poo to begin with.

Dmdtt
Moderator
Posts: 271

Post #4 »

Almedes wrote:I haven't tried this, but...
First you would need to set a variable in default state for doing meta calls, call it sMSCall.
Create a metastate (lets call it WaitTime) where it acts on char name, and if name matches, it runs embedded navroute of say 2 seconds. Next Char is 4 secs, and so on. Add to this state, when navroute is empty return from call sMScall.

Now call this metastate "WaitTime" from the !recomp meta state, (so you can reuse this "WaitTime" State for multiple metastates), and have it return to sMSCall metastate (!recomp).

Good possibility I have something screwed up here, so DM probably has to straighten me out here. Or it just might be poo to begin with.
that in theory would work fine, but you could lessen number of states needed using variables.

Code: Select all

Condtion- getcharstringprop[1]==CharOne
Action- setvar[WaitTime, 2]

Code: Select all

condition- getcharstringprop[1]==CharTwo
Action setvar[WatiTime, 4]
etc etc for all chars then set a stopwatch

Code: Select all

condition- testvar[Stopwatch]==0
Action- setvar[Stopwatch, stopwatchcreate[]];stopwatchstart[getvar[Stopwatch]
and finally a rule to trigger the load route for the npc based on comparing stopwatch time to set variable wait time,

Code: Select all

condition- stopwatchelapsedseconds[getvar[Stopwatch]]>=getvar[WaitTime]
action- Embedded Nav 1pt

bradacc
Posts: 128

Post #5 »

Dmdtt wrote:

Code: Select all

condition- stopwatchelapsedseconds[getvar[Stopwatch]]>=getvar[WaitTime]
action- Embedded Nav 1pt
How often would that condition be checked?

Dmdtt
Moderator
Posts: 271

Post #6 »

bradacc wrote:
Dmdtt wrote:

Code: Select all

condition- stopwatchelapsedseconds[getvar[Stopwatch]]>=getvar[WaitTime]
action- Embedded Nav 1pt
How often would that condition be checked?
if charOne 2 seconds until it loads the route, if charTwo 4s until it loads the route.

User avatar
Immortalbob
Site Admin
Posts: 676
Contact:

Post #7 »

I made this it's own thread. [mention]Doog[/mention] [mention]Dmdtt[/mention] [mention]Bradacc[/mention] [mention]Almedes[/mention]
Immortalbob of MT

doog
Posts: 37

Post #8 »

I might even have a few use cases where the delay is different.

The problematic use cases, however are seldom. For example, when you take your (team) to kill bobo for the first time, is it Kleeoh? who talks for like 30 seconds to flag the char and goes "modal" (won't talk to char "next").

In that case I park the team outside, run one in, talk, run out. watch screen. So that's a one-off.

But *recurring* tasks I like (and DMDTT I do see your line of thinking, just send them all in and when the char "sees" text indicating success, move then to next part of the route), I'm trying to be more lazy here. I have the Toutou tasks in mind in particular. And Snowy Valley. And Hoshino', and maybe even for some instances, "/mt givep <item> to <NPC> -- ESP the Fiun so we don't ever mess up mass handing in of Argitrator's tokens for aug gems? or giving the gladiator statues to the garbage bin.
  • I walk up with my new found team o doogs. Hai look, a set of repeatable tasks.
    I make a simple route. Yes, smarter people than I have probably solved this and posted at IB's (hello good folks), but hey *I* am learning here, *I* wanna automate it, and I wanna make this work.
    So I make a route. it's not smart, it's walk, talk, walk, talk. no fancy "listening" - and it's all route.
    Now I past something like this into a TXT file that's on my desktop: /vt nav load HoshinosNPCs
    and I "visit" all client windows. I take my time SO THAT there is a 2ish second pause in between client, click, enter, CTRL-V "paste" and move to next client window
    And about 90 sec later, all the doogs have run my simple route, and we are off to kill the baddies.
In these cases, a 3ish second delay, and a single !doogsDoTT from my squad leader would:
1. have all doogs see the command
2a. leader might say "hey I said that, special fork/instruction for me"
2b. other (gang o doogs) sees the !doogsDoTT and don't do anything more than stand there.
3a. my leader would go into "clock" mode (needs a better name?)
3b. Somewhere in my control meta there might be a matrix of chars "doog2, doog3, doog4"
3c. leader walks the array/matrix of char names, does /t <charN> issues TASKVAR in a tell (is this possible to /t "CharN" "TASKVAR", I'm not solid here?)
3d. Check for a name="XX" <end of list condition>, else, leader pauses a fixed set of seconds, moves to next name in list
3e. chars are in motion, leader sends self command to do TASKVAR last
4. leader issues !followme

... and we're off to kill the bad guys.]

For tasks that can all take place in parallel (e.g. handing the gladiator status to the trash bin), I just make a !command in my meta. !giveStatueToTrash is a simple read for the command, and a chat command to /givep <item> to <destination> easy I know. It's when the destination is an NPC who won't talk to 2 people at once that I need this. AS I think, it's probably the daily tasks where this clash occurs most frequently? Maybe I really just need to make a hard coded list of names for every task and I'm being lazy here. Leader can do something after >2 sec, after >5 sec, >8, etc.?

Almedes
Posts: 15

Post #9 »

doog wrote:I might even have a few use cases where the delay is different.

The problematic use cases, however are seldom. For example, when you take your (team) to kill bobo for the first time, is it Kleeoh? who talks for like 30 seconds to flag the char and goes "modal" (won't talk to char "next").

In that case I park the team outside, run one in, talk, run out. watch screen. So that's a one-off.

But *recurring* tasks I like (and DMDTT I do see your line of thinking, just send them all in and when the char "sees" text indicating success, move then to next part of the route), I'm trying to be more lazy here. I have the Toutou tasks in mind in particular. And Snowy Valley. And Hoshino', and maybe even for some instances, "/mt givep <item> to <NPC> -- ESP the Fiun so we don't ever mess up mass handing in of Argitrator's tokens for aug gems? or giving the gladiator statues to the garbage bin.
  • I walk up with my new found team o doogs. Hai look, a set of repeatable tasks.
    I make a simple route. Yes, smarter people than I have probably solved this and posted at IB's (hello good folks), but hey *I* am learning here, *I* wanna automate it, and I wanna make this work.
    So I make a route. it's not smart, it's walk, talk, walk, talk. no fancy "listening" - and it's all route.
    Now I past something like this into a TXT file that's on my desktop: /vt nav load HoshinosNPCs
    and I "visit" all client windows. I take my time SO THAT there is a 2ish second pause in between client, click, enter, CTRL-V "paste" and move to next client window
    And about 90 sec later, all the doogs have run my simple route, and we are off to kill the baddies.
In these cases, a 3ish second delay, and a single !doogsDoTT from my squad leader would:
1. have all doogs see the command
2a. leader might say "hey I said that, special fork/instruction for me"
2b. other (gang o doogs) sees the !doogsDoTT and don't do anything more than stand there.
3a. my leader would go into "clock" mode (needs a better name?)
3b. Somewhere in my control meta there might be a matrix of chars "doog2, doog3, doog4"
3c. leader walks the array/matrix of char names, does /t <charN> issues TASKVAR in a tell (is this possible to /t "CharN" "TASKVAR", I'm not solid here?)
3d. Check for a name="XX" <end of list condition>, else, leader pauses a fixed set of seconds, moves to next name in list
3e. chars are in motion, leader sends self command to do TASKVAR last
4. leader issues !followme

... and we're off to kill the bad guys.]

For tasks that can all take place in parallel (e.g. handing the gladiator status to the trash bin), I just make a !command in my meta. !giveStatueToTrash is a simple read for the command, and a chat command to /givep <item> to <destination> easy I know. It's when the destination is an NPC who won't talk to 2 people at once that I need this. AS I think, it's probably the daily tasks where this clash occurs most frequently? Maybe I really just need to make a hard coded list of names for every task and I'm being lazy here. Leader can do something after >2 sec, after >5 sec, >8, etc.?
IBC 3.0 has the Tou-Tou, Hosh, Frozen Valley, Rynthid, Nefty, & Graveyard Tasks built into it. It works great too. I have added a ton to it, but I use Hosh and Rynthid Daily.