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
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Thu Jul 31, 2008 5:55 pm   

Using a manual #OK trigger.
 
Currently I have my mapper set up to manually do a #OK apon receiving the room name of the next room. How could I manually code it to first match the roomname to the room Im moving to on the mapper. Currently it moves me in the desired direction every time I get a room name, no matter whether it matches or not.

Keeping in mind %1 equals the roomname how can I compare that? I thought about using %roomname but seems that would try to match it to the previous room since technically the mapper hasnt moved until it receives the #OK.

Any ideas..

Thanks.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Thu Jul 31, 2008 6:44 pm   
 
Well, you'd probably have to use several % functions to get the top direction from the queue, follow that direction (in your code) to see what room you are entering, get the room name of that room, compare it with %1, and if that is a match, execute the #OK. I'm afraid I can't remember the names of the functions, but if you need more help, I might be able to look through my code at some point.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Thu Jul 31, 2008 7:20 pm   
 
If I knew the functions to use, I wouldn't have asked for help *grin*
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Thu Jul 31, 2008 7:46 pm   
 
Er, yeah, but you can look! I've just got TeSSH here and it has no manual, so it's a bit tedious for me to look right now.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jul 31, 2008 10:45 pm   
 
The function you are looking for would be %destroom, however that will return the final destination when a speedwalk is active. Since there is no real way to tell that the mapper is preforming a speedwalk, you would have to use %roomlink(,%item(%lastdir,1)) to get the number of the room you are heading to at all times.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Sat Aug 02, 2008 4:29 pm   
 
Viji... The above doesnt work when moving from one room to another using a custom exit command.... anything to fix that?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Aug 02, 2008 8:51 pm   
 
That then adds the complexity of %roomportal. In order to handle it you have to check whether %lastdir is a defined direction, and even it it is defined then you have check its type and use %roomportal when it is an other(custom/non-standard) direction. Basically you have to have 2 PhD's to figure it out, and hopefully Zugg will extend %roomlink to be able to return all of this as he updates the mapper. I will certainely be pushing for it.

The easiest way to do it is to grab the part of my Toolbox package that reads all of the #DIRECTION settings into a record variable. Then you can check both presence and type against the contents of that variable.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Sat Aug 02, 2008 11:52 pm   
 
Well, with the new mapper just around the corner Im not sure I want to get dragged into all that just for an #OK trigger. Hopefully the changes in the new mapper will help this issue alot.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Aug 03, 2008 1:20 am   
 
I will definitely be pushing for %roomlink to be more capable. I will probably also push for other existing functions to gain appropiate capabilities. However, I am just one user. My ability to test existing CMud features has been quite small for the recent past and will probably remain in the same state. Even if Zugg implemented something I suggested it is not likely that I would have the proper time to test it to make sure it was everything I wanted.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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