Log:Basic Coding

From Fate's Harvest
Revision as of 00:41, 27 November 2017 by MagicRabbit (Talk | contribs)

Jump to: navigation, search


Basic Coding
Participants

Annapurna

9 November, 2017


Annapurna teaches babycode!

Location

Annapurna says, “Hellooooo”

You say, “Helloooooo~”
 
Haruki says, “Hi”
 
Annapurna says, “Checking to see if Vorp's coming.”
 
You say, “Are you logging for people who can't attend, Anna?”

Haruki says, “TodaY I am sick and particularly stupid so I don't expect to understand anything but gonna sit here anyway”

Vorpal has arrived.
 
Annapurna says, “You may already know some of what I'm going to tell you, so bear with me.”
 
Annapurna says, “I don't know what level of knowledge people have already.”
 
Haruki has none
 
Haruki says, “Mu code is utterly baffling to me”
 
Annapurna says, “Alrighty. First thing to bear in mind: players, exits, rooms, items, they are all the same thing as far as code is concerned.”
 
Annapurna says, “They all have database references (dbrefs).”
 
Annapurna says, “They are code objects.”
 
Annapurna says, “They are objects of a particular "type"”
 
Annapurna says, “Player objects, exit objects, room objects, etc.”
 
Annapurna says, “If you look at yourself, you will see your name up at the tippity top of your desc.”
 
Annapurna says, “Next to that, you'll see a bunch of letters and numbers tucked into ()”
 
Annapurna says, “The number is your dbref.”
 
Annapurna says, “There are less spammy ways to get that number.”
 
Annapurna says, “But we'll skip those for now.”
 
Haruki says, “The letters?”
 
Annapurna says, “Those are flags.”
 
Annapurna says, “Since you are a Player object, your list will start with P. :)”
 
Annapurna points to: help flag list
 
Haruki says, “Thanks!”
 
Annapurna says, “Now, by default, you as a player object can control any object you are listed as the owner of.”
 
Annapurna says, “So you can @desc yourself, any rooms or items you own, set code on them, move them around, etc.”
 
Annapurna says, “There are all sorts of @powers which players can be given, to allow them to, say, look at things in distant places, or build things, or...”
 
Annapurna says, “If you are a Wizard, you get (almost) all of those.”
 
Annapurna says, “The veryvery first Player object created on these games, #1, is God.”
 
Annapurna says, “Olympus here.”
 
Annapurna says, “God is the only one with the ability to set the Wizard flag, and certain things can't be done to #1.”
 
Annapurna says, “And certain things can ONLY be done BY #1.”
 
Annapurna says, “Wouldn't Riker be pleased.”
 
Haruki laughs
 
Vorpal says, “HA!”
 
Michelle giggles
 
Haruki says, “I am surprised you made a pop culture joke!”
 
Annapurna says, “I grew up on Star Trek because my dad was obsessed.”
 
Annapurna laughs.
 
Vorpaldoesn't think tng is still pop culture.
 
You say, “TNG isn't universal? wat? :P”
 
Vorpal says, “Same woth me, Anna!”
 
Annapurna says, “Picard is forever. <3”
 
Annapurna says, “So!”
 
Annapurna says, “You as regular players have none of those fancy @powers, so you can only modify yourselves/objects you own.”
 
Annapurna says, “That is Basic Code Thing #1.”
 
Annapurna says, “If you don't own it, you can't change it.”
 
Annapurna says, “That's why, say, if you type 'ex here' you will just see that someone else owns it.”
 
Annapurna says, “ex is short for examine.”
 
Annapurna says, “You can type 'e' as an even shorter shortcut.”
 
Vorpal says, “izzat an owner cmd?”
 
Annapurna points at: help examine
 
Haruki says, “ACK! I forgot do't type ex me”
 
Annapurna says, “Yeah, even worse for wizzies, Haruki.”
 
Annapurna says, “We see more of your attributes than you do.”

Rowan comes in from the temproom hub.
Rowan has arrived.
Franklyn comes in from the temproom hub.
Franklyn has arrived.
 
Annapurna says, “Welcome, welcome.”
 
Annapurna says, “+repose should have the last bit.”
 
Rowan waves and hides in a corner to listen while she makes lunch.
 
Annapurna says, “So far we have established that Rule #1 is that you can only modify objects YOU own.”
 
Annapurna says, “And how to see your dbref (look at yourself) and flag list (help flag list).”
 
Annapurna says, “So!”
 
Annapurna says, “On to touch on "attributes" in more detail.”
Haruki has disconnected.
Haruki has connected.
 
Annapurna says, “Oops. Looks like we lost a Haruki.”
 
Annapurna says, “Ah! There he is.”
 
Haruki ducttapes
 
Annapurna says, “The way TinyMUX code works, almost everything is stored in "attributes" set on an object.”
 
Annapurna says, “You can examine your attributes with 'examine'”
 
Annapurna says, “Like.. ex me/desc”
 
Annapurna says, “Examine <target>/<attribute name>”
 
Annapurna says, “ex me/d* would pull up anything starting with d.”
 
Annapurna says, “The * is a wildcard.”
 
Annapurna says, “Like when you're playing Uno, and get a card which can be any colour.”
 
Annapurna says, “* means "I could be anything"”
 
Annapurna says, “We'll touch more on uses for those shortly.”
 
Annapurna says, “In this code base, commands are stored as attributes, too.”
 
Annapurna says, “They just have to start with a specific sequence.”
 
Annapurna says, “I'll get to that in a moment. First, I want to be very clear: what you are writing is called an "arbitrary" command.”
 
Annapurna says, “As opposed to an @command, or a hard coded command like look or think or examine.”
 
You say, “I was wondering if this was softcode. Thank you.”
 
Annapurna says, “We as staffers write a + in front of things as a simple way of indicating that it is softcode, custom stuff.”
 
Annapurna says, “So +finger was written by staff, not by TinyMUX itself.”
 
Annapurna says, “Things like that.”
 
Annapurna says, “You don't NEED to start your command with a +.”
 
Annapurna says, “Only thing you can't use is a number.”
 
Annapurna says, “Same goes for attributes. You can never start an attribute name with a number.”
 
Annapurna says, “Now, in a similar vein, the system itself doesn't care what you name a command attribute.”
 
Annapurna says, “Howeeeever...”
 
Annapurna says, “We are human beings.”
 
Annapurna says, “We like being able to easily search for things with our fleshy eyeball blobs.”
 
Annapurna says, “So it's customary to start command attributes with something like cmd- or cmd_ or c. or...”
 
Annapurna says, “I usually use cmd- myself, but it makes absolutely no difference, and it's entirely your choice.”
 
Annapurna says, “The part which DOES matter is what goes INTO that command attribute.”
 
Annapurna says, “Now we're touching on that magic sequence I mentioned earlier.”
 
Annapurna says, “I'll give you an easy example of one I coded on November.”
 
Annapurna says, “I wanted a cheaty simple way to teleport directly into Ninth Spectrum Paintball without having to +travel to the room outside.”
 
Annapurna | &CMD-NSP November=$+nsp:@tel %#=#1228 
 
Annapurna says, “That's the entire command.”
 
Haruki says, “What do you type to make it work?”
 
You say, “I think +nsp”
 
Vorpal says, “+nsp looks like.”
Vorpal has reconnected.
 
Annapurna says, “Copy that into Notepad somewhere so you don't get it spammed off.”
 
Annapurna says, “The magical sequence is $<stuff you type to make the command happen>:”
 
Annapurna says, “The very first thing in the attribute is a $.”
 
Annapurna says, “That tells the system HEY. This is an arbitrary command.”
 
Annapurna says, “It says 'OKAY. What can people type to make this happen?' and promptly looks to the right of the $ to see what the command is.”
 
Annapurna says, “+nsp, in this case, yes.”
 
Annapurna says, “Once it sees a :, it knows 'OKAY, that's the end of the command text.'”
 
Annapurna says, “So to make a +nattie command on yourself, you'd do &cmd-nattie me=$+nattie: bla bla bla bla”
 
