Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Tue Sep 06, 2005 10:54 pm   

Retromud Mapping Script
 
They told me it couldn't be done. This is my answer.

First I would like to give thanks to Rainchild for her code to grab multi-line chat which I used to solve my problems with grabbing the exit block. Also I would like to thank Vijilante and Zugg who helped me when I got horribly stumped and flustrated trying to simply grab the description block.

Okay, some major changes have come into how things are being done here. I'm now using a commandque to verify movement which has completely eliminated any problems with mobs blocking your path. It handles them quite efficiently now.

It does still have problems if you light goes out, if you're still in mapping it will start generating stacked rooms on you until you can see again. I'm looking for ways to resolve this but it's looking like the only way to handle this may be completely take over all of the room creation features. That would mean (A) a lot more work and (B) would probably require zMapper to function. So far that's being put on the back burner.

Meanwhile, what I've got here works very very well. Previously it was troublesome to map water areas because it would often try to grab those prompts and shove them into the room description field. I've fixed that. I've fixed the mappers movement in general so it should be very very rare for it to get confused there.

And this will load any maps you started to generate with my earlier verion with no hassles at all.

The bad news is that if you are already struggling with maps in zMud that this script is going to reject any rooms you already have mapped. Your description fields will have variable weather text and possibly other things included with them, and anything the script grabs will filter out this information. Because of this the mapper will generate stacked rooms pretty much every time because the description text will not match.

Getting Started
To use this code simply put the entire block of code into a text file and import it. You may want to save off and clear any scripts you currently have first for good measure. You will need to set the colors so that the script recognizes your rooms. I use color to help insure reliability.

color roomshort bg_green
color roomlong bg_blue

These colors are filtered so that the name, desc, and weather are all highlighted and colored while the script is active. If you don't like the colors I chose for them it isn't that hard to find the #COLOR tags in the code and change them.

Next, the mapper uses verbose descriptions so that it can get the full description block. So if you are not already running in verbose mode you will have to type...

Brief

Brief should report as 'Verbose Mode.' I have no plans to teach the script about brief descriptions.

Last, you should go into the mapper window, configuration and find Room Name, Room Descriptions, and Room Exits. You should click all three of these boxes off since the script does not need any help finding any of this information.

If you have any problems with the script, feel free to let me know. You can leave me detailed information here or drop me a line in game if you must. I play as Damia in RetroMUD.

Troubleshooting
While I am fairly confident of how things are working now it's entirely possible there are still a few bugs I haven't nailed down yet. if it starts acting wonky it could help to hit return a bunch of times. The reason for this is it's using a commandque and if it somehow manages to get out of sync your best bet is to just clear the que.

Also it seems that it refuses to load the mapper correctly initially. You should click the mapper to off mode, then to edit to make sure it loads everything correctly.

Code:
#CLASS {System}
#VAR InputCounter 0
#VAR InputSpammy 5
#VAR CommandStack ""
#VAR LastCommand ""
 #VAR Hp 0
 #VAR HpMax 0
 #VAR Sp 0
 #VAR SpMax 0
 #VAR Ep 0
 #VAR EpMax 0
 #VAR Gold 0
 #VAR Exp 0
#GAUGE Hp "@Hp/@HpMax" @Hp @HpMax (@HpMax/3) "" "15,2" "4" "0"
#GAUGE Sp "@Sp/@SpMax" @Sp @SpMax (@SpMax/3) "" "15,1" "1" "0"
#GAUGE Ep "@Ep/@EpMax" @Ep @EpMax (@EpMax/2) "" "15,6" "4" "0"
#TRIGGER {~"} {#SUB {'}}
#TRIGGER {~;} {#SUB {,}}
#VAR RoomTitleColor "11"
#VAR DescBlockColor "9"
#VAR S_L_BlockColor "3"
#VAR MudPromptColor "#FF8040"
#CLASS 0
!
!
!
!
!
!
#CLASS {System|AutoMapperALL}
#VAR RoomTitle ""
#VAR DescBlock ""
#VAR ExitBlock ""
#TRIGGER {You follow your leader (%w).} {
  #MENU {Mapper|File|Follow Mode}
  #MOVE %1
  }
