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


Joined: 31 Jan 2006
Posts: 55

PostPosted: Fri Mar 31, 2006 12:03 pm   

Map and portals
 
On my mud, we have portals. One of them will transport me to a 'home' spot like recall does. I have this portal set up with the mapper so that it uses it as the shortest route to most places.

But the problem is, there are some areas were most rooms don't allow portals to be used. If I am in such area, and try to use a speedwalk, the mapper tries to use the portal even though it won't work. In these areas, I would like the mapper to ignore all portals and take the shortest path out of the area on foot.

Is there any way I can get the mapper to see that certain rooms are noportal? Maybe someway to temporarily disable all portals in script, and then afterwards re-enable them just as they were before? Anyone have a suggestion?
Reply with quote
mo24
Wanderer


Joined: 31 Jan 2006
Posts: 55

PostPosted: Wed Apr 05, 2006 1:59 pm   
 
*bump :)
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Wed Apr 05, 2006 5:33 pm   
 
suggestion would be for each room set it with a room script.
#trigger {You cannot portall msg} {#nomap;#walk ###;portal command}

where ### is the room # that you use to get out

Drawing a blank right now on what Aard's no portal msg is..Don't forget there's also the no recall rooms ;-)

I've never actually got around to bothering with that stuff myself...in all honesty I don't think that the #nomap will work...lemme know ;-)
_________________
http://www.Aardwolf.com
Reply with quote
mo24
Wanderer


Joined: 31 Jan 2006
Posts: 55

PostPosted: Wed Apr 05, 2006 6:29 pm   
 
Thx Vitae I'll try that :)
Reply with quote
mo24
Wanderer


Joined: 31 Jan 2006
Posts: 55

PostPosted: Thu Apr 06, 2006 11:31 am   
 
Ick, I just realized there is a problem

The main issue is that #walk still tries to use portals for the shortest route.

So if I put the trigger in the room script, in a room where there is noportal, it will still try to use the portal since the portal is its shortest route. it will work for some rooms where the noportal room is only one room away or so from a portal enabled one. But not in large areas that are almost entirely no portal like the ST:TNG, which I would really like to set up for. In areas like that path by portal is almost always shorter than by foot, so #walk tries to use portals.

If only there was a command to give shortest path without portals.. that would make this so easy. i suppose i could try putting in room script a big loop to save portal values, disable all portals, then reenable them after I am at destination room. It probably will be very long and laggy though. is there Any easier and better solution?
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu Apr 06, 2006 2:46 pm   
 
crap, sorry, hadnt thought of that.

portalenabled

Syntax: %portalenabled( PortalName {, Value})

Returns the status of the specified PortalName. Returns 0 if portal is disabled, 1 if enabled. If Value is given, this is used as the new status, and the function will return the previous status.

err..so...

%portalenabled( PortalName {, 0})
#walk ####
%portalenabled( PortalName {, 1})

?...
_________________
http://www.Aardwolf.com
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