Teach Room (script): Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 4: Line 4:
|auth=[[User:Isharon|Isharon]]
|auth=[[User:Isharon|Isharon]]
}}
}}

{{LTOC}}

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.
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==
==Triggers==


<pre>#trigger {^(\w+) begins to lecture you on the proper usage of the (?!Sorcery|Stealing|Thievery)} {#send listen to $1}
<pre>#trigger {^(\w+) is teaching a class on (extremely advanced|advanced|intermediate|basic|simplistic|extremely simplistic) \(compared to what you already know\) (.+)( which|, but).+You are in this class!$} {#statusbar 3 Listening to $1 teach $3}
#trigger {^(\w+) is teaching a class on(?! (extremely advanced|advanced|intermediate|basic|simplistic|extremely simplistic)) (.+)( which|, but).+You are in this class!$} {#statusbar 3 Listening to $1 teach $3}
#trigger {^(\w+) is teaching a class on (extremely advanced|advanced|intermediate|basic|simplistic|extremely simplistic) \(compared to what you already know\) (.*)( which|, but).+You are in this class!$} {#statusbar 3 Listening to $1 teach $3}
#trigger {^(\w+) is teaching a class on(?! (extremely advanced|advanced|intermediate|basic|simplistic|extremely simplistic)) (.*)( which|, but).+You are in this class!$} {#statusbar 3 Listening to $1 teach $3}
#trigger {^All of your students have left, so you stop teaching|^Because you have no more students, your class ends|^But you aren't listening to anyone|^But you aren't teaching anyone|^No one seems to be teaching|^You stop listening to|^You stop teaching so as not to disturb the aura of quiet here|^You stop teaching\.|^Your teacher (has left|is not here), so you are no longer learning anything|cannot concentrate to teach .+ in combat\.|stops teaching and looks around quietly} {#statusbar 3 ""}
#trigger {^You are teaching a class on (.+) which} {#statusbar 3 Teaching $1;#var class $1}
#trigger {^(\w+) just tried to teach you\.$} {#echo >log $1 tries to teach you.}
#trigger {^All of your students have left, so you stop teaching|^Because you have no more students, your class ends|^Being unconscious, you make a lousy student, so \w+ stops teaching you|^But you aren't listening to anyone|^But you aren't teaching anyone|^No one seems to be teaching|^You stop listening to|^You stop teaching so as not to disturb the aura of quiet here|^You stop teaching\.|^Your teacher (has left|is not here), so you are no longer learning anything|cannot concentrate to teach .+ in combat\.|stops teaching and looks around quietly|^You're unconscious!$} {#statusbar 3 ""}
#trigger {^You begin to listen to (\w+) teach the (.+) skill} {#statusbar 3 Listening to $1 teach $2}
#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}
#trigger {^You begin to listen to (\w+) teach the (.*) skill} {#statusbar 3 Listening to $1 teach $2}
#trigger {^You continue to instruct your students? on (.*)\.$} {#statusbar 3 Teaching $1;#var class $1}
#trigger {^You decide to take things as they come} {#send teach open}
#trigger {^You decide to take things as they come} {#send teach open}
#trigger {begins to listen to you teach the (.+) skill} {#statusbar 3 Teaching $1;#var class $1}</pre>
#trigger {begins to listen to you teach the (.*) skill} {#statusbar 3 Teaching $1;#var class $1}</pre>


