MU Soapbox

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

    You're on a boat!

    MU Code
    6
    23
    6748
    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.
    • il-volpe
      il-volpe last edited by

      &SAIL_CMD Generic Boat=$sail *:@swi [u(%0/navigable)]=1,@fo me=%0,{@pemit %#=You have to sail on water.}

      Okay, fine. But I want the navigable exits to have a size, and the boats to have a size, so you can take a little boat up the river, but not a big ship. My prodding at this problem hasn't worked, for I am ignorant. Well, unless I just use two types of parents and have two types of navigable attributes on the exits, using both for large waterways and only the one for small.

      "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

      1 Reply Last reply Reply Quote 0
      • Misadventure
        Misadventure last edited by

        I thought grids that simulate the land were a done thing.

        Also, it's all about the draft.

        I have a waggish sense of humor.

        il-volpe 1 Reply Last reply Reply Quote 0
        • Alzie
          Alzie last edited by

          2 options. Easy and hard. I suggest easy.

          Easy:

          • Create zones for the ships and exits. Check the parents of each. Code for the large and small waterway parent.

          Hard:

          • Set each exit to have a size and each boat to have one too. Make sure they're compatible.

          The easy way just requires setting a parent. The hard requires each one to have an attribute set.

          Alzie's Too Long Playlist

          il-volpe 1 Reply Last reply Reply Quote 1
          • il-volpe
            il-volpe @Alzie last edited by

            @Alzie

            Thanks, though, well, not enough detail for my ignorance.

            I'm trying to do 'hard' way, because I have other purposes for zones, and really don't intend to have shitloads of waterway anyway. What I can't figure is how to say, "If the 'size' attribute of the waterway is greater than or equal to the 'size' attribute of the vessel, then...else..." rather than, "If the 'navigable' attribute of the waterway is 1, then...else..." like I've got.

            "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

            1 Reply Last reply Reply Quote 0
            • TNP
              TNP last edited by

              I think you can do it with lock. Give each boat a size attribute. Have the lock check for the attribute. If > maximum size for that lock it fails.

              il-volpe 1 Reply Last reply Reply Quote 0
              • il-volpe
                il-volpe @TNP last edited by

                @TNP I think that would lock out swimmers (that is, PCs who are not on boats) too, and I don't want to do that.

                "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                1 Reply Last reply Reply Quote 0
                • Ganymede
                  Ganymede Admin last edited by

                  Needs a command that gives me a nautical-themed Pashmina afghan.

                  “It is better to live doing the things that you like. It is foolish to live within this dream of a world seeing unpleasantness and doing only things that you do not like.” -- Yamamoto Tsunetomo.

                  1 Reply Last reply Reply Quote 1
                  • Alzie
                    Alzie last edited by Alzie

                    So basically. You want to do this.

                    Set size on boat. Lock it to wizards but set it visual so exits can pull it without being set wizard.
                    @lock exit=canpass/1|type^player
                    &canpass exit=grab size of %#'s boat and compare to get(%!/size)

                    That will let them pass if the size of the boat works or they're a player object.

                    Alzie's Too Long Playlist

                    il-volpe 1 Reply Last reply Reply Quote 1
                    • il-volpe
                      il-volpe @Alzie last edited by il-volpe

                      @Alzie Thanks. If you'd write that in actual MUSH syntax, like, I could make use of it -- as far as I know, the > symbol is not how to compare said sizes, or the poking about code I was using earlier would work.

                      As I said, I'm ignorant as fuck, and really don't know how to make 'grab' and 'compare' into MUSH code, and bugger if the manual, such as it is, helps me.

                      Edited to add that, in all honesty, unless there's something wrong with it that I don't know about, I really want to use the 'hard way' code above, except have it actually work with a greater-than rather than an equal-to, because this allows me to tell people /why/ their boat won't move through the exit, rather than leaving them with the generic fail message, which I rather want to leave in place in case said exit is locked.

                      "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                      1 Reply Last reply Reply Quote 0
                      • Alzie
                        Alzie last edited by Alzie

                        I can help with that. Can I know a bit more about the setup? For example, are the boats objects they carry? Or are they objects players enter? If they are just things they carry, how do you know when someone is sailing?

                        Alzie's Too Long Playlist

                        1 Reply Last reply Reply Quote 1
                        • il-volpe
                          il-volpe last edited by

                          They are objects they enter. You then type 'sail <exit name>' and -- well the blurb of code is above in my first post.

                          "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                          1 Reply Last reply Reply Quote 0
                          • Alzie
                            Alzie last edited by Alzie

                            That makes things considerably easier.

                            @lock exit=canpass/1|type^player
                            &canpass exit=lte(get([where(%#)]/size),v(size))

                            That will only allow someone through the exit if the size attribute of where they are is less than or equal to the exits size attribute or they are a player object.

                            Alzie's Too Long Playlist

                            1 Reply Last reply Reply Quote 0
                            • il-volpe
                              il-volpe last edited by

                              And if I want, as I said above, to put the check on the sail command I've got, instead of as an exit lock, so I can have the messages actually tell you why you can't sail that way?

                              I am mystified as to the use of 'where' in there, as the entire boat object and all its contents should go though the exit, and since the sail command is @forcing the object to take the exit, would not 'where' then refer to the room where the boat object is, and not the boat object itself?

                              "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                              1 Reply Last reply Reply Quote 0
                              • Cobalt
                                Cobalt Tutorialist last edited by

                                Hit up an @fail and @ofail on your locks saying: "You can't sail that way" -- this should emit to the room/player that they can't sail because they failed to pass the lock.

                                il-volpe 1 Reply Last reply Reply Quote 0
                                • il-volpe
                                  il-volpe @Cobalt last edited by il-volpe

                                  @Cobaltasaurus Yes. It's not that I don't know how to set the fail messages. It's that this doesn't tell you that you can't sail that way because your boat is too big. It would tell you that you can't sail that way even if you're not sailing, but swimming. Ideally, it ought to tell people, "You can't sail on land," if you try to sail the boat through a non-waterway exit, and "The water isn't deep enough for this vessel," (or better yet, a customizable message so they can't fit under the bridge, or whatever) if you try to sail through an exit too small for the boat you're on, and "You can't go that way," if I've locked the exit entirely for some other reason.

                                  Admittedly, people don't read that shit so I'll still eventually have somebody tell me that they could sail all the way up the river in their canoe, but they tried it yesterday in a big trading carrack and it wouldn't go, the exit or the boat is broken, kinyafixit?

                                  But it'd be nice to give 'em a chance.

                                  "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                                  1 Reply Last reply Reply Quote 0
                                  • il-volpe
                                    il-volpe @Misadventure last edited by

                                    @Misadventure said:

                                    I thought grids that simulate the land were a done thing.

                                    Took me a bit to figure out what you meant.

                                    I hate the new-style grids where things that are ICly next to one another are not next to one another on the grid, or things that are far apart ICly are reached via some OOC grid-hub or summat. The grid should give you some imagination milage. I don't try to stop people using +join, or hangouts-hop-code to avoid ever walking the grid if they don't wanna walk it, and there's nothin' I can do about people who just fail to read the descs (well, except make it so boats will not move where boats cannot go) but bugger the grid that reflects nothing about the lay-out of the IC world.

                                    "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                                    1 Reply Last reply Reply Quote 0
                                    • Misadventure
                                      Misadventure last edited by

                                      If it makes you happy, it's good, and it won't get in anyone elses way.

                                      I have a waggish sense of humor.

                                      il-volpe 1 Reply Last reply Reply Quote 0
                                      • il-volpe
                                        il-volpe @Misadventure last edited by

                                        @Misadventure Yeeep. I also hated that old custom of banning teleporting in any fashion and forcing people who didn't want to walk the grid to do it. Why even give a shit?

                                        "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                                        1 Reply Last reply Reply Quote 0
                                        • Alzie
                                          Alzie last edited by

                                          @il-volpe the fail messages can be whatever you want to be clear. As to where, it would grab the object's dbref. If you enter an object, your location is that objects dbref. As to making it part of the @ command, that's a little harder. I will do that in a little

                                          Alzie's Too Long Playlist

                                          1 Reply Last reply Reply Quote 0
                                          • Alzie
                                            Alzie last edited by Alzie

                                            Okay, so, the player types sail north for instance from inside the object. The problem is that the exit isn't inside the object. So you can't just assume it is. So you have to account for that.

                                            sail *:@switch [setq(a,0)][iter(lexits(where(where(%#))),if(strmatch(name(%i0),%0*),setq(a,%i0)), ,)]%qA=0,{@pemit %#=That doesn't appear to be a direction you can sail!},{[if(u(%qA/CANPASS,%#),tel(where(%#),loc(%qA)),pemit(%#,Your boat can't fit through there!))]}

                                            Alzie's Too Long Playlist

                                            il-volpe 1 Reply Last reply Reply Quote 1
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post