Annapurna says, “With me so far?”
 
Annapurna says, “Any questions?”
 
Vorpal says, “Nope!”
 
You say, “I'm good.”
 
Annapurna says, “Good!”
 
Annapurna says, “The part which comes AFTER the colon is what the command actually DOES.”
 
Haruki's brain's so stupid.
 
Annapurna says, “It's a language with a lot of numbers in it, Haruki.”
 
Annapurna says, “I approach it as learning the syntax of a very weird robotic version of Spanish or whatnot.”
 
Haruki says, “The cmd-nsp is it's name? The November, is setting it on November?”
 
Annapurna says, “Yep!”
 
Annapurna says, “& is a shortcut command.”
 
Haruki says, “And this command will only work for the person setting it on themselves?”
 
You say, “Anna, I'm logging this so I can look back on it personally--if that's not okay, I'll stop and delete what I have. I just started, but I have backlog.”
 
Annapurna says, “Like look or think.”
 
Annapurna says, “Oh, log whatever you like. :)”
 
Michelle nods! Thanks.
 
Annapurna says, “The & command is very specifically "set an attribute"”
 
Annapurna says, “@set and set() both can do the same thing, but it's not as fast.”
 
Haruki says, “Okay. What's #1840? Are we getting to that?”
 
Annapurna says, “We're getting to that. :D”
 
Haruki says, “Hrm it showed me my debref when I typed that”
 
Annapurna says, “Exaaactly.”
 
Annapurna says, “%# is what is called a substitution.”
 
Annapurna says, “It's a sequence of characters which stand for something else.”
 
Annapurna says, “In this case, you.”
 
