I'm sure you've just been checking your email constantly hoping to see the first lesson :)  Well, here it is:

Lesson 1  Basic LPC

  Some of you may already know this, but I figure I'll start basic and go from there.  This lesson will cover a little mud theory and variables.  These lessons are based off of Descarte's LPC manual(where I learned) so if you want to cross reference, that's where I'm coming from.  First we'll have some theory.

  The mud is composed of 2 parts.  The driver and the mudlib (short for mud library).  The driver is a program that operates everything.  It handles people connecting and how the code we write works.  The real technical stuff.  The mudlib takes over from there.  The mudlib sets up things like how rooms work, how fighting happens, and what stuff does.  That's as far as we need to go now.  We'll do more with the driver/mudlib when we get into heartbeats and resets.

  Now for some info on variables.  In some code you may have seen something like:

int i;
string bob;

  Well, those are variables.  Variables are containers for information.  You get to give them a name and say what type of information they'll hold.  For instance, if I want to make a variable named "george" that holds a number, I'd put:

int george;

  So now I have a variable named "george".  What value does george have?  nothing.  You need to give him one.  So after you 'declare your variable', you need to give it a value.  Here's how you do it:

george = 10;

  So now, if I did something that gave me exp...  and I wanted to give myself 10+george exp.  I'd get 20 exp from it, because george = 10.  It may seem quite useless at the moment, but you'll see how they come in handy later.

  Now you know the "int" variable type.  That type is used to hold numbers.  2 Other types are "string" and "object".  A string holds a series of letters or statment.  An object is something like this_player() or this_object().  A quick example of how to 'declare' these, then give them values:

int george;
string shady;
object person;

george = 24;
shady = "The Real Night Shady";
person = this_player();

  Notice that the string value has "s around it.  That is important for strings.  Another variable that we'll get into our next lesson is void.  Yes, there's a 'void' type.  Something to look forward to, eh?

Next Lesson: Lesson 2 funcions

(c)Nightshady Productions 2001

Sidenote:  Misty wanted me to throw in how to add races, so here goes:

Making/Changing races:

    Races don't really fit into your usual programming in Nightmare.  The playable races are stored in /daemon/cfg/races.cfg.  If you look at that file, it has instructions on how to add a race.  I'll go over that breifly.  You'll have different sections that define your race.  The first section is the race name.  Then a : and their sight modifier.  This number changes how well a creature can see in the dark.  The higher the number, the better they can see.  0 is average.  The next is weight.  A human is 9999, so go off of that for your race's weight.  Misty and I have found that your weight MUST be unique.  Why?  I dunno.  It just doesn't work if it's not.  Then you put : and how many fingers your race has on each hand.  Next is the weilding limbs.  just put the limbs that can fight separated by a ;.  the next set of numbers are stat modifiers.  it goes like this:   str:con:int:wis:dex:cha  if you add them up, it shouldn't go over 10.  just try to be reasonable.  The last is the body type.  should be human.  If human doesn't work for you, look at the others, or check the files in the /daemon/cfg/mon_races/ directory.  So.  Time for an example.  To make the "Nightshade" race, I'd add this line:

nightshade:1:9050:5:right hand;left hand:9:9:20:20:15:500:human

I'm humble, can't ya tell?  But anyway, That's how you add a race.  Enjoy :)
