Absolut Citron says 'During the class, I use a tool called the blackboard. You can 'look blackboard' to see what I'm talking about.' Absolut Citron says 'The first thing we'll go over is the basic structure of mprogs' Absolut Citron says 'Within an mprog, you have triggers, if statements , variables, and commands, as well as a couple of special codes to use' Absolut Citron says 'We'll leave triggers for last, since that's the last thing you'll do with an mprog anyways.' Absolut Citron says 'The first topic we'll cover is commands' Absolut Citron says 'There are several specialized commands that a mob can use, that go beyond normal gameplay. Some of these you'll use a lot in your mprogs (echo, mload/oload, etc) and some of them you'll use rarely, if ever' Absolut Citron says 'On the blackboard are several examples of mob commands' mob echo This is a test. mob mload 3001 mob junk all Absolut Citron says 'Within a mob program, all mob commands must be preceded by 'mob', as in 'mob oload' or 'mob echo'' Absolut Citron says 'These are differentiated between normal gameplay commands, such as the use of socials, say, etc.' Absolut Citron says 'You would never precede normal commands like say with the word mob, or it simply won't work' Absolut Citron asks 'I'll go over the different commands in my next class, are there any questions so far?' Absolut Citron says 'Timeghost' Beer Lover Timeghost asks 'will the actual commands possible - the list - also be covered only in the next class?' Absolut Citron says 'yes' Absolut Citron asks 'Anything else?' Absolut Citron says 'Ford' Lunatic Ford asks 'Is this based on any existing language, or is it something completely new?' Absolut Citron says 'The structure is very loosely based on basic, but don't count on knowing everything even if you know basic' Absolut Citron says 'Meadowlark' A mellow Meadowlark asks 'When is the next class?' Absolut Citron says 'Probably next week or the week after' Absolut Citron says 'Drgon' Drgon says 'ok can you learn how to do mogprogs with out knowing how to code' Absolut Citron says 'Yes, that's what these classes are designed for' Absolut Citron says 'Okay, let's move on to variables' Absolut Citron says 'Variables are what allows the mob to interact with players, other mobs, objects, etc., without having to use specific names in your mprogs, which isn't always possible' Absolut Citron says 'There are variables for almost everything, including names, sexes, and vnums' Absolut Citron says 'The most common ones you'll use will be $i and $n. $i indicates the mob itself, and $n indicating the one who triggers the mprog' Absolut Citron says 'The blackboard contains examples of a couple of variables' mob echoat $n This is a test. mob purge $i Absolut Citron says 'Variables are also how you can do delayed mprogs and how you can force a mob to remember a particular player' Absolut Citron asks 'Again, I'll go through the different variables in another class, this class is designed to show you the basics of mprog structure. Any questions so far?' Absolut Citron says 'Sarlock' Sleepless Sarlock asks 'How long can a variable stay in memory?' Absolut Citron says 'Most variables are transitory things, $n, $i etc. all stay in the mprog memory for the length of the mprog alone' Absolut Citron says 'The only ones that force memory past the mprog are the remembering variables, like $q. This variable will stay in the mob's memory until a: someone else triggers the mprog and replaces it, b: the mob forgets with the mob command forget, or c:' Absolut Citron says 'the mud reboots' Absolut Citron says 'Kiels' True Love Kiels says 'Well, C was missing ---' True Love Kiels asks 'O and what does the mob command on the blakboard do ?' Absolut Citron says 'The first part of your question I didn't understand, Kiels' Absolut Citron says 'For the second part, mob echoat echoes at the target only, rather than to the entire room, but mob commands I'll get into the next class.' Absolut Citron says 'Timeghost' Beer Lover Timeghost asks 'what is meant by 'length of the mobprog'?' True Love Kiels says 'The line you wrote with how they forgeth. says can only have a limited lenght and it cut off c.' Absolut Citron says 'As in, how long the mprog runs for. Each mprog happens instantaneously, unless there's a delay on it. So it would be that one, brief spate that it will remember the transitory variables' Absolut Citron says 'Ardhiel' Azrhei Ardhiel asks 'will the mob forget if it is killed, or does the mobprog hold the last variable?' Absolut Citron says 'Ah, thank you, yes killing a mob will also erase it's memory' Absolut Citron says 'Timeghost' Beer Lover Timeghost asks 'so, if a certain delay is set, the mobprog is inactive, but can remember 'temporary' variables?' Absolut Citron says 'The mob won't remember temporary variables past that mprog. If you want it to remember, you have to use the variables that force it's memory' Absolut Citron says 'Balaam' (Blessed) Balaam says 'can you have a mob remember things past when it was killed? Like if I made a mob that would be ticked off at someone killing it and not help them.' Absolut Citron chuckles 'Sorry, no. You can have an unkilleable mob remember things and force the other to do stuff, but that's a lot more complex and I don't recommend it for beginners :)' Absolut Citron says 'Tauren' Tauren asks 'could i make a mob respond if it saw a player wearing a certain item?' Absolut Citron says 'Yes, there's variables for objects as well as players' Absolut Citron says 'Let's move onto if statements' Absolut Citron says 'If statements are how you get your mob to differentiate between particular circumstances.' Absolut Citron says 'You can make if statements for a huge variety of things. They're really what makes mprogs interesting and are what makes mprogs sometimes tricky to solve' Absolut Citron says 'There are a couple of examples on the blackboard' if sex $n == 2 say Hello, my lady. break else say Hello, my lord. endif Absolut Citron says 'With if statements, there are three special commands you need to remember: else, break and endif' Absolut Citron says 'With an if statement, you must always have an endif statement at the end of the mprog. An if statement opens up a loop, if you will, and the endif statement closes it' Absolut Citron says 'There's an example of a break/else on the blackboard now' Absolut Citron says 'With if statements, if you want the mprog to simply stop once it finds a statement it matches, you will want a break in there.' Absolut Citron says 'In other words, if you want the mprog to simply stop checking once it has found, say, the sex it's looking for, you put in a break and it simply won't continue past that statement' Absolut Citron says 'Else indicates that, if the if statement isn't met, the mprog will continue down until it is or until it finds an endif' Absolut Citron asks 'Any questions so far?' Absolut Citron says 'Balaam' (Blessed) Balaam asks 'can you nest if statements? and if so, does break end the last if, or all of them?' Absolut Citron chuckles 'You can, and I'll get into the ands and ors in a few minutes :)' Absolut Citron says 'Kiels' True Love Kiels asks 'How does IF statements start ?' Absolut Citron says 'It starts with the if. In other words, if sex $n == 2 starts the if statement.' Absolut Citron says 'Jeter' Jeter asks 'can an IF statement discern whether certain things have been done in a particular order or am I getting ahead?' Absolut Citron says 'An if statement functions for the length of that mprog alone. You can have it check to see if a person is carrying a particular item, or something liek that, but it can't keep track of what a player does beyond that' Absolut Citron says 'Tauren' Tauren asks 'so if i had a mobprog to check a sex, and i didn't have break at the end, what would be the result?' Absolut Citron says 'Well, it wouldn't also hit the information beyond the else, but let me put up another example' Absolut Citron says 'So, on the example on the board, the break will stop the mprog after it hits the break and won't continue it with what's below the endif' if sex $n == 2 say Hello, my lady. break else say Hello, my lord. endif say What's going on here? Absolut Citron says 'For most things, it's not important. I will say the one if statement you must *always* use a break with is a random' Absolut Citron says 'So, on the blackboard, the first random program probably won't work, but the second will' look blackboard if rand 10 say test else if rand 20 say blah endif if rand 10 say test break else if rand 20 say blah break endif Absolut Citron says 'Arliss' TrueDaddy Arliss asks 'so endif is always the last command .. and is not used before the final of a statement?' Absolut Citron says 'Endif is the statement you use to close the if statement. You can continue hte mprog below that though' Absolut Citron says 'Meadowlark' A mellow Meadowlark says 'Is it possible to /only/ break the if statement? So that the mobprog continue' Absolut Citron says 'Use only else/endif, with no break. This works in most mprogs (again, it probably won't work with randoms)' Absolut Citron asks 'Any other questions so far?' Absolut Citron says 'Okay, let's move on' Absolut Citron says 'For nested if statements, you generally want to use and/or statements whereever possible' Absolut Citron says 'And and or are both shown on the blackboard now' Absolut Citron says 'An and statement will check for multiple things, i.e. if the target carries a book AND is female, the mprog will trigger' Absolut Citron says 'An or statement will check for one or the other, i.e. if the target carries a book OR a magazine, the mprog will trigger' Absolut Citron says 'You can also nest if statements in a slightly less effective way.' Absolut Citron says 'An example is shown on the blackboard' if carries $n book say That's a nice book! if carries $i magazine say And I love that magazine! endif endif Absolut Citron says 'You'll notice the two seperate if statements, that aren't seperated by an else. This will work, mostly, but can be rather tricky to set up. For the most part you'll want to stick to end/or' Absolut Citron says 'You'll notice that there are two endifs at the bottom of this statement. When you nest if statements in this fashion, there MUST be an endif for every if statement that is left unclosed (i.e. no else statement)' Absolut Citron says 'You'll only need one else statement if you're continuing in that fashion, however.' Absolut Citron asks 'Any questions so far?' Absolut Citron says 'Barrin' Chancellor Barrin asks 'can we use the and/or in the same way than in logic?' Absolut Citron says 'I'm not sure I understood that question' Chancellor Barrin asks 'can we use combinations of and/or?' Absolut Citron says 'yes' Chancellor Barrin says 'thanks :-)' Absolut Citron says 'The only thing I'll add onto that is, if you have an if/and and include an or, it will check for the if/and and the or seperately' Absolut Citron says 'Sarlock' Sleepless Sarlock says 'Can you negate an if statement, such as if not carries $n book; say I need the book!; endif' Absolut Citron says 'The mprog on the blackboard contains an example of how to do that' if carries $n book say Oh! A book! break else say I need the book! endif Absolut Citron says 'You can't negate the if statement itself, but you can put a check in and if it fails make it do something ese' Absolut Citron says 'Ford' Lunatic Ford asks 'are "book" and "magazine" there object-keywords, or are they variables defining an object? (i.e. could i walk up to the mob with _any_ book and get the "nice book"-response, or would i need a book with the vnum(?) specified in the variable)?' Absolut Citron says 'Those would be object keywords.' Absolut Citron says 'You can use variables, object keywords or vnums for most if statements, but not all. I'll get into those differences in another class' Absolut Citron says 'Timeghost' Beer Lover Timeghost asks 'what if: an if being untrue is to drop down to another if statement, (sub-mob-prog), while if the original if was true, the mobprog is to drop down the code and continue further?' Absolut Citron says 'That's another example of where break might come in handy, though I'll warn you it's tricky and doesn't always work' Beer Lover Timeghost goes, "Hmmmm." Absolut Citron says 'Look at the blackboard for an example of that' if carries $n book Say Oh! A book! if sex $n == 2 Say I love reading, my lady, don't you? break say I have hundreds of books at home. endif Absolut Citron says 'Tauren' Tauren asks 'could i make it check if the book was in an inventory OR if the target was wearing the item, or even if the item was on the ground?' Tauren asks 'or any combination of those options?' Absolut Citron chuckles 'Yes, you can, and that's all in the various if statements, I'll get into those in another class :)' Absolut Citron says 'Kiels' True Love Kiels asks 'Wouldnt it be kinda easy to "cheat" bu having a "book" manorpie ?' Absolut Citron says 'That's why it's better to use vnums, I'm simply using keywords for ease of understanding' Absolut Citron says 'Arliss' TrueDaddy Arliss asks 'since there are 2 if statements on the blackboard does there need to be 2 endif ?' Absolut Citron says 'The break negates the need for a second endif' Absolut Citron says 'Slith.' Decedent Slith asks 'is there a way for builder's to test mobprogs as they are creating/working on them?' Absolut Citron says 'Nods, a builder is allowed to create a test character that I'll advance to any level you need' Absolut Citron says 'Delph' Arcanic Delph asks 'Can I have the mprog trigger the mprog of a different mob if a certain statement is true?' Absolut Citron chuckles 'Yes, and we'll get into that in later classes :)' Absolut Citron asks 'Any other questions regarding if statements?' Absolut Citron says 'Okay, let's move onto triggers' Absolut Citron chuckles 'Triggers are the very last thing you'll do with an mprog. The reason being is, you can't put a trigger on a mob for an mprog that doesn't exist :)' Absolut Citron says 'Everything else we've done has been done in the mprog editor itself. To add a trigger, you actually have to edit the mob that you're adding the trigger to.' Absolut Citron says 'Triggers are what sets the mprog off, they can be anything from greet triggers to exit triggers to speech or act triggers. We'll go over the different triggers in another class.' Absolut Citron says 'To add a trigger, you edit the mob that you want the trigger on and type 'addmprog ' if carries $n book Say Oh! A book! if sex $n == 2 Say I love reading, my lady, don't you? break say I have hundreds of books at home. endif Absolut Citron says 'The variable depends on the trigger type. Greet triggers, for example, are percentages (greet 80 would greet 80% of the time) while triggers like act trigger on specific messages (act 'kisses you' would trigger on the mob being kissed)' Absolut Citron asks 'Any questions on triggers?' Absolut Citron says 'Delph' Arcanic Delph asks 'Would I need to add a different trigger for all ocassions if I want the mprog on several different things?' Absolut Citron says 'Yes, a trigger will only trigger on one specific thing. If you want the mprog to trigger on a choice of several differnt things, you'd need several triggers' Absolut Citron says 'Latonya' Latonya says 'can you set trigers to type of sex ' Absolut Citron says 'No, that has to be done with if variables' Absolut Citron asks 'Any other questions?' Absolut Citron chuckles 'Thank you all for attending :)' Absolut Citron waves happily. Citron pulls a "cloud in a bottle kit" from her pocket, adds vodka, and kickstarts it into the sky!