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
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Fri Oct 18, 2002 6:39 pm   

Mapping Help
 
Hi all,
I am using the mapper and It maps well, but I want to distinguish certain rooms differently when I am mapping.
Here is the problem. You can only see the exits and get to certain rooms if you are holding a compass.
What I want to do is make the room that you can only get to with a compass have a different color.
Here is the prompt with and without a compass.
With compass:
Primary Exits: north south (other exits: w, nw, se, sw)
Without a compass:
Primary Exits: north south

If you are in an area that is a compass held only room the exit looks like this:
Primary Exits: none (other exits: w, nw, se, sw)
Any Ideas?
************* Second Part *************
How do I get the mapper to reconize directions that have a door that way. The show in the prompt with bracets around the direction like this:
Primary Exits: [north] south [east]
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Oct 18, 2002 11:54 pm   
 
I think the simplest way to handle this will be to override the mapper. However we won't override it in the simplest fashion.

#CLASS {System|Automapper}
#VAR EXITLINE {} {}
#VAR CompassExits {} {}
#VAR Timeout {} {}
#TRIGGER {^Primary Exits: &%*{ExitLine}$} {ExitLine=%replace(%expand(@ExitLine,1),"[","");CompassExits=%replace(%remove(")",%word(@ExitLine,2,"other exits: ")),", ","|");ExitLine=%replace(%word(@ExitLine,1," (other exits: ")," ","|");Timeout=%eval(%secs+10000);#WHILE ((%lastdir!=%null)&(@Timeout>%secs)) {#NOOP};#IF (@Timeout<%secs) {#ECHO Timed out trying to capture exits and create rooms.} {#FORALL @ExitLine { #IF (%roomlink(%roomnum,%remove("]",%i))=-2) {#MAKEROOM %remove("]",%i);#IF (%ends(%i,"]")) {#DOOR %remove("]",%i)};#NOOP %roomload(%roomlink(%roomnum,%remove("]",%i)),7)}};#FORALL @CompassExits { #IF (%roomlink(%roomnum,%i)=-2) {#MAKEROOM %i;#NOOP %roomload(%roomlink(%roomnum,%i),7);#NOOP %roomcol(%roomlink(%roomnum,%i),red)}}}}
#CLASS 0

What it does it create rooms ahead of you, but is only active when in map mode. Thoes rooms are set load all details of the room and should do so when you enter them. I can't help it much if they don't. It also creates the doors for you, and colors roms requiring the compass to red, I am sure you can find where to change that if you desire a different color.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sun Oct 20, 2002 1:14 am   
 
Unfortunately when I use this create this. It times out. I am on a cable modem and it shouldn't do it. When I remove the script everything works fine.

Anybody else?

Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Oct 20, 2002 1:58 am   
 
The time out is set for 10 seconds. It is looping continously until the time out or the mapper finishes creating the room occurs.

I think I understand why it is not working, in the public version (6.16) all processing stops while a loop in a trigger is occuring, I will rearrange it so it tries repeatedly to process it but allows other triggers to go through.

This should do better, it may take an extra second, but should work so long as you move 1 room at a time and have no trigger sending other commands while mapping.
#CLASS {System|Automapper}
#ALIAS ProcessExitLine {#FORALL @ExitLine { #IF (%roomlink(%roomnum,%remove("]",%i))=-2) {#MAKEROOM %remove("]",%i);#IF (%ends(%i,"]")) {#DOOR %remove("]",%i)};#NOOP %roomload(%roomlink(%roomnum,%remove("]",%i)),7)}};#FORALL @CompassExits { #IF (%roomlink(%roomnum,%i)=-2) {#MAKEROOM %i;#NOOP %roomload(%roomlink(%roomnum,%i),7);#NOOP %roomcol(%roomlink(%roomnum,%i),red)}}}
#ALIAS MakeExitAlarm {#ALARM {+1} {#IF (%lastdir=%null) {ProcessExits} {#IF (@Timeout>%sec) {MakeExitAlarm} {#ECHO Timed out trying to capture exits and create rooms.}}}}
#VAR EXITLINE {} {}
#VAR CompassExits {} {}
#VAR Timeout {} {}
#TRIGGER {^Primary Exits: &%*{ExitLine}$} {ExitLine=%replace(%expand(@ExitLine,1),"[","");CompassExits=%replace(%remove(")",%word(@ExitLine,2,"other exits: ")),", ","|");ExitLine=%replace(%word(@ExitLine,1," (other exits: ")," ","|");Timeout=%eval(%secs+10000);MakeExitAlarm}
#CLASS 0
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Thu Oct 24, 2002 2:25 am   
 
I see that you are calling an alias ProcessExits but I don't see it in the code?

Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Tue Nov 05, 2002 8:15 pm   
 
Does anybody else have any ideas on this?

Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1
Reply with quote
doomfyre
Apprentice


Joined: 03 Jan 2002
Posts: 152
Location: USA

PostPosted: Tue Nov 05, 2002 9:20 pm   
 
It looks like the actual alias thats being called should be ProcessExitLine.

Did you try changing the code accordingly?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Nov 05, 2002 11:04 pm   
 
Yep, typo on my part, the Alarm is trying to call ProcessExits, but I named the alias ProcessExitLine. Just switch one or the other so they match and it should be functional.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Wed Nov 06, 2002 3:50 pm   
 
Well I tried it and it creates the room but then will create another room in the random direction.
If you want to help with this. This is on Untamed Lands MUD.

Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Mon Dec 23, 2002 8:30 pm   
 
GURUS PLEASE HELP?
I am still trying to get this to work. Does anybody have any ideas? I wonder if Zugg could add something to the mapper that would detect these exists for you?

Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Tue Dec 31, 2002 6:06 pm   
 
quote:

GURUS PLEASE HELP?
I am still trying to get this to work. Does anybody have any ideas? I wonder if Zugg could add something to the mapper that would detect these exists for you??

Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1



Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1
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