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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Thu Jul 24, 2008 11:50 pm   

Mapper questions
 
Does the onroomcreate alias work with cmud?

It does not appear to be working for me.

Does this require zmapper or cmud pro?

I have zmapper but for some reason it is not loading as a plugin and when i go to the plugin menu and try to load the zmapper.exe as a plugin, it says it is not a valid plugin.
_________________
Talahaski


dartmud.com 2525
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Jul 25, 2008 12:00 am   
 
The old zMud special aliases are now handled by Events. There are also a few more things that can be detected in CMud.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 12:02 am   
 
figured out i needed to change the onroomcreate to an event instead of a alias.

Now I get an error that zmapper is not loaded. I'm not sure how to fix this, it is not letter me load zmapper as a valid plugin. Has anybody else has this problem?

onroomcreate event:

#IF (@MoveExtraDir) {
Room=%map.CurRoom
#IF (@MoveExtraDir="d") {#ADD Room.Z 1} {#ADD Room.Z -1}
#CALL @Room.Update
}
MoveExtraDir=""
_________________
Talahaski


dartmud.com 2525
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 12:04 am   
 
basically all I'm trying to do is change the location of the room up or down based on a variable I set when the mud send me a message that I am going downhill or uphill
_________________
Talahaski


dartmud.com 2525
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 12:10 am   
 
I can open zmapper separately, it runs and opens my map database just fine.

Could it be related to vista and having zmapper installed to the c:\program\zmapper dir?
_________________
Talahaski


dartmud.com 2525
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 12:12 am   
 
I have version 1.3 Beta, it is the only version I was able to find as a download.

I tried re-installing already, but have not tried re-installing to a different directory
_________________
Talahaski


dartmud.com 2525
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Jul 25, 2008 12:26 am   
 
Zugg is going to have to answer this. I have no problems interfacing with the zMapper API using 2.33 and XP. It may indeed be a Vista problem, but I am unaware of any Vista issue relating to the API interfacing with CMud.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 12:26 am   
 
I just tried uninstalled and re-installing zmapper to c:\zmapper also set zmapper.exe to run as administrator.

Still does not work.
_________________
Talahaski


dartmud.com 2525
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 12:44 am   
 
The only other thing I can think of is to relocate cmud to c:\cmud. But I doubt that will help either
_________________
Talahaski


dartmud.com 2525
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 12:48 am   
 
I found this error message on my computer's event logs

Unable to start a DCOM Server: {CD2A402A-E625-4B75-9942-20DA9FEF33A3}. The error:
"740"
Happened while starting this command:
C:\zMapper\zMapper.exe -Embedding
_________________
Talahaski


dartmud.com 2525
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 1:05 am   
 
is there suppose to be a zmapper.dll, or just the zmapper.exe cause I don't see a .dll file
_________________
Talahaski


dartmud.com 2525
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 1:27 am   
 
I checked DCOM service, RPC service. they are running just fine. I'm not sure what is causing this.

Also its not my firewall of virus scan. I shut these down and retired.

ok, I give up for tonight, if anybody has any ideas, let me know please.
_________________
Talahaski


dartmud.com 2525
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Jul 25, 2008 2:48 am   
 
There isn't any DLL. CMUD tries to call the zMAPPER.EXE to determine whether it is licensed properly. Try running CMUD itself "As Admin" and see if that helps. Not sure what the problem is since it's working fine on my Vista system here though.
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 1:22 pm   
 
interesting, I thought I had cmud set to run as admin, perhaps I lost it when I installed the latest version. Running as admin on CMUD worked to load the plugin.

Although my script still does not appear to be working. Anybody seed anything wrong here? It used to work in zmud, but this may be a timing issue if the call to onroomcreate has changed and perhaps is done before the room is available to the %map.CurRoom?

#event onroomcreate

#IF (@MoveExtraDir) {
Room=%map.CurRoom
#IF (@MoveExtraDir="d") {#ADD Room.Z 1} {#ADD Room.Z -1}
#CALL @Room.Update
}
MoveExtraDir=""

I have a trigger that captures the message that I went uphill/downhill and sets the variable MoveExtraDir to u or d and also run #nomap. This text is sent from the mud after I move in a direction, but before the room name appears.


If I run this from the command line, it works, so I'm thinking it must be a timing issue of some sort.
Room=%map.CurRoom
#IF (@MoveExtraDir="d") {#ADD Room.Z 1} {#ADD Room.Z -1}
#CALL @Room.Update

