Teach Room (script): Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
(No difference)

Revision as of 16:28, 12 March 2011

This script offers to teach your ongoing class to everyone in the room. It will not work without the triggers that set the class variable.

Triggers

#trigger {begins to listen to you teach the (.+) skill} {#statusbar 3 Teaching $1;#var class $1}
#trigger {^You continue to instruct your students? on (.+)\.$} {#statusbar 3 Teaching $1;#var class $1}
#trigger {^You are teaching a class on (.+) which} {#statusbar 3 Teaching $1;#var class $1}

Script (Teaches Class to Everyone)

eval players replace("$roomplayers", "Also here: ", ", ")
eval players replace("%players", " and", ",")
eval players replace("%players", ".", ", ")
eval players replacere("%players", " who is kneeling,", ",")
eval players replacere("%players", " who is lying down,", ",")
eval players replacere("%players", " who is sitting,", ",")
eval players replacere("%players", " who is behind a plexus of azure lines,", ",")
eval players replacere("%players", " who is emanating a benevolent holy aura,", ",")
eval players replacere("%players", " who is emanating a bright holy aura,", ",")
eval players replacere("%players", " who is emanating a malevolent holy aura,", ",")
eval players replacere("%players", " who is radiating a glowing aura,", ",")
eval players replacere("%players", " who is shrouded in ghostly flames,", ",")
eval players replacere("%players", " who is surrounded by a fiery mantle,", ",")
eval players replacere("%players", " who is surrounded by a shimmering shield,", ",")
eval players replacere("%players", " who is surrounded by one circling blade of ice,", ",")
eval players replacere("%players", " who is surrounded by two circling blades of ice,", ",")
eval players replacere("%players", " who is surrounded by three circling blades of ice,", ",")
eval players replacere("%players", " who is surrounded by four circling blades of ice,", ",")
eval players replacere("%players", " who is surrounded by five circling blades of ice,", ",")
eval players replacere("%players", ", [\w'-]+ ", ", ")
eval players replacere("%players", ", [\w'-]+ ", ", ")
eval players replacere("%players", ", [\w'-]+ ", ", ")
eval players replace("%players", ", ", "|")
var players %players
echo players: %players
eval total count("%players", "|")

Loop:
eval player element("%players", 1)
eval number count("%players", "|%player")
var count 0
gosub RemoveLoop
action setvariable player $1 when ^@.* (\S+)$
put #parse @%player
counter set %count
gosub teach
if %players != "|" then goto Loop
exit

RemoveLoop:
eval number count("%players", "|%player|")
eval players replace("%players", "|%player|", "|")
eval players replace("%players", "||" "|")
evalmath count %count + %number
if !contains("%players", "|%player|") then return
goto RemoveLoop

teach:
counter subtract 1
put teach $class to %player
waitforre ^I could not find who you were referring to|^That person is too busy teaching|^You begin to lecture|^You have already offered to teach|is already listening to you|is listening to someone else|is not paying attention to you
if %c = 0 then return
goto teach

Script (Announces Class)

This script merely announces your class to everyone in the room.

Syntax: .class [skillset of subject]
For example, if you were teaching first aid, you would type .class survival.

send demeanor neutral

waitforre ^You decide to take things as they come pause

action setvariable class $1 when ^You are teaching a class on (.*) which (is still open to new students|you have currently closed to new students) put assess teach wait

action setvariable level a novice's when %class.+ novice action setvariable level a practitioner's when %class.+ practitioner action setvariable level a dilettante's when %class.+ dilettante action setvariable level an aficionado's when %class.+ aficionado action setvariable level an adept's when %class.+ adept action setvariable level an expert's when %class.+ expert action setvariable level a professional's when %class.+ professional action setvariable level an authority's when %class.+ authority action setvariable level a genius's when %class.+ genius action setvariable level a savant's when %class.+ savant action setvariable level a master's when %class.+ master action setvariable level a grand master's when %class.+ grand master action setvariable level a guru's when %class.+ guru action setvariable level a legend's when %class.+ legend

put exp %1 rp 10 waitforre Total Ranks Displayed

put '/quietly I am teaching %level class on %class if anyone wants to listen.