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

Post new topic  Reply to topic     Home » Forums » zMapper Discussion
SBG
Novice


Joined: 05 Mar 2003
Posts: 44
Location: Australia

PostPosted: Thu Jul 08, 2004 1:06 pm   

Changing Link Type Through Commnd
 
First off to Zugg, Thanks for the great products ;)
Zmud and Zmapper have made playing my mud sooo much better, easier
and a lot more fun.

I've been searching through all the helpfiles and the forums and still
can't find what I'm looking for.

What I need it a way to toggle doors and other links to the custom
ones I'm made via command line in Zmud while mapping.
I've made alias's for things like doors, eg. {ds} {#door south} and so on
I've a couple of custom links for things like "Trapped Door" ,"Locked Trapped Door" and "Hidden Door"
but can't workout how a toggle these on so I can set up some alais's.

After reading the Zmapper help file I'm more confused than before.
Can someone please give me a example of the structor of the command to do this?

Any help would be greatly appreciated,
Mark.
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Jul 08, 2004 6:13 pm   
 
You need to use the COM Object interface to zMapper that is described in the zMapper help file. You use this interface in zMUD scripting. In zMUD, the %map object points to the current map that is open.

%Map.CurRoom is the room with the blue marker on it. You can then get an exit object using functions like Exit("n") (or using a bunch of other functions documented in the Room Object page of the zMapper help file). Once you have an Exit Link object, you change it's type using the property KindID.

So, let's say your "Trapped Door" exit has a definition ID of 4. You would change the "north" link to this type using the code:

#var Link %map.curroom.exit("n")
#var @Link.Kindid 4
#call @Link.Save

That will change the link and save it.

Haven't tested this stuff in a while, so you'll probably just need to play around with it. But the documentation in the zMapper help file is the key.
Reply with quote
SBG
Novice


Joined: 05 Mar 2003
Posts: 44
Location: Australia

PostPosted: Thu Jul 08, 2004 7:08 pm   
 
Many thanks kind sir, I'll have a look at it in the morning
with a fresh eye. But for now I need to get some sleep, after 3am
here :P I do feel some examples like this in the helpfile like
you have in Zmud helpfile would be good though as most of the
time I can work with those and workout what I can and can not do.
Just a thought.

anyway, have a good one and thanks again.
Mark
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jul 08, 2004 11:29 pm   
 
Last time I tested the COM interface in zMapper is wasn't working right. It appeared that the proper registry keys weren't created during installation. If you get better results or don't please post.
Reply with quote
SBG
Novice


Joined: 05 Mar 2003
Posts: 44
Location: Australia

PostPosted: Fri Jul 09, 2004 7:20 am   
 
Gday Zugg,

no go I'm affaid, above example doesn't work well. it makes a link over the link that is already there,
and when you click on that link there is a error popup saying "Invalid pointer operation"
nor does it make the correct type of custom link. I played around with it a little like you suggested but still
no joy so far :(

Vijilante, do you have at hand the proper registry keys ? I could maybe place these by hand with regedit
(-I'm willing to take the risk ;)-) Your welcome to mail them to me personally if you like.
Or if not could you suggest another way to do it? install a older version of Zmapper perhaps ??

As always any help will be greatly appreciated,
Mark.
Reply with quote
SBG
Novice


Joined: 05 Mar 2003
Posts: 44
Location: Australia

PostPosted: Sat Jul 10, 2004 7:08 pm   
 
Gday Guys,

I re-downloaded Zmapper incase I got a corrupted file last time
then uninstall,reboot,re-install. now with the above example I get
a error window that says...

quote:
Access violation at address 00401FD3 in module 'Zmud.exe'. Write of address 1706C960


I'll still play around a bit with it, but this sort of advanced scripting is still a little
above my head (give me back the good old days of amiga and arexx scripting :P)
and hope I can work something out. If not I'll just have to stick to the tried and true method
through the GUI, Just hope the above error helps in some way for a future version :)

Anyways, all the best to ya's and have a good one.
Mark.
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Jul 12, 2004 6:51 pm   
 
Take a look at the page in the zMapper help file regarding the Room Object. Down towards the bottom of the page the functions for creating and getting room links are listed. If the Exit function is creating a new link instead of giving you an existing link, then try one of the other functions that access links by the name of the link or by the direction and see if they work any better.

Just to remind you, this is a *very* advanced function and has gotten little testing. So, it's possible that there is a bug that prevents it from working correctly.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMapper 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 on Wolfpaw.net