Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Nariel
Newbie


Joined: 24 Jan 2006
Posts: 7
Location: USA

PostPosted: Thu Jan 26, 2006 10:16 pm   

Pausing an alias
 
I'm trying to make a script that will attempt to find a certain item in the MUD. All of the examples of scripts like this were done using the built in speedwalk command in zMUD, but I can't use this because it doesn't recognize any of the exits that are not the standard 6: nsewud. So, I ended up making all these as aliases.

The only problem is that I couldn't find a way to pause in the middle of the string my alias sends when my trigger for when I find the item fires. I know I have this trigger correct because I added color to it, and sure enough the color changes.
I tried the #PAUSE command with this, but I assume this only works with zMUD's speedwalk system. I also added a delay where the item is found during the alias, but it would still not pause in the middle of it.

Idealy, I would like to be able to set the trigger to pause in the middle of my alias whenever it fires, and then when I'm done I simply send a resume command to start up again where I left off in the alias.

I could also break up my aliases, since I know in which points of the aliases the item could appear. I also can get an output if it isn't there if I try to "look" at it, but I couldn't find a way to set up a case to send the next consecutive part of my alias and not a blanket input.

If anyone has any suggestions about how to do this or corrections on my experiments (why they wouldn't work, for learning purposes) it would be greatly appreciated.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Jan 26, 2006 11:58 pm   
 
Maybe something here will help you: Help "Shortcuts and Tricks"

Non-standard exits
While you can create non-standard exits (like enter, portal, etc) by manually creating a link and editing it's properties, you can also create one while walking around your MUD creating your map from the MUD command line. Simply prefix the non-standard direction with the MapDir character (defaults to >) and the mapper will create the new room as you move. So, for example, if one of the exits from the room is "enter", simply type ">enter" on the command line and a room will be created and linked with the Other exit called "enter". Normally the mapper will put the new room in a vacant spot near the original room. To force the room to be created a certain cardinal direction from the original room, put the cardinal direction after the other exit separated by another ">" character. So, for example, to create a new room to the east, you would type ">enter>e". This is only needed when you first need to create the room. Once the room is created, simply typing "enter" should follow the existing link to the room.

Special Aliases
There are 3 aliases which are executed automatically while using the mapper. They are onroomcreate, onroomenter, and onwalkend. Details can be found here.

Other alias tricks
Alias may be used with many of the fields in the automapper. Links between rooms have the Other Com field. In the mapper configuration under Strings and Doors aliases can be used to handle special doors. For even more powerful map scripting it is recommened that you try out zMapper.
Reply with quote
Nariel
Newbie


Joined: 24 Jan 2006
Posts: 7
Location: USA

PostPosted: Fri Jan 27, 2006 2:13 am   
 
Thanks for the file, I didn't even know that was there. I searched through all the mapper help files now that I found them, and I now know how to enter a marked exit that's not a default exit, but I'm still stuck on other types of exits, namely the hidden ones. For almost a third of my speedwalks there is a hidden exit where you either have to say something, activate something, press a button, etc, and it won't work, I'm guessing because that synthax just automatically enters "go" before the exit. I have a feeling this has something to do with the Strings and Doors section, but I didn't fully understand that anyway. If you know of a way to solve this I would be most obliged.

PS: I found the New Direction button, but this doesn't work well for me, first because it's only one character assigned to the direction, and I don't have enough characters for even all the "say *" exits I need. Secondly because it doesn't work well at all with a reverse command. On that note, is there a way to make a speedwalk and assign it to the reverse of another speedwalk? Also, is there a way to change the delay interval on slowwalks? I found the abort interval, but not the walk interval. If I could lower this dramatically I could make my slowwalk into what I want, a fastwalk that would recognize triggers in the middle of the walk. Thanks again guys.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Jan 27, 2006 4:59 am   
 
I haven't actively used the mapper in quite some time but I found ideas:
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=6863&highlight=nonstandard+exit
dacheeba wrote:

I'm afraid its note that simple. First thing you want to do is make the link not be a door on your map. That way it wont automatically send the door command. Then in the scripts section of the Room Properties put this in:

#TR {There is no obvious exit down.} {#NODIR;push stone;down}

What this will do is if it read the "There is no obvious exit down", the trigger will stop you from going down on the map, then it will send the push stone command, THEN it will follow you down.

If you have trouble finding the script section for the room, select the 'Room Properties' and be in the first tab(The one that shows the room's name and describtion) and try dragging the bottom portion up. Its usually partially hidden at the bottom.


http://forums.zuggsoft.com/phpbb/viewtopic.php?t=8279&highlight=nonstandard+exit
Vijilante wrote:

The shortest method to handle such exits is to use a room script.

However it is likely that you have so many such exits across your mud that you don't want to waste time taking the shortest route for 1 or 2 exits. I am guessing you should go all out right from the start.

The correct way to do that is to change the door command in the mapper configuration to an alias you create. My alias was DoorCheck so is set the command to "DoorCheck %1".

Then in the room script for such rooms you add variables that declare what has to be done for the exit. An example of mine is "#VAR n {C:pull lever||I}"

The DoorCheck alias is automatically invoked when the exit is set to be a door, and it can look at that variable and determine that the exit is invisible, and it needs to send the command "pull lever" before stepping through.

Another example of something like your "enter trap". #VAR e {S|C:enter trap|I}
That indicates that the exit is invisible, has to be searched for, and then the command "enter trap" has to be substituted for the east direction.

The more complex system is worth the effort, at least until the next public version when you can create exits with special commands built right into them if you have zMapper as well.
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Fri Jan 27, 2006 9:26 am   
 
This may help.

If you have mapped the area, the most reliable method would probably be to edit the exits in the room properties. Doing so would allow you to remap the MUD's non-standard exits back into map coords.

For example, when you type 'n' zMUD would send "say Hey, open the bloody door already!"

Then, the #PATH command should work forward and reverse.

If every exit is non-standard, this may be too much work. Also, if you enjoy typing long commands to move from room to room, this technique will probably ruin your experiencing the unique flavor of the MUD. Laughing
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net