MU Soapbox

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Muxify
    • Mustard

    Getting Attributes with Roomformat

    MU Code
    3
    10
    1853
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 3543thrh67
      3543thrh67 last edited by

      Okay. I'm fiddling with @roomformat (as well as exit and name and conformat) but right now I am having troubles figuring out what I need to use in @roomformat to pull an attribute off the room. I specifically mean the details in the attribute. I tried the things I know and can't find a connecting helpfile that will tell me.

      Mercutio 1 Reply Last reply Reply Quote 0
      • Mercutio
        Mercutio Creator @3543thrh67 last edited by

        @icanbeyourmuse
        Get(), v(), or u() if you need it evaluated.

        3543thrh67 1 Reply Last reply Reply Quote 0
        • 3543thrh67
          3543thrh67 @Mercutio last edited by

          @Mercutio I tried all of those with %#, %!, %0, %L, etc. and it just returns a blank line. SO, it is breaking down in pulling the attribute details.

          1 Reply Last reply Reply Quote 0
          • 3543thrh67
            3543thrh67 last edited by

            OH! I figured it out. Apparently I missed the attribute.

            1 Reply Last reply Reply Quote 0
            • 3543thrh67
              3543thrh67 last edited by 3543thrh67

              Okay. This is sort of not and sort of related to this. I am trying to make a simple weather system (very simple). At least looks wise. The details are:

              Weather/time (extremely simple, I hope)

              • It tracks the season by changing it every 3 months (to do 4 times a year). It simply changes an attribute called something like ‘currentseason’. It’ll just do ‘Spring, Summer, Fall, Winter’ So, the automatic change would start at, say, spring, and after 3 months turn over to summer and so on.
              • It’ll just give the current weather in a couple words, give or take (IE it’ll say Rainy), pulling from a list related to the season going on. IE: It’s spring so it’d pull from an attribute that is something like: &list.spring <object>=<list of spring weather choices> and so on for each seasons.
              • A 12 hour clock. It’d basically just track the IC time. The ability to adjust the time speed would be nice. For example 2 IC days happens every 1 RL day.

              How would I go about making it so a cron runs according to the change of season every 4 months and the change of weather every day. Basically how I explained it. Trying to code for my game myself so.. yup. I am ignoring the clock and time ratio. I couldn't find a weather system that is this simple.

              faraday 1 Reply Last reply Reply Quote 0
              • faraday
                faraday @3543thrh67 last edited by

                @icanbeyourmuse Here's a fairly simple weather system you can use for ideas. It relies on Myrddin's Cron System, which you can find in various places to do the periodic cron job. Here's Volund's Version of the cron, and here's mine. I'm sure the original is around somewhere but I can't find it.

                3543thrh67 1 Reply Last reply Reply Quote 0
                • 3543thrh67
                  3543thrh67 @faraday last edited by

                  @faraday I was looking up a cron on MUSHCode (I think) and couldn't figure it out. Yours seems to make more sense. One question.. If I wanted to make it run daily to weather would I need a cron time thing for each day? Same with making it change every 4 months.

                  faraday 1 Reply Last reply Reply Quote 0
                  • faraday
                    faraday @3543thrh67 last edited by faraday

                    @icanbeyourmuse There's some help for the cron system here. You just need to create attributes for each cron job telling the cron system when you want your thing to run, and what to do when it runs. The cron system has a loop running in the background like every minute checking to see "is it time for any of these cron jobs to run?"

                    So you would probably want a cron job to change the weather every day. An hourly cron job could look like this (I think):

                    |||12|00| <-- runs every day at 12:00

                    I'm not sure why you need a second cron job to change the season. You can figure out what season it is from the current date. But if you wanted to set that with a cron you can have one that runs every four months.

                    3543thrh67 1 Reply Last reply Reply Quote 0
                    • 3543thrh67
                      3543thrh67 @faraday last edited by

                      @faraday The 'args' would be the thing it does?

                      faraday 1 Reply Last reply Reply Quote 0
                      • faraday
                        faraday @3543thrh67 last edited by

                        @icanbeyourmuse No the thing it does goes into a matching attribute named CRON_JOB_xxx that is triggered when the time in CRON_TIME_xxx matches. I forget what args is for.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post