I also verified that the variable MoveExtraDir is populated.

In addition I change the #onroomload event and removed the check just to see if that will work

#event onroomcreate:

Room=%map.CurRoom
#IF (@MoveExtraDir="d") {#ADD Room.Z 1} {#ADD Room.Z -1}
#CALL @Room.Update

This is not working either, so my assumption is that %map.CurRoom is not available when the event onRoomCreate is fired? Can anybody verify this and perhaps help me modify this so it will work.
_________________
Talahaski


dartmud.com 2525
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Fri Jul 25, 2008 7:49 pm   
 
I also have not been able to get a similar thing to work with OnRoomCreate. I can get it to change the room location with an alias after the room is created and entered. I suspect that at the time the OnRoomCreate event is raised, the current room has not yet been changed.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Jul 25, 2008 7:54 pm   
 
For details like that you'll need to wait for the new mapper. The current mapper is kludged to use events instead of aliases and it hasn't been fully tested for functionality. The OnRoomCreate event is called from the same place in the code that the OnRoomCreate alias was called in zMUD.
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 11:24 pm   
 
Figured it out.

The problem was the MyRoom = %map.CurRoom, when I changed it to use #VAR statement instead, it works.


Here is the fixed OnRoomCreate event.

#IF (@MoveExtraDir)
{
#var MyRoom %map.CurRoom
#IF (@MoveExtraDir="d") {#ADD MyRoom.Z 1} {#ADD MyRoom.Z -1}
#CALL @MyRoom.Update
}
MoveExtraDir = ""
_________________
Talahaski


dartmud.com 2525
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Jul 25, 2008 11:27 pm   
 
Now that the room is being created in the proper position, does anybody know how to get the map GUI to display the level I'm on.

After updating the room to a deeper lower, the map still shows the previous level and I have to click on the map window and manually go down a level.
_________________
Talahaski


dartmud.com 2525
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Sat Jul 26, 2008 12:20 am   
 
Rahab, have you had any luck mapping the up/downs in the ud?

This method I am trying has its flaws also. Since it creates the room first, then updates it, you can sometimes end up with 2 rooms on top of each other on the same level.

I need to figure out how to tell the mapper that I'm going down a level at the same time as going in a direction like east


On a side note, where can I find documentation on the object model for interfacing with the mapper? Like %room and %map. How do I know what methods and attributes are available. For example I know %map.curroom returns the curroom object, but where do I find out what else is available. I tried openning zmapper.hlp, but the help file is not readable on vista. Is this online somewhere?
_________________
Talahaski


dartmud.com 2525
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Sat Jul 26, 2008 6:43 am   
 
I didn't see any explicit way to shift the view on the z-axis. Here are the guts from the help.

MAP
function CurRoom: zMUDRoom
Returns the current room of the map. The current room is the one with the blue marker in it.

function SelectRoom: zMUDRoom
Returns the room last selected on the map with the mouse (highlighted in red)

function GetRoom( ID: Integer): zMUDRoom
Return the room object for the specified room ID. ID is the room Key ID field.

property CurRoomID: Integer
The ID of the current room on the map

property SelectRoomID: Integer
The ID of the currently selected room on the map

function GetSelection: zMUDList
Returns a list of currently selected rooms

function GetLinkSelection: zMUDList
Returns a list of currently selected links

function GetLabelSelection: zMUDList
Returns a list of currently selected labels

method UnselectAll
Unselect all rooms, links, and labelsB on the map

function NewRoom( Name, Desc: String; X,Y,Z: Integer; KindID, ZoneID: Integer): Integer
Create a new room on the map with the given name, description, coordinates and room type. If ZoneID is -1 then the room is created in the current zone. The ID of the room is returned.

function NewLink( FromID, ToID: Integer; DirFrom, DirTo: zMapDirType; KindID: Integer; OtherDir: String; OneWay: Boolean): Integer
Create a new link between FromID and ToID rooms. KindID is the type of exit. OtherDir is the exit command for non-standard exits. OneWay indicates whether a single one-way link or a 2-way link should be created. The Link ID is returned.

function NewLabel( Name: String; X,Y,Z: Integer; StyleID, ShapeID, ZoneID: Integer): Integer
Create a new label or shape/icon on the map. Name is the text of the label. X,Y,Z are the coordinates of the label. StyleID is the text style to use, and ShapeID is the ID of a shape to display instead of the label. If ZoneID is -1 then the current zone will be used. The ID of the new label is returned.