#TRIGGER {You cowardly flee (%w)~!} {
  #MENU {Mapper|File|Follow Mode}
  #MOVE %1
  }
#CLASS 0
!
!
!
!
!
!
#CLASS {System|MarkRoomTitle}
#TRIGGER {^%e[42m(*)%e[0m$} {
  #VAR RoomTitle %literal( " %1")
  #TAG name @RoomTitle
  #VAR linefeed "%lf"
  #VAR DescBlock "%lf"
  #TAG desc @linefeed
  #COLOR @RoomTitleColor
  #CLASS MarkDescBlock 1
  #CLASS MarkWeatherBlock 0
  } "" {color}
!
!
!
!
!
!
#CLASS {System|MarkDescBlock}
! This is by far my largest block of code, simply because of
! The large number of possible weather messages. Since it is
! colored exactly the same as the description block there was
! no other way to filter it than to patiently jot down every
! single possible line of text for the weather.
!
! without filtering this variable text, the mapper often
! gets confused when descriptions do not match and generates
! new stacked rooms constantly.
!
! Here I grab the actual room description block. All the
! triggers below are for recognizing various lines of weather,
! position of the sun, or simply lighting messages. Thankfully
! these all show up in a certain order, first bad weather
! which obscures the sun, next comes the sun or night sky
! and if you are indoors the only lines that seem to show
! are for lighting. There is actually one indoor case where
! no message at all is shown.
!
! Just in case, and because of this null lighting prompt
! this class will mark the end of the description block
! at the exit block prompt as well.
!
! Any recognized weather blocks will be highlighted yellow as
! long as I continue debugging.
!
#CLASS MarkDescBlock 0
!
! Recognizes the night sky
#TRIGGER {The sky is black and the stars shine down brightly.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
!
! Recognizes the position of the sun messages
#TRIGGER {The Sky is dark blue and a fierce orange glow comes from the west.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sky is dark blue and a yellow glow comes from the east.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The Sky is dark blue and a yellow glow comes from the west.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun is dipping beyond the western horizon.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun is setting in the west.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun shines brightly in the western sky.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun shines down from directly overhead.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun unbearably shines down from directly overhead. } {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun shines brightly in the eastern sky.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun is rising on the western horizon.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun is rising on the eastern horizon.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun rises on the eastern horizon and begins to fill the sky.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun shines brightly in the orange eastern sky.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun is setting in the east.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sky is dark orange and a violet glow comes from the west.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun shines down from directly overhead making the sky a beatiful blue.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sun shines brightly in the green western sky.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sky is dark umber and a white glow comes from the east.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sky is dark blue and a fierce orange glow comes from the east.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
!
! Bad Weather - Obscures the Sun
#TRIGGER {The sky is overcast with dark clouds.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {A light rain is falling from a cloudy sky.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {a steady rain is falling.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sky is overcast and a heavy wind blows rain into your face.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {Gale force winds pummel rain and hail into your face.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {Hurricane force winds pummel rain and hail on you.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {Snow flurries are drifting down from the clouds.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {Heavy snow flakes whip around your in the brisk wind.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
!
! Recognizes lighting, normally only for indoors
! Also for perdow and crypt since these worlds have no sun
#TRIGGER {It is pitch black here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {It is very dark here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {It is dark and shadowy here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {It is dimly lit here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {It is fairly well lit here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {It is very brightly lit here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
!
! Recognizes other weird things
#TRIGGER {There is less than a foot of water here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {There are a few feet of water here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {There is a lot of water here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {There is a flood of water here.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {The sky is full of solar flares.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
#TRIGGER {There is a sunmote here lighting the area.} {
  #NOMAP
  #COLOR @S_L_BlockColor
  #CLASS MarkWeatherBlock 1
  #CLASS MarkDescBlock 0
  }
