|
hpoonis2010 Adept
Joined: 18 Jun 2019 Posts: 279
|
Posted: Fri Aug 13, 2021 10:18 am
Command input trigger |
I am trying to think of a way to get #WALK to cater for a path which has a non-standard door with a random exit.
One 'continent' in aardwolf is within another continent; access through the named door (hole); exit leads to a random room within the sub-continent.
Destination would be one of the sub-zones of the sub-continent.
Regular speedwalks fail as the walk path is fixed at the start, so when we hit the random entry point, the walk continues with the remaining directions which are guaranteed to be incorrect.
I thought of aliasing the destinations so the walk would be (eg)
start -> enter hole (intermediate destination) -> sub-continent-random-room -> sub-zone-start-room
Then I thought, "why not intercept the input"! Alas, #oninput doesn't cater for cMUD commands (anything starting with '#').
%pathexpand would probably give me something like
dirs to hole;enter hole;dirs to dest
which I could strip the trailing dirs to replace with a fresh #WALK from the entry point...
...but then I'd have to be intercepting the #WALK command at source, which #oninput fails to do. |
|
|
|
chaossdragon Apprentice
Joined: 09 Apr 2008 Posts: 168
|
Posted: Fri Aug 13, 2021 11:19 am |
Is there a fixed number of destination points after 'enter hole' ? Could you find your unique identifier for each destination and create a #switch to continue to your desired end point?
Know I'm not really helping, just tossing out what comes to mind if I was to encounter this situation.
edit : I never could get the mapper to work well in the hand full of muds I have played over the years, so never used it... graph paper and memory was enough for me. |
|
Last edited by chaossdragon on Fri Aug 13, 2021 4:09 pm; edited 1 time in total |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4701 Location: Pensacola, FL, USA
|
Posted: Fri Aug 13, 2021 3:06 pm |
Ideally you would want it to be a multi step process.
First, you walk to and enter the hole.
#ALIAS holey {#WALK hole}
Second, Issue a #FIND command and make sure you can self-center on arrival.
#EVENT onWalkEnd {#IF (%roomnum= hole room's num) {enter hole;#WAIT 500;#FIND;#WAIT 1000;finalDestination}}
Third, continue on to your final destination.
#ALIAS finalDestination {#WALK toWhereYouGoFromThere} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
hpoonis2010 Adept
Joined: 18 Jun 2019 Posts: 279
|
Posted: Sun Aug 15, 2021 8:31 am |
"Fixed number of rooms": yes. Fixed to all of the rooms in that zone >150
There is no problem really with locating. The mapper has the flag for mud-delivered numbers so I am always 'found'. Also, the zone (through the hole), being a 'continent' in itself also has a gmcp-delivered flag denoting a continent instead of a room.
I was hoping that I'd not have to double-up walking aliases for rooms in this sub-zone. It is disappointing that #oninput doesn't have the ability to capture client commands in some way.
Not sure about #FIND
"In the second command format (without parameters), it finds the current location on the map. Issues the MUD Look command and compares the current MUD room description with the map database and sets the map location to the matching room."
I have NEVER been able to get descriptions for this mud into the mapper so I never bother with anything regarding descriptions.
I am thinking that %destroom is going to be of more help than drumming up aliases for aliases.
Something like
#IF %destroom=somewhere through the sub-continent, purge the current #WALK, and then walk hole;enter hole;walk destination
But, again, there are problems with simplicity here. There is no OnWalkStart event, and I think I'd then have to be checking EVERY speedwalk not just those passing through the problem zone. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4701 Location: Pensacola, FL, USA
|
Posted: Sun Aug 15, 2021 12:00 pm |
The reason it has to be a two #WALK process is due to pathing.
It calculates the route when you enter the command.
But it is impossible to know where you are going to end up in the random teleportation in advance.
If you have a better way to update your #LOCATION position, do that instead of the #FIND.
P.S. One #IF check at the end of each speedwalk is a fairly small overhead. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
chaossdragon Apprentice
Joined: 09 Apr 2008 Posts: 168
|
Posted: Sun Aug 15, 2021 10:24 pm |
That's a lot of 'fixed' rooms... thanks for indulging my ignorance.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4701 Location: Pensacola, FL, USA
|
Posted: Mon Aug 16, 2021 11:21 pm |
If you really want what amounts to an onWalkStart event, use an alias to issue the #WALK command, along with whichever other commands you need to process.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|