function Walk( FromID, ToID: Integer): zMUDList
Returns a list of Links used to speedwalk from the FromID room to the ToID room.

function GetLink( ID: Integer): zMUDLink
Return the link record given by the specified ID

function GetLabel( ID: Integer): zMUDLabel
Return the label record given by the specified ID


ROOM

property ID: Integer (read-only)
Returns the Key ID field for the room. This ID is used to reference the room in all other scripting. It is a unique number assigned to the room when it is added to the database and cannot be changed.

property Name: String
The Name of the room

property Desc: String
The Description of the room

property vNum: Integer
The Virtual room number. This is a number assigned to the room that can be changed and only needs to be unique within a zone. It is typically used to store the actual room number used by the MUD to locate the room.

property Script: String
The zMUD script assigned to this room. The script is executed when the room is entered. Any settings (aliases, variables, etc) created in this script are removed when the room is exited.

property Cost: Integer
The speedwalk cost for entering this room. Assigning a higher cost to a room will cause the room to be avoided during speedwalking.

property Color: Integer
The RGB color value for this room. Use the %colorname function in zMUD to convert the name of a color to an RGB color value

property LabelDir: zMapDirType
The direction used to label the room. zMapDirType is an integer from 0 to 11, where N=0, NE=1, E=2, SE=3, S=4, SW=5, W=6, NW=7, U=8, D=9, Other=10, None=11. Set LabelDir to None (11) to turn off the room label. Room is labelled using the IDName field.

property Contents: String
A string list of record ids in the zMUD database module representing the contents of this room.

property X: Integer
The X coordinate of the room

property Y: Integer
The Y coordinate of the room

property Z: Integer
The Z coordinate of the room

property Dx: Integer
The width (X) of the room

property Dy: Integer
The height (Y) of the room

property ZoneID: Integer
The zone number that contains this room

property KindID: Integer
The room type.

property MetaID: Integer
The ID of a shape to draw for this room

property IconID: Integer
The ID of an icon to draw for this room

property UserStr: String
A user-defined string value stored with this room

property UserInt: Integer
A user-defined integer value stored with this room

property StyleID: Integer
ID of style used to display room label text

property IDName: String
The short name of this room. This is used to label the room and also used to reference the room by name instead of number in some functions and commands.

property Selected: Boolean
Determine if room is selected on the map. You can change this property to Select or Unselect the room on the map

method Save
Saves any changes made to this room to the map database. Can be slow.

method Cancel
Cancel any changes made to this room so that clicking on the map or selecting another room doesn't cause an automatic Save

method Update
Update any changes made to this room on the visual map, but doesn't save the changes to the database. This is a fast way to update the map.

property NumLinks
Returns the number of exits from this room

function LinkNum( Index: Integer): zMUDLink
Returns the ith link from this room

function ExitList: zMUDList
Returns the exits from this room as a list of links

function Exit( ExitName: String): zMUDLink
Returns the named exit from this room. ExitName can be a standard Direction command, such as "north" or "n", or it can be the name of an "Other" link from this room.

function ExitDir( Dir: zMapDirType): zMUDLink
Returns the exit in the given direction. See the LabelDir property above for a definition of zMapDirType.

function ExitTo( ToID: Integer): zMUDLink
Returns the exit to the specified room

method SetLink( ToID: Integer; Dir, DirTo: zMapDirType; OtherDir: String; OneWay: Boolean)
Add a new exit from from the current room to the ToID room. Exit leaves the current room in the Dir direction and connects to the destination room in the DirTo direction. If exit is an "Other" link you can specify the command to using the exit in the OtherDir string. If OneWay is true, a one-way link is created, otherwise a two-way link is created.
If a link to the ToID room already exists in the indicated direction, or there is a Null link in the indicated direction, then this will replace the current exit with the new ToID, DirTo, OtherDir, and OneWay values.

method DeleteLink( ToID: Integer; Dir: zMapDirType; OtherDir: String)
Deletes a link from the current room. Specify the Direction (Dir) and the destination Room ID (ToID) to delete a specific link. To delete any link in the given direction, set ToID to -1. If the exit is a non-standard exit, specify the Other name of the direction in OtherDir.


LINK

property ID: Integer (read-only)
The low-level Key ID of this exit link in the map database. This value is set when the exit is created in the database and cannot be changed.

