Using the highlightRoom during manual fastwalk
Posted: Tue Aug 11, 2020 1:31 pm
the mud i play on have a delay when moving, meaning that one often queues up several directions while walking from one place to another.
The mud supports gmcp.Room, so i have set it up to move the map whenever it gets a gmcp.Room.
This works good, however, when running around i would like to highlight the room i queuing to, for instance by using highlightRoom
Example, I am looking for:
i hit "w" 5 times, the room 5 west of current room is highlighted, the current position gets updated as i get feedback from the mud, when i enter the target room, the highlight is removed
I can do this easily by running a function on my direction macros (keypad), to where they check if the command i am executing is in the exits table in the "selected" room. If it is, then move the highlighter.
However i would like to do this for every written command (check if it is an exit in the selected room, if it is, move the highlighter, then send(cmd))
I was sortof able to do this, but now we get to the challenge as "send" sends the command to the mud, not to Mudlet, meaning that if the command i wrote was a mudlet alias, or a "lua ..." command, then they will not expand.
I contemplated replacing send() with expandAlias(), but then I fear a loop as i think i would need a way to prevent the alias capturing the command from re-firing on its own expandAlias. (maybe the capture alias can disable itself jsut before the expandAlias, then renable itself?)
i also conteplated building dynamic triggers using the room exits in the selected room as pattern, then deleting these as the highlighter is moved. This might work, but feels clunky.
does anyone have suggestions as to the best way of doing this?
thanks and regards
The mud supports gmcp.Room, so i have set it up to move the map whenever it gets a gmcp.Room.
This works good, however, when running around i would like to highlight the room i queuing to, for instance by using highlightRoom
Example, I am looking for:
i hit "w" 5 times, the room 5 west of current room is highlighted, the current position gets updated as i get feedback from the mud, when i enter the target room, the highlight is removed
I can do this easily by running a function on my direction macros (keypad), to where they check if the command i am executing is in the exits table in the "selected" room. If it is, then move the highlighter.
However i would like to do this for every written command (check if it is an exit in the selected room, if it is, move the highlighter, then send(cmd))
I was sortof able to do this, but now we get to the challenge as "send" sends the command to the mud, not to Mudlet, meaning that if the command i wrote was a mudlet alias, or a "lua ..." command, then they will not expand.
I contemplated replacing send() with expandAlias(), but then I fear a loop as i think i would need a way to prevent the alias capturing the command from re-firing on its own expandAlias. (maybe the capture alias can disable itself jsut before the expandAlias, then renable itself?)
i also conteplated building dynamic triggers using the room exits in the selected room as pattern, then deleting these as the highlighter is moved. This might work, but feels clunky.
does anyone have suggestions as to the best way of doing this?
thanks and regards