Annapurna says, “Any time you use %# in code like this, it's the "executor" -- that is, the person who entered the command.”
I don’t see that here.
Michelle(#2984PXck1)
Hair the color of rubies, lips the color of garnet, and eyes the color of golden topaz. This alabaster-skinned woman is jeweled perfection, with her perfect, hourglass figure and her perfect proportions in said hourglass. She wears fashionable clothes very often, even in the dead of the coldest Winter.

Her Mantle is the scent of a bonfire on a crisp, cool evening: sweet smoke rising into twilight. It matches her smoky alto voice, inescapable and lovely.

(Autumn Mantle 3; Striking Voice 2 (Smoky Alto); Siren Song; Striking Mien 2 (Jeweled Countenance))
Michelle looks at you.
 
Haruki says, “Okay!”
 
Annapurna says, “So, the @tel command teleports you somewhere.”
 
Annapurna says, “It can also teleport your objects, since you own them.”
 
Annapurna says, “You can teleport to anything YOU own.”
 
Haruki says, “You can teleport anywhere as long as you know the dbref?”
 
Annapurna says, “If you want to go to a friend's house, they have to set a special flag called JUMP_OK on it.”
 
Annapurna says, “You can also set various locks to prevent certain people from being able to get in, that way.”
 
Annapurna says, “But yes, Haruki, that's correct.”
 
Annapurna says, “You can get the dbref of any room you are in by typing: %L”
 
Annapurna says, “think #1129”
 
Annapurna says, “Ha, forgot to double the %”
 
Annapurna says, “'think' is a command which is like a pemit to yourself.”
 
Annapurna says, “It runs whatever code you feed it and only shows you.”
 
Annapurna says, “So you can test your comtitles without spamming channels.”
 
Annapurna says, “Things like that.”
 
Annapurna says, “So! Back to +nsp”
 
Haruki nods
 
Annapurna says, “It has @tel %#=#1228”
 
Vorpal says, “#1228 being NSP's room object DBRef?”
 
Annapurna says, “That means: Teleport the person who entered this command to the room #1228.”
 
Annapurna says, “Yep!”
 
Annapurna says, “And that is a command.”
 
Annapurna says, “That's all there is to it, for things that simple.”
 
Haruki says, “So, using something similar I can set up a lot of different commands that will teleport me wherever I want to go?”
 
Annapurna says, “Yep! Or you could, say, assign separate places numbers, like +travel does.”
 
Annapurna says, “+travel is a more complicated version of +nsp.”
Levi has arrived.
Vorpal disappears, swirling down into the black hole of the exit portal.
Vorpal has left.
 
Annapurna says, “When you type in a grid coordinate, it checks the corresponding dbref in a list, and @tels you to that dbref.”
 
Haruki nods
 
Annapurna says, “The random stuff, however, gets a smidge more complicated than a simple @tel.”
 
Haruki says, “I usually use +Dir to find the coord and then +Travel”
 
Annapurna says, “Yep!”
 
Annapurna says, “+travel/list gives you lists, too.”
 
Annapurna says, “Now, tap those learning caps on.”
 
Haruki says, “But would be much easier if I can just type where I want to go”
 
Annapurna says, “More code jargon:”
 
Haruki says, “You are very good at explaining”
 
Annapurna says, “Functions.”
 
Annapurna says, “Remember how I mentioned arbitrary commands and @commands?”
 
You say, “mhm!”
 
Annapurna says, “The third thing in that trifecta is a group of little useful things called functions.”
 
Annapurna says, “Because...well, they perform useful functions.”
 
Annapurna says, “Many functions actually HAVE a @command version.”
 
Annapurna says, “Like @set and set()”
 
Annapurna says, “Functions end in ()”
 
Annapurna says, “This can be tricky/deceptive, though.”
 
Annapurna says, “So bear in mind that you should always check the helpfile before assuming that an @command will do the same thing as a function.”
 
Annapurna says, “@commands are usually more flexible, since their structure means they can accept more information.”
 
Annapurna says, “Functions will just pick a single default thing.”
 
Annapurna says, “So the default for the function may not be the default for the @command.”
 
Annapurna says, “Key things to know about functions:”
 
Annapurna says, “NEVER ever ever put a space between the function and its ()”
 
Annapurna says, “That's a biggie.”
 
Annapurna says, “It's always set(), and never set ()”
 
Annapurna says, “Functions use commas to separate different things inside of them.”
 
You say, “So set(a blanket,a shawl,a pair of socks) ?”
 
Annapurna says, “If you are ever putting something inside code with a comma in it, you need to "escape" that comma.”
 
Annapurna says, “I touch on this on the comtitle +help file.”
 
Annapurna says, “+help comtitle2”
 
Annapurna says, “The pickrand() function is what you will be using to make your randomness, if you want a random thing for a little command about yourself.”
 
Edmond says, “(is ansi() a function?)”
 
Annapurna says, “Yep!”
 
Edmond ohooo okay!
 
Annapurna says, “And %xh is a substitution.”
 
Edmond nodnods
 
Annapurna says, “Which does the same thing as ansi(h,text)”
 
Edmond says, “(but there's no way to substitute fansi ansi)”
 
Annapurna says, “%x<#ffffff>text”
 
Edmond OHO
 
Annapurna winks.
 
Edmond says, “TINYMUX WINS OVER PENNMUSH AGAIN”
 
Annapurna says, “You can use the 256 in ansi() too.”
 
You say, “It's sexy here, Ed. <3”
 
Annapurna says, “Speaking of things Penn doesn't do, I forgot one thing you as players should never start an attribute with.”
 
Annapurna says, “Don't put a _ before your attribute name.”
 
Annapurna says, “The _ means it is wizlocked/hidden.”
 
Annapurna laughs.
 
Annapurna says, “That's what your +sheet is stored on.”
 
Edmond says, “Michelle: I just get a lot of 'but can you do X in your precious tinymux??' when i hate on penn. and now i can say 'YES IT CAN'”
 
Annapurna says, “Attributes YOU can't see.”
 
Michelle nods at Ed.
 
Annapurna says, “TinyMUX is the only one with the _ attribute name shortcut.”
 
Edmond says, “okay sorry, so pickrand()”
 
Annapurna says, “Yes! Pickrand()”
 
Annapurna says, “For the sake of learning baby code, let's all write a tiny command on ourselves called +myfave”
 
Annapurna says, “My favourite things.”
 
Annapurna says, “So we know that to set an attribute on ourselves, we'll want to type...”
 
Annapurna listens.
 
Edmond &cmd-myfave me=$+myfave
 
Annapurna says, “Yep! With a : after +myfave.”
 
Edmond oh wasn't sure if we were wildcarding it :D
 
Haruki's going to duck out and read the log, but thanks so much for doing this Anna
Haruki disappears, swirling down into the black hole of the exit portal.
Haruki has left.
 
Annapurna says, “I'll show the wildcard after I get this one, yep yep.”
 
Edmond jump gun but not shark. (soz!)
 
Annapurna says, “So, everyone come up with three of their favourite things.”
 
You say, “Say them out loud?”
 
Annapurna says, “If you want. :)”
 
Edmond says, “maple sugar, wesley crusher, embroidered jeans!”
 
Edmond >.>
 
You say, “I think the next thing I'd type after the : would be pickrand(music,ice cream,cake) ?”
 
Annapurna says, “Allllmost.”
 
You say, “Hah, I love you, Ed. You're so 80s. <3”
 
Annapurna says, “See, if you do that, it's not going to show anybody.”
 
Edmond IS 90s!! >:|
 
Michelle apologizes to Edmond.
 
Edmond XD;
 
You say, “Okay, Anna. Why?”
 
Annapurna says, “You need a handy dandy @command.”
 
Annapurna says, “Like @pemit.”
 
Annapurna says, “Also because while using raw functions like that works in TinyMUX, it won't work if you port the command over to, say, Penn.”
 
Annapurna says, “So it's always safest to use your functions inside of @commands.”
 
Annapurna says, “Just in case.”
 
Annapurna says, “Now, here's your choice: do you want to show the entire room?”
 
Annapurna says, “Or just yourself?”
 
Annapurna says, “This touches on the biggest issue when learning how to code: learning the vocabulary...”
 
Annapurna says, “There are ZILLIONS of ways to do things, and sometimes there is a specific super quick and easy function or @command which does EXACTLY what you want.”
 
Annapurna says, “But how on earth will you know that?”
 
You say, “I want to learn to show the entire room, but both is good.”
 
Annapurna says, “Mostly it amounts to experience and time and reading helpfiles.”
 
Annapurna says, “Okay! Then you will want @remit.”
 
Annapurna says, “help @remit”
 
Annapurna says, “Which is handy dandy and convenient, because it means I get to teach you another key thing you can do with functions. :D”
@REMIT

  COMMAND: @remit <room dbref#> = <message>

  Sends <message> to the contents of <room>.

  Related Topics: @femit, @oemit, @pemit, @npemit, @emit, SPOOFING.

 
Annapurna says, “So! You have &cmd-myfave me=$+myfave: written in your Notepad.”
 
You say, “yep!”
 
Annapurna says, “You start to write the @remit, but then you see, waaait a minute, it wants the room dbref!”
 
Annapurna says, “If you want it to ALWAYS @remit to the same specific room dbref, it's fine to just write #1234 (or whatever) there.”
 
Annapurna says, “Like, someone ringing a doorbell.”
 
Annapurna says, “But what if you want to be able to use the command in any room you're standing in?”
 
Annapurna says, “You have to find a way to grab "the room I am in" as the room dbref.”
 
Annapurna says, “Thankfully, that's where %L is useful.”
 
Annapurna says, “%L is a substitution for loc(%#)”
 
You say, “Is it supposed to be an L? Every time I type that, I get an error.”
 
Levi says, “Does... hm. Does the L stand for loca-HA! Okay!”
 
Annapurna says, “#-1 FUNCTION (LOC) EXPECTS 1 ARGUMENTS grabs the location.”
 
Annapurna coughs.
Huh?  (Type “help” for help.)
 
Annapurna says, “That's what happens when I don't escape the ()”
 
Annapurna ahem.
 
You say, “#1129”
 
You say, “OH! Okay.”
 
Annapurna says, “So with that in mind...”
 
Annapurna says, “Skipping what comes after the = for now, how would my command look?”
 
Annapurna listens.
 
You say, “&cmd-myfave me=$+myfave:@remit /#1129”
 
You say, “I didn't escape it right.”
 
You say, “&cmd-myfave me=$+myfave:@remit %L”
 
Annapurna says, “To escape things, you can use % or \”
 
Annapurna says, “Try "say" ing something with a plain % or \ in it.”
 
Annapurna says, “See how they disappear?”
 
You say, “”
 
Annapurna says, “That's why you have to type 100%% to make something like 100% show up in text.”
 
You say, “Aha. I used the wrong slash, is all.”
 
Annapurna says, “The system parses that symbol.”
 
Annapurna says, “Parses = it reads it as code.”
 
Levi says, “Is there an @lemit? That skips needing a room reference from @remit?”
 
Annapurna says, “There's a @pemit, @emit, @femit, @oemit, @npemit, @remit...”
 
Annapurna says, “Lots of ways to emit.”
 
Levi says, “Gotcha! Thank you!”
 
Annapurna says, “But in this case, no.”
 
Annapurna says, “@remit will emit the same message to the entire room.”
 
Annapurna says, “But! Further complication.”
 
Annapurna says, “Do you want it to say "Your" favourite thing to you, and "Michelle's" favourite thing to everybody else?”
 
You say, “Michelle's.”
 
You say, “Er, yes. I reread and understand better.”
 
Annapurna says, “Hehe.”
 
Michelle is still not enough caffeine'd.
 
Annapurna says, “See, that's what I did with the +cb command.”
Annapurna sets Michelle on fire by lobbing them into the SUN ITSELF. What an arm!
 
Annapurna says, “YOU see 'Annapurna sets Michelle on fire'”
 
Annapurna says, “I see 'You set Michelle on fire'”
 
Annapurna says, “Because I used two separate commands: @pemit %#=You set Michelle on fire etc.”
 
Annapurna says, “@oemit %#=[moniker(%#)] sets Michelle on fire etc.”
 
You say, “How... do you set that up?”
 
Annapurna says, “O for other.”
 
Annapurna says, “See how @oemit still uses %#?”
 
You say, “yup”
 
Annapurna says, “It does something close to what Levi asked.”
 
Annapurna says, “It emits to everyone in the room EXCEPT for %#”
 
Annapurna says, “Now, see the moniker() bit there?”
 
Annapurna says, “That's a function.”
 
Annapurna says, “I have colours on my name because I have a moniker.”
 
Annapurna says, “Michelle, say something.”
 
You say, “uh. Hi?”
 
Annapurna says, “My lovely guinea pig.”
 
You say, “Not that I mind...”
 
Annapurna says, “I used @moniker on her.”
 
Michelle looks around.
 
You say, “Oooh, and it's pretty pink.”
 
Annapurna says, “So her name is now bright pink.”
 
Edmond says, “that is... SUPER PINK”
 
Annapurna says, “Now, type: think moniker(*michelle)”
 
Annapurna says, “The * in front of the name tells the system that you want the dbref of michelle.”
Michelle
 
Annapurna says, “It brings up the colourful name.”
 
Annapurna says, “Now, do the exact same thing, but with name(*michelle) instead.”
 
Annapurna says, “No fancy colours.”
 
You say, “I'm just gtting a huh?”
 
Annapurna says, “Have to think it. :)”
 
Annapurna says, “think name(*michelle)”
Michelle
 
You say, “Ah, yes, okay. >.>”
 
Annapurna says, “Sorry, my bad. I should have been more specific. :)”
 
You say, “It's okay! <3”
 
Annapurna says, “So it's entirely your choice, which one you use.”
 
Annapurna says, “If you want your command to show fancy name colours, you can use moniker()”
 
Annapurna clears the eyeblinding pink away.
 
Annapurna says, “Still with me? Any questions so far?”
 
You say, “I'm a bit confused.”
 
You say, “But it's a few steps back.”
 
Annapurna says, “Go ahead. :)”
 
You say, “For the two separate commants, @pemit and @oemit. Which do you use, or how do you use both?”
 
Annapurna says, “Yeah, I hadn't gotten to that part yet.”
 
You say, “Aha.”
 