property FromID: Integer
The ID of the room at the start of the link

property FromRoom: zMUDRoom (read-only)
The room record at the start of the link

property ToID: Integer
The ID of the room at the end of the link

property ToRoom: zMUDRoom (read-only)
The room record at the end of the link

property Dir: zMapDirType
The direction of the start of the link. zMapDirType is an integer from 0 to 11, where N=0, NE=1, E=2, SE=3, S=4, SW=5, W=6, NW=7, U=8, D=9, Other=10, None=11

property DirToL zMapDirType
The direction for the end of the link

property Command: String
The Other command for non-standard exits. The Dir should be set to Other (10). Then this command is used to exit the room via this link.

property DoorName: String
The name of the Door. This actually sets the Param field for the database so that the script can refer to the door name using the %1 variable.

property KindID: Integer
The type of exit. By default, 0 is a normal exit, 1 is an unlocked door, and 2 is a locked door, but users can change the properties of the exit type definitions or add their own using zMapper.

property LinkIDTo: Integer
The link ID value of the link in the other direction if this is a 2-way link.

property OneWay: Boolean
Indicates whether this is a one-way link. If this is false and you change it to true and then save the link, the other link will be deleted to force a one-way link. Alternatively, if Oneway is true and you change it to false and then save the link, a new link in the opposite direction will be created so that the link is now 2-way.

property IsStub: Boolean
Indicates whether this is a "stub" link that doesn't go anywhere

property LabelStr: String
The label to display at the endpoints of the link

property DrawLink: Boolean
Determine whether to draw the connection link, or just the stubs with a label.

property Selected: Boolean
Determine if link is selected on the map. You can change this property to Select or Unselect the link on the map

method Save
Save any changes made to this link. Unlike rooms, which automatically save their changes when you switch to a new room, changes to links are only saved if you explicitly call this Save method.

method Update
Update visual changes to link on the map without saving the link. Note that only some properties can be updated without saving.

method Delete( DeleteBoth: Boolean)
Delete this link. Set DeleteBoth to true to delete both links (if it's a 2-way link), or set DeleteBoth to false to just delete this single link record (possibly leaving behind a one-way link).


LABEL

property ID: Integer (read-only)
The ID of the label record. This ID is set when the label is added to the database and cannot be changed.

property Name: String
The text of the label.

property X: Integer
The X coordinate of the label.

property Y: Integer
The Y coordinate of the label

property Z: Integer
The Z coordinate of the label

property StyleID: Integer
The text style ID for the label

property ShapeID: Integer
The ID of the shape/icon to draw instead of a label

property ZoneID: Integer
The zone containing the label

property Selected: Boolean
Determine if label is selected on the map. You can change this property to Select or Unselect the label on the map

method Save
Saves the changes made to the label to the database. Unlike rooms, which automatically save their changes when you switch to a new room, changes to labels are only saved if you explicitly call this Save method.

method Update
Updates the changes to the label on the map display without saving the changes to the database

method Delete
Deletes this label from the database.


LIST

property Count: Integer
The number of objects in the list

property Item( Index: Integer): Variant
Return the ith object from the list. The type of object returned depends upon the type of objects stored in this list
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sat Jul 26, 2008 1:27 pm   
 
Well, you could use the #TE command to teleport into a room without any scripts associated and then teleport back to the current room.

Kinda clunky I understand but off the top of my head it is the best solution I can come up with.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Jul 28, 2008 4:27 pm   
 
Quote:

I need to figure out how to tell the mapper that I'm going down a level at the same time as going in a direction like east

I don't think there is any way to do that. I'm trying to do it the same way you are, by moving the room after creation. #merge should fix the problem of moving a newly created room onto a known room.
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Mon Jul 28, 2008 10:19 pm   re:Rahab
 
Hey Rahab, I decided to completely override the mapper and use the zmapper interface to create rooms manually myself. I got it working pretty well for Dartmud including up/down.

And I was also able to implement something I found missing from the automapper - the ability to show you when a room name or description is different from what you previously recorded on your map. This will tell you what the room used to look like so you can identify what was changed about the room. This also helps in identifying a mapping screw-up.

I stole quite a bit of code from Vijilante's post here http://forums.zuggsoft.com/forums/viewtopic.php?t=19628.

Send me an email if you want to discuss.
talahask@optonline.net
_________________
Talahaski


dartmud.com 2525
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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