==Script (Teaches Class to Everyone)==
==Script (Teaches Class to Everyone)==
Line 24: Line 29:
eval players replacere("%players", " who is kneeling,", ",")
eval players replacere("%players", " who is kneeling,", ",")
eval players replacere("%players", " who is lying down,", ",")
eval players replacere("%players", " who is lying down,", ",")
eval players replacere("%players", " who is prone,", ",")
eval players replacere("%players", " who is sitting,", ",")
eval players replacere("%players", " who is sitting,", ",")
eval players replacere("%players", " who has a fiery visage,", ",")
eval players replacere("%players", " who is sleeping,", ",")
eval players replacere("%players", " who has a stony visage,", ",")
eval players replacere("%players", " who has a \S+ visage,", ",")
eval players replacere("%players", " who has coalesced into a battle of light and shadow, each warring for dominance,", ",")
eval players replacere("%players", " who has coalesced into a battle of light and shadow,", ",")
eval players replacere("%players", " who is bathed in pale golden sunlight,", ",")
eval players replacere("%players", " who is bathed in pale golden sunlight,", ",")
eval players replacere("%players", " who is behind a plexus of azure lines,", ",")
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 being harassed by an intrigue of phantasmal kittens,", ",")
eval players replacere("%players", " who is emanating a bright holy aura,", ",")
eval players replacere("%players", " who is blurred by hazy afterimages,", ",")
eval players replacere("%players", " who is emanating a malevolent holy aura,", ",")
eval players replacere("%players", " who is covered in layers of filth and surrounded by a cloud of putrescence,", ",")
eval players replacere("%players", " who is in a fiery crimson cage,", ",")
eval players replacere("%players", " who is covered with whitened ridges,", ",")
eval players replacere("%players", " who is in a geometric azure cage,", ",")
eval players replacere("%players", " who is darkened by an unnatural shadow,", ",")
eval players replacere("%players", " who is radiating a glowing aura,", ",")
eval players replacere("%players", " who is emanating a \S+ holy aura,", ",")
eval players replacere("%players", " who is flickering with fire motes,", ",")
eval players replacere("%players", " who is followed by a rabid confusion of smirking weasels,", ",")
eval players replacere("%players", " who is haloed in a double rainbow,", ",")
eval players replacere("%players", " who is in a globe of blue fire,", ",")
eval players replacere("%players", " who is in an? \S+ \S+ cage,", ",")
eval players replacere("%players", " who is mounted on .+ horse,", ",")
eval players replacere("%players", " who is radiating an? \S+ aura,", ",")
eval players replacere("%players", " who is sheathed in an aura of crackling electricity,", ",")
eval players replacere("%players", " who is shining with a dark golden glow,", ",")
eval players replacere("%players", " who is shining with a dark golden glow,", ",")
eval players replacere("%players", " who is shrouded by swirling \S+ fog,", ",")
eval players replacere("%players", " who is shrouded in ghostly flames,", ",")
eval players replacere("%players", " who is shrouded in ghostly flames,", ",")
eval players replacere("%players", " who is surrounded by a band of twittering songbirds,", ",")
eval players replacere("%players", " who is surrounded by a fiery mantle,", ",")
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 a.+shimmering shield,", ",")
eval players replacere("%players", " who is surrounded by a.+shimmering shield,", ",")
eval players replacere("%players", " who is who is mounted on .+ horse,", ",")
eval players replacere("%players", " who is surrounded by \S+ circling blades? of ice,", ",")
eval players replacere("%players", " who is surrounded by one circling blade of ice,", ",")
eval players replacere("%players", " who is swathed in shimmering sunbeams,", ",")
eval players replacere("%players", " who is surrounded by two circling blades of ice,", ",")
eval players replacere("%players", " who is trailed by a discombobulated shadow jumping in and out of view,", ",")
eval players replacere("%players", " who is surrounded by three circling blades of ice,", ",")
eval players replacere("%players", " who is trailed by a discombobulated shadow jumping in,", ",")
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 replacere("%players", ", [\w'-]+ ", ", ")
Line 51: Line 66:
eval players replace("%players", ", ", "|")
eval players replace("%players", ", ", "|")
var players %players
var players %players
echo players: %players
put #echo players: %players
eval total count("%players", "|")
eval total count("%players", "|")


Line 77: Line 92:
counter subtract 1
counter subtract 1
put teach $class to %player
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|is already trying to teach someone else
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|does not have the necessary training to learn|is already listening to you|is already trying to teach someone else|is listening to someone else|is not paying attention to you
if %c = 0 then return
if %c = 0 then return
goto teach</pre>
goto teach</pre>

Latest revision as of 07:40, 21 February 2019

