MU Soapbox

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

    Parent Room Problems

    MU Code
    mux parents hel
    6
    8
    2211
    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.
    • Rusalka
      Rusalka last edited by

      I'm coder for a game using MUX 2.10.1.12, and I'm having trouble with parent rooms. I want the ConFormat to show a list of who's connected, their idle time, and their &shortdesc.

      Tidy list of names? Check. Idle times? Check. &shortdesc? #-1 PERMISSION DENIED.

      It works fine when I'm on my wizbit, but when I switch over to a regular player character, I get permission denied even on my own &shortdesc. I've set the room INHERIT, !INHERIT, ROYALTY, !ROYALTY, etc., and fiddled around with objeval(), but nothing changes.

      (I'm also totally unable to get u(#some other object/attribute) to work, which I assume is related. But since I can just copy the attributes over to the parent room object and use u(attribute), it's not a big deal.)

      Help? I don't have a lot of experience with parent rooms, so feel free to point and laugh at whatever ridiculously simple thing I've overlooked.

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

        I'm having a similar issue on my little pennmush server. I usually get the Huh? reply when I make interactive objects.

        When I copypasta from mushcode.com, I get arguments must be intergers quite often.

        Many things get nuked.

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

          Speaking about TinyMUX only:

          To do it purely through @ConFormat every single room on the game will need to beset INHERIT, because it is the room itself running the code, not the parent.

          You can create a global function with @function that can fetch this information on behalf of the room. See; "wizhelp @function". The function will need to be /privileged.

          Use this with caution. The function running with wizard privileges will be able to see contents that are DARK and on reality levels other than the observer. Off the top of my head I don't recall if the enactor will be the room or the observer.

          With the function being global, anyone will be able to use it. If it turns out that the enactor is the room you could write the function to verify that the enactor is in fact a room, but a player could just use a room they control to run the function.

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

            The following mess of code is from Eldritch's parent room:

            Main Room Parent
            Type: ROOM Flags: FLOATING INHERIT MONITOR PARENT_OK SAFE
            %r%tThis is an un-@desc'd room!%r
            Owner: Code Wizard  Key: *UNLOCKED* Pennies: 0
            
            NameFormat: wheader( name( %! ))
            
            DescFormat: strcat( %0, if( cor( get( %!/placesmax ), places( list, %! )), strcat( %r, wrap( Places are active here. Use '%xhplaces%xn' and '%xhplace #%xn' to see descriptions., width( %# ), c ), %r )), )
            
            ConFormat: strcat( if( 0, strcat( setq( u, setdiff( lcon( %!, connect ), iter( %qp, elements( %i0, 4, : ), | ))), if( t( %qu ), strcat( setq( c, 1 ), wdivider( Unplaced Characters ), %r, u( display.allchars, %qu ))), iter( %qp, if( setr( t, elements( %i0, 4, : )), strcat( if( t( %qu ), %r, setq( c, 1 )), wdivider( strcat( elements( %i0, 1, : ), .%b, capstr( elements( %i0, 2, : )))), %r, u( display.allchars, %qt ))), |, @@ ))), if( setr( 1, filter( fil.notdark, lcon( %!, player ))), strcat( setq( c, 1 ), wdivider( Characters ), %r, u( display.allchars, %q1 ))), if( setr( o, filter( fil.notdark, lcon( %!, object ))), strcat( if( %qc, %r, setq( c, 1 )), wdivider( Objects ), %r, u( .vtable, map( map_stuff, %qo, %b, | ), 0, | ))), if( 0, strcat( if(  %qc, %r ), wdivider( +Views in this location ), %r, u( .vtable, %qv, 0, | )) ))
            
            ExitFormat: strcat( if( setr( 1, filter( fil.dir, filter( fil.notdark, lexits( %! )))), strcat( wdivider( v( directions_name )), %r, u( .vtable, map( map_exit, %q1, %b, | ), 0, | ), %r )), if( setr( 1, filter( fil.exit, filter( fil.notdark, lexits( %! )))), strcat( wdivider( Exits ), %r, u( .vtable, map( map_exit, %q1, %b, | ), 0, | ), %r )), wfooter( if( u( .isic, %! ), cat( IC Area -, get( %!/coord )), OOC Area)))
            

            Some is missing, but you get the idea. We are using an edited version of @Chime's parent room code from The Reach. Both available upon request.

            “If you wish to make an apple pie from scratch, you must first invent the universe.”
            ― Carl Sagan, Cosmos

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

              Thank you! Used a @function to grab the shortdesc, and it's working fine now. I incorporated objeval() into it, which should prevent most mischief.

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

                Not sure if it works on MUX but you can also make an attribute visual, which means anyone and anything can see it with ex or get() as well.

                Chime 1 Reply Last reply Reply Quote 0
                • Chime
                  Chime @Bobotron last edited by

                  @Bobotron said:

                  Not sure if it works on MUX but you can also make an attribute visual, which means anyone and anything can see it with ex or get() as well.

                  That's what was done on TheReach.

                  Setting attributes visual is persistent in the DB and global across all objects.

                  It is by will alone I set my mind in motion. It is by the juice of Coffea arabica that thoughts acquire speed, the table acquires stains, the stains become a warning. It is by will alone I set my mind in motion.

                  Bobotron 1 Reply Last reply Reply Quote 0
                  • Bobotron
                    Bobotron @Chime last edited by

                    @Chime
                    Yeah, it's how my Room Parent on TheatreMUSH handles form tags and Virtual NPCs, and is especially useful for player builds that might have issues with having a function call or some other power. It's also not something that is easily abusable.

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