I'm assuming that you are pretty experienced because that is a fairly complex thing to do.
To create a class I would suggest making a struct/type thing that stores the basic things. Avarax uses this in MMod:
tClass = record
name,description: string;
skill: array[1..4] of string;
weap: array[0..14] of boolean;
Human: boolean;
input,output,inmod,outmod,PickX,PickY: integer;
BCount,ICount: byte;
end;
Then you just need to initialize all of them and check for their spells when they do stuff.
For #2, just save what class each person is in, and when they do a command associate that with their class...
Script example:
http://nopaste.com/p/a0soFkyNM