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


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Thu Mar 22, 2012 2:45 am   

Portals
 
I'm having trouble finding documentation on portals. Where are they stored in the configuration? I can't find them anywhere. Is there anyway to make their behavior more advanced (add verification to ensure that the command worked) or would it just be better to not use the portal system and develop my own?
Reply with quote
bothkill
Apprentice


Joined: 13 Mar 2005
Posts: 125
Location: Bucharest

PostPosted: Thu Mar 22, 2012 6:56 am   Re: Portals
 
oxseyn wrote:
I'm having trouble finding documentation on portals.


For documentation I use the CMUD menu Help/Search (enter portal - and you'll get the related help files)


oxseyn wrote:
Where are they stored in the configuration?


Portals are stored in .dbm map database file, in the 'PortalTbl' table.

That's pretty much all I know about portals Smile .
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Mar 22, 2012 1:36 pm   
 
No, there is no way to automatically make their behavior more advanced. You could, however, wrap your portal command inside other commands that do such checking.

Could you explain exactly what you want to do with portals?
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Mar 23, 2012 1:13 am   
 
If you read the documentation on how the #PORTAL command works (also the%portal function), you will notice that it says that, at the location you want the portal to land you, you enter #PORTAL <somestring>. Whatever <somestring> is, it will be parsed by CMUD. So, in practical terms, <somestring> will be the name of an alias. So to invoke the portal, you use that alias. Within the alias you do (i.e. send commands to the mud) whatever needs to be done, e.g. fetching the mud portal object from a container, equipping the portal and finally entering the portal. Within the alias you can do pretty much as you wish. Client side, the data for portals is kept in a table that can be accessed via the Edit menu on the mapper. You can update the portal data manually via this table, or use the %portal function. Also read the documentation for the %portalenable function.
_________________
Sic itur ad astra.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Fri Mar 23, 2012 4:28 pm   
 
I would suggest you use a trigger and the #TELEPORT command if you want to error proof where you arrived at.
Portal is more for those games that have a 'go home' type command that always goes to one spot.
_________________
Discord: Shalimarwildcat
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat Mar 24, 2012 1:25 am   
 
You are correct, Shalimar. That would command would be placed within the alias to be executed. The execution would update one's location on the map. I tend to put it toward the sequence since, being a CMUD command, it will execute immediately and will not actually correspond to the sequence being executed by the server. Since my portal routines are general, I use this:
Code:

...
...
#TELEPORT  %portal($portalalias) // Relocate position on map.
...
...

Where $portalalias corresponds to <somestring> mentioned above.
_________________
Sic itur ad astra.
Reply with quote
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Mon Apr 09, 2012 8:57 pm   
 
Portal's don't seem to be used by the speedwalking algorithm. Is there any way to accomplish such a task? I.E. if I say #walk <dest> I want the speedwalker to utilize any available "portals" to get as close as possible to the destination ...
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Mon Apr 09, 2012 11:45 pm   
 
It should. Make sure you have portals enabled at Edit -> Portals (each portal has its own enabled check box, and there's a global one too).
Reply with quote
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Tue Apr 10, 2012 3:02 am   
 
Daern wrote:
It should. Make sure you have portals enabled at Edit -> Portals (each portal has its own enabled check box, and there's a global one too).

Thanks, that was the problem. :)
Reply with quote
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Tue Apr 10, 2012 3:05 pm   
 
How would you go about disabling specific portal commands in specific rooms?
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Apr 10, 2012 3:32 pm   
 
You can enable and disable portals in a script with the %portalenabled function.
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