summaryrefslogtreecommitdiff
path: root/npc/commands/titulate.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/commands/titulate.txt')
-rw-r--r--npc/commands/titulate.txt44
1 files changed, 43 insertions, 1 deletions
diff --git a/npc/commands/titulate.txt b/npc/commands/titulate.txt
index 35e50328f..c286297f1 100644
--- a/npc/commands/titulate.txt
+++ b/npc/commands/titulate.txt
@@ -28,7 +28,7 @@ OnCall:
.@them=getvariableofpc(ACADEMIC_RANK, .@id, 99);
mes ".:: " + l("Titulation") + " ::.";
- if (.@mine <= .@them) {
+ if (.@mine <= .@them || .@them < 0) {
mesc l("You can only concede or vouch a title for people of academic rank smaller or equal to your own.");
close;
}
@@ -98,13 +98,55 @@ OnCall:
Exception("Player not found.", RB_ISFATAL|RB_SPEECH);
}
+ attachrid(.@ori);
// Inform everyone
kamibroadcast(sprintf("%s has vouched %s for the title of %s.",
strcharinfo(0), .@request$, academicrank(.@them+1)));
+ // Log in a special log file as well
+ logmes(sprintf("%s has vouched %s for the title of %s.",
+ strcharinfo(0), .@request$, academicrank(.@them+1)));
+
+ close;
+
+OnCassate:
+ if (ACADEMIC_RANK < ACADEMIC_GM) {
+ mesc l("Only Academy Grand Masters may cassate someone.");
+ close;
+ }
+ mes ("To revoke someone's title and optionally apply a ban on them.");
+ mes ("Please insert the nickname of person to cassate (they must be online)");
+ input .@request$;
+ mes ("Ban them from the Magic Academy as well?");
+ .@ban=(askyesno() == ASK_YES);
+ next;
+ .@ori = getcharid(3);
+ .@id = getcharid(3, .@request$);
+ if (.@id < 1 || .@ori < 1) {
+ Exception("Player not found.", RB_ISFATAL|RB_DISPBOTTOM);
+ }
+
+ // Execute the banishment
+ if (attachrid(.@id)) {
+ ACADEMIC_RANK=(.@ban ? -1 : ACADEMIC_LAYMAN);
+ skill TMW2_STUDY, 0, 0;
+ dispbottom l("Your academy titles have been rescinded%s",
+ (.@ban ? l(", and you have been banned from the Academy.") : "."));
+ } else {
+ Exception("Player not found.", RB_ISFATAL|RB_DISPBOTTOM);
+ }
+
+ attachrid(.@ori);
+ // Inform everyone
+ kamibroadcast(sprintf("%s (A.GM) has stripped %s from their academic titles.",
+ strcharinfo(0), .@request$);
+ // Log in a special log file as well
+ logmes(sprintf("%s (Grandmaster) has stripped %s from their academic titles.",
+ strcharinfo(0), .@request$);
close;
OnInit:
bindatcmd "titulate", "@titulate::OnCall", 0, 100, 1;
+ bindatcmd "cassate", "@titulate::OnCassate", 60, 100, 1;
}