!
! Next are the triggers to grab the actual non-variable
! description block. This functions as is, but handles a
! few things strangely. indentation of paragraphs is
! completely ignored for some reason, and also for some
! reason linefeed generates what looks like the space at
! the beginning of every following line, yet somehow is not
! since a trimleft has no effect on it.
!
#TRIGGER {^%e[44m(*)%e[0m$} {
  #VAR DescLine %concat( %literal( "%1"), "%lf")
  #TAG desc @DescLine
  #COLOR @DescBlockColor
  } "" {color}
#TRIGGER {^$} {
  #VAR DescLine "%lf"
  #TAG desc {@DescLine}
  }
#CLASS 0
!
!
!
!
!
!
#CLASS {System|MarkWeatherBlock}
!
! Here I NOMAP tag every single line of weather or other
! variable text, and highlight it all yellow for visual
! verification.
! The yellow highlight is here for debugging purposes
! although I am strongly tempted to leave some version of it
! in the final build simply because I have kind of gotten used
! to seeing the weather and other effects neatly seperated in
! the description block.
!
#CLASS MarkWeatherBlock 0
#TRIGGER {^%e[44m(*)%e[0m$} {
  #COLOR @S_L_BlockColor
  #NOMAP
  } "" {color}
#TRIGGER {^The only obvious exit is*} {#CLASS MarkWeatherBlock 0}
#TRIGGER {^Obvious exits are:*} {#CLASS MarkWeatherBlock 0}
#CLASS 0
!
!
!
!
!
!
#CLASS {System|MarkExitBlock}
#VAR ModifiedExitBlock ""
!
! Here I mark the exit block. It can reliably grab any exit
! block up to three lines and if necessary I can add a few more
! triggers to grab even larger exit blocks. These triggers are
! completely reliable.
!
! I may end up putting commands here to add rooms as necessary
! If So I need to think real carefully on rules for which classes
! are enabled at what times.
!
#TRIGGER {^The only obvious exit is &*.$} {
  #VAR ExitBlock {%1.}
  #CLASS MarkDescBlock 0
  #CLASS MarkWeatherBlock 0
  #TAG exitpara @ExitBlock
  }
#TRIGGER {^Obvious exits are: &*.$} {
  #VAR Exitblock {%1.}
  #CLASS MarkDescBlock 0
  #CLASS MarkWeatherBlock 0
  #TAG exitpara @ExitBlock
  }
 #TRIGGER {^Obvious exits are: &*,$&*.$} {
  #VAR Exitblock {%1, %2.}
  #CLASS MarkDescBlock 0
  #CLASS MarkWeatherBlock 0
  #TAG exitpara @ExitBlock
  }
#TRIGGER {^Obvious exits are: &*, and$&*.$} {
  #VAR Exitblock {%1, and %2.}
  #CLASS MarkDescBlock 0
  #CLASS MarkWeatherBlock 0
  #TAG exitpara @ExitBlock
  }
#TRIGGER {^Obvious exits are: &*,$&*,$&*.$} {
  #VAR Exitblock {%1, %2, %3.}
  #CLASS MarkDescBlock 0
  #CLASS MarkWeatherBlock 0
  #TAG exitpara @ExitBlock
  }
#TRIGGER {^Obvious exits are: &*,$&*, and$&*.$} {
  #VAR Exitblock {%1, %2, and %3.}
  #CLASS MarkDescBlock 0
  #CLASS MarkWeatherBlock 0
  #TAG exitpara @ExitBlock
  }
