|
Iceclaw Apprentice
Joined: 11 Sep 2005 Posts: 124
|
Posted: Fri Dec 30, 2005 9:28 pm
One way Links |
I see that there is no way to create a oneway exit via the command line, is there anyway i can create an exit, with a given reverse exit, and then turn it into a one way exit afterwards ?(Calls to Access? Anything?)
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Dec 30, 2005 10:23 pm |
You can do it with zMapper, or directly on the database through ADO calls, but I wouldn't reccommend the second method. Example of doing it with zMapper:
Code: |
#ALIAS SetOneWay {#NOOP sourceRoom destRoom sourceDir destDir
#VAR ComTemp {%map.GetRoom(%1)}
#IF (%numparam=5) {
#CALL @ComTemp.SetLink(%2,%3,%4,%5,1)
#CALL @ComTemp.SetLink(%2,%3,%4,%5,1)
} {
#CALL @ComTemp.SetLink(%2,%3,%4,"",1)
#CALL @ComTemp.SetLink(%2,%3,%4,"",1)
}
#CALL @ComTemp.Save
#VAR ComTemp {}} |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Iceclaw Apprentice
Joined: 11 Sep 2005 Posts: 124
|
Posted: Fri Dec 30, 2005 11:14 pm |
If it would be possible to see the ADO Com implementation for this I'd appreciate it, but I can understand if thats not possible.
Ok, the purpose for this is to allow my character to generate the current appearance of a random maze.
Basic Premise for a Method is as follows, (I have all the rooms VNUMS, and can see them when entering the room)
#Teleport into the 'entrance room' <Unlink rooms sequentially by vnum?>
Unlink all exits in Maze. <that are random> <Ie: Not the way out from the entrance, and not the one way at the other end of the maze>
Move randomly in an unmoved direction <from entrance room>,
Store the Vnum of the room I arrived in
Delete the room I'm in.
Teleport to the Original Room and %link the room I reached from the direction I traveled, to any of these NE|NW|SE|SW,
Make the Exit one way, #teleport to the new room, repeat.
Suggestions? |
|
|
|
Iceclaw Apprentice
Joined: 11 Sep 2005 Posts: 124
|
Posted: Tue Jan 10, 2006 7:14 am |
cant get your script to work. also, whats the 5th parameter to pass?
Tried such things as
#call %map.getroom(11671).setlink(11670,e,2,"",1)
#call %map.curroom.exitdir(6).setlink(11670,e,2)
<both fail to do anything>
#call %map.setlink(11670,w,4,"",1)
"No method/property name: setlink"
Please help. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Jan 10, 2006 11:09 am |
The 5th parameter is the OtherCom field for the link. I think I tested combining it down like that and found that the intermediate variable was necessary. Also you must use the Save or Update methods, my example shows Save.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Dodgester Wanderer
Joined: 17 Nov 2005 Posts: 65
|
Posted: Sun Jan 15, 2006 2:46 pm |
You can also set it up within the mapper that's displayed within zMUD as I tested it out that way.
A---B
Assuming the above link setting is currently 2 way between rooms A and B, use the following steps:
Click on Room "A"
Click on Properties
Goto the Exit tab (if not already there)
Click on the "One-Way" button
Click on Room "B" within the map
On the left side within the properties dialog box on the exit tab, right click
Click on "New Link" (This creates a new link and selects it)
Click on the proper cardinal direction of the first set of directions (W in this example)
Hoover the mouse over Room "A" to get the Room's ID number that's been assigned to it.
Click on the "#" in the upper right corner of the room properties dialog box on the exit tab.
Type in the number that was revealed as you had the mouse hoovering over Room "A", and press "Enter".
Click on the proper cardinal direction (E in this example).
Click on the "One-Way" button.
There's your 2 different one-way links. You can also set the "Other Com" field for what the command is to go into Room A from Room B while you are in the Room B properties, and vice versa when you are on Room A properties. If you set the Other command though, you must type in the other command for the navigation to set you in the next room. One other problem that I have noticed with the "Other Com" field, if it's set to something like, "enter something", while it's not case sensitive, you must type it in fully else the mapper won't navigate into the next room. I hope this is something that Zugg can modify in the future so as one can type in "enter s", the full name or some portion of the first part of the name, rather than having to type in "enter something" in order for the navigation to take place.
Sincerely,
Dodgester |
|
|
|
|
|
|
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
|
|