chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Aug 31, 2010 5:19 pm
3.24 Unidentified Bug |
I'm looking for some help in ways that I might narrow down and identify a fairly egregious bug that has suddenly appeared in the latest versions of CMUD. My Clan Highlighter script uses an alias called "Updater" which runs through the who list and gathers pertinent information for its purposes. For all previous versions, this has worked just fine.
However, starting in 3.23 and definitely in 3.24, when I type "Updater" and let it run, CMUD crashes. It freezes up, and has only once given me an error, which was some sort of memory access error.
I don't even know where to begin looking in the Updater alias in order to isolate this issue since the entire program crashes whenever I try to run it. It usually gets through a few names first and then crashes completely.
I'll post the script at the end, and the game is Dark and Shattered Lands (dsl-mud.org), but I don't really expect anyone to honestly go through looking for what might be causing the problem. However, any help identifying that this isn't just happening to me, and possibly helping me to use my own skills to isolate this bug would be extraordinarily useful.
[code:1:a19892b7e3]
<class name="Clan Highlighter" id="1182">
<alias name="updater" id="1183">
<value><![CDATA[#T- Gatherer-Off
#T+ Gatherer-Off
$_updates=1
#switch (%begins( "clan", %1)) {
#T+ Gatherer
#send "whoc"
#say "who clan"
}
(%begins( "loner", %1)) {
#T+ Gatherer
#send "who loner"
#say "who loner"
}
(%begins( "kingdom", %1)) {
#T+ Gatherer
#send "whok"
#say "who kingdom"
}
(%begins( "angel", %1)) {
#T+ Gatherer
#send "who angel"
#say "who angel"
}
(%begins( "demon", %1)) {
#T+ Gatherer
#send "who demon"
#say "who demon"
}
(%begins( "giant", %1)) {
#T+ Gatherer
#send "who giant"
#say "who giant"
}
(%begins( "renegade", %1)) {
#T+ Gatherer
#send "who renegade"
#say "who renegade"
}
(%begins( "show", %1)) {
$_updates=0
#switch (%begins( "level", %-2)) {#IF (@_show.lvl)
{
_show.lvl=0
#show "Clan Highlighter will no longer display level changes."
}
{
_show.lvl=1
#show "Clan Highlighter will now display level changes."
}}
(%begins( "clan", %-2)) {#IF (@_show.clan)
{
_show.clan=0
#show "Clan Highlighter will no longer display clan changes."
}
{
_show.lvl=1
#show "Clan Highlighter will now display clan changes."
}}
(%begins( "class", %-2)) {#IF (@_show.class)
{
_show.class=0
#show "Clan Highlighter will no longer display class changes."
}
{
_show.class=1
#show "Clan Highlighter will now display class changes."
}}
(%begins( "rank", %-2)) {#IF (@_show.rank)
{
_show.rank=0
#show "Clan Highlighter will no longer display rank changes."
}
{
_show.rank=1
#show "Clan Highlighter will now display rank changes."
}}
(%begins( "new", %-2)) {#IF (@_show.new)
{
_show.new=0
#show "Clan Highlighter will no longer display new members."
}
{
_show.new=1
#show "Clan Highlighter will now new members."
}}
(%begins( "all", %-2)) {#IF (@_show.all)
{
_show.all=0
_show.lvl=0
__show.class=0
_show.clan=0
_show.rank=0
_show.new=0
#show "Clan Highlighter is now set to show no changes or new members."
}
{
_show.all=1
_show.lvl=1
_show.class=1
_show.clan=1
_show.rank=1
_show.new=1
#show "Clan Highlighter is now set to show all changes and new members"
}}
}
(%begins( "stop", %1) || %begins( "no-update", %1)) {
$_updates=0
#SWITCH (%2="list") {#IF (%numitems( _no_update)>0) {
#show "The following names will not be updated automatically:"
#FORALL @_no_update {#show %i}
} {#show "No names on the no-update list currently."}}
{#IF (%ismember( %2, _no_update)) {
#DELI _no_update %2
#show %2" has been removed from the no-update list."
} {
#ADDI _no_update %2
#show %2" has been added to the no-update list."
}}
}
(%begins( "war", %1)) {
$_updates=0
#SWITCH (%2="list") {
#show "You are currently at war with:"
#FORALL @_list.war {#IF (!%ismember( %i, _list.clan) && !%ismember( %i, _list.kingdom)) {
$_mem_num=%ismember( %i, _char_rec.name)
#IF (%item( _char_rec.war, $_mem_num)!="war") {#DELI _list.war %i}
}}
$_iter=1
#FORALL @_char_rec.war {
#IF (%i="war" && !%ismember( %item( _char_rec.name, $_iter), _list.war) && !%ismember( %item( _char_rec.clan, $_iter), _list.war)) {#ADDI _list.war %item( _char_rec.name, $_iter)}
#ADD $_iter 1
}
#IF (%numitems( _list.war)>0) {
#LOCAL $_war
#FORALL @_list.war {
#IF (%ismember( %i, _list.clan) || %ismember( %i, _list.kingdom)) {$_war=@formatclan( %i)} {
$_mem_num=%ismember( %i, _char_rec.name)
$_war=%concat( %format( &-12 s, %i), " ", @padding( @formatclan( %item( _char_rec.clan, $_mem_num)), 15))
$_war=%concat( $_war, " [", %format( &-2 s, %item( _char_rec.lvl, $_mem_num)))
$_war=%concat( $_war, %format( &12 s, %item( _char_rec.class, $_mem_num)), "] ")
$_war=%concat( $_war, "(", %item( _char_rec.rank, $_mem_num), ")")
}
#show $_war
}
} {#show "You are not currently at war with anyone."}
}
{#IF (%ismember( %-2, _list.clan) || %ismember( %-2, @_list.kingdom)) {#IF (%ismember( %-2, @_list.war)) {
#LOOP %numitems( _char_rec.clan) {#IF (%-2=%item( _char_rec.clan, %i)) {#VAR _char_rec.war %replaceitem( "peace", %i, _char_rec.war)}}
$_string=@_list.war
#DELI $_string %-2
_list.war=$_string
#show "You are no longer at war with "@formatclan( %-2)
} {
#LOOP %numitems( @_char_rec.clan) {#IF (%-2=%item( _char_rec.clan, %i)) {#VAR _char_rec.war %replaceitem( "war", %i, _char_rec.war)}}
$_string=@_list.war
#ADDI $_string %-2
_list.war=$_string
#show "You are now at war with "@formatclan( %-2)
}} {#IF (%ismember( %-2, @_char_rec.name)) {
$_mem_num=%ismember( %-2, _char_rec.name)
$_name=%item( _char_rec.name, $_mem_num)
$_clan=@formatclan( %item( _char_rec.clan, $_mem_num))
$_lvl=%item( _char_rec.lvl, $_mem_num)
$_class=%item( _char_rec.class, $_mem_num)
$_rank=%concat( "(", %item( _char_rec.rank, $_mem_num), ")")
#IF (%ismember( %-2, _list.war)) {
#VAR _char_rec.war %replaceitem( "peace", $_mem_num, _char_rec.war)
$_string=@_list.war
#DELI $_string %-2
_list.war=$_string
#show "You are no longer at war with "$_name" "$_clan" ["$_lvl" "$_class"] "$_rank
} {
#VAR _char_rec.war %replaceitem( "war", $_mem_num, _char_rec.war)
$_string=@_list.war
#ADDI $_string %-2
_list.war=$_string
#show "You are now at war with "$_name" "$_clan" ["$_lvl" "$_class"] "$_rank
}
} {#show %2" is not a valid character, kingdom, or clan."}}}
}
{
#T+ Gatherer
#send "whoc"
}
#IF ($_updates)
{
#T+ Continue-who
#T+ Stop-who
#say "Gathering updates..."
#show "Please do not input commands until the 'Updates Complete' message is shown. Thank you."
}
{#send %cr}]]></value>
</alias>
<trigger name="Continue-who" priority="3740" regex="true" enabled="false" id="1184">
<pattern>\[ \(C\)ontinue, \(R\)efresh, \(B\)ack, \(H\)elp, \(E\)nd, \(T\)op, \(Q\)uit, or RETURN \]\:</pattern>
<value>_continue = 1
#send %cr
_continue = 0</value>
</trigger>
<trigger name="Stop-who" priority="3750" regex="true" enabled="false" id="1185">
<pattern>(Total|Players found): \d+\.</pattern>
<value>#T- Continue-who
#say "Updates complete."
#send {~~}
#send %cr
#T- Gatherer
#T- Stop-who</value>
</trigger>
<trigger name="Turn-Highlight-On" priority="3840" regex="true" id="1186">
<pattern>(@_highlight.if)</pattern>
<value>#T+ Highlight-t
#T+ Turn-Highlight-Off</value>
</trigger>
<trigger name="Turn-Highlight-Off" priority="3860" regex="true" enabled="false" id="1187">
<pattern>^$</pattern>
<value>#T- Highlight-t
#T- Turn-Highlight-Off</value>
</trigger>
<alias name="highlight" parsearg="false" id="1188">
<value><![CDATA[#SWITCH (%begins( "level", %1) || %1="lvl") {#IF (@_highlight.lvl) {
_highlight.lvl=0
#show "Levels will no longer be shown in the Highlighter."
} {
_highlight.lvl=1
#show "Levels will now be shown in the Highlighter."
}}
(%begins( "rank", %1)) {#IF (@_highlight.rank) {
_highlight.rank=0
#show "Ranks will no longer be shown in the Highlighter."
} {
_highlight.rank=1
#show "Ranks will now be shown in the Highlighter."
}}
(%begins( "flag", %1)) {#IF (@_highlight.flag) {
_highlight.flag=0
#show "Flags will no longer be shown in the Highlighter."
} {
_highlight.flag=1
#show "Flags will now be shown in the Highlighter."
}}
(%begins( "class", %1)) {#IF (@_highlight.class) {
_highlight.class=0
#show "Classes will no longer be shown in the Highlighter."
} {
_highlight.class=1
#show "Classes will now be shown in the Highlighter."
}}
(%begins( "highlight", %1)) {#IF (@_highlight.highlight) {
_highlight.highlight=0
#show "Highlighting will no longer be shown in the Highlighter."
} {
_highlight.highlight=1
#show "Highlighting will now be shown in the Highlighter."
}}
(%begins( "war", %1)) {#IF (@_highlight.war) {
_highlight.war=0
#show "War flags will no longer be shown in the Highlighter."
} {
_highlight.war=1
#show "War flags will now be shown in the Highlighter."
}}
(%begins( "list", %1)) {#IF (!%ismember( "null", @_highlight.if)) {
#show "The following patterns will trigger highlighting:"
#FORALL @_highlight.if {#show @parseregex( %i, 2)}
} {#show "You have no highlight patterns currently."}}
(%begins( "no", %1) || %begins( "stop", %1)) {#IF (%ismember( %-2, @_list.clan) || %ismember( %-2, @_list.kingdom) || %ismember( %-2, @_char_rec.name) || %-2="clans" || %-2="kingdoms") {#IF (%ismember( %-2, @_highlight.no)) {
$_string=@_highlight.no
$_mem_num=%ismember( %-2, $_string)
#DELNI $_string $_mem_num
_highlight.no=$_string
#show %-2" will now be highlighted again."
} {
$_string=@_highlight.no
#ADDI $_string %-2
_highlight.no=$_string
#show %-2" will no longer be highlighted."
}} {#show "That is not a valid entry. Valid parameters are: <clan/kingdom>/<name>/clan/kingdom"}}
(%begins( "add", %1)) {
$_pattern_list=@_highlight.if
$_parsed_pattern=@parseregex( %-2)
#IF (!%ismember( $_parsed_pattern, $_pattern_list) && $_parsed_pattern!="null" && $_parsed_pattern!="Null") {
#IF (%ismember( "null", _highlight.if)) {#VAR _highlight.if %replaceitem( %-2, 1, _highlight.if)} {
#ADDI $_pattern_list $_parsed_pattern
_highlight.if=$_pattern_list
}
#show "'"%-2"' will now trigger highlighting."
} {#IF ($_parsed_pattern!="null" && $_parsed_pattern!="Null") {#show "'"@parseregex( %item( _highlight.if, %ismember( $_parsed_pattern, $_pattern_list)), 0)"' is already on the highlighting list."} {#show "Null is not a valid pattern."}}
}
(%begins( "delete", %1)) {
$_pattern_list=@_highlight.if
$_parsed_pattern=@parseregex( %-2)
#IF (%ismember( $_parsed_pattern, $_pattern_list)) {#IF (@_confirm.if_del) {#IF (@_confirm.if_pat=$_parsed_pattern) {
#DELI $_pattern_list $_parsed_pattern
_highlight.if=$_pattern_list
#show "'"%-2"' will no longer trigger highlighting."
#IF (%numitems( _highlight.if)<1) {#VAR _highlight.if %additem( "null", _highlight.if)}
_confirm.if_del=0
_confirm.if_pat=%null
} {
#show "You have chosen to delete '"%-2"' from the highlighting list. Please type 'highlight delete' followed by the pattern again to confirm deletion."
_confirm.if_pat=$_parsed_pattern
#T+ reset-if-del
}} {
_confirm.if_del=1
_confirm.if_pat=$_parsed_pattern
#show "You have chosen to delete '"%-2"' from the highlighting list. Please type 'highlight delete' followed by the pattern again to confirm deletion."
}} {#show "'"%-2"' is not part of the highlighting list."}
}
(%begins( "about", %1)) {
#show "-----------------------------------------------------------"
#show "ABOUT:"
#show "-----------------------------------------------------------"
#show %ansi( 10)"Clan Highlighter:"%ansi( reset)" Version 4.0"
#show %ansi( 10)"Author:"%ansi( reset)" Steven Blea"
#show %ansi( 10)"Located:"%ansi( reset)
#show %ansi( 9)"http://www.dsl-mud.org/forum/forum_posts.asp?TID=50064"%ansi( reset)
#show "For use with Dark and Shattered Lands (DSL)"
#show "Special thanks to "%ansi( 5)"Gowr"%ansi( reset)" for hosting my scripts"
#show "you may current versions here:"
#show %ansi( 9)"http://phosen.tos5.com/DSL/Scripts/CMUD/Scripts_CMUDHome.html"%ansi( reset)
#show "-----------------------------------------------------------"
}
(%begins( "help", %1)) {#switch (%begins( "find", %2)) {
#show "-----------------------------------------------------------"
#show "FIND:"
#show "-----------------------------------------------------------"
#show "Typing this command will bring up all relevant information"
#show "on a particular character in the following format:"
#show "name [ "%ansi( 3)"clan"%ansi( reset)" ][lvl class] (rank)"
#show "ex:"
#show "Found: 1. Ealanil [ "%ansi( 4)"Bloodlust"%ansi( reset)" ] [51 Illusionist] (Devourer)"
#show "Found: 2. Lanival [ Shadow ] [51 Shadowknight] (Dark_Lord)"
#show "Valid arguments:"
#show %ansi( 10)"<name>"%ansi( reset)" - Returns exact matches. Multiple names may be"
#show "entered at once."
#show %ansi( 10)"all ([<name> <class> <clan> <kingdom> <lvl>], null)"%ansi( reset)" - Returns"
#show "any characters who match all criteria. <name> will return"
#show "partial matches and accepts special characters ^ to match"
#show "the beginning or $ to match the end, <lvl> accepts both a"
#show "number or range in the format 43-51. eg. 'find all Shalonesti"
#show "warrior 43-51 ^D' will return all warriors in clan Shalonesti"
#show "from lvl 43 to 51 whose names begin with the letter D. Entering"
#show "nothing will return all of your current records."
#show %ansi( 10)"settings/set (time <number>, <number>, null)"%ansi( reset)" - Sets"
#show "short lists for 'find'. time <number> will set how long it"
#show "takes for find to automatically reset your searches. <number>"
#show "will set the size of your short list groups. And entering"
#show "nothing will toggle short lists on and off, default size 20."
#show %ansi( 9)"Credit"%ansi( reset)" must be given to "%ansi( 9)"Drax"%ansi( reset)" for developing this pattern"
#show "matching system."
#show %ansi( 12)"NOTE"%ansi( reset)": listing ALL of the names without using short-lists"
#show "will likely be spammy. Use at your own discretion."
#show "-----------------------------------------------------------"
}
(%begins( "edit", %2)) {
#show "-----------------------------------------------------------"
#show "EDIT:"
#show "-----------------------------------------------------------"
#show %ansi( 10)"<name> (<clan>, <level>, <rank>, <class>)"%ansi( reset)" - Edits information"
#show "in the character's record. You can edit one thing, or everything"
#show "about the character and in any order. 'edit name Yasan 43 Bard'"
#show "would change Yasan's level to 43 and his class to Bard."
#show %ansi( 10)"add <name> [<clan> <level> <rank> <class>]"%ansi( reset)" - Adds a character"
#show "that is not currently in the records to the records. You must"
#show "enter a clan/kingdom, level, rank, and class, but the order in"
#show "which you enter them does no matter."
#show %ansi( 12)"NOTE:"%ansi( reset)" "%ansi( 15)"Shalonesti Kingdom"%ansi( reset)" must be manually entered as the "
#show "following: "%ansi( 15)"Shalonesti-k"%ansi( reset)
#show %ansi( 10)"delete <name>"%ansi( reset)" - Deletes a name that is currently on the records"
#show "from the records. You will need to type 'delete <name>' twice in"
#show "order to confirm the deletion."
#show %ansi( 10)"save"%ansi( reset)" - Saves your current records into a backup record for the"
#show "restore command."
#show %ansi( 10)"restore -"%ansi( reset)" Replaces your current lists with your backup lists,"
#show "this is useful if your lists become corrupted for some reason."
#show %ansi( 12)"NOTE:"%ansi( reset)" Your backup lists will likely be older than your current ones"
#show " this means data loss is inevitable. But it's better than having corrupt"
#show " lists. If you know of a bug causing synchronization errors, please report"
#show " them to the author."
#show "-----------------------------------------------------------"
}
(%begins( "updater", %2)) {
#show "-----------------------------------------------------------"
#show "UPDATER:"
#show "-----------------------------------------------------------"
#show %ansi( 10)"clan/kingdom/loner/renegade/giant/angel/demon"%ansi( reset)" - Will run"
#show "gatherer to automatically update information on the selected"
#show "group. i.e. 'updater king' will gather information on"
#show "kingdomers automaticlly. Typing updater with no argument will"
#show "update clanners."
#show %ansi( 12)"NOTE:"%ansi( reset)" While updates are gathered, do not input commands. If"
#show "the gatherer stalls, you can input [enter] until you reach"
#show "the end of the list."
#show %ansi( 10)"show (level, clan, class, rank, new, all)"%ansi( reset)" - Toggles information"
#show "shown when the gatherer updates. 'show level' will toggle"
#show "whether or not changes to level are shown in the updater."
#show "'show new' will toggle whether or not you see new additions,"
#show "and 'show all' will toggle all of the options at once."
#show %ansi( 10)"stop/no-update (list, <name>)"%ansi( reset)" - Allows you to add a name to"
#show "the no-update list. Names on the no-update list will not be"
#show "gathered automatically, though you can still add them via"
#show "'edit add'. Using 'stop list' will give a listing of names"
#show "that are currently on the no-update list."
#show %ansi( 10)"war (list, <name>, <clan>)"%ansi( reset)" - Toggles your war status with"
#show "the appropriate clan or individual. Typing 'war Yasan' would"
#show "flag Yasan as at-war with you, or peace if Yasan was flagged"
#show "at-war. Typing 'war Shadow' would flag all Shadow characters"
#show "as at-war, or peace if they were flagged at-war. List will"
#show "show all of your current wars."
#show "-----------------------------------------------------------"
}
(%begins( "highlight", %2)) {
#show "-----------------------------------------------------------"
#show "HIGHLIGHT:"
#show "-----------------------------------------------------------"
#show %ansi( 10)"(level, flag, rank, class, highlight, war)"%ansi( reset)" - Toggles various"
#show "highlights on and off. 'highlight level' will make it so that"
#show "you no longer see levels as part of the highlights if you have"
#show "levels on, otherwise it will toggle on levels as part of the"
#show "highlighting."
#show %ansi( 10)"no/stop (clans, kingdoms, <clan/kingdom>, <name>)"%ansi( reset)"- Toggles"
#show "groups and individuals for highlighting. Typing the command"
#show "'highlight no kingdoms' would turn of all highlighting for"
#show "kingdomers. Typing 'highlight no Yasan' would turn off all"
#show "highlighting for Yasan. If either were already turned off,"
#show "typing the respective commands would turn them back on."
#show %ansi( 10)"add"%ansi( reset)" - Allows users to add custom patterns which will trigger"
#show "highlighting. See 'highlight help pattern' for information"
#show "on building custom patterns."
#show %ansi( 10)"delete"%ansi( reset)" - Deletes patterns from the list, you can delete"
#show "custom patterns or preset ones. If there are no patterns"
#show "the value 'null' will be added instead."
#show %ansi( 10)"list"%ansi( reset)" - This will list all of your current patterns."
#show %ansi( 10)"about"%ansi( reset)" - Gives information about Clan Highlighter"
#show %ansi( 10)"help"%ansi( reset)
#show %ansi( 10)"(highlight, find, edit, updater, help, about, patterns)"%ansi( reset)
#show "The help command takes the above parameters, offering help"
#show "on those topics."
#show %ansi( 10)"update"%ansi( reset)" - Displays the information on the latest version of"
#show "Clan Highlighter's changes. Will also run anything that may"
#show "need to be run after a new update of Clan Highlighter."
#show %ansi( 12)"NOTE:"%ansi( reset)" You should run 'highlight update' immediately after"
#show "updating Clan Highlighter."
#show "-----------------------------------------------------------"
}
(%begins( "pattern", %2)) {
#show "-----------------------------------------------------------"
#show "PATTERNS"
#show "-----------------------------------------------------------"
#show "Clan Highlighter uses a simplified form of Regex for its custom"
#show "highlights. Regular regex patterns should work, but won't be"
#show "explained here and aren't yet supported as part of custom"
#show "highlights."
#show "To make a pattern, you simply put in the phrase that you would"
#show "expect to appear, and replace variable words with specific symbols."
#show "For instance, to get the pattern for:"
#show "Yasan yells (Elvish) 'I'm being attacked!'"
#show "You know that Yasan is variable, (Elvish) is variable, and the"
#show "phrase 'I'm being attacked' is variable."
#show "When we know that only one word is going to be varied, we can use:"
#show %ansi( 14)"$w"%ansi( reset)" - Used to match any one word, can contain ' and -"
#show %ansi( 14)"&w"%ansi( reset)" - matches a string of multiple words without digits."
#show %ansi( 14)"$d"%ansi( reset)" - matches one or more digits."
#show %ansi( 14)"$*"%ansi( reset)" - matches any amount of digits, strings, and spaces."
#show %ansi( 14)"?"%ansi( reset)" - means that the () before it are optional."
#show %ansi( 14)"\"%ansi( reset)" - is the escape character. For instance, () are parsed. But if"
#show "you use \(\) they will be taken literally."
#show "[], {}, ?, (), and other special symbols are all parsed and need to"
#show "be escaped. You will need to learn more about regex to learn any others."
#show "Those should be the only ones you need to worry about for most patterns"
#show "that you might make in DSL."
#show "So, for the above phrase, you would get:"
#show %ansi( 10)"$w yells( \(&w\)) '*'"%ansi( reset)
#show "More symbols may be added in the future."
#show "-----------------------------------------------------------"
}
{
#show "-----------------------------------------------------------"
#show "HELP:"
#show "-----------------------------------------------------------"
#show "Type highlight help <command> for more information on a specific"
#show "command. ex: highlight help updater"
#show "> highlight <param>"
#show "> updater <param>"
#show "> edit <param> <name>"
#show "> find <name>"
#show "-----------------------------------------------------------"
}}
(%begins( "update", %1)) {
#IF (!@_update) {
#show "Clan Highlighter Update is now running to update you to v3.0..."
_update=1
}
#show %ansi( 14)"New in version 4.0:"%ansi( reset)
#show %ansi( 10)"Commands:"%ansi( reset)
#show %ansi( 9)"> Edit"%ansi( reset)
#show "- Added the subparameter [war/peace], you can now type edit <name> war,"
#show " or edit <name> peace to set their status. This should also reflect"
#show " properly on the updater war listings."
#show %ansi( 9)"> Highlight"%ansi( reset)
#show "- Removed 'highlight help about' because it's redundant, please use"
#show " 'highlight about' instead."
#show %ansi( 10)"Features:"%ansi( reset)
#show %ansi( 14)"> "%ansi( reset)
#show ""
#show %ansi( 10)"Misc:"%ansi( reset)
#show %ansi( 11)"> Script Updates"%ansi( reset)
#show "- Changed a lot of variable references for more efficient handling in"
#show " CMUD v3.2x."
#show %ansi( 11)"> Fixes"%ansi( reset)
#show "- Fixed the (WAR) flag to properly update when someone changes clans and"
#show " kingdoms. Both automatic and manual versions of switching should update"
#show " and reflect their new (WAR) status properly."
#show "- Fixed updater to properly update sub-level 10 angels, demons, loners, and"
#show " giants properly."
}
{
#show "-----------------------------------------------------------"
#show "HELP:"
#show "-----------------------------------------------------------"
#show "Type highlight help <command> for more information on a specific"
#show "command. ex: highlight help updater"
#show "> highlight <param>"
#show "> updater <param>"
#show "> edit <param> <name>"
#show "> find <name>"
#show "-----------------------------------------------------------"
}
#send %cr]]></value>
</alias>
<trigger name="Highlight-t" priority="3940" regex="true" enabled="false" id="1189">
<pattern>^((?:The ghost of )?(?:@_char_rec.name))(?:[,\s])(\s+)?(\S+.*)$</pattern>
<value><![CDATA[$_name=%replace( %1, "The ghost of ", "")
$_mem_num = %ismember( %1, _char_rec.name)
$_clan = %item( _char_rec.clan, $_mem_num)
#SWITCH (%ismember( %1, _highlight.no)) {}
(%ismember( $_clan, _highlight.no)) {}
(%ismember("clans", _highlight.no) && %ismember($_clan, _list.clan)) {}
(%ismember("kingdoms", _highlight.no) && %ismember($_clan, _list.kingdom)) {}
{
$_c_color = @clancolor( $_clan)
#IF (@_highlight.war) {#IF (%item( _char_rec.war, $_mem_num)="war") {
$_len=%len( %2)
#SUB %concat( %1, " ", %ansi( 12)"(WAR) "%ansi( reset), %repeat( " ", %eval( %len( %2)-6)), %3)
}}
#if (@_highlight.highlight)
{#IF (%item( _char_rec.clan, $_mem_num) = "Shadow")
{#pcol 8 %x1}
{#pcol $_c_color %x1}}
#if (@_highlight.flag)
{
$_clan_echo = @formatclan( $_clan, 1)
#sayadd " "$_clan_echo
}
#if (@_highlight.lvl)
{#sayadd "("%item( _char_rec.lvl, $_mem_num)")"}
#if (@_highlight.class)
{#sayadd "("%item( _char_rec.class, $_mem_num)")"}
#if (@_highlight.rank)
{#sayadd "("%item( _char_rec.rank, $_mem_num)")"}
}]]></value>
</trigger>
<alias name="edit" id="1191">
<value><![CDATA[#LOCAL $_type $_add_type $_error
$_param_list="add|delete|restore|save"
$_cr=1
$_change=1
#SWITCH (%begins( "add", %1)) {#IF (!%ismember( %2, _char_rec.name) && !%ismember( %2, $_param_list)) {
$_params=%replace( %-3, " ", "|")
#FORALL $_params {
#SWITCH (%ismember( %i, _list.clan) || %ismember( %i, _list.kingdom)) {$_type="clan"}
(%ismember( %i, _list.class)) {$_type="class"}
(%isnumber( %i) && %i<52 && %i>0) {$_type="lvl"}
{$_type="rank"}
#IF (%isnumber( %i) && %i>51 || %i<1) {$_error="level out of range (1-51)"}
#IF (!%ismember( $_type, $_add_type)) {$_add_type=%additem( $_type, $_add_type)}
}
#IF (!%ismember( "clan", $_add_type)) {$_error=%additem( "clan", $_error)}
#IF (!%ismember( "class", $_add_type)) {$_error=%additem( "class", $_error)}
#IF (!%ismember( "lvl", $_add_type) && !%ismember( "level out of range (1-51)", $_error)) {$_error=%additem( "lvl", $_error)}
#IF (!%ismember( "rank", $_add_type)) {$_error=%additem( "rank", $_error)}
#IF ($_error!=%null) {
$_err_num=%numitems( $_error)
$_error=%replace( $_error, "|", ", ")
$_error=%replace( $_error, "lvl", "level")
#show "Could not add "%2
#show "You are missing the following parameter"%if( $_err_num>1, "s")": "$_error
} {
$_string=@_char_rec.name
$_name=%2
$_first_letter=%left( $_name, 1)
$_first_letter=%upper( $_first_letter)
$_name=%concat( $_first_letter, %right( $_name, 1))
#ADDI $_string $_name
_char_rec.name=$_string
#LOOP %numitems( $_params) {
$_type=%item( $_add_type, %i)
$_string=@{_char_rec.${_type}}
#VAR $_string %additem( %item( $_params, %i), $_string)
#SWITCH ($_type="clan") {_char_rec.clan=$_string}
($_type="rank") {_char_rec.rank=$_string}
($_type="lvl") {_char_rec.lvl=$_string}
($_type="class") {_char_rec.class=$_string}
}
$_mem_num=%numitems( _char_rec.name)
#IF (%ismember( %item( _char_rec.clan, $_mem_num), _list.war)) {#VAR _char_rec.war %additem( "war", _char_rec.war)} {#VAR _char_rec.war %additem( "peace", _char_rec.war)}
$_name=%item( _char_rec.name, $_mem_num)
$_clan=@formatclan( %item( _char_rec.clan, $_mem_num))
$_lvl=%item( _char_rec.lvl, $_mem_num)
$_class=%item( _char_rec.class, $_mem_num)
$_rank=%concat( "(", %item( _char_rec.rank, $_mem_num), ")")
#show $_name" "$_clan" ["$_lvl" "$_class"] "$_rank" has been added."
}
} {#IF (%ismember( %2, _char_rec.name)) {
#show %2" is already on the list."
find %2
$_cr=0
} {#show %2" is not a valid name."}}}
(%begins( "delete", %1)) {#IF (%ismember( %2, _char_rec.name)) {
$_mem_num=%ismember( %2, _char_rec.name)
$_name=%item( _char_rec.name, $_mem_num)
$_clan=@formatclan( %item( _char_rec.clan, $_mem_num))
$_lvl=%item( _char_rec.lvl, $_mem_num)
$_class=%item( _char_rec.class, $_mem_num)
$_rank=%concat( "(", %item( _char_rec.rank, $_mem_num), ")")
#IF (@_confirm.edit-del) {#IF (@_confirm.edit-pat=%2) {
$_mem_num=%ismember( %2, _char_rec.name)
$_string=@_char_rec.name
#DELNI $_string $_mem_num
_char_rec.name=$_string
$_string=@_char_rec.clan
#DELNI $_string $_mem_num
_char_rec.clan=$_string
$_string=@_char_rec.lvl
#DELNI $_string $_mem_num
_char_rec.lvl=$_string
$_string=@_char_rec.class
#DELNI $_string $_mem_num
_char_rec.class=$_string
$_string=@_char_rec.rank
#DELNI $_string $_mem_num
_char_rec.rank=$_string
$_string=@_char_rec.war
#DELNI $_string $_mem_num
_char_rec.war=$_string
#show $_name" "$_clan" ["$_lvl" "$_class"] "$_rank" has been removed."
_confirm.edit-del=0
_confirm.edit-pat=%null
#T- reset-edit-del
} {
#show "You have chosen to delete the following entry:"
#show $_name" "$_clan" ["$_lvl" "$_class"] "$_rank
#show "Type 'edit delete "%2"' to confirm deletion."
_confirm.edit-pat=%2
#T- reset-edit-del
#T+ reset-edit-del
}} {
#show "You have chosen to delete the following entry:"
#show $_name" "$_clan" ["$_lvl" "$_class"] "$_rank
#show "Type 'edit delete "%2"' to confirm deletion."
_confirm.edit-del=1
_confirm.edit-pat=%2
#T+ reset-edit-del
}
} {#show %2" is not on the records to delete."}}
(%begins( "save", %1)) {#IF (@_confirm.save) {
#show "Replacing current backups..."
_char_rec_b.name=@_char_rec.name
#show "Character names backed up."
_char_rec_b.clan=@_char_rec.clan
#show "Character clans backed up."
_char_rec_b.class=@_char_rec.class
#show "Character classes backed up."
_char_rec_b.lvl=@_char_rec.lvl
#show "Character levels backed up."
_char_rec_b.rank=@_char_rec.rank
#show "Character ranks backed up."
_char_rec_b.war=@_char_rec.war
#show "Character war records backed up."
#show "Character save completed."
#T- reset-save-restore
_confirm.save=0
} {
#show "You have chosen to backup your character records. You should make sure that your records are free of corruption before continuing. Type 'edit save' again to confirm the backup."
_confirm.save=1
#T+ reset-save-restore
}}
(%begins( "restore", %1)) {#IF (@_confirm.restore) {
#show "Replacing current records with backups..."
_char_rec.name=@_char_rec_b.name
#show "Character names restored."
_char_rec.clan=@_char_rec_b.clan
#show "Character clans restored."
_char_rec.class=@_char_rec_b.class
#show "Character classes restored."
_char_rec.lvl=@_char_rec_b.lvl
#show "Character levels restored."
_char_rec.rank=@_char_rec_b.rank
#show "Character ranks restored."
_char_rec.war=@_char_rec_b.war
#show "Character war records restored."
#show "Character restore completed."
#T- reset-save-restore
_confirm.restore=0
} {
#show "You have chosen to restore your character records. Restore files are typically older than current ones which will result in data loss. Restores should only happen if your records get corrupted. Type 'edit restore' again to confirm the restore."
_confirm.restore=1
#T+ reset-save-restore
}}
{#IF (%ismember( %1, @_char_rec.name)) {
$_mem_num=%ismember( %1, _char_rec.name)
$_name=%item( _char_rec.name, $_mem_num)
$_o_clan=@padding( @formatclan( %item( _char_rec.clan, $_mem_num)), 15)
$_o_lvl=%format( "&-2s", %item( _char_rec.lvl, $_mem_num))
$_o_war=%item( _char_rec.war, $_mem_num)
$_o_war=%format( "&-5s", $_o_war)
$_o_war=%if(%pos("war", $_o_war), %concat(%ansi(12), $_o_war, %ansi(reset)), %concat(%ansi(15), $_o_war, %ansi(reset)))
$_o_class=%format( "&12s", %item( _char_rec.class, $_mem_num))
$_o_rank=%concat( "(", %item( _char_rec.rank, $_mem_num), ")")
#IF (%-2!=%null) {
$_params=%replace( %-2, " ", "|")
#FORALL $_params {
#SWITCH (%ismember( %i, _list.clan) || %ismember( %i, _list.kingdom)) {$_type="clan"}
(%ismember( %i, _list.class)) {$_type="class"}
(%isnumber( %i) && %i<52 && %i>0) {$_type="lvl"}
(%ismember(%i, "war|peace")) {$_type="war"}
{#IF (!%isnumber( %i)) {$_type="rank"} {#show "Level not in the proper range. (1-51)"}}
#IF (%isnumber( %i) && %i>51 || %i<1) {
$_error="level out of range (1-51)"
$_change=0
}
#IF (!%ismember( $_type, $_add_type)) {$_add_type=%additem( $_type, $_add_type)}
}
#IF ($_change) {
#LOCAL $_clan $_class $_lvl $_rank
#LOOP %numitems( $_params) {
$_type=%item( $_add_type, %i)
$_string=%db(_char_rec, $_type)
#IF (%item( $_params, %i)!=%item( $_string, $_mem_num)) {
#VAR $_string %replaceitem( %item( $_params, %i), $_mem_num, $_string)
#IF ($_type="clan") {
_char_rec.clan=$_string
#IF (%ismember( %item( _char_rec.clan, $_mem_num), _list.war) && %item( _char_rec.war, $_mem_num="peace")) {#VAR _char_rec.war %replaceitem( "war", $_mem_num, _char_rec.war)}
#IF (!%ismember( %item( _char_rec.clan, $_mem_num), _list.war) && %item( _char_rec.war, $_mem_num="war")) {#VAR _char_rec.war %replaceitem( "peace", $_mem_num, _char_rec.war)}
}
#IF ($_type="class") {_char_rec.class=$_string}
#IF ($_type="lvl") {_char_rec.lvl=$_string}
#IF ($_type="rank") {_char_rec.rank=$_string}
#IF ($_type="war") {_char_rec.war=$_string}
}
}
$_clan=@padding( @formatclan( %item( _char_rec.clan, $_mem_num)), 15)
$_class=%format( "&12s", %item( _char_rec.class, $_mem_num))
$_lvl=%format( "&-2s", %item( _char_rec.lvl, $_mem_num))
$_war=%item( _char_rec.war, $_mem_num)
$_war=%format( "&-5s", $_war)
$_war=%if(%pos("war", $_war), %concat(%ansi(12), $_war, %ansi(reset)), %concat(%ansi(15), $_war, %ansi(reset)))
$_rank=%concat( "(", %item( _char_rec.rank, $_mem_num), ")")
#show $_name" "$_o_clan" ["$_o_lvl" "$_o_class"] "$_o_war" "$_o_rank
#show "has been changed to"
#show $_name" "$_clan" ["$_lvl" "$_class"] "$_war" "$_rank
}
} {#show "You haven't chosen anything to edit for "$_name}
} {#show %1" isn't in the records to edit."}}
#IF ($_cr) {#send %cr}]]></value>
</alias>
<func name="clancolor" id="1192">
<value>#RETURN %switch($char_clan = "Justice", 1, $char_clan = "Bloodlust", 4, $char_clan = "Knighthood", 9, $char_clan = "Shadow", 7, $char_clan = "Slayers", 14, $char_clan = "Conclave", 14, $char_clan = "Red Robes", 12, $char_clan = "Black Robes", 8, $char_clan = "White Robes", 15, $char_clan = "Shalonesti", 2, $char_clan = "Wargar", 11, $char_clan = "Chaos", 8, $char_clan = "Loner", 15, $char_clan = "Renegade", 15, $char_clan = "Dragon", 10, $char_clan = "Angel", 10, $char_clan = "Demon", 10, $char_clan = "Retired", 15, %ismember($char_clan, @_list.kingdom), 3)</value>
<arglist>$char_clan</arglist>
</func>
<func name="selclass" id="1193">
<value>#RETURN %switch($_c_abbr="War","Warrior", $_c_abbr="Ran", "Ranger", $_c_abbr="Bar", "Barbarian", $_c_abbr="Swb", "Swashbuckler", $_c_abbr="Arm", "Armsman", $_c_abbr="Cle", "Cleric", $_c_abbr="Cru", "Crusader", $_c_abbr="Dru", "Druid", $_c_abbr="Sha", "Shaman", $_c_abbr="Pri", "Priest", $_c_abbr="Mag", "Mage", $_c_abbr="Wit", "Witch", $_c_abbr="Wlk", "Warlock", $_c_abbr="Ill", "Illusionist", $_c_abbr="Enc", "Enchantor", $_c_abbr="Brd", "Bard", $_c_abbr="Jng", "Jongleur", $_c_abbr="Cha", "Charlatan", $_c_abbr="Skd", "Skald", $_c_abbr="Thi", "Thief", $_c_abbr="Asn", "Assassin", $_c_abbr="Bnd", "Bandit", $_c_abbr="Nsh", "Nightshade", $_c_abbr="Inv", "Invoker", $_c_abbr="Tra", "Transmuter", $_c_abbr="Bmg", "Battlemage", $_c_abbr="Nec", "Necromancer", $_c_abbr="Pal", "Paladin", $_c_abbr="Skn", "Shadowknight", $_c_abbr="Bla", "Bladesinger", $_c_abbr="Eld", "Eldritch", $_c_abbr="Bat", "Battlerager", $_c_abbr="Run", "Runesmith", $_c_abbr="Mon", "Monk", $_c_abbr="Slr", "Dragonslayer", $_c_abbr="Dra", "Dragon", $_c_abbr="Ang", "Angel", $_c_abbr="Dem", "Demon", $_c_abbr="???", "???", $_c_abbr="Gia", "Giant", 1, "Null")</value>
<arglist>$_c_abbr</arglist>
</func>
<func name="trimclan" id="1194">
<value>$_trim_clan = %replace($_trim_clan, "[", "")
$_trim_clan = %replace($_trim_clan, "]", "")
$_trim_clan = %replace($_trim_clan, "(", "")
$_trim_clan = %replace($_trim_clan, ")", "")
#RETURN %trim($_trim_clan)</value>
<arglist>$_trim_clan</arglist>
</func>
<func name="trimrank" id="1195">
<value>$_trim_rank = %replace($_trim_rank, "(Leader)", "")
$_trim_rank = %replace($_trim_rank, "(Recruiter)", "")
#RETURN %trim($_trim_rank)</value>
<arglist>$_trim_rank</arglist>
</func>
<func name="selkingdom" id="1196">
<value>#RETURN %switch($_king_abbr="VR", "Verminasia", $_king_abbr="AL", "Althainia", $_king_abbr="AR", "Arkane", $_king_abbr="NT", "New Thalos", $_king_abbr="SH", "Shalonesti-k", $_king_abbr="THAX", "Thaxanos", $_king_abbr="Darkonin", "Darkonin", $_king_abbr="Verminasia", "Verminasia", $_king_abbr="Abaddon", "Abaddon", $_king_abbr="Ganth", "Ganth", $_king_abbr="Nordmaar", "Nordmaar", $_king_abbr="Retired", "Retired", $_king_abbr="Marauders", "Marauders", $_king_abbr="Gray Church", "Gray Church", 1, "No Kingdom")</value>
<arglist>$_king_abbr</arglist>
</func>
<trigger name="Clear-Delete" type="Alarm" priority="4330" enabled="false" id="1197">
<pattern>30</pattern>
<value>_del_char_name=%null
_del_char=0
#T- Clear-Delete</value>
</trigger>
<func name="compare" id="1198">
<value>#IF ($_greater)
{
#RETURN %switch($_val1 > $_val2, $_val1, $_val2 > $_val1, $_val2, 1, $_val1)
}
{
#RETURN %switch($_val1 > $_val2, $_val2, $_val2 > $_val1, $_val1, 1, $_val1)
}</value>
<arglist>$_val1, $_val2, $_greater</arglist>
</func>
<trigger name="Del-All-Off" type="Alarm" priority="4350" enabled="false" id="1199">
<pattern>10</pattern>
<value>_del_all = 0
#T- Del-All-Off</value>
</trigger>
<trigger name="Gatherer-Off" type="Alarm" priority="4950" enabled="false" id="1200">
<pattern>60</pattern>
<value>#IF (@_continue)
{
#send %cr
}
#send %cr
#T- Gatherer
#T- Stop-who
#T- Continue-who
#T- Gatherer-Off</value>
</trigger>
<trigger name="Gatherer" priority="5250" regex="true" enabled="false" id="1201">
<pattern>^\[(?:\s)?(?:\d){1,2}\s+</pattern>
<value><![CDATA[#LOCAL $_lvl $_class $_clan $_name $_rank
#SWITCH (%match( %trigger, "%/^\[\s?(\d+) ([\w\?]{3})\] (?:\[|\() ([\w '-]+) (?:\]|\))\s+([\w'-]+)\s+([\w '-]+:?(?:\s+)?(?:\(\w+\)|\w+)?)(?:\s+)?(?:\((Leader)\))?(?: \(Recruiter\))?/%", $_lvl, $_class, $_clan, $_name, $_rank)) {}
(%match( %trigger, "%/^\[\s?(\d+) ([\w\?]{3})\] (?:\(\w+\))?\(([\w ]+)\)(?:\s[\w '-]+)?\s+([\w'-]+)(?:\s+)?(?:\(Leader\))?(?: \(Recruiter\))?/%", $_lvl, $_class, $_clan, $_name)) {
$_rank="Citizen"
$_clan=@selkingdom( $_clan)
}
(%match( %trigger, %/"\[\s?(\d+)\s+(\w+) (?:Ang|Dem)(?:\s+)?] \( (Angel|Demon) \) ([\w'-]+)"/%, $_lvl, $_rank, $_clan, $_name)) {$_class=$_clan}
(%match( %trigger, %/"\[\s?(\d+)\s+([\w-]+)(?:\s+)?(\w+)\] \[ (Loner|Renegade) \] ([\w'-]+)"/%, $_lvl, $_race, $_class, $_clan, $_name)) {#IF ($_race="Frost" || $_race="Fire" || $_race="Cloud") {$_class=%concat( $_race, " ", $_class)}}
$_lvl=%trim( $_lvl)
$_class=@selclass( $_class)
$_rank=@trimrank( $_rank)
#LOCAL $_old
#IF (%ismember( $_name, _char_rec.name)) {
$_mem_num=%ismember( $_name, _char_rec.name)
$_old=%item( _char_rec.lvl, $_mem_num)
#IF ($_old!=$_lvl) {
#VAR _char_rec.lvl %replaceitem( $_lvl, $_mem_num, _char_rec.lvl)
#IF (@_show.lvl) {#show "Level changed from "%ansi( 15)$_old%ansi( reset)" to "%ansi( 15)$_lvl%ansi( reset)}
}
$_old=%item( _char_rec.class, $_mem_num)
#IF ($_old!=$_class) {
#VAR _char_rec.class %replaceitem( $_class, $_mem_num, _char_rec.class)
#IF (@_show.class) {#show "Class changed from "%ansi( 15)$_old%ansi( reset)" to "%ansi( 15)$_class%ansi( reset)}
}
$_old=%item( _char_rec.clan, $_mem_num)
#IF ($_old!=$_clan AND $_clan!="No Kingdom") {
#VAR _char_rec.clan %replaceitem( $_clan, $_mem_num, _char_rec.clan)
#IF (%item( _char_rec.war, $_mem_num)="war" && !%ismember( %item( _char_rec.clan, $_mem_num), _list.war)) {
#VAR _char_rec.war %replaceitem( "peace", $_mem_num, _char_rec.war)
#IF (@_show.clan) {#show "War status changed from "%ansi( 12)"war"%ansi( reset)" to "%ansi( 15)"peace"%ansi( reset)}
}
#IF (%item( _char_rec.war, $_mem_num)="peace" && %ismember( %item( _char_rec.clan, $_mem_num), _list.war)) {
#VAR _char_rec.war %replaceitem( "war", $_mem_num, _char_rec.war)
#IF (@_show.clan) {#show "War status changed from "%ansi( 15)"peace"%ansi( reset)" to "%ansi( 12)"war"%ansi( reset)}
}
#IF (@_show.clan) {
$_old=@formatclan( $_old)
$_clan=@formatclan( $_clan)
#show "Clan changed from "%ansi( 15)$_old%ansi( reset)" to "%ansi( 15)$_clan%ansi( reset)
}
}
$_old=%item( _char_rec.rank, $_mem_num)
#IF (%item( _char_rec.rank, $_mem_num)!=$_rank) {
#VAR _char_rec.rank %replaceitem( $_rank, $_mem_num, _char_rec.rank)
#IF (@_show.rank) {#show "Rank changed from "%ansi( 15)$_old%ansi( reset)" to "%ansi( 15)$_rank%ansi( reset)}
}
} {#IF (!%ismember( $_name, _no_update)) {
$_name_list=@_char_rec.name
#ADDI $_name_list $_name
_char_rec.name=$_name_list
#VAR _char_rec.war %additem( %if( %ismember( $_clan, _list.war), "war", "peace"), _char_rec.war)
#VAR _char_rec.lvl %additem( $_lvl, _char_rec.lvl)
#VAR _char_rec.class %additem( $_class, _char_rec.class)
#VAR _char_rec.clan %additem( $_clan, _char_rec.clan)
#VAR _char_rec.rank %additem( $_rank, _char_rec.rank)
#IF (@_show.new) {
$_clan=@formatclan( $_clan)
#show $_clan" ["$_lvl" "$_class"] "$_name" ("$_rank") has been added."
}
}}]]></value>
</trigger>
<func name="formatclan" id="1202">
<value>$_c_color = @clancolor( $_clan)
#SWITCH ( $_clan="Chaos") {#RETURN %ansi( 4)"[ "%ansi( $_c_color)$_clan%ansi( 4)" ]"%ansi( reset)}
(%ismember( $_clan, @_list.clan)) {#RETURN "[ "%ansi( $_c_color)$_clan%ansi( reset)" ]"}
($_clan="Retired") {#RETURN %ansi( 3)"("%ansi( 15)$_clan%ansi( 3)")"%ansi( reset)}
($_clan="Shalonesti-k") {#RETURN %ansi( 11)"("%ansi( 3)Shalonesti%ansi( 11)")"%ansi( reset)}
(%ismember( $_clan, @_list.kingdom)) {#RETURN %ansi( 11)"("%ansi( 3)$_clan%ansi( 11)")"%ansi( reset)}
(%ismember( $_clan, @_list.remort)) {#RETURN "( "%ansi( $_c_color)$_clan%ansi( reset)" )"}</value>
<arglist>$_clan</arglist>
</func>
<trigger name="restore-off" type="Alarm" priority="5430" enabled="false" id="1203">
<pattern>30</pattern>
<value>_restore=0
#T- restore-off</value>
</trigger>
<trigger name="save-off" type="Alarm" priority="5450" enabled="false" id="1204">
<pattern>30</pattern>
<value>_save=0
#T- save-off</value>
</trigger>
<func name="parseregex" id="1205">
<value>#IF (%2=%null) {$_direction=1}
#IF ($_direction=1)
{
$_phrase = %replace( $_phrase, "$w", "[\w'-]+")
$_phrase = %replace( $_phrase, "&w", "[\w '-]+")
$_phrase = %replace( $_phrase, "$d", "[\d+")
$_phrase = %replace( $_phrase, "$*", ".*")
#return $_phrase
}
{
$_phrase = %replace( $_phrase, "[\w'-]+", "$w")
$_phrase = %replace( $_phrase, "[\w '-]+", "&w")
$_phrase = %replace( $_phrase, "[\d+", "$d")
$_phrase = %replace( $_phrase, ".*", "$*")
#return $_phrase
}</value>
<arglist>$_phra |
|