 |
oxseyn Wanderer

Joined: 26 Nov 2011 Posts: 71 Location: Colorado Springs
|
Posted: 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?
|
|
|
 |
bothkill Apprentice

Joined: 13 Mar 2005 Posts: 125 Location: Bucharest
|
Posted: 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 . |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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? |
|
|
 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: 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. |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4733 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: 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. |
|
|
 |
oxseyn Wanderer

Joined: 26 Nov 2011 Posts: 71 Location: Colorado Springs
|
Posted: 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 ...
|
|
|
 |
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: 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).
|
|
|
 |
oxseyn Wanderer

Joined: 26 Nov 2011 Posts: 71 Location: Colorado Springs
|
Posted: 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. :) |
|
|
 |
oxseyn Wanderer

Joined: 26 Nov 2011 Posts: 71 Location: Colorado Springs
|
Posted: Tue Apr 10, 2012 3:05 pm |
How would you go about disabling specific portal commands in specific rooms?
|
|
|
 |
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Tue Apr 10, 2012 3:32 pm |
You can enable and disable portals in a script with the %portalenabled function.
|
|
|
 |
|
|