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
ZealousAnonymous
Wanderer


Joined: 06 Jan 2006
Posts: 70

PostPosted: Tue Sep 05, 2006 6:36 am   

DrawLink?
 
Just wondering how you would go about disabling the drawlink for exit X in a map. I can't quite figure out how to either A. Do it in zMapper or B. Do it using a COM Access script.
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: Tue Sep 05, 2006 2:56 pm   
 
Should probably go in the ZMapper thread.

Inside ZMapper (manually): Select the link, right click on the link > Properties, on the right below the One Way and Door buttons uncheck "Draw Link".

From ZMud (scriptable): Three parts. Create a variable so that you can use the COM functions. Then set the property. Then save--note you won't see any results until after you save.

Code:

#VAR TempCom {%map.getroom(ROOM NUMBER).exitdir(NUMBER**)}
#VAR TempCom.DrawLink 0
#CALL @TempCom.Save

**0 for north, 1 for northeast, and so on clockwise. Up is 8, down is 9, other is 10. Note the error if you use an invalid exit number.

Note that you can do step one any number of ways, depending on how flexible you need it to be, e.g.:
#VAR TempCom {%map.curroom.exitdir(EXIT NUMBER)}
Reply with quote
ZealousAnonymous
Wanderer


Joined: 06 Jan 2006
Posts: 70

PostPosted: Tue Sep 05, 2006 7:34 pm   
 
Thanks bunches!
Reply with quote
ZealousAnonymous
Wanderer


Joined: 06 Jan 2006
Posts: 70

PostPosted: Wed Sep 06, 2006 12:15 am   
 
Still having a few problems? What happens with multiple 'other' exits? I have things like 'in' and 'enter grate' how would I disable the 'draw link' for the second other exit? I keep getting errors in my tests.
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: Wed Sep 06, 2006 4:08 am   
 
Theoretically,
Code:
#var tempcom {%map.curroom.Exit(in)}
#VAR TempCom.DrawLink 0
#call @TempCom.Save

However, this wasn't working for me (or rather, it was working, just changing the wrong exits in what seemed like a random fashion). I'm sure it's something I'm missing but I'm not sure what, let me know if you figure it out!
Reply with quote
ZealousAnonymous
Wanderer


Joined: 06 Jan 2006
Posts: 70

PostPosted: Wed Sep 06, 2006 4:25 am   
 
Aye, I had similar results. I'll see what I can do.
Reply with quote
ZealousAnonymous
Wanderer


Joined: 06 Jan 2006
Posts: 70

PostPosted: Wed Sep 06, 2006 4:58 am   
 
Aha! I did some research, looked at some other scripts and come up with this which works:

#VARIABLE query {Update ExitTbl set Flags='3' where name = 'EXIT NAME'}
#VAR ConnStr {Provider=Microsoft.Jet.OLEDB.4.0%char( 59)Data Source=C:\fullachaeanmap.mdb}
#VARIABLE conn %comcreate( "ADODB.connection")
#CALL @conn.Open(@ConnStr)
#CALL @conn.execute(@query)
#CALL @conn.close
#VARIABLE rs ""
#UNVAR rs
#UNVAR query
#UNVAR ConnStr
#SAY All done
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