.-
add_step
int add_step(string lesson_name,
string * blurbs,
string skill,
int diff,
string * responses,
string * params,
string award_mess,
string succeed_mess,
string fail_mess)
-
Add a step to a lesson plan. This is the interaction between student and
teacher. One step should be defined for each thing you want the student
to learn.
- Parameters:
- lesson_name - the name of the lesson this lesson plan is
associated with.
- blurbs - An array of strings in order that they should be given
during the lesson. This is what the teacher says to the student. ', :, #, etc.
can be used for say, emote and execute a command respectively.
- skill - The skill being learned.
- difficulty - The bonus level of the skill being learned.
- responses - An array of strings. These are the expected responses
to the teacher's blurbs.
- params - an array of strings given as arguments to the responses in
order.
- award_mess - The string a player sees if they get a TM award during this step. It
should not end in a newline \n.
- succeed_mess - The string a player gets if they are successful in doing what the
step asks. It should not end in a newline \n.
- fail_mess - A string telling the player that they've failed. It should not
end in a newline \n.
-
has_required_cash
int has_required_cash(string name,
object player)
- has_required_cash( string name, object player )
Give some, get some. Money makes a teacher more likely to teach you.
- Parameters:
- name - name of the lesson they're trying to learn
- player - player object of the player trying to learn
-
has_required_materials
int has_required_materials(string name,
object player)
- has_required_materials( string name, object player )
Materials: Materials are objects which are necessary for a student to learn
something. For instance, to learn to speak a language, you might need
a textbook. To learn to ride a horse, you might want to require a helmet.
- Parameters:
- name - name of the lesson they're trying to learn
- player - player object of the player trying to learn
-
has_required_skills
int has_required_skills(string name,
object player)
- has_required_skills( string name, object player )
Skills: Skills and skill levels which may be necessary to learn something
For instance, one should learn to walk before one learns to run. If you
don't have sufficient skill levels in walking, you won't be able to learn
how to run.
- Parameters:
- name - name of the lesson they're trying to learn
- player - player object of the player trying to learn
-
lesson_end
int lesson_end(string name,
object student)
-
lesson_response
int lesson_response(string name,
object student,
int lessonstep,
string args)
-
query_lessons
string * query_lessons()
-
This method returns an array of the registered lessons.
- Returns:
- a list of lesson names.
-
register_lesson
int register_lesson(string name,
mapping minimum_skills,
mapping maximum_skills,
string * materials,
int cost,
string currency,
string * lesson_ending,
object teacher)
-
start_lesson
int start_lesson(string name,
object player)
-
This method starts a lesson for a given player.
- Parameters:
- the - lesson name
- the - player