Annapurna says, “Was going to go into that next. :D”
 
Michelle :)
 
Annapurna says, “So! Daisy-chaining things.”
 
Annapurna says, “If any of you are familiar with other codebases, you may know the term "white space"”
 
Annapurna says, “I.e. you can hit return, toss things in other lines, use tabs to make it more visually kind.”
 
Annapurna says, “... forget that exists.”
 
Annapurna says, “TinyMUX doesn't do it.”
 
Annapurna says, “That's why you'll see everything in one giant glob.”
 
Annapurna says, “There are a few places where it's safe to add an extra space for visibility, but since you're just learning, ignore the fact that it even exists.”
 
Annapurna says, “It'll just get confusing.”
 
Annapurna says, “Now, do you remember how I had [ ] around moniker() up there?”
 
You say, “Yes.”
 
Annapurna says, “@oemit %#=[moniker(%#)] sets Michelle on fire etc.”
 
Annapurna says, “That's because the system needs to know that it is reading a function.”
 
Annapurna says, “When you're putting a function in text, you always put square brackets around it.”
<Autumn> Zhenya has joined this channel.
(New BB message (38/12) posted to 'ElseMU* Advertisements' by Anonymous: Threads of Pern)
<Wiki> Zhenya has joined this channel.
 
Michelle nods.
 
Annapurna says, “Sec. Phone. :P”
 
Michelle nods!
 
Edmond says, “--and you can't do like [%K(%#)] right XD”
 
Edmond says, “divide by zeroooo”
 
Annapurna says, “Almost done!”
 
Annapurna says, “Supporting a customer.”
 
Annapurna says, “Theeere we go.”
 
Annapurna says, “And, yeah, for those of you who don't know, %K is a shortcut of moniker(%#)”
 
Annapurna says, “Like %L is a shortcut substitution for loc(%#)”
 
Annapurna says, “and %N is for name(%#)”
 
Annapurna says, “You can't just use %K(%#)”
 
Annapurna says, “That'll break. :”
 
Annapurna :P
 
Annapurna says, “So! Daisy-chaining.”
 
Annapurna says, “To use multiple functions one after the other, it's as easy as writing them that way.”
 
Annapurna says, “[][][][][]”
 
Annapurna says, “All of those with functions inside.”
 
Annapurna says, “To use multiple commands, you separate them with a semicolon.”
 
Annapurna says, “@pemit %#=Stuff;@oemit %#=Stuff”
 
Annapurna says, “Which, as you can guess, means that you always want to write %; if you actually want a semicolon to show up in what you are emitting to someone. :P”
 
You say, “Can I see an example on the +myfaves thing, please?”
 
Annapurna says, “&cmd-myfaves me=$+myfaves:@pemit %#=Stuff;@oemit %#=Stuff”
 
You say, “Okay! Cool, thank you.”
 
Annapurna says, “One of the places you can put a space, as an aside, is after the ;”
 
Annapurna says, “&cmd-myfaves me=$+myfaves:@pemit %#=Stuff; @oemit %#=Stuff”
 
Annapurna says, “That would work too.”
 
Annapurna says, “Let's say we want the message to say "Your favourite thing is" and then <random thing>”
 
Annapurna says, “For the pemit.”
 
Annapurna says, “First, we want to make our little pickrand()”
 
Annapurna says, “ is a function which does what it looks like it does.”
 
Annapurna says, “Pickrand() is a function which does what it looks like it does.”
 
Annapurna says, “It picks something at random”
 
Annapurna .
 
You say, “So pickrand(knitting,music,chocolate) is not in square brackets?”
 
Annapurna says, “Not quite.”
 
Annapurna says, “See, look at help pickrand”
 
Annapurna says, “By default in code, a list is separated by spaces.”
 
Annapurna says, “pickrand(a list is separated by spaces)”
 
Annapurna says, “separated”
 
Annapurna says, “It picked a random word from that 'list' inside of it.”
 
Edmond says, “(with rand() can you do rand(list*,list*) if you have &list1 &list2 &list2 etc?)”
 
Annapurna says, “rand() in TinyMUX is for numbers, actually.”
 
Edmond says, “er pickrand() i mean”
 
Annapurna says, “pickrand(yellow dog orange cat blue bird)”
 
Annapurna says, “dog”
 
Annapurna says, “See how it couldn't tell the difference?”
 
Annapurna says, “To separate those out, we need to use what is called a "delimiter"”
 
Annapurna says, “Fancy word for "the thing which separates items in a list"”
 
Annapurna says, “So we could do...”
 
Annapurna says, “pickrand(yellow dog|orange cat|blue bird)”
 
Annapurna says, “But wait! That won't work.”
 
Annapurna says, “dog|orange”
 
Annapurna says, “It's still trying to pick items with spaces between them.”
 
Annapurna says, “THAT is where the comma comes in.”
 
Annapurna says, “pickrand(yellow dog|orange cat|blue bird,|)”
 
Annapurna says, “See the ,| at the end?”
 
Annapurna says, “Everything BEFORE the , is the list.”
 
Annapurna says, “The thing AFTER the , is the delimiter.”
 
Annapurna says, “So we are telling it, pick something at random from this list, which has items separated by a |”
 
Annapurna says, “blue bird”
 
Annapurna says, “Et voila.”
 
Annapurna says, “THAT time it worked.”
 
Annapurna says, “The 'say' command works like 'think'”
 
Annapurna says, “Except it shows the room.”
 
Annapurna says, “The 'page' command also works like 'think'”
 
Annapurna says, “Except it shows only specific people.”
 
Edmond says, “OHO defining delimiters <3”
 
Annapurna says, “For say or page, you can tell it NOT to parse code by using the /noeval switch.”
 
Annapurna says, “say/noeval pickrand(blabla”
 
Annapurna says, “That means you don't need to double up on your % or escape anything.”
 
Annapurna says, “The /noeval says "don't evaluate this code"”
 
Edmond says, “can you use /noeval for @emit?”
 
Annapurna says, “Where "evaluate" in this fancy code jargon context means "run the code"”
 
Annapurna says, “Alas, no.”
 
Annapurna says, “Just paging/saying.”
 
Edmond crie
 
Annapurna says, “The ooc command is a softcoded one which is basically a @remit.”
 
Annapurna says, “So you can't use it for that, either.”
 
Annapurna says, “So! All together, our little command would look something like...”
 
Annapurna says, “&cmd-myfave me=$+myfave:@pemit %#=Your favourite thing is [pickrand(thing1 thing2 thing3)].;@oemit %#=[name(%#)]'s favourite thing is [pickrand(thing1 thing2 thing3)].”
 
Annapurna says, “If your favourite thing has multiple words in it, then you would use the delimiter trick.”
 
Annapurna says, “| is a very common delimiter.”
 
Annapurna says, “You can also safely use ~”
 
Annapurna says, “Those aren't typed often in text, so you won't likely ever see them come up in a list you're writing.”
 
Annapurna says, “And, best, they don't mean anything to code in that context.”
 
Annapurna says, “So it won't misread them.”
 
You say, “aha!”
 
Annapurna says, “Go ahead and write up your favourite things and set the command on yourself. :)”
 
Annapurna says, “Before you use it, however, type: @lock/use me=me”
 
Annapurna says, “Because otherwise people will be trying to use your version of the command instead of theirs. :P”
Locked.
 
You say, “It's a good idea to @lock/use me=me anyway, isn't it?”
 
Annapurna says, “Always.”
Set.
Your favourite thing is chocolate.
Vorpal thinks of his favorite thing, pickrand(knives|winning|smol qtpies).
 
Levi says, “noooooo”
 
Annapurna says, “Levi gives us a good example of what not to do. ;)”
 
Levi says, “Don't I always?”
 
Annapurna says, “Remember, put [ ] around your functions. :)”
 
Annapurna says, “Otherwise the system doesn't know they ARE functions if you have them in text like that.”
Vorpal thinks of his favorite thing, qtpies.
 
You say, “How do you choose a random player from someone in the room?”
 
You say, “But you're Levi, not Vorpal, in here, hun”
 