#CLASS 0
!
!
!
!
!
!
#CLASS {System|DetectPrompt}
 #TRIGGER {Hp: (%n)/(%n) Sp: (%n)/(%n) Ep: (%n)/(%n) Gold: (%n) Exp: (%n) ~>} {
  #PRIORITY {
    #SUB {Hp: %1/%2 Sp: %3/%4 Ep: %5/%6 Gold: %7 Exp: %8 ~=~)}
    #VAR Hp %1
    #VAR HpMax %2
    #VAR Sp %3
    #VAR SpMax %4
    #VAR Ep %5
    #VAR EpMax %6
    #VAR Gold %7
    #VAR Exp %8
    #CLASS CommandLine 1
    #TAG prompt
    #COLOR @MudPromptColor
    #CLASS MarkDescBlock 0
    #VAR LastCommand %pop( CommandStack)
    #VAR NextCommand %pop( CommandStack)
    #IF (@LastCommand!="") {
      #IF ((%left( @NextCommand, 6)="unlock") | ((%left( @NextCommand, 4)="open") & (%left( @LastCommand, 6)!="unlocked")) | (%roomportal( ,@NextCommand)!="")) {
        #VAR LastCommand @NextCommand
        #VAR NextCommand ""
        } {
        #VAR CommandStack %push( @NextCommand, @CommandStack)
        #NOOP
        }
      #IF ((%left( @LastCommand, 6)="unlock")|(%left( @LastCommand, 4)="open")) {
        #NOOP
        #NOOP
        } {
        #IF (@RoomTitle!="") {
          #NOOP
          #OK
          } {
          #NOOP
          #NODIR
          }
        }
      }
    #VAR InputCounter 0
    #VAR LastCommand ""
    #VAR RoomTitle ""
    #VAR ExitBlock ""
    }
  } "" {prompt|color}
!
! Health updates
#TRIGGER {^--- HP:(%n)/(%n)~ ~ SP:(%n)/(%n)~ ~ EP:(%n)/(%n)} {
  #COLOR @MudPromptColor
  #VAR Hp %1
  #VAR HpMax %2
  #VAR Sp %3
  #VAR SpMax %4
  #VAR Ep %5
  #VAR EpMax %6
  } "" {prompt}
#TRIGGER {^Hp: (%n)/(%n) Sp: (%n)/(%n) Ep: (%n)/(%n)} {
  #COLOR @MudPromptColor
  #VAR Hp %1
  #VAR HpMax %2
  #VAR Sp %3
  #VAR SpMax %4
  #VAR Ep %5
  #VAR EpMax %6
  } "" {prompt}
#TRIGGER {^EQ Tick: Hp: (%n)/(%n) Sp: (%n)/(%n) Ep: (%n)/(%n)} {
  #COLOR @MudPromptColor
  #VAR Hp %1
  #VAR HpMax %2
  #VAR Sp %3
  #VAR SpMax %4
  #VAR Ep %5
  #VAR EpMax %6
  } "" {prompt}
#CLASS 0
!
!
!
!
!
!
#CLASS {System|CommandLine}
#ONINPUT {(*)} {
  #IF (%left( %1, 4)="mail")|(%left( %1, 4)="plan")|(%left( %1, 4)="desc")|(%left( %1, 4)="news")|(%left( %1, 4)="typo")|(%left( %1, 3)="bug")|(%left( %1, 4)="idea")|(%left( %1, 6)="praise") {
    #CLASS CommandLine 0
    #NOOP
    } {
    #MATH InputCounter @InputCounter+1
    #VAR CommandStack %additem( "%1", @CommandStack)
    #IF (@InputCounter>@InputSpammy) {
      #NOOP Stub for later
      #NOOP Will use this to handle safewalk speeds
      }
    }
  }


Last edited by billaben on Thu Sep 22, 2005 5:45 am; edited 4 times in total
Reply with quote
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Tue Sep 06, 2005 11:27 pm   
 
Typical. Just Typical. I intentionally held this code since sunday trying to make sure I had caught all the weather messages and any other major bugs. Sure enough, five minutes after I post it I find a weather message I missed.

I edited the main post and included the new trigger.

