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
Gintonic
Beginner


Joined: 04 May 2018
Posts: 12

PostPosted: Tue Oct 02, 2018 1:02 pm   

PORTAL cost from command line
 
Hey Gurus!

I would like to use the PORTAL functions built into the zmapper, however I have several issues.
The item grants portal on my mud is global with only a few exceptions. Some rooms are no teleport zones. I couldnt find anything to be able to set this up on the room setting page, so I thought I create 2 aliases, portalon and portaloff.
I would run portaloff whenever I enter those rooms, and run portalon when I exit.
However I can only port out from the zone to another zone's starting location, I can not use the portal to get back to the begging of the current zone. I could compensate for this if I set the portal cost relatively high, therefore it is 'cheaper' for the mapper to walk me to the begging of the zone, than to try to port me there.
But as I mentioned, some rooms I want to turn the portals on and off, and if I do that, I have to manually re-set the portals costs for 60+ portals in the mapper.
Is there a way to set the cost via script?
any help would be great!

Gin
Reply with quote
shalimar
GURU


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

PostPosted: Wed Oct 03, 2018 11:11 am   
 
Looking over the help file... It doesn't look like there is a way to set a cost for using #PORTAL.
Costs are associated with the room alone, not with each exit.
There doesn't even seem to be a way to see which all #PORTALs you have made, or temporarily disabling them.
With that in mind, it may behove you to make use of the #TELEPORT command, triggering off of the text when you make use of the game side portals, and update your #LOCATION from that.

#TR {A street urchin shows you the way to the General Store.} {#TELE 1234}
_________________
Discord: Shalimarwildcat
Reply with quote
Gintonic
Beginner


Joined: 04 May 2018
Posts: 12

PostPosted: Thu Oct 04, 2018 6:00 am   
 
Hey Shalimar!

Thanks for the reply.

Whilst I was waiting, I did some research too.
I found this function in the help files: %portalenable()

I was wondering if I could use this function as a zone script somehow.

For example:

Let's say I have 3 portals to 3 different zones, portals: #POR "teleport 1" {1} #POR "teleport 2" {2} #POR "teleport 3" {3}

can i just set up a zonescript on the 3 zones as such, Zone1: %portalenable(teleport 1, 0) Zone2: %portalenable(teleport 2, 0) Zone3: %portalenable(teleport 3, 0)

would this work theoratically?
if the portal gets disabled while I'm in the zone, would it automatically re-enable when I leave? Or do I have to set the zone script for each zone like:
Zone1:
%portalenable(teleport 1, 0)
%portalenable(teleport 2, 1)
%portalenable(teleport 3, 1)
etc etc

As before I appreciate any feedback

Thanks,
Gin
Reply with quote
shalimar
GURU


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

PostPosted: Thu Oct 04, 2018 10:59 am   
 
The function is %portalenabled

You would have to toggle them both ways manually.

The only issue I see is that you would want to use quotes around the portal name inside the function, assuming they are even allowed to have spaces:

#NOOP %portalenabled("teleport 1", 1)
_________________
Discord: Shalimarwildcat
Reply with quote
BumblingBee
Newbie


Joined: 17 Feb 2020
Posts: 1

PostPosted: Mon Feb 17, 2020 6:53 am   
 
Gintonic wrote:
Hey Shalimar!

Thanks for the reply.

Whilst I was waiting, I did some research too.
I found this function in the help files: %portalenable()

I was wondering if I could use this function as a zone script somehow.

For example:

Let's say I have 3 portals to 3 different zones, portals: #POR "teleport 1" {1} #POR "teleport 2" {2} #POR "teleport 3" {3}

can i just set up a zonescript on the 3 zones as such, Zone1: %portalenable(teleport 1, 0) Zone2: %portalenable(teleport 2, 0) Zone3: %portalenable(teleport 3, 0)

would this work theoratically?
if the portal gets disabled while I'm in the zone, would it automatically re-enable when I leave? Or do I have to set the zone script for each zone like:
Zone1:
%portalenable(teleport 1, 0)
%portalenable(teleport 2, 1)
%portalenable(teleport 3, 1)
etc etc

As before I appreciate any feedback

Thanks,
Gin


Great articles love it good work keep it up
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