Annapurna says, “Oooh. Michelle gets a new vocabulary word!”
 
Levi says, “I did that on purpose, Michelle. :D”
 
Annapurna says, “Handy dandy little thing called lcon()”
 
You say, “okay Levi. :D”
 
You say, “#-1 FUNCTION (LCON) EXPECTS 1 OR 2 ARGUMENTS?”
 
You say, “erk”
 
Annapurna says, “It lists the contents of what's inside of it.”
 
Annapurna says, “Hence lcon.”
 
You say, “location... contents.”
 
Annapurna says, “That's how you see the people in a room, for example.”
 
Annapurna says, “When you look at a place, we have it set up to run lcon() and format the results in a particular way.”
 
Annapurna says, “Type: help lcon”
LCON()

  FUNCTION: lcon(<object>[, <subset>])

  Returns a space-separated list of the contents of <object> which are
  visible to the person running the function.

  By default, all of the contents visible to the executor are returned;
  however, the list may further restricted with a <subset>:

    PLAYER  -- include only Player objects.
    OBJECT  -- include only non-Player objects.
    CONNECT -- include only Connected Players.
    PUPPET  -- include only Puppets.
    LISTEN  -- include only Listening objects.

  Example:
    > i
    t1(#366)
    radio(#223)
    The Wizard's Pointy Hat(#188SO)
    You have 42463 clams.
    > say lcon(me)
    You say, "#366 #223 #188"

  Related Topics: lexits(), @dolist.

 
Annapurna says, “In a helpfile, anything in [ ] is an option.”
 
Annapurna says, “You CAN just do: think lcon(here)”
 
Annapurna says, “think lcon(here)”
#3565 #1507 #3407 #3759 #2984 #12
 
You say, “Ah!”
 
You say, “dbrefs.”
 
Annapurna says, “Yep yep.”
 
Annapurna says, “But that will pull up all the objects in the room.”
 
Annapurna says, “Not just the players.”
 
You say, “Aha!”
 
Annapurna says, “So what you want to do, to get JUST the connected players, is...”
 
Annapurna says, “think lcon(loc(%#),connect)”
#3565 #1507 #3407 #3759 #2984 #12
 
You say, “still dbrefs, but yes. okay.”
 
Annapurna says, “Exactly.”
#3565 #1507 #3407 #3759 #2984 #12
 
Annapurna says, “Remember, to the system, we're all numbers.”
 
Annapurna says, “We're just referents in the database.”
 
Annapurna says, “It has no idea who Michelle is, but if I say #2984 it knows.”
 
You say, “Sure. How do you get it to make names show instead? Or is that next up? >.>”
 
Annapurna says, “'Michelle' is just the name() of #2984.”
 
You say, “How does that incorporate, or does it not need to?”
 
Annapurna says, “One thing to be aware of with pickrand() -- it will pick something different for everyone.”
 
Annapurna says, “If you want them to all see the same thing, you need to store the result, then use that specific result.”
 
Michelle blinks.
 
Annapurna says, “Like my oopsie in the OOC room earlier.”
 
You say, “Ah.”
 
Annapurna says, “Remember how I saw fire ants and you saw torches?”
 
You say, “Yep!”
 
Annapurna says, “So you get more vocabulary!”
 
Annapurna says, “Registers.”
 
You say, “WHEE!”
 
Michelle nods
 
Annapurna says, “The setr() and setq() functions are what are called "side effect" functions.”
 
Annapurna says, “That is to say, they don't have output.”
 
Annapurna says, “When you use pemit(), it gives a message.”
 
Annapurna says, “When you use num(), it gives a message.”
 
Annapurna says, “When you use eq(), it returns a 1 or a 0 depending on whether what's inside of it is equal.”
 
Annapurna says, “Setr and setq return nothing.”
 
Annapurna says, “Set register.”
 
Annapurna says, “Setr.”
 
Annapurna says, “A register is a way of saying "store this information and create a shortcut so I can use it later"”
 
Annapurna says, “So for the part of +cb where I'm picking someone at random...”
 
Annapurna says, “You know what? I'll paste it to you. Your eyes may go swirly, but it could help to see it in context.”
 
Annapurna says, “@assert strmatch(loc(%#),loc(%qp))={@pemit %#=You can't find your target here in the room with you, but what the heck! Let's set someone else on fire!%r%r; think [setq(r,pickrand(lcon(loc(%#),connect)))][setq(k,pickrand(get(#1327/LIST-CB-SILLIES),|))]; @pemit %#=You set [moniker(%qr)] on fire %qk!; @oemit %#=[moniker(%#)] looks around, can't find the right target, and sets the [moniker(%qr)] on fire instead %qk!};”
 
Annapurna says, “Let's separate that out into its specific elements for you.”
 
You say, “Please and thank you.”
 
You say, “but first, brb!”
 
Annapurna says, “@assert is a command.”
 
Annapurna says, “@assert <something that returns a 1 or 0>=<what happens if it returns a 0>”
 
Annapurna says, “1 = success, 0 = fail”
 
Annapurna says, “Always always always.”
 
Annapurna says, “Lots of Boolean.”
 
Annapurna says, “Many many Boolean functions.”
 
Annapurna says, “Copy that code block into Notepad or something so it doesn't get spammed away.”
 
Annapurna says, “So, in this case, strmatch(loc(%#),loc(%qp)) is my Boolean.”
 
Annapurna says, “You know that loc() gives the dbref of a location.”
 
Annapurna says, “Strmatch is a function which matches strings of text against each other.”
 
Annapurna says, “String match.”
 
Annapurna says, “So what strmatch(loc(%#),loc(%qp)) is saying is, "Does the text from loc(%#) match the text from loc(%qp)?"”
 
Annapurna says, “This touches on what I said waaaay back in the beginning, about wildcards.”
 
Annapurna says, “Because the command is +cb <name>”
 
Annapurna says, “Your little +myfave command doesn't have a <name> option.”
 
Annapurna says, “My +cb command starts with...”
 
You say, “Ahh. Back”
 
Annapurna says, “&CMD-CB #1327=$+cb *:@assert setr(p,pmatch(%0))={@pemit %#=That isn't a real person! But what the heck. Let's set it on fire anyway!”
 
Annapurna says, “Look at the header where it lists the command input text. $+cb *:”
 
Annapurna says, “See the *?”
 
Annapurna says, “That Anything after '+cb ' is covered by the *”
 
Annapurna says, “You can use up to ten *”
 
Annapurna says, “+cb *=*/*”
 
You say, “Yes.”
 
You say, “I think I follow.”
 
Annapurna says, “Now, look a bit to the right. See the part where it says setr(p,pmatch(%0))?”
 
Annapurna says, “The %0 is the *”
 
You say, “Oh!”
 
Annapurna says, “From left to right, the * are represented by %0, %1, %2, etc. up to %9”
 
Annapurna says, “So +cb name=bla/boop”
 
Annapurna says, “Would mean that %0 = name, %1 = bla, %2 = boop”
 
Annapurna says, “Because the command was set up as +cb *=*/*”
 
Michelle thinks she gets it...
 
You say, “Okay. So for +nattie”
 
You say, “I'd want something... this is going to be screwed up, and I'm asking for help. How do I noeval? /noeval?”
 
Annapurna says, “say/noeval”
 
Edmond drop chee in here instead
Edmond disappears, swirling down into the black hole of the exit portal.
Edmond has left.
Czcibor comes in from the temproom hub.
Czcibor has arrived.
 
You say, “&cmd-nattie me=$+nattie:@remit %L=@pemit %#=You knit pickrand(list to come,|) for lcon(loc(%#),connect) quickly.; @oemit %#=[moniker(%#)] knits pickrand(list to come,|) for lcon(loc(%#),connect) quickly.”
 
You say, “I'm stuck.”
 
You say, “I have the list in another window, I'm just lazy about typing that part. But the lcon bits...”
 
Annapurna says, “Take out the @remit.”
 
Annapurna says, “Unless you want to room emit all of your @pemit and @oemit code. ;)”
 
You say, “kay. Yes, I see where that's error.”
 
You say, “haha”
 
You say, “Is that the only error in this code?”
Moving a sleepy Franklyn.
 
Annapurna says, “Remember: functions need their bracket sandwich.”
 
Annapurna says, “Your lettuce and tomatoes have no bread, and will make a mess.”
 
Annapurna says, “(can you tell it's getting close to noon?)”
 
Annapurna says, “(mmm lunch)”
 
You say, “hee.”
 
You say, “Is that the only error? I fixed it. What else?”
 
You say, “setr somewhere in there...”
 
Annapurna says, “Paste what you have.”
 
You say, “&cmd-nattie me=$+nattie:@pemit %#=You knit [pickrand(list to come,|)] for [lcon(loc(%#),connect)] quickly.; @oemit %#=[moniker(%#)] knits [pickrand(list to come,|)] for [lcon(loc(%#),connect)] quickly.”
 
Annapurna says, “Yep yep. Muuuuch better.”
 
You say, “That's correct? I don't need setr?”
 
Annapurna says, “It will pick a different person for you than it will for everyone in the oemit.”
 
Annapurna says, “Because you're using pickrand twice.”
 
You say, “Right, I don't want that to happen.”
 
Annapurna says, “think [setq(r,pickrand(lcon(loc(%#),connect)))][setq(k,pickrand(get(#1327/LIST-CB-SILLIES),|))];”
 
Annapurna says, “That's from +cb.”
;
 
You say, “I got a ;”
 
You say, “and then nothing whne I took the ; out”
 
Annapurna says, “Because they are ninjas. :)”
 
Annapurna says, “Remember? Side effect functions.”
 
Annapurna says, “They -don't- return anything.”
 
Annapurna says, “Now, in this case, see how I'm using setq?”
 
You say, “Oh. Yes. And yes.”
 
Annapurna says, “#2984”
 
Annapurna says, “Now, with that one, I used setr.”
 
Annapurna says, “[setr(r,pickrand(lcon(loc(%#),connect)))]”
 
Annapurna says, “That's the difference between them.”
 
Annapurna says, “To explain...”
 
Annapurna says, “Setq sets a QUIET register.”
 
Annapurna says, “So anything inside of it disappears into a black hole.”
 
Annapurna says, “Setr sets a register, but the stuff inside of it still displays whatever it was going to display.”
 
Annapurna says, “So because I had a pickrand, it displayed the result of the pickrand.”
 
Annapurna says, “I could do...”
 
Annapurna says, “[setr(r,pickrand(lcon(loc(%#),connect)))]%r%r%qr”
 
You say, “Okay. So I'd want setr for the lcon?”
 
Annapurna says, “#12

#12”
 
Annapurna says, “#12 is me, as an aside.”
 
Michelle guessed :D
 
Annapurna says, “See how %qr turned into #12?”
 
You say, “Yes.”
 
Annapurna says, “Because the setr stored the result of the pickrand.”
 
Annapurna says, “But it also DISPLAYED it.”
 
Annapurna says, “And we don't want that.”
 
You say, “So I WOULD want setq.”
 
Annapurna says, “So BEFORE your @pemit/@oemit, you would want to use a think.”
 
Annapurna says, “think [setq(r,pickrand(lcon(loc(%#),connect)))][setq(k,pickrand(get(#1327/LIST-CB-SILLIES),|))]; @pemit %#=You set...”
; @pemit #2984=You set...
 
Annapurna says, “Now, look at the second one there.”
 
Annapurna says, “The setq(k”
 
You say, “yes”
 
Annapurna says, “That's setting %qk to a random thing from the list I stored in the attribute list-cb-sillies.”
 
Annapurna says, “That's another way to use pickrand.”
 
Annapurna says, “The get() function grabs the text inside an attribute.”
 
Annapurna says, “It gets it.”
 
You say, “And is that explained in the comtitle2 helpfile?”
 
You say, “how to make an attribute for a list?”
 
Annapurna says, “&LIST-CB-SILLIES #1327=with a molotov cocktail|with a flame thrower|by lobbing them into a conveniently located fire pit|by lobbing them into a volcano which appears purely by the power of his whim to lob someone into it|by dousing them with faerie fire ants|with a torch|with a single match which mysteriously treats its target as extremely flammable material|by lobbing them into the SUN ITSELF. What an arm”
 
Annapurna says, “That's all it is.”
 
Annapurna says, “pickrand(get(#1327/LIST-CB-SILLIES),|) -->”
 
You say, “OH. But that's so much easier than typing it twice... okay.”
 
Annapurna says, “with a flame thrower”
 
Annapurna says, “with a molotov cocktail”
 
Annapurna says, “by dousing them with faerie fire ants”
 
You say, “and I need to know the dbref they're stored on, hence the #1327?”
 
Annapurna says, “The reason I use a setq on it is so it stores the SAME random result to use for all people.”
 
You say, “I'm still not understanding that part, for some reason, how it works.”
 
Annapurna says, “Okay, going back to [setq(r,pickrand(lcon(loc(%#),connect)))][setq(k,pickrand(get(#1327/LIST-CB-SILLIES),|))];”
Huh?  (Type “help” for help.)
 
Michelle nods
 
Annapurna says, “[setq(r,pickrand(lcon(loc(%#),connect)))]”
 
Annapurna says, “Taking that apart...”
 
Annapurna says, “pickrand(lcon(loc(%#),connect))”
 
Annapurna says, “That is what is stored as %qr”
 
Annapurna says, “So the pickrand grabs a random dbref from the lcon of connected players.”
 
You say, “Okay.”
 
You say, “I think... hang on.”
 
Annapurna says, “So if the pickrand grabbed #1234, then %qr = #1234”
 
You say, “&cmd-nattie me=$+nattie:@pemit %#=You knit [pickrand(list to come,|)] for [setq(r,pickrand(lcon(loc(%#),connect)))] quickly.; @oemit %#=[moniker(%#)] knits [pickrand(list to come,|)] for %qr quickly.”
 
You say, “?”
 
Annapurna says, “Test it out!”
 
Annapurna says, “Trial and error.”
 
You say, “I can edit it later?”
 
Annapurna says, “Go ahead and try the command. :)”
 
Annapurna says, “It's just like any attribute.”
 
Annapurna says, “You can do whatever you want with it.”
 
Annapurna says, “Commands are not special.”
 
Annapurna laughs.
 
Annapurna says, “If they were, I'd be in trouble!”
Set.
You knit a teddy bear for  quickly.
 
You say, “Oh, it didn't return anyone.”
 
Annapurna says, “What I saw:”
 
Annapurna says, “Michelle knits a sweater for #12 quickly.”
 
You say, “I got "You knit a teddy bear for quickly."”
 
Annapurna says, “Look at your code. Remember what I said about quiet vs. not quiet registers?”
 
You say, “lol. I'm in info overload. I don't remember.”
 
Annapurna says, “Make that a setr instead of a setq.”
 
Annapurna says, “And use another setr around the teddy bear/sweater pickrand.”
 
Annapurna says, “Registers can be a through z, 0 through 9.”
 
Annapurna says, “setr(a, setr(1, etc.”
 
You say, “okay.”
 
Annapurna says, “The letter you put before the comma defines which register you're using.”
 
Annapurna says, “It's flushed out of the system at the end of the command.”
 
You say, “Testing again.”
Set.
You knit list to come for  quickly.
 
Annapurna says, “This stuff is explained in the helpfiles. It just isn't always helpful for n00bs, as I know all too well, having learned mostly from said helpfiles.”
 
You say, “I knit list to come for blank quickly. bleh”
 
Michelle nods.
 
Annapurna says, “Michelle knits list to come for #3565 quickly.”
 
Annapurna says, “Now, why is it showing the dbref instead of the name..?”
 
Annapurna listens.
 
You say, “....name() needs to be in there?”
 
Annapurna says, “Bingo!”
 
Annapurna says, “Because you're storing the result of lcon()”
 
Annapurna says, “And lcon() returns a dbref.”
 
Annapurna says, “So you need to name(%qr)”
 
Annapurna says, “Coding is pretty much all data manipulation.”
 
You say, “I... see.”
 
Annapurna says, “Grabbing stuff from lists and doing things to it.”
 
Annapurna says, “So you'd swap out 'for %qr quickly' for 'for [name(%qr)] quickly'”
 
Annapurna says, “Now, as long as you aren't reusing a letter/number, it doesn't really matter which one you choose for your register.”
 
Annapurna says, “It's common coding practice to choose a letter which is easy to associate with what you're storing, though.”
 
Annapurna says, “Like..”
 
Annapurna says, “setr(p,pmatch(%0))”
 
Annapurna says, “#-1 FUNCTION (PMATCH) EXPECTS 1 ARGUMENTS is a function which takes the stuff inside of it and matches it against player names.”
 
Annapurna chortles. pmatch()
 
Annapurna says, “Oops.”
 
Annapurna says, “It returns a dbref if there's a player name which matches it.”
 
Annapurna says, “Kind of like how you can page anna and get annapurna, even though my alias is food.”
 
Annapurna says, “think pmatch(anna)”
 
Annapurna says, “Comes up with #12, my dbref.”
Set.
You knit setr(k,(pickrand(a teddy bear|a sweater|socks,|)) for #2984 quickly.
 
You say, “ugh”
 
Annapurna says, “Michelle knits for Michelle quickly.”
 
Annapurna says, “Michelle knits  for Michelle quickly.”
 
Annapurna says, “Pardon. It had the space.”
 
Annapurna says, “Are you using a setq or a setr?”
Huh?  (Type “help” for help.)
 
You say, “r”
 
Annapurna says, “Oh, right. Before we get too far, for setr(p,pmatch(%0))”
 
Annapurna says, “See how I used p?”
 
You say, “yes”
 
Annapurna says, “That's because it's easy to remember that %qp = player”
 
Annapurna says, “Or %qn for name, or..”
 
Annapurna says, “It's entirely up to you (and which letters you haven't used yet)”
Set.
You knit setr(k,(pickrand(a teddy bear|a sweater|socks,|)) for #2984 quickly.
 
Annapurna says, “Go ahead and paste your code.”
 
Annapurna says, “It blanked it again.”
 
You say, “&cmd-nattie me=$+nattie:@pemit %#=You knit [setr(k,(pickrand(a teddy bear|a sweater|socks,|))] for [setr(n,pickrand(lcon(loc(%#),connect)))] quickly.; @oemit %#=[moniker(%#)] knits %qk for [name(%qn)] quickly.”
 
You say, “no ( before the first pickrand, I know”
 
Annapurna nodnods.
 
Annapurna says, “Try it again.”
Set.
You knit a sweater for #12 quickly.
 
Annapurna says, “Bingo!”
 
You say, “Woo!”
 
Annapurna says, “Michelle knits a sweater for Annapurna quickly.”
 
You say, “Yes! :D”
 
You say, “I'm still returning a dbref on my end”
 
You say, “Trying to fix that.”
 
Annapurna says, “I bet you know why. ;)”
 
Annapurna says, “What did you do for the %qn before?”
 
You say, “It's name() but where does ti go?”
 
Annapurna says, “Do the same thing around the setr(n”
 
Annapurna says, “Inside the [”
 
Annapurna says, “[name(setr(n,...”
 
Annapurna says, “And don't forget to close the ) on the far side.”
 
You say, “and end with another ().... yes”
 
Annapurna says, “[name(setrstuff)]”
Set.
You knit a teddy bear for Michelle quickly.
 
Michelle bounces!
 
Annapurna says, “Now, regarding local vs. global commands...”
 
Annapurna says, “A local command is something like what you just did.”
 
Annapurna says, “It works in only one place.”
 
Annapurna says, “A global command is something which works everywhere.”
 
Annapurna says, “Players cannot create globals.”
 
You say, “ok!”
 
Annapurna says, “In TinyMUX, there's something called the Master Room.”
 
Annapurna says, “If you put a command on an object in that room, that command can be used anywhere in the game.”
 
Annapurna says, “i.e. it turns it into a global command.”
 
Annapurna says, “Players can't manipulate that room, so they can't create globals.”
 
Annapurna says, “Howeeeeever...”
 
Annapurna says, “Zone Objects.”
 
Annapurna says, “If you have a business and want a command which people can access throughout your business, let's say a menu in a restaurant...”
 
Annapurna says, “You can create a zone object for that business, toss all the rooms on it, and toss the command on the zone object.”
 
Annapurna says, “Et voila.”
 
Annapurna says, “I explain those in more detail on the wiki.”
 
Michelle nods!
 
Annapurna says, “That's faster than setting the command individually on every room in the business.”
 
Annapurna says, “And players CAN create zone objects.”
 
Annapurna says, “Again, there are scads of helpfiles about this too.”
 
You say, “okay. One sec, back up a bit.”
 
Annapurna says, “Yep?”
 
You say, “spam:”
 
You say, “If I want to make the list LIST-NATTIE-SILLIES and set it on Nat, would it be: &LIST-NATTIE-SILLIES #1486=a scarf|a shawl|socks|a hat|mittens|gloves|fingerless mitts|a sweater|a vest|a jacket|a dress|leggings|a skirt|a top|a cowl|a hooded cowl|a capelet|slippers|cuffs|convertable gloves to mittens|legwarmers|a poncho|earwarmers|a kerchief|a blanket|a handful of bookmarks ?”
 
Annapurna says, “Yep yep. Then you could do pickrand(get(YOURDBREF/list-nattie-sillies),|)”
 
You say, “Yus!”
 
Annapurna says, “One thing to be careful about, however...”
 
Annapurna says, “You are a player, not a wiz.”
 
Annapurna says, “And so are the people using the commad.”
 
Annapurna says, “command*”
 
You say, “yes.”
 
Annapurna says, “So THEY won't be able to grab things off of you.”
 
You say, “Ok.”
 
Annapurna says, “So, if you're doing it yourself, without staff help, you wouldn't want to use that method.”
 
You say, “Absolutely, I'd want to do it the long way.”
 
Annapurna says, “If you have me put it on a global object, that object has the "Inherit" flag set on it.”
 
Annapurna says, “a.k.a. it inherits the @powers of its owner.”
 
You say, “Ooo. Can you put it on a global object? Once I'm done tweaking?”
 
Annapurna says, “And since its owner is a wizard..”
 
Annapurna says, “It can touch anybody.”
 
Annapurna says, “Technically speaking, it's dangerous to give players access to any rooms or objects set inherit, because there are ways for unscrupulous people to destroy the game.”
 
Annapurna says, “If you know how to code well enough, you can take advantage of things like that.”
 
You say, “Yes, I understand.”
 
Annapurna says, “Which is, I suspect, why so much mystique has been preserved around coders.”
 
Annapurna says, “They don't WANT players to know how to code.”
 
You say, “That's fair.”
 
Annapurna says, “But! Yes. My goal from the beginning has been to teach you how to make your own little commands so I can make them global for you. :D”
 
You say, “Yay! <3”
Set.
You knit 1 for Levi quickly.
 
You say, “Why did 1 come up?”
 
Annapurna says, “Paste the code?”
Set.
You knit #-1 for Czcibor quickly.
 
You say, “mmmph.”
 
Annapurna says, “The #-1 means there is an error.”
 
You say, “&cmd-nattie me=$+nattie:@pemit %#=You knit [setr(k,pickrand(get(#1486/list-nattie-sillies)))] for [name(setr(n,pickrand(lcon(loc(%#),connect))))] quickly.; @oemit %#=[moniker(%#)] knits %qk for [name(%qn)] quickly.”
 
Annapurna says, “You'll see that a lot.”
 
Annapurna says, “You don't have a ,| in the pickrand for the list, for one thing.”
 
Annapurna says, “Your list is delimited by |, but your pickrand is looking for spaces.”
Set.
You knit setr(k,pickrand(get(#1486/list-nattie-sillies)) for Czcibor quickly.
 
You say, “What else am I doing wrong?”
 
Annapurna says, “What does the code look like now?”
 
You say, “&cmd-nattie me=$+nattie:@pemit %#=You knit [setr(k,pickrand(get(#1486/list-nattie-sillies))] for [name(setr(n,pickrand(lcon(loc(%#),connect))))] quickly.; @oemit %#=[moniker(%#)] knits %qk for [name(%qn)] quickly.”
 
Annapurna says, “You knit [setr(k,pickrand(get(#1486/list-nattie-sillies),|))] for [name(setr(n,pickrand(lcon(loc(%#),connect))))] quickly.”
Set.
 
You say, “...mm?”
 
Annapurna says, “You didn't have the ,|”
 
You say, “OH!”
 
You say, “I thought--never mind, you're right.”
Set.
You knit setr(k,pickrand(get(#1486/list-nattie-sillies,|)) for Levi quickly.
 
Annapurna says, “As an FYI, if you are serious about coding and want to have an easier time of it, check out the Notepad++ program.”
 
You say, “What's good about it?”
 
Annapurna says, “It highlights the matching pairs for () and such so you can see if you closed them.”
 
You say, “oh, awesome.”
 
Annapurna says, “It also lets you select all instances of a word or whatnot so you can see everywhere in your code you used a setr or setq or..”
Set.
 
Annapurna says, “Very handy.”
You knit #-1 PERMISSION DENIED for Levi quickly.
 
You say, “!”
 
Annapurna laughs!
 
You say, “what happened?!”
 
Annapurna says, “What's the full attribute name? I'll toss it onto the global object.”
 
You say, “For the list?”
 
You say, “&LIST-NATTIE-SILLIES #1486”
 
Annapurna says, “#1468 is not your dbref.”
 
Annapurna says, “Er. 86.”
 
Annapurna says, “So you're trying to read an attribute you set on Nathania.”
 
Annapurna says, “So Michelle can't read it.”
 
You say, “OH. You explained this.”
 
Michelle sighs.
 
Annapurna says, “Excellent example of -- yep!”
 
Annapurna says, “Buuuut. Handy dandy thing: If we keep the list of sillies on Nathania, you can still edit it.”
 
You say, “Yes!”
 
Annapurna says, “And your edits to that list will show up when someone uses the global command.”
 
Annapurna says, “Because you own you.”
 
Annapurna says, “So, sec.”
 
Annapurna laughs.
 
Michelle blinks.
 
Annapurna hums and tests and fiddles.
 
You say, “Did something break? XD”
 
Annapurna says, “Sec! Dealing with workthings. :)”
 
Michelle nods!
Annapurna knits a teddy bear for Czcibor quickly.
 
Annapurna says, “Works fantaculariffically on this end.”
You knit #-1 PERMISSION DENIED for Rowan quickly.
 
You say, “Not on mine. hm.”
 
+nattie
You knit a teddy bear for Czcibor quickly.
 
Michelle blink.
You knit #-1 PERMISSION DENIED for Michelle quickly.
 
Annapurna says, “That's what mine said.”
 
Annapurna says, “What did it say when I did it for you?”
 
You say, “You knit #-1 PERMISSION DENIED for Michelle quickly.”
Annapurna knits mittens for Rowan quickly.
 
Annapurna says, “I knitted mittens for Rowan that time.”
 
You say, “When you did it for me it worked. A teddy bear for Czci.”
 
Annapurna says, “Oh, take the command off of yourself.”
 
Annapurna says, “Doi.”
 
Annapurna laughs.
 
You say, “How?”
 
Annapurna says, “Clear the attribute.”
 
You say, “I don't know how. >>”
 
Annapurna says, “&whatever me=”
 
Annapurna was typing. :)
 
Annapurna says, “You remove an attribute by setting it again with nothing inside of it.”
 
You say, “You've the patience of a saint, Anna.”
Set.
You knit a hat for Levi quickly.
 
You say, “Aha!”
 
Annapurna says, “Oooor you can use the scary @wipe command.”
 
You say, “scary!”
 
Annapurna says, “If you had a bunch of attributes like thing-1, thing-2, thing-3”
 
Annapurna says, “You could @wipe me/thing*”
 
Czcibor snortlaugh I got, btw, 'you knit a teddy bear for Czcibor quickly.'
 
Annapurna says, “And it'd wildcard wipe everything starting with thing.”
 
You say, “nooooooooo”
 
Annapurna says, “So, @wipe is scary.”
 
Annapurna says, “Because there is no backup.”
 
You say, “That is scary.”
 
Annapurna says, “That is why you always always always code NOT in the game.”
 
Czcibor says, “(that is why i take regular decomps of my characters)”
 
Annapurna says, “And -- yes. That.”
 
You say, “Czci, wait, when you +nattie'd, or when I/Anna did?”
 
Czcibor says, “i didn't nattie at all”
 
You say, “Oh, I think Anna forced all of us to”
 
Annapurna says, “No no, I @emitted what I got.”
 
You say, “OH!”
 
Annapurna laughs.
 
Michelle whew
Annapurna knits a vest for Czcibor quickly.
 
Czcibor | Annapurna knits a teddy bear for Czcibor quickly.
 
Czcibor | Annapurna says, "Works fantaculariffically on this end."
 
Czcibor | Michelle knits #-1 PERMISSION DENIED for Rowan quickly.
 
Czcibor | Michelle says, "Not on mine. hm."
 
Czcibor | +nattie
 
Czcibor | You knit a teddy bear for Czcibor quickly.
 
Czcibor | Michelle blink.
 
Czcibor | Michelle knits #-1 PERMISSION DENIED for Michelle quickly.
 
+nattie
You knit a vest for Czcibor quickly.
 
Annapurna says, “That's what I just got.”
 
Annapurna says, “And I made the @emit cyan this time so you could see!”
 
Czcibor <3
 
Annapurna says, “It really likes Czcibor.”
 
You say, “It does.”
 
Annapurna says, “Clearly we think he is cold.”
 
Annapurna says, “And needs knitted goods.”
 
You say, “COLD SPRINGS”
 
Michelle tested it on Nat, it's good... sec
 
Annapurna says, “Tested on November. :)”
 
You say, “Tested in the OOC on Magda. It works.”
Czcibor sets Czcibor on fire with a torch!
 
You say, “It really likes you.”
 
Czcibor lmao
 
You say, “Why... it's not working for me. +cb, right?”
Michelle spins the Mina!
...Mina spins, spins, spins!
Mina ends up pointing at Michelle!
 
Czcibor says, “yeah”
 
You say, “Yeah, I'm just getting a "huh?"”
 
Czcibor says, “you have to target it”
 
Michelle sigh.
 
Czcibor says, “+cb <person>”
You set Michelle on fire with a single match which mysteriously treats its target as extremely flammable material!
 
You say, “Yes. That works. I'm tired. XD”
 
Czcibor :D
 
Annapurna says, “I retuuurn.”
 
You say, “WB@”
 
You say, “Where can I download Notepad++?”
 
Annapurna says, “Just google Notepad++ :)”
 
Annapurna says, “It's the first site to come up”
 
You say, “It's timing out”
 
Annapurna says, “Oh, weird.”
 
You say, “But that's the site? I'll grab it later”
 
Czcibor says, “you can also get it from sourceforge”
 
Czcibor says, “notepad-plus-plus.org”
 
You say, “Thank you! <3”
 
Czcibor <3!
 
Michelle may learn to MUSHcode yet
 
Annapurna nodnods.
 
Czcibor XD
 
Annapurna says, “It may help to download the help.txt for TinyMUX.”

Michelle nods.
 
You say, “And between you and our mutual friend who taught you, Anna, I'm probably set, although I won't open a MUSH”
 
Annapurna says, “Vesuvius is handy dandy, yep.”
 
Annapurna says, “That's why he's on the staff list, in case anyone ever wondered.”
 
Michelle nods, wasn't sure what he was called here.
 
Annapurna says, “He answers questions when I run into WHY ISN'T THIS WORKING????”
 
You say, “Vesuvius is a great guy.”
 
Annapurna eyes the list.