generic Academy room #146

Parent #258Owner Flags Source rpg_march_2006/Misc/academy.txt

Aliases: a, room

3 verbs · 21 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
enrol*lany none nonerxd#14632
look_selfthis any nonerxd#14610
add_coursethis none this#14616

Properties

PropertyDefinerFlagsOwnerValue
coursedesc#146rc{}
course_text#146rc{}
course_atts#146rc{}
courses#146rc{}
sign_msg#146rc"A sign on the wall announces that members may enroll in the following courses here:"
misc_notes#146not readable (E_PERM)
magic_effects#146not readable (E_PERM)
combat_effects#146not readable (E_PERM)
unannounced#146not readable (E_PERM)
allowed_exits#146not readable (E_PERM)
dawn_msg#146""
night_msg#146""
dusk_msg#146""
day_msg#146""
free_entry#1460
entrances#146not readable (E_PERM)
exits#146not readable (E_PERM)
ctype#1460
key#146not readable (E_PERM)
aliases#146{"a", "room"}
object_size#146{5101, 1141286558}

Ancestry

Ancestors (nearest first): #258 Generic Dungeon Room#1610 RPG RDB room#364 outside room#6792 Generic Integrating Description Room#3879 Matching Room#27777 Self-Cleaning Room

Children: none

Call graph

calls n146_0 #146:enrol*l n258_67 #258:announce n146_0->n258_67 n146_1 #146:look_self n258_30 #258:look_self n146_1->n258_30

Source

enrol*l

Spec any none noneFlags rxdDefiner #146

Referenced by

none

Source

1"enrol <coursename>";
2"Enrol in a course to improve all or some of the attributes in the appropriate 'course_atts' index.";
3rpg = $local.rpg;
4if (!(cnum = dobjstr in this.courses))
5  rpg:playertell(player, "Sorry, that course isn't available here.");
6  return;
7endif
8total = rpg:train(player, atts = this.course_atts[cnum]);
9if (total == E_NONE)
10  rpg:playertell(player, "You have no idea what's going on.  Embarrassed, you try to sneak out un-noticed.");
11  this:announce($string_utils:pronoun_sub("%N %<edges> towards the exit, looking very out of place.  Could %s be a spy?"));
12  return total;
13elseif (total == E_QUOTA)
14  rpg:playertell(player, "Your body and mind are unfocused; you couldn't possibly pass a course now.  Maybe you should go out and work off the tension.");
15  this:announce($string_utils:pronoun_sub("%N %<mopes> aimlessly around %l."));
16  return total;
17endif
18"Should probably add 'ocourse_msgs' or something here.";
19this:announce($string_utils:pronoun_sub(("%N %<fills> out the enrollment forms for " + dobjstr) + ".  %S %<is> led away to begin %p training."));
20player:tell_lines(this.course_text[cnum]);
21if (!total)
22  rpg:playertell(player, "You just can't seem to grasp what this course is trying to teach you.");
23  this:announce($string_utils:pronoun_sub("%N %<returns>, looking somewhat disappointed."));
24elseif (total == length(atts))
25  rpg:playertell(player, "You feel a great sense of accomplishment as you complete the course.");
26  this:announce($string_utils:pronoun_sub("Someone appears from the training area, a glow of accomplishment on %p face.  You recognise %o as a new, enlightened %n."));
27else
28  rpg:playertell(player, "You have now reached your full potential in this area.");
29  rpg:playertell(player, "You are obviously running low on potential, but may be able to improve another ability.");
30  this:announce($string_utils:pronoun_sub("%N returns from %p training, looking somewhat more than what %s was before."));
31endif
32"Quinn 11-AUG-93 0648: Re-written; added more verbose result messages; added omessages for the room.";

look_self

Spec this any noneFlags rxdDefiner #146

Referenced by

none

Source

1"Show the courses available, and their brief descriptions.";
2pass(@args);
3if (nc = length(this.courses))
4  player:tell_lines(this.sign_msg);
5  for k in [1..nc]
6    player:tell(this.courses[k], " : ", this.coursedesc[k]);
7  endfor
8else
9  player:tell("No courses seem to be available here.");
10endif

add_course

Spec this none thisDefiner #146

Referenced by

none

Source

1":add_course(name, desc, text, atts)";
2"Add a course with the given attributes.";
3"name -- What coursename the student should request.";
4"desc -- A one-liner describing the course.";
5"text -- Text displayed to student when course is taken.";
6"atts -- Attributes to be increased, in order.";
7if (!$local.rpg:is_grandmaster(caller_perms()))
8  return E_PERM;
9elseif (length(args) < 4)
10  return E_ARGS;
11endif
12this.courses = listappend(this.courses, args[1]);
13this.coursedesc = listappend(this.coursedesc, args[2]);
14this.course_text = listappend(this.course_text, args[3]);
15this.course_atts = listappend(this.course_atts, args[4]);
16return this.courses;