Code:
#TRIGGER { The sky is dark umber and a white glow comes from the east.} {
  #NOMAP
  #COLOR "#000000,#B7B700"
  #CLASS MarkDescBlock 0
  #CLASS MarkWeatherBlock 1
  }
Reply with quote
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Tue Sep 06, 2005 11:40 pm   
 
Yuck and double yuck. It looks like there may be a number of weather messages I am missing still, so be warned. If the script fails to tag a weather message it will stack the room every time the weather changes. So it is important that I find any stray messages.

I have found a number of new weather messages on Raji which I had missed before. I have added them all to the big chunk of code above.

If you find any problems with the script, especially ones with the weather messages, please let me know.
Reply with quote
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Thu Sep 22, 2005 5:44 am   
 
Okay, I've been doing a lot of work on this lately. I held off posting off anything new for a while because I was making a pretty profound change to how the script verifies if you have moved or not. It is now using a commandque to store all your commands and verify these against the prompts and room information sent to tell which commands resulted in a succesful move and which did not.

End result is that it no longer has any difficulties at all with figuring out if your movement was blocked by a mob. I've been running this for several days now without a hitch so it should do the job quite nicely. This also happened to clear up some difficulties it was having in water or other hazardous terrain.

The main area the script is still weak on is with lighting. If your light goes out it no longer has accurate room information to work with. If you are in edit mode, this means it will be stacking rooms on you every time. If you are just in follow mode however it will go ahead and accept your moves without question as long as you have known paths. It will still detect blocked movement accurately in either case.

As before. While I'm confident of my code, I make no guarantees. It's still beta. I'm squashing bugs as I can find 'em. I'll keep it posted.
Reply with quote
Vitae
Enchanter


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

PostPosted: Thu Sep 22, 2005 7:54 pm   
 
Just curious, why
#TRIGGER {The sky is full of solar flares.} {
#NOMAP
#COLOR @S_L_BlockColor
#CLASS MarkWeatherBlock 1
#CLASS MarkDescBlock 0
}
#TRIGGER {There is a sunmote here lighting the area.} {
#NOMAP
#COLOR @S_L_BlockColor
#CLASS MarkWeatherBlock 1
#CLASS MarkDescBlock 0
}

and not
#TRIGGER {{There is a sunmote here lighting the area.|The sky is full of solar flares.}} {
#NOMAP
#COLOR @S_L_BlockColor
#CLASS MarkWeatherBlock 1
#CLASS MarkDescBlock 0
}

or

#TRIGGER {@weathermsgs} {
#NOMAP
#COLOR @S_L_BlockColor
#CLASS MarkWeatherBlock 1
#CLASS MarkDescBlock 0
}
#var weathermsgs {There is a sunmote here lighting the area.|The sky is full of solar flares.}

Don't play the mud, but wanted to see what the script looked like and thought i would ask
_________________
http://www.Aardwolf.com
Reply with quote
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Fri Sep 23, 2005 2:12 am   
 
Humm... yea, it is rather a monster, I considered converting it to a string list at one point but chose not to bother. When I initially started coding in those triggers I didn't know how to define string list in zMud yet.

However, I'm not sure it would work. In an earlier attempt at grabbing the descripting block I had problems with it failing to grab the entire block when I was storing it all into a string. The problem only occured on rooms that had around 12 or more lines of text in them. I am not certain, but I think there actually is a max size on strings. if so this amount of data would certainly exceed that.

So I could try converting it to a string list and see what happens, but It wouldn't really gain me anything, and it might not work correctly. It's quite readable as it is currently, even if it is a bit bulky looking.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Oct 04, 2005 5:46 pm   
 
Well i just started trying RetroMud... I've not even made past my initial starting point yet. So I'll try the string lists and see what happens. What's gonna suck is that since I started playing around with some zMapper features for the rooms, I'm going to lose all of that.

Also if time permits, real life has a habit of getting into the way of MUD-related pursuits, I'll try to see what Mods can be made for a zMapper enhanced version of the script.
_________________
Asati di tempari!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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