Teach Room (script)
Category utility
Front-end Genie
Author Isharon



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 {^(\w+) begins to lecture you on the proper usage of the (?!Sorcery|Stealing|Thievery)} {#send listen to $1}
#trigger {^(\w+) is teaching a class on (extremely advanced|advanced|intermediate|basic|simplistic|extremely simplistic) \(compared to what you already know\) (.*)( which|, but).+You are in this class!$} {#statusbar 3 Listening to $1 teach $3}
#trigger {^(\w+) is teaching a class on(?! (extremely advanced|advanced|intermediate|basic|simplistic|extremely simplistic)) (.*)( which|, but).+You are in this class!$} {#statusbar 3 Listening to $1 teach $3}
#trigger {^(\w+) just tried to teach you\.$} {#echo >log $1 tries to teach you.}
#trigger {^All of your students have left, so you stop teaching|^Because you have no more students, your class ends|^Being unconscious, you make a lousy student, so \w+ stops teaching you|^But you aren't listening to anyone|^But you aren't teaching anyone|^No one seems to be teaching|^You stop listening to|^You stop teaching so as not to disturb the aura of quiet here|^You stop teaching\.|^Your teacher (has left|is not here), so you are no longer learning anything|cannot concentrate to teach .+ in combat\.|stops teaching and looks around quietly|^You're unconscious!$} {#statusbar 3 ""}
#trigger {^You are teaching a class on (.*) which} {#statusbar 3 Teaching $1;#var class $1}
#trigger {^You begin to listen to (\w+) teach the (.*) skill} {#statusbar 3 Listening to $1 teach $2}
#trigger {^You continue to instruct your students? on (.*)\.$} {#statusbar 3 Teaching $1;#var class $1}
#trigger {^You decide to take things as they come} {#send teach open}
#trigger {begins to listen to you teach the (.*) skill} {#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 prone,", ",")
eval players replacere("%players", " who is sitting,", ",")
eval players replacere("%players", " who is sleeping,", ",")
eval players replacere("%players", " who has a \S+ visage,", ",")
eval players replacere("%players", " who has coalesced into a battle of light and shadow, each warring for dominance,", ",")
eval players replacere("%players", " who has coalesced into a battle of light and shadow,", ",")
eval players replacere("%players", " who is bathed in pale golden sunlight,", ",")
eval players replacere("%players", " who is behind a plexus of azure lines,", ",")
eval players replacere("%players", " who is being harassed by an intrigue of phantasmal kittens,", ",")
eval players replacere("%players", " who is blurred by hazy afterimages,", ",")
eval players replacere("%players", " who is covered in layers of filth and surrounded by a cloud of putrescence,", ",")
eval players replacere("%players", " who is covered with whitened ridges,", ",")
eval players replacere("%players", " who is darkened by an unnatural shadow,", ",")
eval players replacere("%players", " who is emanating a \S+ holy aura,", ",")
eval players replacere("%players", " who is flickering with fire motes,", ",")
eval players replacere("%players", " who is followed by a rabid confusion of smirking weasels,", ",")
eval players replacere("%players", " who is haloed in a double rainbow,", ",")
eval players replacere("%players", " who is in a globe of blue fire,", ",")
eval players replacere("%players", " who is in an? \S+ \S+ cage,", ",")
eval players replacere("%players", " who is mounted on .+ horse,", ",")
eval players replacere("%players", " who is radiating an? \S+ aura,", ",")
eval players replacere("%players", " who is sheathed in an aura of crackling electricity,", ",")
eval players replacere("%players", " who is shining with a dark golden glow,", ",")
eval players replacere("%players", " who is shrouded by swirling \S+ fog,", ",")
eval players replacere("%players", " who is shrouded in ghostly flames,", ",")
eval players replacere("%players", " who is surrounded by a band of twittering songbirds,", ",")
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 \S+ circling blades? of ice,", ",")
eval players replacere("%players", " who is swathed in shimmering sunbeams,", ",")
eval players replacere("%players", " who is trailed by a discombobulated shadow jumping in and out of view,", ",")
eval players replacere("%players", " who is trailed by a discombobulated shadow jumping in,", ",")
eval players replacere("%players", ", [\w'-]+ ", ", ")
eval players replacere("%players", ", [\w'-]+ ", ", ")
eval players replacere("%players", ", [\w'-]+ ", ", ")
eval players replace("%players", ", ", "|")
var players %players
put #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|does not have the necessary training to learn|is already listening to you|is already trying to teach someone else|is listening to someone else|is not paying attention to you
if %c = 0 then return
goto teach