Compare commits

...

2 Commits

Author SHA1 Message Date
b2c196cb34 config.tin 2026-02-08 11:40:38 -06:00
66a7c3985a Missions, loads of stuff 2026-02-08 10:53:19 -06:00
25 changed files with 1182 additions and 1606 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ src/quow.db.old
src/personal.tin src/personal.tin
src/wamgsaver.tin src/wamgsaver.tin
src/constants.tin src/constants.tin
src/timer.tin

View File

@ -1,4 +1,5 @@
cd ~/documents/MUD/Discworld cd ~/documents/MUD/Discworld
rm logs/history.log
# No existing discworld session? Then create one # No existing discworld session? Then create one
if [[ ! $(tmux ls -F '#S') =~ discworld ]]; then if [[ ! $(tmux ls -F '#S') =~ discworld ]]; then

View File

@ -1,15 +1,15 @@
#VARIABLE {chat_file} {logs/chat.log} #VARIABLE {chat_file} {logs/chat.log}
#CONFIG {SPEEDWALK} {OFF}; #CONFIG {SPEEDWALK} {OFF};
#CONFIG {SPLIT};
#CONFIG {PACKET PATCH} {5}; #CONFIG {PACKET PATCH} {5};
#CONFIG {COLOR PATCH} {ON}; #CONFIG {COLOR PATCH} {ON};
#CONFIG {MCCP} {ON}; #CONFIG {MCCP} {ON};
#CONFIG {MOUSE} {ON};
#CONFIG {LOG} {RAW}; #CONFIG {LOG} {RAW};
#CONFIG {BUFFER SIZE} {2000000}; #CONFIG {BUFFER SIZE} {1000000};
#config {COMMAND COLOR} {<fcf>}; #config {COMMAND COLOR} {<fcf>};
#SPLIT {2} {1}; #SPLIT {3}; #nop removed arg: {1} and removed #CONFIG {SPLIT};
#READ {src/channels.tin}; #READ {src/channels.tin};
#READ {src/actions.tin}; #READ {src/actions.tin};
@ -31,12 +31,39 @@
#READ {src/missions.tin}; #READ {src/missions.tin};
#READ {src/group.tin}; #READ {src/group.tin};
#READ {src/personal.tin};
#SESSION {discworld} {discworld.starturtle.net} {4242}; #SESSION {discworld} {discworld.starturtle.net} {4242};
#nop #SESSION {discworld} {disctemp.starturtle.net} {23}; #nop #SESSION {discworld} {disctemp.starturtle.net} {23};
#FORMAT {log_file} {logs/active/%t.log} {%Y-%m-%d}; #FORMAT {log_file} {logs/active/%t.log} {%Y-%m-%d};
#LOG {APPEND} {$log_file}; #LOG {APPEND} {$log_file};
#ACTION {Greco the Departure Gecko waves.} {#end} #HISTORY {read} {logs/history.log};
#EVENT {SESSION DISCONNECTED} {
/writetimerstosyncfile;
/writemissiontimerstofile;
#HISTORY {write} {logs/history.log};
};
#EVENT {SIGHUB} {
/writetimerstosyncfile;
/writemissiontimerstofile;
#HISTORY {write} {logs/history.log};
};
#TICKER {timers_to_file} {
/writetimerstosyncfile;
/writemissiontimerstofile;
#HISTORY {write} {logs/history.log};
} {60};
#EVENT {SCROLLED MOUSE WHEEL UP} {#buffer up 5};
#EVENT {SCROLLED MOUSE WHEEL DOWN} {#buffer down 5};
#FUNCTION {log_line_to_chat} {
#script {ts} {date +"%I:%M%P"};
#line {log} {$chat_file} {$ts[1] \};
#line {log} {$chat_file};
};
#FORMAT {start_time} {%T}; #FORMAT {start_time} {%T};

View File

@ -1,40 +1,42 @@
#CLASS {actions} {kill}; #CLASS {actions} {kill};
#CLASS {actions} {open}; #CLASS {actions} {open};
#NOP ==[TPA Alerts]== #NOP ==[TPA Alerts]==;
#HIGHLIGHT {^There is a sudden white flash. Your magical shield has broken.$} {bold red underscore}; #HIGHLIGHT {^There is a sudden white flash. Your magical shield has broken.$} {Red underscore};
#HIGHLIGHT {^There is a sudden white flash around {(?!a passing wizard).+}.$} {bold red underscore}; #HIGHLIGHT {^There is a sudden white flash around {(?!a passing wizard).+}.$} {Red underscore};
#ACTION {^There is a sudden white flash around {(?!a passing wizard).+}.$} { #ACTION {^There is a sudden white flash around {(?!a passing wizard).+}.$} {
#showme {\a}; #showme {\a};
#line {log} {$chat_file}; #return @log_line_to_chat{};
}; };
#SUB {^In blocking the attack {(?:.+)} floating around {(?:\w+\b\W*?){1,8}} is knocked out of orbit.$} #NOP ==[EFF Alerts]==;
{<199><438>In blocking the attack <788>%1<099><188><438> floating around <788>%2<099><188><438> is knocked out of orbit.<099>}; #SUB {^In blocking the attack {(?:.+)} floating around {(?:\w+\b\W*?){1,8}} is knocked out of orbit.$} {<199><438>In blocking the attack <788>%1<099><188><438> floating around <788>%2<099><188><438> is knocked out of orbit.<099>};
#ACTION {^In blocking the attack {(?:.+)} floating around {(?:\w+\b\W*?){1,8}} is knocked out of orbit.$} {
#showme {\a};
#line {log} {$chat_file};
};
#NOP ==[T-Shop Alerts]== #NOP ==[T-Shop Alerts]==
#HIGHLIGHT {Greasy sparks crawl over the %1 wall, and a door silently materialises.} {bold green underscore}; #HIGHLIGHT {^Greasy sparks crawl over the %1 wall, and a door silently materialises.$} {green underscore};
#HIGHLIGHT {There is a doorway in the %1 wall leading into a curious shop.} {bold green underscore}; #HIGHLIGHT {^There is a doorway in the %1 wall leading into a curious shop.$} {green underscore};
#ACTION {^Greasy sparks crawl over the %1 wall, and a door silently materialises.$} { #showme {\a}; };
#ACTION {^There is a doorway in the %1 wall leading into a curious shop.$} { #showme {\a}; };
#NOP ==[Incident Highlighting]== #NOP ==[Incident Highlighting]==
#HIGHLIGHT {^%1 grabs %2 from you. You struggle briefly but %3 wrests it from your grip and makes for a hasty retreat.$} {bold red underscore}; #SUB {^The%1grabs your%2. You struggle briefly but {she|he|it} wrests it from your grip and makes for a hasty retreat.} {<488><119>The<088><fca>%1<488><119>grabs your<088><afc>%2<488><119>. You struggle briefly but {she|he|it} wrests it from your grip and makes for a hasty retreat.};
#HIGHLIGHT {^%1 grabs {his|her|its} %2. You struggle briefly but {he|she|it} wrests it from your grip and makes for a hasty retreat.} {bold red underscore}; #SUB {^The%1and%2struggle briefly over%3before%4wrests it free%5$} {<488><119>The<088><fca>%1<488><119>and<088><fca>%2<488><119>struggle briefly over<088><afc>%3<488><119>before%4wrests it free%5};
#HIGHLIGHT {^%1 grabs your %2. You struggle briefly but {she|he|it} wrests it from your grip and makes for a hasty retreat.} {bold red underscore}; #SUB {^The%1suddenly snatches%2from%3and makes a run for it.$} {<488><119>The<088><188><fca>%1<488><119>suddenly snatches<088><188><afc>%2<488><119>from<088><188><fca>%3<488><119>and makes a run for it.};
#HIGHLIGHT {^As %1 dies %2 drops %3 in shock.$} {bold green underscore}; #HIGHLIGHT {^As %1 dies %2 drops %3 in shock.$} {green underscore};
#HIGHLIGHT {^When you open the %1 you think you can hear a faint rumbling sound from it.$} {red underscore}; #HIGHLIGHT {^When you open the %1 you think you can hear a faint rumbling sound from it.$} {red underscore};
#HIGHLIGHT {^Whoops! You tried to carry too many things and fumbled %1} {red underscore}; #HIGHLIGHT {^Whoops! You tried to carry too many things and fumbled %1} {red underscore};
#HIGHLIGHT {%1 juggles around his stuff and fumbles %2} {red underscore}; #HIGHLIGHT {%1 juggles around his stuff and fumbles %2} {red underscore};
#HIGHLIGHT {^The sparkles around you fall to the ground and vanish.$} {red underscore}; #HIGHLIGHT {^The sparkles around you fall to the ground and vanish.$} {red underscore};
#HIGHLIGHT {^You sail past the brindle horse, flying over the side of the mountain in the process!$} {Red underscore};
#ACTION {^You sail past the brindle horse, flying over the side of the mountain in the process!$} {
#showme {\a};
};
#NOP ==[Command Color Highlighting]== #NOP ==[Command Color Highlighting]==
#SUB {%w %w with a total of %* item} {<148>%1 %2<099> with a total of <148>%3<099> item}; #SUB {%w %w with a total of %* item} {<148>%1 %2<099> with a total of <148>%3<099> item};
#NOP ==[Truffle Found]== #NOP ==[Truffle Found]==
#HIGHLIGHT {truffle pigs? unearths a truffle from the ground.} {bold green}; #HIGHLIGHT {truffle pigs? unearths a truffle from the ground.} {Green};
#NOP ==[Attention Soul(s)]== #NOP ==[Attention Soul(s)]==
#ACTION {^{(?!Ryattenoki).+} tugs on your sleeve in a desperate attempt to get some attention.$} { #ACTION {^{(?!Ryattenoki).+} tugs on your sleeve in a desperate attempt to get some attention.$} {
@ -46,14 +48,14 @@
#SUB {a hammer chip would break %1 of rock} {a hammer chip would break <138>%1<099> of rock}; #SUB {a hammer chip would break %1 of rock} {a hammer chip would break <138>%1<099> of rock};
#SUB {pickaxe strike would break %1 inches.} {pickaxe strike would break <138>%1<099> inches.}; #SUB {pickaxe strike would break %1 inches.} {pickaxe strike would break <138>%1<099> inches.};
#SUB {You determine that directly behind this wall is a small gem vein of %1, exactly %2 deep.} {You determine that directly behind this wall is a small gem vein of %1, exactly <138>%2<099> deep.}; #SUB {You determine that directly behind this wall is a small gem vein of %1, exactly %2 deep.} {You determine that directly behind this wall is a small gem vein of %1, exactly <138>%2<099> deep.};
#HIGHLIGHT {You shake your pan gently, as glittering purple gathers under the cloudy water.} {bold magenta}; #HIGHLIGHT {You shake your pan gently, as glittering purple gathers under the cloudy water.} {Magenta};
#HIGHLIGHT {You shake your pan from side to side, as the last of the sediment leaves the pan and the water runs clear for just a moment.} {bold magenta}; #HIGHLIGHT {You shake your pan from side to side, as the last of the sediment leaves the pan and the water runs clear for just a moment.} {Magenta};
#HIGHLIGHT {Something doesn't smell right. You take a sniff but the faint odour of rotten eggs makes you cough.} {bold green underscore}; #HIGHLIGHT {Something doesn't smell right. You take a sniff but the faint odour of rotten eggs makes you cough.} {Green underscore};
#HIGHLIGHT {Somewhere above you, you hear the rumble of falling rock.} {bold green underscore}; #HIGHLIGHT {Somewhere above you, you hear the rumble of falling rock.} {Green underscore};
#HIGHLIGHT {You suddenly feel like you can't breathe.} {bold green underscore}; #HIGHLIGHT {You suddenly feel like you can't breathe.} {Green underscore};
#HIGHLIGHT {You collapse on the ground, your muscles spasming uncontrollably.} {bold green underscore}; #HIGHLIGHT {You collapse on the ground, your muscles spasming uncontrollably.} {Green underscore};
#HIGHLIGHT {You can't smell it any more, but you're getting a dizzy sort of headache. Maybe you should get out of here.} {bold green underscore}; #HIGHLIGHT {You can't smell it any more, but you're getting a dizzy sort of headache. Maybe you should get out of here.} {Green underscore};
#HIGHLIGHT {The air here is just as choking as before.} {bold green underscore}; #HIGHLIGHT {The air here is just as choking as before.} {Green underscore};
#ACTION {You shake your pan gently, as glittering purple gathers under the cloudy water.} { #showme {\a}; }; #ACTION {You shake your pan gently, as glittering purple gathers under the cloudy water.} { #showme {\a}; };
#ACTION {You shake your pan from side to side, as the last of the sediment leaves the pan and the water runs clear for just a moment.} { #showme {\a}; }; #ACTION {You shake your pan from side to side, as the last of the sediment leaves the pan and the water runs clear for just a moment.} { #showme {\a}; };
#ACTION {Something doesn't smell right. You take a sniff but the faint odour of rotten eggs makes you cough.} { #showme {\a}; }; #ACTION {Something doesn't smell right. You take a sniff but the faint odour of rotten eggs makes you cough.} { #showme {\a}; };
@ -62,45 +64,45 @@
#ACTION {You collapse on the ground, your muscles spasming uncontrollably.} { #showme {\a}; }; #ACTION {You collapse on the ground, your muscles spasming uncontrollably.} { #showme {\a}; };
#ACTION {You can't smell it any more, but you're getting a dizzy sort of headache. Maybe you should get out of here.} { #showme {\a}; }; #ACTION {You can't smell it any more, but you're getting a dizzy sort of headache. Maybe you should get out of here.} { #showme {\a}; };
#ACTION {The air here is just as choking as before.} { #showme {\a}; }; #ACTION {The air here is just as choking as before.} { #showme {\a}; };
#HIGHLIGHT {The air here seems fresher.} {bold yellow underscore}; #HIGHLIGHT {The air here seems fresher.} {Yellow underscore};
#NOP ==[Gemcutting/Finesmithing]== #NOP ==[Gemcutting/Finesmithing]==
#HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and delicately chip %1} {bold green}; #HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and delicately chip %1} {green};
#HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and chip away %1} {bold red}; #HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and chip away %1} {Red};
#HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and, struggling with %1} {bold red}; #HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and, struggling with %1} {Red};
#HIGHLIGHT {With a start, you realise that you've been going about this all wrong, %1} {bold red}; #HIGHLIGHT {With a start, you realise that you've been going about this all wrong, %1} {Red};
#SUB {You estimate that the %1 is worth A$%2. You} {You estimate that the <149>%1<099> is worth A$<139>%2<099>. You}; #SUB {You estimate that the %1 is worth A$%2. You} {You estimate that the <149>%1<099> is worth A$<139>%2<099>. You};
#NOP ==[Achievements]== #NOP ==[Achievements]==
#HIGHLIGHT {the {green|aqua|cyan|blue|yellow|red|orange|beige|brown|grey|black|violet|mauve|pink|purple} ball} {bold cyan}; #HIGHLIGHT {the {green|aqua|cyan|blue|yellow|red|orange|beige|brown|grey|black|violet|mauve|pink|purple} ball} {Cyan};
#ACTION {^The %1 duellist has yielded to you, if this satisfies you then enter "accept surrender from duellist" to accept} { #ACTION {^The %1 duellist has yielded to you, if this satisfies you then enter "accept surrender from duellist" to accept} {
#showme {\a}; #showme {\a};
} }
#HIGHLIGHT {blackbird} {violet}; #HIGHLIGHT {blackbird} {violet};
#HIGHLIGHT {old {men|man|women|woman|shopper|shoppers|beggar|beggars}} {bold magenta}; #HIGHLIGHT {old {men|man|women|woman|shopper|shoppers|beggar|beggars}} {magenta};
#ACTION {^One of the truffle pigs unearths a truffle from the ground.$} { #ACTION {^One of the truffle pigs unearths a truffle from the ground.$} {
#delay {120} { #showme {<ccc>CAN TRUFFLE FARM AGAIN<999>} } #delay {120} { #showme {<ccc>CAN TRUFFLE FARM AGAIN<999>} }
}; };
#NOP ==[PK Actions]== #NOP ==[PK Actions]==
#HIGHLIGHT {You reach towards your goal but apuse suddenly as %1 seems to sense something. {She|He|It} doesn't spot you and %2} {bold green}; #HIGHLIGHT {You reach towards your goal but pause suddenly as %1 seems to sense something. {She|He|It} doesn't spot you and %2} {Green};
#HIGHLIGHT {You try to filch %1 from %2 but {she|he|it} notices you and manages to %3} {bold red}; #HIGHLIGHT {You try to filch %1 from %2 but {she|he|it} notices you and manages to %3} {Red};
#ACTION {A stream of expletives drifts down from above with %1} { #showme {\a}; }; #ACTION {A stream of expletives drifts down from above with %1} { #showme {\a}; };
#ACTION {There is the faintest of sounds, as of a gnat yawning, then a WHOOSH sound. %2} { #showme {\a}; }; #ACTION {There is the faintest of sounds, as of a gnat yawning, then a WHOOSH sound. %2} { #showme {\a}; };
#HIGHLIGHT {A stream of expletives drifts down from above with %1} {bold red underscore}; #HIGHLIGHT {A stream of expletives drifts down from above with %1} {Orange};
#HIGHLIGHT {There is the faintest of sounds, as of a gnat yawning, then a WHOOSH sound. %2} {bold red underscore}; #HIGHLIGHT {There is the faintest of sounds, as of a gnat yawning, then a WHOOSH sound. %2} {Lime};
#NOP ==[Shelox]== #NOP ==[Shelox]==
#HIGHLIGHT {^Screaming echoes throughout the lair!$} {bold red}; #HIGHLIGHT {^Screaming echoes throughout the lair!$} {Red};
#HIGHLIGHT {^You see a thick string of web hurtling at you and then everything suddenly goes black.$} {bold green}; #HIGHLIGHT {^You see a thick string of web hurtling at you and then everything suddenly goes black.$} {green};
#HIGHLIGHT {^Webbing shoots out from the frog that looks an awful lot like Queen Shelox's abdomen and slams into %1.$} {bold green}; #SUB {^Webbing shoots out from the frog that looks an awful lot like Queen Shelox's abdomen and slams into %1.$} {<028>Webbing shoots out from the frog that looks an awful lot like Queen Shelox's abdomen and slams into <128>%1<028>.};
#HIGHLIGHT {^Webbing shoots out from Queen Shelox's abdomen and slams into %1.$} {bold green}; #SUB {^Webbing shoots out from Queen Shelox's abdomen and slams into %1.$} {<028>Webbing shoots out from Queen Shelox's abdomen and slams into <128>%1<028>.};
#ACTION {^An ominous gurgling noise can be heard coming from the frog that looks an awful lot like Queen Shelox's abdomen.$} { #showme {\a}; }; #ACTION {^An ominous gurgling noise can be heard coming from the frog that looks an awful lot like Queen Shelox's abdomen.$} { #showme {\a}; };
#ACTION {^An ominous gurgling noise can be heard coming from Queen Shelox's abdomen.$} { #showme {\a}; }; #ACTION {^An ominous gurgling noise can be heard coming from Queen Shelox's abdomen.$} { #showme {\a}; };
#HIGHLIGHT {^%1 giant spiders climb up from below!} {bold violet}; #HIGHLIGHT {^%1 giant spiders climb up from below!} {Violet};
#HIGHLIGHT {^%1 spiders scuttle up from below and join the fight!} {bold violet}; #HIGHLIGHT {^%1 spiders scuttle up from below and join the fight!} {Violet};
#NOP ==[Horses]== #NOP ==[Horses]==
@ -109,12 +111,14 @@
#NOP ==[Tab Completions]== #NOP ==[Tab Completions]==
#ACTION {^[%1 has gained the %2 achievement %3]$} { #ACTION {^[%1 has gained the %2 achievement %3]$} {
#tab {%1}; #tab {%1};
#return @log_line_to_chat{};
} }
#NOP ==[End Session On Quit]== #NOP ==[End Session On Quit]==
#ACTION {Thanks for playing. See you next time.} { #nop #ACTION {Thanks for playing. See you next time.} {;
#end; #nop Don't do this anymore, since history buffer is with tt++ not tmux now, we want to see what we missed while idling out.;
} #nop #end;
#nop };
#CLASS {actions} {close}; #CLASS {actions} {close};

View File

@ -28,10 +28,10 @@
{ {
#foreach {a;b;c;d;e;f} {cnt2} #foreach {a;b;c;d;e;f} {cnt2}
{ {
#var result <000>; #local result <000>;
#foreach {a;b;c;d;e;f} {cnt3} #foreach {a;b;c;d;e;f} {cnt3}
{ {
#var result $result <$cnt1$cnt2$cnt3> <<888>$cnt1$cnt2$cnt3><088> #local result $result <$cnt1$cnt2$cnt3> <<888>$cnt1$cnt2$cnt3><088>
}; };
#showme $result #showme $result
} }
@ -39,17 +39,17 @@
} }
#ALIAS {minesolve %1 %2 %3} { #ALIAS {minesolve %1 %2 %3} {
#var {total} {%1}; #local {total} {%1};
#var {hammer} {%2}; #local {hammer} {%2};
#var {pickaxe} {%3}; #local {pickaxe} {%3};
#var {solvecommand} {python3 -c 'import math; t,p,h = $total,$pickaxe,$hammer; pu,hu = int(math.floor(t/p)+1), int(math.floor(t/h)+1); print(*sorted([(i, j) for j in range(0,hu) for i in range(0,pu) if ((i*p) + (j*h) == t)], key=lambda t: t[1])[0]);'}; #local {solvecommand} {python3 -c 'import math; t,p,h = $total,$pickaxe,$hammer; pu,hu = int(math.floor(t/p)+1), int(math.floor(t/h)+1); print(*sorted([(i, j) for j in range(0,hu) for i in range(0,pu) if ((i*p) + (j*h) == t)], key=lambda t: t[1])[0]);'};
#script {result} {$solvecommand}; #script {result} {$solvecommand};
#replace {result[1]} { } {;}; #replace {result[1]} { } {;};
#list {solution} {create} {$result[1]}; #list {solution} {create} {$result[1]};
#format {minesolvedisplay} {<149>[MineSolver] Best solution is <139>%d<149> pickaxe strikes and <139>%d<149> hammer chips for a total of <159>%f<149> inches.<099>} {$solution[1]} {$solution[2]} {$total}; #format {minesolvedisplay} {<acf>[<fff>mines<acf>] Best solution is <139>%d<acf> pickaxe strikes and <139>%d<acf> hammer chips for a total of <159>%f<acf> inches.<099>} {$solution[1]} {$solution[2]} {$total};
#echo {$minesolvedisplay}; #echo {$minesolvedisplay};
}; };
@ -93,3 +93,29 @@
#ALIAS {gatherstones} { #ALIAS {gatherstones} {
#10 get rock;put white rocks&white stones&white pebbles in knapsack;bury rocks in me&stones in me&pebbles in me #10 get rock;put white rocks&white stones&white pebbles in knapsack;bury rocks in me&stones in me&pebbles in me
} }
#nop Map Door Text custom match controls;
#ALIAS {mdtc add %1} {
#local {mdtc_command} {python3 src/mdt_matchcontrol.py add %1};
#script {result} {$mdtc_command};
#if {"$result" == "0"} {
#echo {<acf>[<fff>mdt<acf>] <138>*<acf> Failed to add a new custom match for '<cfa>%1<acf>'.};
#return;
} {
#echo {<acf>[<fff>mdt<acf>] <138>*<acf> Successfully added a new custom match for '<cfa>%1<acf>'.};
};
};
#ALIAS {mdtc remove %1} {
#local {mdtc_command} {python3 src/mdt_matchcontrol.py remove %1};
#script {result} {$mdtc_command};
#if {"$result" == "0"} {
#echo {<acf>[<fff>mdt<acf>] <138>*<acf> Failed to remove a custom match for '<cfa>%1<acf>'.};
#return;
} {
#echo {<acf>[<fff>mdt<acf>] <138>*<acf> Successfully removed a custom match for '<cfa>%1<acf>'.};
};
};

View File

@ -3,16 +3,13 @@
#VARIABLE {talker_log_toggle} {0}; #VARIABLE {talker_log_toggle} {0};
#FUNCTION {log_line_to_chat} {
#script {ts} {date +"%I:%M%P"};
#line {log} {$chat_file} {$ts[1] \};
#line {log} {$chat_file}
};
#ACTION {^You {tell|ask|exclaim to} %1:%2} {#return @log_line_to_chat{};}; #ACTION {^You {tell|ask|exclaim to} %1:%2} {#return @log_line_to_chat{};};
#ACTION {^%1 {tells|asks|exclaims to} %*you{|(?: in \w+)?}: %4} {#return @log_line_to_chat{};}; #ACTION {^%1 {tells|asks|exclaims to} %*you{|(?: in \w+)?}: %4} {#return @log_line_to_chat{};};
#ACTION {^[%1] %2{:|} %3} {
#tab {%2}; #nop Capture group chat best we can, but ignore any of our client-side [x] messages at least;
#ACTION {^[{(?!(talker|spottimers|missions|speedwalk|sail|quota|mdt)).+}] %2{: | }%4} {
#nop %1 is group name, %3 is player name, %6 is message;
#tab {%3};
#return @log_line_to_chat{}; #return @log_line_to_chat{};
}; };
@ -45,6 +42,21 @@
#return @log_line_to_chat{}; #return @log_line_to_chat{};
}; };
}; };
#ACTION {^(Priests) %1 wisps{:|} %2} {
#if {"$talker_log_toggle" == "1"} {
#return @log_line_to_chat{};
};
};
#ACTION {^(Pishe) %1 wisps{:|} %2} {
#if {"$talker_log_toggle" == "1"} {
#return @log_line_to_chat{};
};
};
#ACTION {^(Witches) %1 wisps{:|} %2} {
#if {"$talker_log_toggle" == "1"} {
#return @log_line_to_chat{};
};
};
#ACTION {^(Igame) %1 wisps{:|} %2} { #ACTION {^(Igame) %1 wisps{:|} %2} {
#if {"$talker_log_toggle" == "1"} { #if {"$talker_log_toggle" == "1"} {
#return @log_line_to_chat{}; #return @log_line_to_chat{};
@ -53,11 +65,11 @@
#ALIAS {talker log %1} { #ALIAS {talker log %1} {
#if {"%1" == "on"} { #if {"%1" == "on"} {
#echo {<149>[Talker] Now logging talker chat to monitor.<099>}; #echo {<acf>[<fff>talker<acf>] Now logging talker chat to monitor.<099>};
#var {talker_log_toggle} {1}; #var {talker_log_toggle} {1};
}; };
#if {"%1" == "off"} { #if {"%1" == "off"} {
#echo {<149>[Talker] No longer logging talker chat to monitor.<099>}; #echo {<acf>[<fff>talker<acf>] No longer logging talker chat to monitor.<099>};
#var {talker_log_toggle} {0}; #var {talker_log_toggle} {0};
}; };
}; };

View File

@ -116,4 +116,16 @@
#HIGHLIGHT {{?:(?!You )(?:\w+\b\W*?){1,8}} runs %2 through %3 with {his|her|its} %4} {$color_melee_third_success}; #HIGHLIGHT {{?:(?!You )(?:\w+\b\W*?){1,8}} runs %2 through %3 with {his|her|its} %4} {$color_melee_third_success};
#HIGHLIGHT {{?:(?!You )(?:\w+\b\W*?){1,8}} takes a sliver off %2 with {his|her|its} %3} {$color_melee_third_success}; #HIGHLIGHT {{?:(?!You )(?:\w+\b\W*?){1,8}} takes a sliver off %2 with {his|her|its} %3} {$color_melee_third_success};
#nop ===== DOCUMENTING ISSUES TO FIX LATER =====;
#nop A burnt torch is hanging from a stall and a pair of plain leather boots is on the ground.;
#nop A green wool shirt, a pair of hard leather boots and a pair of heavy cotton breeches are on the ground.;
#nop A pair of heavy socks, a pair of hard leather boots and a pair of heavy cotton breeches are on the ground.;
#nop A pair of plain leather boots is on the ground.;
#nop A street lamp is here and a pair of light grey kidskin ladies' boots is on the ground.;
#nop The Grand Wizard clock strikes the half-hour with a deep, rolling chime that sounds like a death knell.;
#nop ===========================================;
#nop == BELOW IS UNHIGHLIGHTED BUT SHOULD BE ==;
#nop You attempt to punch Arlof Eetmmot but you move too slowly and lose the initiative.;
#CLASS {combat} {close}; #CLASS {combat} {close};

View File

@ -97,7 +97,7 @@
#list {last_query_list} {clear}; #list {last_query_list} {clear};
#if {$gatherable_result_size > 0} { #if {$gatherable_result_size > 0} {
#format {gatherable_display} {%cResults for gatherables matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue}; #format {gatherable_display} {%cResults for gatherables matching "%c%s%c":<099>} {Azure}{Yellow}{%1}{Azure};
#echo {$gatherable_display}; #echo {$gatherable_display};
#var {gather_count} {0}; #var {gather_count} {0};
@ -113,14 +113,14 @@
{map_name}{$map_id_names[$gatherable_results[4]]} {map_name}{$map_id_names[$gatherable_results[4]]}
}; };
#format {gatherable_display} {%c [%c%d%c]: %c%s%c found in %c%s%c,%c %s%c} {bold blue}{cyan}{$gather_count}{bold blue}{green}{$gatherable_info[item_name]}{bold blue}{orange}{$gatherable_info[room_short]}{bold blue}{orange}{$gatherable_info[map_name]}{bold blue}; #format {gatherable_display} {%c [%c%d%c]: %c%s%c found in %c%s%c,%c %s%c<099>} {Azure}{Cyan}{$gather_count}{Azure}{Green}{$gatherable_info[item_name]}{Azure}{Orange}{$gatherable_info[room_short]}{Azure}{Orange}{$gatherable_info[map_name]}{Azure};
#echo {$gatherable_display}; #echo {$gatherable_display};
#variable {last_query_list[$gather_count]} {$gatherable_info}; #variable {last_query_list[$gather_count]} {$gatherable_info};
#math {gather_count} {$gather_count + 1}; #math {gather_count} {$gather_count + 1};
} }
} { } {
#format {gatherable_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue}; #format {gatherable_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$gatherable_display}; #echo {$gatherable_display};
} }
} }
@ -134,12 +134,12 @@
#nop If we found an area name in curly braces, try to match a map-set; #nop If we found an area name in curly braces, try to match a map-set;
#var {search_map} {@map_parse{%4}}; #var {search_map} {@map_parse{%4}};
#if {&map_term} { #if {&{map_term}} {
#format {query} {SELECT npc_name, rooms.map_id, rooms.room_id, rooms.room_short, INSTR(npc_name, '%s') pos FROM npc_info INNER JOIN rooms on rooms.room_id = npc_info.room_id WHERE pos > 0 AND rooms.map_id IN (%s) LIMIT 10} {$search_term} {$map_term}; #format {query} {SELECT npc_name, rooms.map_id, rooms.room_id, rooms.room_short, INSTR(npc_name, '%s') pos FROM npc_info INNER JOIN rooms on rooms.room_id = npc_info.room_id WHERE pos > 0 AND rooms.map_id IN (%s) LIMIT 10} {$search_term} {$map_term};
}; };
#else { #else {
#format {query} {SELECT npc_name, rooms.map_id, rooms.room_id, rooms.room_short, INSTR(npc_name, '%s') pos FROM npc_info INNER JOIN rooms on rooms.room_id = npc_info.room_id WHERE pos > 0 LIMIT 10} {$search_term}; #format {query} {SELECT npc_name, rooms.map_id, rooms.room_id, rooms.room_short, INSTR(npc_name, '%s') pos FROM npc_info INNER JOIN rooms on rooms.room_id = npc_info.room_id WHERE pos > 0 LIMIT 10} {$search_term};
} };
#format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query}; #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
#script {npc_query_result} {$db_command}; #script {npc_query_result} {$db_command};
@ -148,7 +148,7 @@
#list {last_query_list} {clear}; #list {last_query_list} {clear};
#if {$npc_result_size > 0} { #if {$npc_result_size > 0} {
#format {npc_display} {%cResults for NPCs matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue}; #format {npc_display} {%cResults for NPCs matching "%c%s%c":<099>} {Azure}{Yellow}{%1}{Azure};
#echo {$npc_display}; #echo {$npc_display};
#var {npc_count} {0}; #var {npc_count} {0};
@ -164,14 +164,14 @@
{room_short}{$npc_results[4]} {room_short}{$npc_results[4]}
}; };
#format {npc_display} {%c [%c%d%c]: %c%s%c found in %c%s%c,%c %s%c} {bold blue}{cyan}{$npc_count}{bold blue}{green}{$npc_info[npc_name]}{bold blue}{orange}{$npc_info[room_short]}{bold blue}{orange}{$npc_info[map_name]}{bold blue}; #format {npc_display} {%c [%c%d%c]: %c%s%c found in %c%s%c,%c %s%c<099>} {Azure}{Cyan}{$npc_count}{Azure}{Green}{$npc_info[npc_name]}{Azure}{Orange}{$npc_info[room_short]}{Azure}{Orange}{$npc_info[map_name]}{Azure};
#echo {$npc_display}; #echo {$npc_display};
#variable {last_query_list[$npc_count]} {$npc_info}; #variable {last_query_list[$npc_count]} {$npc_info};
#math {npc_count} {$npc_count + 1}; #math {npc_count} {$npc_count + 1};
} }
} { } {
#format {npc_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue}; #format {npc_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$npc_display}; #echo {$npc_display};
} }
}; };
@ -185,12 +185,12 @@
#nop If we found an area name in curly braces, try to match a map-set; #nop If we found an area name in curly braces, try to match a map-set;
#var {search_map} {@map_parse{%4}}; #var {search_map} {@map_parse{%4}};
#if {&map_term} { #if {&{map_term}} {
#format {query} {SELECT npc_info.map_id, npc_name, npc_info.room_id, item_name, room_short, INSTR(item_name, '%s') pos FROM 'npc_info' INNER JOIN npc_items ON npc_items.npc_id = npc_info.npc_id INNER JOIN rooms on npc_info.room_id = rooms.room_id WHERE pos > 0 AND rooms.map_id IN (%s) LIMIT 10} {$search_term} {$map_term}; #format {query} {SELECT npc_info.map_id, npc_name, npc_info.room_id, item_name, room_short, INSTR(item_name, '%s') pos FROM 'npc_info' INNER JOIN npc_items ON npc_items.npc_id = npc_info.npc_id INNER JOIN rooms on npc_info.room_id = rooms.room_id WHERE pos > 0 AND rooms.map_id IN (%s) LIMIT 10} {$search_term} {$map_term};
}; };
#else { #else {
#format {query} {SELECT npc_info.map_id, npc_name, npc_info.room_id, item_name, room_short, INSTR(item_name, '%s') pos FROM 'npc_info' INNER JOIN npc_items ON npc_items.npc_id = npc_info.npc_id INNER JOIN rooms on npc_info.room_id = rooms.room_id WHERE pos > 0 LIMIT 10} {$search_term}; #format {query} {SELECT npc_info.map_id, npc_name, npc_info.room_id, item_name, room_short, INSTR(item_name, '%s') pos FROM 'npc_info' INNER JOIN npc_items ON npc_items.npc_id = npc_info.npc_id INNER JOIN rooms on npc_info.room_id = rooms.room_id WHERE pos > 0 LIMIT 10} {$search_term};
} };
#format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query}; #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
#script {npcitem_query_result} {$db_command}; #script {npcitem_query_result} {$db_command};
@ -199,7 +199,7 @@
#list {last_query_list} {clear}; #list {last_query_list} {clear};
#if {$npcitem_result_size > 0} { #if {$npcitem_result_size > 0} {
#format {npcitem_display} {%cResults for NPC items matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue}; #format {npcitem_display} {%cResults for NPC items matching "%c%s%c":<099>} {Azure}{Yellow}{%1}{Azure};
#echo {$npcitem_display}; #echo {$npcitem_display};
#var {npcitem_count} {0}; #var {npcitem_count} {0};
@ -216,14 +216,14 @@
{room_short}{$npcitem_results[5]} {room_short}{$npcitem_results[5]}
}; };
#format {npcitem_display} {%c [%c%d%c]: %c%s%c found on %c%s%c in %c%s%c,%c %s%c} {bold blue}{cyan}{$npcitem_count}{bold blue}{green}{$npcitem_info[item_name]}{bold blue}{white}{$npcitem_info[npc_name]}{bold blue}{orange}{$npcitem_info[room_short]}{bold blue}{orange}{$npcitem_info[map_name]}{bold blue}; #format {npcitem_display} {%c [%c%d%c]: %c%s%c found on %c%s%c in %c%s%c,%c %s%c<099>} {Azure}{Cyan}{$npcitem_count}{Azure}{Green}{$npcitem_info[item_name]}{Azure}{White}{$npcitem_info[npc_name]}{Azure}{Orange}{$npcitem_info[room_short]}{Azure}{Orange}{$npcitem_info[map_name]}{Azure};
#echo {$npcitem_display}; #echo {$npcitem_display};
#variable {last_query_list[$npcitem_count]} {$npcitem_info}; #variable {last_query_list[$npcitem_count]} {$npcitem_info};
#math {npcitem_count} {$npcitem_count + 1}; #math {npcitem_count} {$npcitem_count + 1};
} }
} { } {
#format {npcitem_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue}; #format {npcitem_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$npcitem_display}; #echo {$npcitem_display};
} }
}; };
@ -237,12 +237,12 @@
#nop If we found an area name in curly braces, try to match a map-set; #nop If we found an area name in curly braces, try to match a map-set;
#var {search_map} {@map_parse{%4}}; #var {search_map} {@map_parse{%4}};
#if {&map_term} { #if {&{map_term}} {
#format {query} {SELECT item_name, sale_price, room_short, shop_items.room_id, map_id, INSTR(item_name, '%s') pos FROM shop_items INNER JOIN rooms on rooms.room_id = shop_items.room_id WHERE pos > 0 AND sale_price != 'gather' AND map_id IN (%s) LIMIT 10;} {$search_term} {$map_term}; #format {query} {SELECT item_name, sale_price, room_short, shop_items.room_id, map_id, INSTR(item_name, '%s') pos FROM shop_items INNER JOIN rooms on rooms.room_id = shop_items.room_id WHERE pos > 0 AND sale_price != 'gather' AND map_id IN (%s) LIMIT 10;} {$search_term} {$map_term};
}; };
#else { #else {
#format {query} {SELECT item_name, sale_price, room_short, shop_items.room_id, map_id, INSTR(item_name, '%s') pos FROM shop_items INNER JOIN rooms on rooms.room_id = shop_items.room_id WHERE pos > 0 AND sale_price != 'gather' LIMIT 10;} {$search_term}; #format {query} {SELECT item_name, sale_price, room_short, shop_items.room_id, map_id, INSTR(item_name, '%s') pos FROM shop_items INNER JOIN rooms on rooms.room_id = shop_items.room_id WHERE pos > 0 AND sale_price != 'gather' LIMIT 10;} {$search_term};
} };
#format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query}; #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
#script {item_query_result} {$db_command}; #script {item_query_result} {$db_command};
@ -251,7 +251,7 @@
#list {last_query_list} {clear}; #list {last_query_list} {clear};
#if {$item_result_size > 0} { #if {$item_result_size > 0} {
#format {item_display} {%cResults for items matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue}; #format {item_display} {%cResults for items matching "%c%s%c":<099>} {Azure}{Yellow}{%1}{Azure};
#echo {$item_display}; #echo {$item_display};
#var {item_count} {0}; #var {item_count} {0};
@ -268,14 +268,14 @@
{map_name}{$map_id_names[$item_results[5]]} {map_name}{$map_id_names[$item_results[5]]}
}; };
#format {item_display} {%c [%c%d%c]: %c%s%c (%c%s%c) found in %c%s%c,%c %s%c} {bold blue}{cyan}{$item_count}{bold blue}{green}{$item_info[item_name]}{bold blue}{yellow}{$item_info[sale_price]}{bold blue}{orange}{$item_info[room_short]}{bold blue}{orange}{$item_info[map_name]}{bold blue}; #format {item_display} {%c [%c%d%c]: %c%s%c (%c%s%c) found in %c%s%c,%c %s%c<099>} {Azure}{Cyan}{$item_count}{Azure}{Green}{$item_info[item_name]}{Azure}{Yellow}{$item_info[sale_price]}{Azure}{Orange}{$item_info[room_short]}{Azure}{Orange}{$item_info[map_name]}{Azure};
#echo {$item_display}; #echo {$item_display};
#variable {last_query_list[$item_count]} {$item_info}; #variable {last_query_list[$item_count]} {$item_info};
#math {item_count} {$item_count + 1}; #math {item_count} {$item_count + 1};
}; };
} { } {
#format {item_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue}; #format {item_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$item_display}; #echo {$item_display};
}; };
}; };
@ -289,12 +289,12 @@
#nop If we found an area name in curly braces, try to match a map-set; #nop If we found an area name in curly braces, try to match a map-set;
#var {search_map} {@map_parse{%4}}; #var {search_map} {@map_parse{%4}};
#if {&map_term} { #if {&{map_term}} {
#format {query} {SELECT room_id, map_id, room_short, room_type, INSTR(room_short, '%s') pos FROM rooms WHERE pos > 0 AND map_id IN (%s) LIMIT 10;} {$search_term} {$map_term}; #format {query} {SELECT room_id, map_id, room_short, room_type, INSTR(room_short, '%s') pos FROM rooms WHERE pos > 0 AND map_id IN (%s) LIMIT 10;} {$search_term} {$map_term};
}; };
#else { #else {
#format {query} {SELECT room_id, map_id, room_short, room_type, INSTR(room_short, '%s') pos FROM rooms WHERE pos > 0 LIMIT 10;} {$search_term}; #format {query} {SELECT room_id, map_id, room_short, room_type, INSTR(room_short, '%s') pos FROM rooms WHERE pos > 0 LIMIT 10;} {$search_term};
} };
#format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query}; #format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
#script {room_query_result} {$db_command}; #script {room_query_result} {$db_command};
@ -303,7 +303,7 @@
#list {last_query_list} {clear}; #list {last_query_list} {clear};
#if {$room_result_size > 0} { #if {$room_result_size > 0} {
#format {room_display} {%cResults for items items matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue}; #format {room_display} {%cResults for items items matching "%c%s%c":<099>} {Azure}{Yellow}{%1}{Azure};
#echo {$room_display}; #echo {$room_display};
#var {room_count} {0}; #var {room_count} {0};
@ -319,14 +319,14 @@
{room_type}{$room_results[4]} {room_type}{$room_results[4]}
}; };
#format {room_display} {%c [%c%d%c]: %c%s%c (%c%s%c) found in %c%s%c} {bold blue}{cyan}{$room_count}{bold blue}{green}{$room_info[room_short]}{bold blue}{yellow}{$room_info[room_type]}{bold blue}{orange}{$room_info[map_name]}{bold blue}; #format {room_display} {%c [%c%d%c]: %c%s%c (%c%s%c) found in %c%s%c<099>} {Azure}{Cyan}{$room_count}{Azure}{Green}{$room_info[room_short]}{Azure}{Yellow}{$room_info[room_type]}{Azure}{Orange}{$room_info[map_name]}{Azure};
#echo {$room_display}; #echo {$room_display};
#variable {last_query_list[$room_count]} {$room_info}; #variable {last_query_list[$room_count]} {$room_info};
#math {room_count} {$room_count + 1}; #math {room_count} {$room_count + 1};
} }
} { } {
#format {room_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue}; #format {room_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$room_display}; #echo {$room_display};
}; };
}; };
@ -334,8 +334,7 @@
#ALIAS {db route %1} { #ALIAS {db route %1} {
#if {&last_query_list[%1]} { #if {&last_query_list[%1]} {
#var {target_room} {$last_query_list[%1]}; #var {target_room} {$last_query_list[%1]};
#format {route_display} {%c[speedwalk] Generating speedwalk from current location to %c%s%c, %c%s%c...} {bold blue}{green}{$target_room[room_short]}{bold blue}{orange}{$target_room[map_name]}{bold blue}; #format {route_display} {<acf>[<fff>speedwalk<acf>] Generating speedwalk from current location to %c%s<acf>, %c%s<acf>...<099>} {Green}{$target_room[room_short]}{Orange}{$target_room[map_name]};
#echo {$route_display}; #echo {$route_display};
#var {route_current_room_id} {$GMCP[room][info][identifier]}; #var {route_current_room_id} {$GMCP[room][info][identifier]};
@ -345,10 +344,10 @@
#script {speedwalk_result} {$route_command}; #script {speedwalk_result} {$route_command};
#if {"$speedwalk_result[1]" == "0"} { #if {"$speedwalk_result[1]" == "0"} {
#format {route_error} {%c[speedwalk] Unable to find route to %c%s%c or unknown current room.} {bold blue}{green}{$target_room[room_short]}{bold blue}; #format {route_error} {<acf>[<fff>speedwalk<acf>] Unable to find route to %c%s<acf> or unknown current room.<099>} {Green}{$target_room[room_short]};
#echo {$route_error}; #echo {$route_error};
#return; #return;
} };
#send {$speedwalk_result[1]}; #send {$speedwalk_result[1]};
#variable {route_length} {$speedwalk_result[1]}; #variable {route_length} {$speedwalk_result[1]};
@ -357,12 +356,12 @@
#list {route_length} {create} {$route_length}; #list {route_length} {create} {$route_length};
#list {route_length} {size} {route_length}; #list {route_length} {size} {route_length};
#format {route_confirm} {%c[speedwalk] A route was found, type "%cspeedwalk%c" to fast travel. [%g steps]} {bold blue}{green}{bold blue}{$route_length}; #format {route_confirm} {<acf>[<fff>speedwalk<acf>] A route was found, type "%cspeedwalk<acf>" to fast travel. [%c%g<acf> steps]<099>} {Green}{Cyan}{$route_length};
#echo {$route_confirm}; #echo {$route_confirm};
} { } {
#format {route_display} {%c[speedwalk] No previous query data found, try searching first.} {bold blue}; #format {route_display} {<acf>[<fff>speedwalk<acf>] No previous query data found, try searching first.<099>};
#echo {$route_display}; #echo {$route_display};
} };
}; };
#ALIAS {speedwalk} { #ALIAS {speedwalk} {
@ -371,7 +370,7 @@
#ALIAS {db routeto %1} { #ALIAS {db routeto %1} {
#var {target_room} {%1}; #var {target_room} {%1};
#format {route_display} {[speedwalk] Generating speedwalk from current location to specified id %s.} {%1}; #format {route_display} {<acf>[<fff>speedwalk<acf>] Generating speedwalk from current location to specified id <cfa>%s<acf>.<099>} {%1};
#echo {$route_display}; #echo {$route_display};
@ -382,10 +381,10 @@
#script {speedwalk_result} {$route_command}; #script {speedwalk_result} {$route_command};
#if {"$speedwalk_result[1]" == "0"} { #if {"$speedwalk_result[1]" == "0"} {
#format {route_error} {%c[speedwalk] Unable to find route to %c%s%c or unknown current room.} {bold blue}{green}{$target_room[room_short]}{bold blue}; #format {route_error} {<acf>[<fff>speedwalk<acf>] Unable to find route to %c%s<acf> or unknown current room.<099>} {Green}{$target_room[room_short]};
#echo {$route_error}; #echo {$route_error};
#return; #return;
} };
#send {$speedwalk_result[1]}; #send {$speedwalk_result[1]};
#variable {route_length} {$speedwalk_result[1]}; #variable {route_length} {$speedwalk_result[1]};
@ -394,9 +393,25 @@
#list {route_length} {create} {$route_length}; #list {route_length} {create} {$route_length};
#list {route_length} {size} {route_length}; #list {route_length} {size} {route_length};
#format {route_confirm} {%c[speedwalk] A route was found, type "%cspeedwalk%c" to fast travel. [%g steps]} {bold blue}{green}{bold blue}{$route_length}; #format {route_confirm} {<acf>[<ffF>speedwalk<acf>] A route was found, type %cspeedwalk<acf> to fast travel. [%c%g<acf> steps]<099>} {Green}{Cyan}{$route_length};
#echo {$route_confirm}; #echo {$route_confirm};
}; };
#ALIAS {^db$} {
#showme {<acf>[<fff>speedwalk<acf>] Try "<fab>db help<acf>" for usage instructions.<099>};
};
#ALIAS {db help} {
#showme {<acf>[<fff>speedwalk<acf>] Speedwalk and Database Lookup Commands:<099>};
#showme {\t<138>*<acf> "<bbd>db room <cfa><query><acf>" - search for a room by name<099>};
#showme {\t<138>*<acf> "<bbd>db item <cfa><query><acf>" - search for an item in shops by name<099>};
#showme {\t<138>*<acf> "<bbd>db npc <cfa><query><acf>" - search for an NPC by name<099>};
#showme {\t<138>*<acf> "<bbd>db npcitem <cfa><query><acf>" - search for an item in NPC inventories by name<099>};
#showme {\t<138>*<acf> "<bbd>db gatherable <cfa><query><acf>" - search for a gatherable item by name<099>};
#showme {<099>};
#showme {<acf>After searching with one of the above commands, find a route there with "<bbd>db route <cfa>#<acf>"<099>};
#showme {<acf>Then type "<fab>speedwalk<acf>" to start moving.<099>};
};
#CLASS {database} {close}; #CLASS {database} {close};

View File

@ -1,861 +0,0 @@
#CLASS {deadletter} {kill};
#CLASS {deadletter} {open};
#var {letter_difficulty} {none};
#VAR {difficult_customer_targets} {
{Triad Boss}{
{show}{Triad [Boss]}
{search}{Triad boss}
}
{Queen Shelox}{
{show}{Queen [Shelox]}
{search}{false}
}
{ice giants}{
{show}{Ice Giants}
{search}{false}
}
{Security guards}{
{show}{First Imperial Bank Security Guards}
{search}{false}
}
{Smuggler Captain}{
{show}{Smuggler Captain}
{search}{false}
}
{The Clown}{
{show}{Ha'pennywise the Clown}
{search}{false}
}
{Hotan Hwoar Ni}{
{show}{[Hotan] Hwoar Ni (Inner Snail)}
{search}{Hotan}
}
{Thursday}{
{show}{Thursday}
{search}{false}
}
{The Grflx}{
{show}{The [Grflx]}
{search}{false}
}
{Vyrt}{
{show}{Vyrt}
{search}{Vyrt}
}
{Bug}{
{show}{Bug, Ramtops}
{search}{false}
}
{Avalanche Preventore}{
{show}{Avalance Preventore, Endless Halls}
{search}{false}
}
};
#VAR {distant_land_targets} {
{Boy Willie}{
{show}{Boy [Willie]}
{search}{Willie}
}
{Disembowel-Meself-Honourably Dibhala}{
{show}{Disembowel-Meself-Honourably [Dibhala]}
{search}{false}
}
{Glod-san}{
{show}{[Glod-san]}
{search}{false}
}
{Laggy-san}{
{show}{[Laggy-san]}
{search}{false}
}
{Lon Fah Lo}{
{show}{Lon Fah [Lo]}
{search}{false}
}
{Mad Hamish}{
{show}{Mad [Hamish]}
{search}{false}
}
{No Go Wan}{
{show}{No Go [Wan]}
{search}{false}
}
{Quisoda}{
{show}{[Quisoda]}
{search}{false}
}
{Ruto of Fish}{
{show}{[Ruto] of Fish}
{search}{false}
}
{Ryattenoki}{
{show}{[Ryattenoki]}
{search}{false}
}
{Shi Do Gai}{
{show}{Shi Do [Gai]}
{search}{false}
}
{Lap-lip}{
{show}{[Lap-lip]}
{search}{false}
}
{Lip-phon Lap-top}{
{show}{Lip-phon [Lap-top]}
{search}{false}
}
{Mihk-gran-bohp}{
{show}{Mihk-gran-[bohp]}
{search}{false}
}
{Phos-phor}{
{show}{[Phos]-phor}
{search}{false}
}
{Very Reverend Khepresh}{
{show}{Very Reverend [Khepresh]}
{search}{false}
}
{Yclept}{
{show}{[Yclept]}
{search}{false}
}
{Tuffy}{
{show}{[Tuffy]}
{search}{false}
}
{Casanunda}{
{show}{[Casanunda]}
{search}{false}
}
{Greig Schwitz}{
{show}{Greig [Schwitz]}
{search}{false}
}
{Noobie}{
{show}{[Noobie]}
{search}{false}
}
{Tfat Chick}{
{show}{Tfat [Chick]}
{search}{false}
}
{Cut Me Own Hand Off Dhblah}{
{show}{Cut Me Own Hand Off [Dhblah]}
{search}{false}
}
{Miss Pennie Laced}{
{show}{Miss Pennie [Laced]}
{search}{false}
}
{Berti Boggis}{
{show}{[Berti] Boggis}
{search}{false}
}
{The Proprietor}{
{show}{The Proprietor}
{search}{false}
}
};
#VAR {far_away_targets} {
{Cern Smith}{
{show}{[Cern] Smith}
{search}{Cern Smith}
}
{Granny Weatherwax}{
{show}{Granny [Weatherwax]}
{search}{Weatherwax}
}
{Gulta Smith}{
{show}{[Gulta] Smith}
{search}{Gulta}
}
{Hanlo Shepston}{
{show}{[Hanlo] Shepston}
{search}{Hanlo}
}
{Jaims Smith}{
{show}{[Jaims] Smith}
{search}{Jaims}
}
{Kev Ogg}{
{show}{[Kev] Ogg}
{search}{Kev}
}
{Mr. Ogg}{
{show}{Mr. Ogg}
{search}{false}
}
{Martha Headlock}{
{show}{[Martha] Headlock}
{search}{Martha}
}
{Mrs Smith}{
{show}{Mrs Smith}
{search}{false}
}
{Cohen the Barbarian}{
{show}{Cohen the Barbarian}
{search}{Cohen}
}
{Morchella Esculenta}{
{show}{[Morchella] Esculenta}
{search}{Morchella}
}
{Emile}{
{show}{Emile}
{search}{Emile}
}
{Fern Golly}{
{show}{[Fern] Golly}
{search}{Fern}
}
{Granville}{
{show}{Granville}
{search}{Granville}
}
{Virgo Vango}{
{show}{[Virgo] Vango}
{search}{Virgo}
}
{The Proprietor}{
{show}{The Proprietor}
{search}{}
}
{shopkeeping native}{
{show}{shopkeeping native}
{search}{shopkeeping native}
}
{Scuttle Me Own Canoe Dihbl}{
{show}{Scuttle Me Own Canoe [Dihbl]}
{search}{Dihbl}
}
{SMOC Dihbl}{
{show}{Scuttle Me Own Canoe Dihbl}
{search}{Dihbl}
}
{Dia Shale}{
{show}{Dia [Shale]}
{search}{Shale}
}
{Esther Elderbury}{
{show}{[Esther] Elderbury}
{search}{Esther}
}
{DEATH}{
{show}{DEATH}
{search}{Death}
}
{Dil the Embalmer}{
{show}{Dil the Embalmer}
{search}{Dil}
}
{Khip-en-dahl}{
{show}{Khip-en-dahl}
{search}{Khip-en-dahl}
}
{Master Bibh-lat}{
{show}{Master Bibh-Lat}
{search}{Bibh}
}
{Merk}{
{show}{Merk}
{search}{Merk}
}
{Ptep-ptip-ptop}{
{show}{Ptep-ptip-ptop}
{search}{Ptep}
}
{Ptik-ptak-ptoe}{
{show}{Ptik-ptak-[ptoe]}
{search}{ptoe}
}
{Pugh Alighieri}{
{show}{[Pugh] Alighieri}
{search}{Pugh}
}
{Teh-takk-eht}{
{show}{[Teh]-takk-eht}
{search}{Teh}
}
{Toohumi}{
{show}{Toohumi}
{search}{Toohumi}
}
{Ug Ogg}{
{show}{Ug Ogg}
{search}{Ug Ogg}
}
{Wan-tew-iit}{
{show}{Wan-tew-iit}
{search}{Wan-tew-iit}
}
{Arms trader}{
{show}{Arms trader}
{search}{arms trader}
}
{Awaiting-Rain}{
{show}{Awaiting-Rain}
{search}{Awaiting}
}
{Captain Ptargos}{
{show}{Captain Ptargos}
{search}{Ptargos}
}
{Fis'n-tsips}{
{show}{Fis'n-tsips}
{search}{tsips}
}
{One of them Dibblers with a long name}{
{show}{One of them Dibblers with a long name}
{search}{Dih-bah-lah}
}
{May-I-be-Dipped-in-My-Own-Grease Dih-bah-lah}{
{show}{May-I-be-Dipped-in-My-Own-Grease Dih-bah-lah}
{search}{Dih-bah-lah}
}
{Abraxas}{
{show}{Abraxas}
{search}{Abraxas}
}
{Ania}{
{show}{Ania}
{search}{Ania}
}
{Arimasticopoulous the Mosaicist}{
{show}{Arimasticopoulous the Mosaicist}
{search}{Arimasticopoulous}
}
{Aurinax}{
{show}{Aurinax}
{search}{Aurinax}
}
{Betty}{
{show}{Betty}
{search}{Betty}
}
{Endos the Listener}{
{show}{Endos the Listener}
{search}{Endos}
}
{Kakia}{
{show}{Kakia}
{search}{Kakia}
}
{Klepton}{
{show}{Klepton}
{search}{Klepton}
}
{Maintenance man}{
{show}{Maintenance man}
{search}{maintenance}
}
{Master Zosimos}{
{show}{Master Zosimos}
{search}{Zosimos}
}
{Rimasticopoulous the Mosaicist}{
{show}{Rimasticopoulous the Mosaicist}
{search}{Rimasticopoulous}
}
{Souvlakios}{
{show}{Souvlakios}
{search}{Souvlakios}
}
{The owner}{
{show}{The owner [Spiros]}
{search}{Spiros}
}
{Xenophobios}{
{show}{Xenophobios}
{search}{Xenophobios}
}
{Clara}{
{show}{Clara}
{search}{Clara}
}
{Ema Nymton}{
{show}{Ema Nymton}
{search}{Ema Nymton}
}
{Ivor von Kaeyya}{
{show}{Ivor von Kaeyya}
{search}{Ivor}
}
{SMOH Dybbler}{
{show}{SMOH Dybbler}
{search}{Dybbler}
}
{Trau Mirnicht}{
{show}{Trau Mirnicht}
{search}{Trau}
}
{Verkauft Keinfleisch}{
{show}{Verkauft Keinfleisch}
{search}{Verkauft}
}
{Generic employee}{
{show}{A generic Charre Bux employee}
{search}{generic}
}
{Ayna}{
{show}{Ayna}
{search}{Ayna}
}
{Blloddwyn}{
{show}{Blloddwyn}
{search}{Blloddwyn}
}
{Brittnee}{
{show}{Brittnee}
{search}{Brittnee}
}
{Captain Merreaux Vingian}{
{show}{Captain Merreaux Vingian}
{search}{Merreaux}
}
{Cogsworth}{
{show}{Cogsworth}
{search}{Cogsworth}
}
{David Leatherman}{
{show}{David Leatherman}
{search}{Leatherman}
}
{Edna Scum}{
{show}{Edna Scum}
{search}{Edna}
}
{Fredd S'Vage}{
{show}{Fredd S'Vage}
{search}{Fredd}
}
{Harbour Master}{
{show}{Harbour Master}
{search}{harbour master}
}
{Harbour mistress}{
{show}{Harbour mistress}
{search}{harbour mistress}
}
{Hotel Reception}{
{show}{Hotel Reception}
{search}{false}
}
{Jolly Roger}{
{show}{Jolly Roger}
{search}{Jolly Roger}
}
{Mamie Olivia}{
{show}{Mamie Olivia}
{search}{Olivia}
}
{Mr Ray}{
{show}{Mr Ray}
{search}{Ray}
}
{Mr Myrtle}{
{show}{Mr Myrtle}
{search}{Myrtle}
}
{Myrtle}{
{show}{Myrtle}
{search}{Myrtle}
}
{Mrs Gogol}{
{show}{Mrs Gogol}
{search}{Gogol}
}
{Sno-ball vendor}{
{show}{Sno-ball vendor}
{search}{sno-ball}
}
{Spritz Peltanque}{
{show}{Spritz Peltanque}
{search}{Spritz}
}
{Talula}{
{show}{Talula}
{search}{Talula}
}
{The shopkeeper}{
{show}{The shopkeeper [chandlery, Genua]}
{search}{false}
}
{The tipster}{
{show}{The tipster}
{search}{tipster}
}
{Thom Cru'ez}{
{show}{Thom Cru'ez}
{search}{Thom}
}
{Watch clerk}{
{show}{Watch clerk}
{search}{false}
}
{Wounded soldier}{
{show}{Wounded soldier}
{search}{false}
}
{Private Inside Leg}{
{show}{Private Inside Leg}
{search}{Private}
}
{Monster}{
{show}{Monster}
{search}{Monster}
}
{Bestiality Carter}{
{show}{Bestiality Carter}
{search}{Bestiality}
}
{Brother Turbil}{
{show}{Brother Turbil}
{search}{Turbil}
}
{Embezile Thatcher}{
{show}{Embezile Thatcher}
{search}{Embezile}
}
{J. Ogg}{
{show}{J. Ogg}
{search}{Jason}
}
{giant leader}{
{show}{giant leader}
{search}{giant leader}
}
{Len}{
{show}{Len}
{search}{Len}
}
{Maggie}{
{show}{Maggie}
{search}{Maggie}
}
{Nicholas Winston}{
{show}{Nicholas Winston}
{search}{Nicholas}
}
{Serb}{
{show}{Serb Unglish}
{search}{Serb}
}
{Sharn}{
{show}{Sharn Unglish}
{search}{Sharn}
}
{Our Wullie}{
{show}{Our Wullie}
{search}{Wullie}
}
{Stephan}{
{show}{Stephan}
{search}{Stephan}
}
{Young Steven}{
{show}{Young Steven}
{search}{Young Steven}
}
{Suhm-wil-deih}{
{show}{Suhm-wil-deih}
{search}{Suhm}
}
{Vic}{
{show}{Vic}
{search}{Vic}
}
{Twoflower the tourist}{
{show}{Twoflower the tourist}
{search}{Twoflower}
}
{My poor kidnapped daughter}{
{show}{My poor kidnapped daughter}
{search}{captive}
}
{beautiful female captive}{
{show}{beautiful female captive}
{search}{captive}
}
{Allen Kingfisher}{
{show}{Allen Kingfisher}
{search}{Allen}
}
{Lobsang}{
{show}{Abbot Lobsang}
{search}{Lobsang}
}
{Asap (Brother Asap)}{
{show}{Asap (Brother Asap)}
{search}{Asap}
}
{Brother Hotpot}{
{show}{Brother Hotpot}
{search}{Hotpot}
}
{Morchella Esculenta}{
{show}{Morchella Esculenta}
{search}{Morchella}
}
{Bi-Bi Effenne}{
{show}{Sister Bi-Bi Effenne}
{search}{Bi-Bi}
}
{Ti-Ti Effenne}{
{show}{Sister Ti-Ti Effenne}
{search}{Ti-Ti}
}
{Heinz Blauhimmel}{
{show}{Heinz Blauhimmel}
{search}{Heinz}
}
{Lichtenstein}{
{show}{Lichtenstein}
{search}{Lichtenstein}
}
{Mad Gammer Nudity}{
{show}{Mad Gammer Nudity}
{search}{Nudify}
}
{Candice Little}{
{show}{Candice Little}
{search}{Candice}
}
{Cleetus Patterson}{
{show}{Cleetus Patterson}
{search}{Cleetus}
}
{Granma Muckloe}{
{show}{Granma Muckloe}
{search}{Muckloe}
}
{Peggy Little}{
{show}{Peggy Little}
{search}{Peggy}
}
{Ann Celeria}{
{show}{Ann [Celeria]}
{search}{Celeria}
}
{Doctor Lancreman}{
{show}{Doctor Lancreman}
{search}{Lancreman}
}
{Hardenfast}{
{show}{Hardenfast}
{search}{Hardenfast}
}
{Honest Dachshund}{
{show}{Honest Dachshund}
{search}{Dachshund}
}
{Frank Doberman}{
{show}{Frank Doberman}
{search}{Doberman}
}
{Irkabod Stork}{
{show}{Irkabod Stork}
{search}{Irkabod}
}
{Kortina Van Dryver}{
{show}{Kortina Van Dryver}
{search}{Kortina}
}
{Miss Van Dryer}{
{show}{Miss Van Dryer}
{search}{false}
}
{Mr Smith (Mr Shopkeeper)}{
{show}{Mr Smith (Mr Shopkeeper)}
{search}{false}
}
{Mrs Van Carrot}{
{show}{Mrs Van Carrot}
{search}{Van Carrot}
}
{My good friend at the post office}{
{show}{My good friend at the post office (Slippery)}
{search}{false}
}
{One and Only Manclef}{
{show}{One and Only Manclef}
{search}{Manclef}
}
{Shopkeeper Bunch}{
{show}{Shopkeeper Bunch}
{search}{Shopkeeper}
}
{The Magistrate}{
{show}{The Magistrate}
{search}{Magistrate}
}
{Magistrate Flathead}{
{show}{Magistrate Flathead}
{search}{Magistrate}
}
{Young Bran}{
{show}{Young Bran}
{search}{Young Bran}
}
{A maitre d'}{
{show}{A maitre d'}
{search}{maitre}
}
{Fleppo}{
{show}{Fleppo}
{search}{Fleppo}
}
{Isobel Kingdom}{
{show}{Isobel Kingdom}
{search}{Isobel}
}
{71-Hour Ahmed}{
{show}{71-hour Ahmed}
{search}{Ahmed}
}
{Temple Guardian}{
{show}{Temple Guardian [templeguard]}
{search}{guardian}
}
{Fione mac Feegle}{
{show}{Fione mac Feegle}
{search}{Fione}
}
{Abe}{
{show}{Abe}
{search}{Abe}
}
{Innkeeper}{
{show}{grim innkeeper - Slaughtered Lamb, Uberwald}
{search}{grim innkeeper}
}
{Spiegal}{
{show}{Spiegal}
{search}{Spiegal}
}
};
#alias {/solveletter} {
#if {&{letter_lines[1]}} {
#var {current_match_line} {^$letter_lines[1]$};
#replace {current_match_line} {_} {%.};
#nop Check against far away targets;
#if {"$letter_difficulty" == "none" || "$letter_difficulty" == "far"} {
#foreach {$far_away_targets[]} {target} {
#regex {$target} {$current_match_line} {
#format {letter_solution_line} {%c[FA] %c*%c Deliver to %c%s%c.} {bold blue} {bold yellow} {bold blue} {bold green} {$far_away_targets[$target][show]} {bold blue};
#echo {$letter_solution_line};
#if {"$far_away_targets[$target][search]" != "false"} {
db npc $far_away_targets[$target][search];
};
};
}
}
#nop Check against distant lands targets;
#if {"$letter_difficulty" == "none" || "$letter_difficulty" == "distant"} {
#foreach {$distant_land_targets[]} {target} {
#regex {$target} {$current_match_line} {
#format {letter_solution_line} {%c[DL] %c*%c Deliver to %c%s%c.} {bold blue} {bold yellow} {bold blue} {bold green} {$distant_land_targets[$target][show]} {bold blue};
#echo {$letter_solution_line};
#if {"$distant_land_targets[$target][search]" != "false"} {
db npc $distant_land_targets[$target][search];
};
};
}
}
#nop Check against difficult customer targets;
#if {"$letter_difficulty" == "none" || "$letter_difficulty" == "difficult"} {
#foreach {$difficult_customer_targets[]} {target} {
#regex {$target} {$current_match_line} {
#format {letter_solution_line} {%c[DC] %c*%c Deliver to %c%s%c.} {bold blue} {bold yellow} {bold blue} {bold green} {$difficult_customer_targets[$target][show]} {bold blue};
#echo {$letter_solution_line};
#if {"$difficult_customer_targets[$target][search]" != "false"} {
db npc $difficult_customer_targets[$target][search];
};
};
}
}
#nop var {letter_difficulty} {none};
};
};
#NOP ==[Halt Parsing Letter]==
#alias {/stopparsingletter} {
#unvar {parsing_dead_letter};
/solveletter
};
#action {^Deliver by %1.$} {
#if {&{parsing_dead_letter}} {
/stopparsingletter
}
};
#action {does not have anything written on it.} {
#if {&{parsing_dead_letter}} {
/stopparsingletter
}
};
#action {Cannot find "letter", no match.} {
#if {&{parsing_dead_letter}} {
/stopparsingletter
}
};
#action {You are too busy fighting to read at the moment.} {
#if {&{parsing_dead_letter}} {
/stopparsingletter
}
};
#NOP ==[Catch-all to grab letter lines, store only lines with a '_']==
#action {^%*$} {
#if {&{parsing_dead_letter}} {
#regex {%1} {%*_%*} {
#list {letter_lines} {add} {%1};
};
}
} {9};
#NOP ==[Alias to attempt solve of letter in inventory]==
#ALIAS {sl} {
#send {read letter};
#var {parsing_dead_letter} {0};
#list {letter_lines} {create};
}
#NOP ==[Actions to catch Frank telling you which delivery type]==
#action {^Frank asks: So you want to try delivering a letter to someone far away then, %1\?} {
#nop far away;
#if {%1 == $GMCP[charinfo][capname]} {
#var {letter_difficulty} {far};
};
}
#action {^Frank asks: So you want to try delivering a letter to someone really far away then, %1\?} {
#nop distant land;
#if {%1 == $GMCP[charinfo][capname]} {
#var {letter_difficulty} {distant};
};
}
#action {^Frank exclaims: Sometimes we end up with letters addressed to people who we've had problems with before. They are not easy letters to deliver. Do you want to try delivering one? You'll have to do it in less than an hour. Think carefully now, %1, it could be dangerous!} {
#nop difficult;
#if {%1 == $GMCP[charinfo][capname]} {
#var {letter_difficulty} {difficult};
};
}
#CLASS {deadletter} {close};

View File

@ -1,38 +0,0 @@
#!/usr/bin/env python
import os
import re
import sys
import math
import json
class MapDoorText:
def __init__(self):
self.return_value = []
self.custom_matches = []
def parse_mdt(self, mdt_line):
pass
if __name__ == '__main__':
if len(sys.argv) < 2:
print('[error] No input provided.')
sys.exit()
argument, mdt_line = sys.argv.pop(1), None
# Is this a file passed to us?
if os.path.exists(argument):
with open(argument, 'r') as f:
mdt_line = f.readline()
else:
mdt_line = argument
mdt = MapDoorText()
mdt.parse_mdt(mdt_line)
for line in mdt.return_value:
print(line)

View File

@ -14,58 +14,92 @@
#ALIAS {debug {on|off}} #ALIAS {debug {on|off}}
{ {
#IF {"%1" == "on"} { #VARIABLE {debug} {1}; }; #IF {"%1" == "on"} {
#ELSE { #VARIABLE {debug} {0} }; #VARIABLE {debug} {1};
#SHOWME { Debug is <139>$debug<099> }; #SHOWME {@debug_log{Debug is <139>on<099>.}};
};
#ELSE {
#VARIABLE {debug} {0};
#SHOWME {@debug_log{Debug is <139>off<099>.}};
};
#NOP; #NOP;
} }
#EVENT {IAC SB GMCP char.vitals IAC SE} #EVENT {IAC SB GMCP char.vitals IAC SE}
{ {
#IF {"$debug" == "1"} { #SHOWME %1 }; #IF {"$debug" == "1"} {
#SHOWME {@debug_log{%1}};
};
#VAR GMCP[oldvitals] {$GMCP[vitals]}; #VAR GMCP[oldvitals] {$GMCP[vitals]};
#VAR GMCP[vitals] {%0}; #VAR GMCP[vitals] {%0};
#nop TODO: If oldvitals doesnt exist, skip this (to prevent HP loss alerts on SU)
#math {hploss} {$GMCP[vitals][hp] - $GMCP[oldvitals][hp]}; #math {hploss} {$GMCP[vitals][hp] - $GMCP[oldvitals][hp]};
#if {$hploss < -150} { #if {$hploss < -150} {
#format {hp_loss_display} {<139>HP IS FALLING! CAREFUL! (Lost %s HP)<099>} {$hploss}; #format {hp_loss_display} {<139>HP IS FALLING! CAREFUL! (Lost %s HP)<099>} {$hploss};
#echo {$hp_loss_display};
#showme {\a}; #if {&GMCP[oldvitals][hp]} {
} #echo {$hp_loss_display};
#showme {\a};
};
};
#math {xpgain} {$GMCP[vitals][xp] - $GMCP[oldvitals][xp]}; #math {xpgain} {$GMCP[vitals][xp] - $GMCP[oldvitals][xp]};
#if {$xpgain > 5000} { #if {$xpgain > 5000} {
#format {xp_gain_display} {(+<169>%g<099>xp)} {$xpgain}; #format {xp_gain_display} {(+<169>%g<099>xp)} {$xpgain};
#delay {1} {#showme {$xp_gain_display};};
#echo {$xp_gain_display}; };
}
update_prompt; update_prompt;
} }
#EVENT {IAC SB GMCP char.info IAC SE} #EVENT {IAC SB GMCP char.info IAC SE}
{ {
#IF {"$debug" == "1"} { #SHOWME %1 }; #IF {"$debug" == "1"} {
#VAR GMCP[charinfo] {%0}; #SHOWME {@debug_log{%1}};
};
#nop New login, invalidate stale info; #nop We've SU'd, cleanup as appropriate;
#nop delete group shields data;
#variable {group_shields} {};
#variable {group_shields_current} {};
/writegroupshieldstofile;
#nop xpreset - do we still want to? if we dont mis-calculate on SU continued tracking is nice;
#nop store data about new character;
#var GMCP[charinfo] {%0};
#nop invalidate stale info;
#unvar {GMCP[oldvitals]}; #unvar {GMCP[oldvitals]};
#unvar {GMCP[vitals]};
#var {latest_xp} {0};
#nop reset prompt details;
#var {tpa_status} {0}; #var {tpa_status} {0};
#var {tpa_color} {0};
#unvar {tpa_start} {0};
#unvar {quota}; #unvar {quota};
#nop re-split the screen to wipe out the prompt from last character;
#split {3};
} }
#EVENT {IAC SB GMCP room.info IAC SE} #EVENT {IAC SB GMCP room.info IAC SE}
{ {
#IF {"$debug" == "1"} { #SHOWME %1 }; #IF {"$debug" == "1"} {
#SHOWME {@debug_log{%1}};
};
#VAR GMCP[room][info] {%0}; #VAR GMCP[room][info] {%0};
/spottimercheckroomid $GMCP[room][info][identifier] /spottimercheckroomid $GMCP[room][info][identifier];
} }
#EVENT {IAC SB GMCP room.map IAC SE} #EVENT {IAC SB GMCP room.map IAC SE}
{ {
#IF {"$debug" == "1"} { #SHOWME %1 }; #IF {"$debug" == "1"} {
#SHOWME {@debug_log{%1}};
};
#VAR {minimap} {%0}; #VAR {minimap} {%0};
#REPLACE {minimap} {u001b} {}; #REPLACE {minimap} {u001b} {};
#SYSTEM {rm logs/minimap.log && touch logs/minimap.log}; #SYSTEM {rm logs/minimap.log && touch logs/minimap.log};
@ -76,20 +110,21 @@
#EVENT {IAC SB GMCP room.writtenmap IAC SE} #EVENT {IAC SB GMCP room.writtenmap IAC SE}
{ {
#IF {"$debug" == "1"} { #SHOWME %1 }; #IF {"$debug" == "1"} {
#SHOWME {@debug_log{%1}};
};
#VAR GMCP[room][mdt] {%0}; #VAR GMCP[room][mdt] {%0};
#REPLACE {GMCP[room][mdt]} {\\n} {}; #REPLACE {GMCP[room][mdt]} {\\n} {};
#SYSTEM {rm logs/mapdoortext.log && touch logs/mapdoortext.log}; #SYSTEM {rm logs/mapdoortext.log && touch logs/mapdoortext.log};
#LINE {log} {logs/mapdoortext.log} {$GMCP[room][mdt]}; #LINE {log} {logs/mapdoortext.log} {$GMCP[room][mdt]};
/wamgsaver $GMCP[room][info][identifier];
} }
#EVENT {IAC WILL GMCP} #EVENT {IAC WILL GMCP}
{ {
#SEND {$IAC$DO$GMCP\}; #SEND {$IAC$DO$GMCP\};
#nop #SEND {$IAC$SB$GMCP Core.Hello { "client": "$CLIENT_NAME", "version": "$CLIENT_VERSION" } $IAC$SE\}; #SEND {$IAC$SB$GMCP core.hello { "client" : "TinTin++", "version" : "2.02.60" } $IAC$SE\};
#nop #SEND {$IAC$SB$GMCP Core.Hello { "client": "TinTin++", "version": "2.01.2" } $IAC$SE\};
#nop #SEND {$IAC$SB$GMCP Core.Supports.Set ["Char.Vitals", "char.info", "char.login", "room.info", "room.map", "room.writtenmap"] $IAC$SE\}
#SEND {$IAC$SB$GMCP core.hello { "client" : "TinTin++", "version" : "2.01.2" } $IAC$SE\};
#SEND {$IAC$SB$GMCP core.supports.set [ "char.login", "char.info", "char.vitals", "room.info", "room.map", "room.writtenmap" ] $IAC$SE\}; #SEND {$IAC$SB$GMCP core.supports.set [ "char.login", "char.info", "char.vitals", "room.info", "room.map", "room.writtenmap" ] $IAC$SE\};
#nop; #nop;
} }
@ -100,4 +135,8 @@
#VARIABLE CLIENT_VERSION %1; #VARIABLE CLIENT_VERSION %1;
} }
#FUNCTION {debug_log} {
#format {result} {<<fac><<caf>GMCP<fac>><099>> %0};
};
#CLASS gmcp close #CLASS gmcp close

View File

@ -16,45 +16,61 @@
#nop EFF #nop EFF
#ACTION {^ * %1 is floating around {him|her|it}:$} { #ACTION {^ * %1 is floating around {him|her|it}:$} {
#variable {group_shields[$group_shields_current][eff]} {1}; #variable {group_shields[$group_shields_current][eff]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
} }
#nop TPA #nop TPA
#ACTION {^ * {She|He|It} is surrounded by a {(dull red |bright red |wobbling orange |flickering yellow |)?}magical impact shield\.$} { #ACTION {^ * {She|He|It} is surrounded by a {(dull red |bright red |wobbling orange |flickering yellow |)?}magical impact shield\.$} {
#variable {group_shields[$group_shields_current][tpa]} {1}; #if {"$group_shields_current" != ""} {
/writegroupshieldstofile #variable {group_shields[$group_shields_current][tpa]} {1};
/softwritegroupshieldstofile;
};
} }
#nop CCC #nop CCC
#ACTION {^ * {Her|His|Its} skin has been {hardened|covered} {with|to}{a?} %4, although {the \w+|it} seems {weaker|not to be}} { #ACTION {^ * {Her|His|Its} skin has been {hardened|covered} {with|to}{a?} %4, although {the \w+|it} seems {weaker|not to be}} {
#variable {group_shields[$group_shields_current][ccc]} {1}; #if {"$group_shields_current" != ""} {
/writegroupshieldstofile #variable {group_shields[$group_shields_current][ccc]} {1};
/softwritegroupshieldstofile;
};
} }
#ACTION {^ * Your skin has been {hardened|covered} {with|to}{a?} %4, although {the \w+|it} seems {weaker|not to be}} {
#variable {group_shields[$GMCP[charinfo][capname]][ccc]} {1};
/softwritegroupshieldstofile;
};
#ACTION {^ * Tiny threads of metal run criss-cross all over {her|his|its} skin, although it seems weaker} { #ACTION {^ * Tiny threads of metal run criss-cross all over {her|his|its} skin, although it seems weaker} {
#variable {group_shields[$group_shields_current][ccc]} {1}; #if {"$group_shields_current" != ""} {
/writegroupshieldstofile #variable {group_shields[$group_shields_current][ccc]} {1};
/softwritegroupshieldstofile;
};
} }
#nop MS #nop MS
#ACTION {^ * {She|He|It} is {(really )?}protected by the power of {Pishe|Gufnork|Gapp|Sandelfon|Fish|Hat|Sek|Aegadon|Cubal|Reebox}} { #ACTION {^ * {She|He|It} is {(really )?}protected by the power of {Pishe|Gufnork|Gapp|Sandelfon|Fish|Hat|Sek|Aegadon|Cubal|Reebox}} {
#variable {group_shields[$group_shields_current][ms]} {1}; #if {"$group_shields_current" != ""} {
/writegroupshieldstofile #variable {group_shields[$group_shields_current][ms]} {1};
/softwritegroupshieldstofile;
};
} }
#nop KII #nop KII
#ACTION {^ * {She|He|It} is surrounded by a {handful|cloud|small swarm|large swarm|vast sawrm|plague} of} { #ACTION {^ * {She|He|It} is surrounded by a {handful|cloud|small swarm|large swarm|vast sawrm|plague} of} {
#variable {group_shields[$group_shields_current][kii]} {1}; #variable {group_shields[$group_shields_current][kii]} {1};
/writegroupshieldstofile /softwritegroupshieldstofile;
}; };
#nop No shields at all #nop No shields at all
#ACTION {^{(\w+\b\W*?){1,8}} has no arcane protection.$} { #ACTION {^{(\w+\b\W*?){1,8}} has no arcane protection.$} {
#variable {group_shields[%1][ccc]} {0}; #if {"$group_shields_current" != ""} {
#variable {group_shields[%1][tpa]} {0}; #if {"%1" != "%+ the %+ horse"} {
#variable {group_shields[%1][eff]} {0}; #variable {group_shields[%1][ccc]} {0};
#variable {group_shields[%1][kii]} {0}; #variable {group_shields[%1][tpa]} {0};
#variable {group_shields[%1][ms]} {0}; #variable {group_shields[%1][eff]} {0};
/writegroupshieldstofile #variable {group_shields[%1][kii]} {0};
#variable {group_shields[%1][ms]} {0};
/softwritegroupshieldstofile;
};
};
}; };
@ -66,17 +82,17 @@
#ACTION {[%1] {[A-Za-z]+} has left the group.} { #ACTION {[%1] {[A-Za-z]+} has left the group.} {
#if {&group_shields[%2]} { #if {&group_shields[%2]} {
#unvariable {group_shields[%2]}; #unvariable {group_shields[%2]};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
#ACTION {[%1] {[A-Za-z]+} has joined the group.} { #ACTION {[%1] {[A-Za-z]+} has joined the group.} {
#tab {%2}; #tab {%2};
#variable {group_shields[%2]} {{tpa}{0}{ccc}{0}{eff}{0}{ms}{0}{kii}{0}}; #variable {group_shields[%2]} {{tpa}{0}{ccc}{0}{eff}{0}{ms}{0}{kii}{0}};
/writegroupshieldstofile /softwritegroupshieldstofile;
}; };
#ACTION {[%1] You have left the group.} { #ACTION {[%1] You have left the group.} {
#var {group_shields} {}; #var {group_shields} {};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
#ACTION {[%1] You have joined the group.} { #ACTION {[%1] You have joined the group.} {
#var {group_shields} {}; #var {group_shields} {};
@ -95,17 +111,26 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][eff]} {0}; #variable {group_shields[$name][eff]} {0};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
#ACTION {^In blocking the attack {(?:.+)} floating around {(?:\w+\b\W*?){1,8}} is knocked out of orbit.$} { #ACTION {^In blocking the attack {(?:.+)} floating around {(?:\w+\b\W*?){1,8}} is knocked out of orbit.$} {
#nop Record room of drop even for non group mates... might come in handy;
#variable {group_eff_item} {%1};
#variable {group_eff_target} {%2};
#variable {group_eff_room} {$GMCP[room][info][name]};
#variable {gs_dropname} {%2}; #variable {gs_dropname} {%2};
#replace {gs_dropname} { } {;}; #replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][eff]} {0}; #variable {group_shields[$name][eff]} {0};
/writegroupshieldstofile /writegroupshieldstofile;
#showme {\a};
#return @log_line_to_chat{};
}; };
}; };
}; };
@ -115,7 +140,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][eff]} {1}; #variable {group_shields[$name][eff]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -124,16 +149,17 @@
#nop TPA #nop TPA
#ACTION {^There is a sudden white flash around {(?!a passing wizard)(\w+\b\W*?){1,8}}.$} { #ACTION {^There is a sudden white flash around {(?!a passing wizard)(\w+\b\W*?){1,8}}.$} {
#showme {\a}; #showme {\a};
#line {log} {$chat_file};
#variable {gs_dropname} {%1}; #variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;}; #replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][tpa]} {0}; #variable {group_shields[$name][tpa]} {0};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
#return @log_line_to_chat{};
}; };
#ACTION {^With a noise that sounds like "Plink!", the air around {(\w+\b\W*?){1,8}} flashes {yellow|red} for a moment.$} { #ACTION {^With a noise that sounds like "Plink!", the air around {(\w+\b\W*?){1,8}} flashes {yellow|red} for a moment.$} {
#variable {gs_dropname} {%1}; #variable {gs_dropname} {%1};
@ -141,7 +167,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][tpa]} {1}; #variable {group_shields[$name][tpa]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -154,7 +180,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {0}; #variable {group_shields[$name][ccc]} {0};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -164,7 +190,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {0}; #variable {group_shields[$name][ccc]} {0};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -174,7 +200,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {1}; #variable {group_shields[$name][ccc]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -184,7 +210,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {1}; #variable {group_shields[$name][ccc]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -194,7 +220,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {1}; #variable {group_shields[$name][ccc]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -207,7 +233,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][kii]} {1}; #variable {group_shields[$name][kii]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -217,7 +243,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][kii]} {1}; #variable {group_shields[$name][kii]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -227,7 +253,7 @@
#foreach {$gs_dropname} {name} { #foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} { #if {&group_shields[$name]} {
#variable {group_shields[$name][kii]} {1}; #variable {group_shields[$name][kii]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
}; };
}; };
}; };
@ -241,12 +267,13 @@
#ALIAS {rgs} { #ALIAS {rgs} {
#variable {group_shields} {}; #variable {group_shields} {};
#variable {group_shields_current} {}; #variable {group_shields_current} {};
/writegroupshieldstofile;
#send {group shields}; #send {group shields};
/writegroupshieldstofile
}; };
#ALIAS {sgs} { #ALIAS {sgs} {
#foreach {$group_shields[]} {name} { #showme {.:: Group Shields ::.};
#foreach {*group_shields[]} {name} {
#format {gs_namelength} {%L} {$name}; #format {gs_namelength} {%L} {$name};
#math {gs_namelength} {9 - $gs_namelength}; #math {gs_namelength} {9 - $gs_namelength};
#if {$gs_namelength < 0} { #var {gs_namelength} {0}; }; #if {$gs_namelength < 0} { #var {gs_namelength} {0}; };
@ -254,24 +281,41 @@
#foreach {tpa;ccc;eff;ms;kii} {shield} { #foreach {tpa;ccc;eff;ms;kii} {shield} {
#if {&group_shields[$name][$shield] && "$group_shields[$name][$shield]" == "1"} { #if {&group_shields[$name][$shield] && "$group_shields[$name][$shield]" == "1"} {
#format {gs_displayline} {%s <fef>%s<099>} {$gs_displayline} {$shield}; #format {gs_displayline} {%s <fef>%u<099>} {$gs_displayline} {$shield};
} { } {
#format {gs_displayline} {%s <aaa>%s<099>} {$gs_displayline} {$shield}; #format {gs_displayline} {%s <aaa>%u<099>} {$gs_displayline} {$shield};
}; };
}; };
#showme {$gs_displayline}; #showme {$gs_displayline};
}; };
}; };
#FORMAT {shieldfile_lastwrite} {%T};
#MATH {shieldfile_lastwrite} {$shieldfile_lastwrite - 10};
#ALIAS {/softwritegroupshieldstofile} {
#format {current_time} {%T};
#math {shieldfile_lastdelta} {$current_time - $shieldfile_lastwrite};
#if {$shieldfile_lastdelta < 2} {
#nop Don't bother writing if its been less than 5 seconds;
#delay {swgstf} {/softwritegroupshieldstofile;} {2};
#return;
};
/writegroupshieldstofile;
#format {shieldfile_lastwrite} {%T};
};
#ALIAS {/writegroupshieldstofile} { #ALIAS {/writegroupshieldstofile} {
#nop Delete and recreate an empty file;
#system {rm $groupshield_file && touch $groupshield_file}; #system {rm $groupshield_file && touch $groupshield_file};
#nop Log a title then iterate over group members to display line by line;
#line {log} {$groupshield_file} {.:: Group Shields ::.}; #line {log} {$groupshield_file} {.:: Group Shields ::.};
#foreach {$group_shields[]} {name} { #foreach {*group_shields[]} {name} {
#format {gs_namelength} {%L} {$name}; #format {gs_namelength} {%L} {$name};
#math {gs_namelength} {6 - $gs_namelength}; #math {gs_namelength} {6 - $gs_namelength};
#nop #if {$gs_namelength < 0} { #var {gs_namelength} {0}; }; #format {gs_displayline} {%.6s: } {$name};
#format {gs_displayline} { %.6s:%+${gs_namelength}s } {$name}; #format {gs_displayline} {%-8s} {$gs_displayline};
#foreach {tpa;ccc;eff;kii} {shield} { #foreach {tpa;ccc;eff;kii} {shield} {
#if {&group_shields[$name][$shield] && "$group_shields[$name][$shield]" == "1"} { #if {&group_shields[$name][$shield] && "$group_shields[$name][$shield]" == "1"} {
@ -282,49 +326,49 @@
}; };
#line {log} {$groupshield_file} {$gs_displayline}; #line {log} {$groupshield_file} {$gs_displayline};
}; };
#return; #format {shieldfile_lastwrite} {%T};
}; };
#nop =======================================================;
#nop ===[ Capture incidents and be able to report them ]===;
#nop =======================================================;
#ACTION {^The %1 grabs your %2. You struggle briefly but {she|he|it} wrests it from your grip and makes for a hasty retreat.} {
#variable {group_snatch_target} {%1};
#variable {group_snatch_victim} {$GMCP[charinfo][capname]};
#variable {group_snatch_item} {%2};
};
#ACTION {^The %1 and %2 struggle briefly over %3 before the %4 wrests it free%5$} {
#variable {group_snatch_target} {%1};
#variable {group_snatch_victim} {%2};
#variable {group_snatch_item} {%3};
};
#ACTION {^The %1 suddenly snatches %2 from %3 and makes a run for it.$} {
#variable {group_snatch_target} {%1};
#variable {group_snatch_victim} {%3};
#variable {group_snatch_item} {%2};
};
#ALIAS {gssnatch} {
#if {"$group_snatch_target" != "0"} {
#send {group say [snatch] $group_snatch_victim's "$group_snatch_item" was stolen by \{$group_snatch_target\}};
} {
#showme {<188><acf>[snatch] No recent snatch to report.<900>};
};
};
#ALIAS {gseff} {
#if {"$group_eff_target" != "0"} {
#send {group say [eff] $group_eff_target's floating "$group_eff_item" was dropped in \{$group_eff_room\}};
} {
#showme {<188><acf>[eff] No recent EFF drops to report.<900>};
};
};
#VARIABLE {group_snatch_target} {0};
#VARIABLE {group_snatch_victim} {0};
#VARIABLE {group_snatch_item} {0};
#VARIABLE {group_eff_item} {0};
#VARIABLE {group_eff_target} {0};
#VARIABLE {group_eff_room} {0};
#CLASS {group} {close}; #CLASS {group} {close};
#nop EFF for you;
#nop ^(?:> )?(?P<effitem>(?:\w+\b\W*?){1,6}) floating around you breaks!$
#nop ^(?:> )?You realise that (?P<effitem>(?:\w+\b\W*?){1,6}) is no longer floating around you\.$
#nop ^(?:> )?In blocking the attack (?P<effitem>(?:\w+\b\W*?){1,6}) floating around you is knocked out of orbit\.$
#nop ^(?:> )?(?P<effitem>(?:\w+\b\W*?){1,6}) begins to float around you\.$
#nop ^ \* (?P<effitem>(?:\w+\b\W*?){1,6}) is floating around you\:$
#nop TPA for you
#nop ^(?:> )?There is a sudden white flash\. Your magical shield has broken\.$
#nop ^(?:> )?With a noise that sounds like "Plink!", everything around you flashes (?>yellow|red) for a moment\.$
#nop ^ \* You are surrounded by a (?P<colour>|dull red |bright red |wobbling orange |flickering yellow )magical impact shield\.$
#nop CCC for you
#nop ^(?:> )?With a brief flash of magic, your (?>metallic|stony|elastic) skin falls away\.$
#nop ^(?:> )?Your skin feels itchy<semicolon> large pieces flake off as you scratch it\.$
#nop ^(?:> )?The metallic network on your skin feels a fair bit stronger now\.$
#nop ^(?:> )?Your? (?>feel your skin become (?>rock hard|elastic as rubber)|skin (?>feels (?>even harder now|much more elastic now)|is now as (?>hard|elastic|thickly covered) as it can get))\.$
#nop ^ \* Tiny threads of metal run criss-cross all over your skin, although
#nop ^ \* Your skin (?>has been|has|is) (?>hardened to a rock-like form|hardened with numerous layers of a mineral-like substance|hardened with a chalk-like substance|covered with several layers of a chalk-like substance|covered with a thin layer of chalk|covered with a thick metal net|metal bands running all over it, forming a kind of net|covered with a thin metal net|covered with a thin, net-like metal coating|solidified into a rubberous form|made elastic with numerous layers of a rubber-like substance|treated with a latex-like substance|covered with several layers of a latex-like substance|covered with a thin layer of latex), although
#nop Major for you;
#nop ^(?:> )?Your divine protection expires\.$
#nop ^(?:> )?You are protected by the power of (?>Pishe|Gufnork|Gapp|Sandelfon|Fish|Hat|Sek|Aegadon|Cubal|Reebox)\.$
#nop ^ \* You are (?>(?>barely |really |perfectly )?protected|shielded) by the (?>power |protective armour |grace )of (?>Pishe|Gufnork|Gapp|Sandelfon|Fish|Hat|Sek|Aegadon|Cubal|Reebox)\. You will be protected for
#nop Bug shield for you;
#nop ^(?:> )?The last of the injured (?>lacewings|stick insects|mayflies|praying mantids|butterflies|ladybirds|dragonflies|damselflies|moths|grasshoppers|winged termites|sandflies|mosquitoes|gnats|crickets|flying ants|locusts|horseflies|cicadas|bees|wasps|hornets|elephant beetles|assassin bugs) surrounding you crash to the ground\.$
#nop ^(?:> )?The (?>lacewings|stick insects|mayflies|praying mantids|butterflies|ladybirds|dragonflies|damselflies|moths|grasshoppers|winged termites|sandflies|mosquitoes|gnats|crickets|flying ants|locusts|horseflies|cicadas|bees|wasps|hornets|elephant beetles|assassin bugs) surrounding you scatter in different directions and fly off\.$
#nop ^(?:> )?(?>Buzzing drowsily, t|Buzzing loudly, t|Buzzing threateningly, t|Clicking and buzzing, t|Whirring gently, t|Rather clumsily, t|With a rasping noise, t|With a high-pitched whining noise, t|With a low, menacing buzzing, t|With a buzzing sound so loud and meaty it's almost like a dog growling, t|T)he (?>handful|cloud|small swarm|large swarm|vast swarm|plague) of (?>lacewings|stick insects|mayflies|praying mantids|butterflies|ladybirds|dragonflies|damselflies|moths|grasshoppers|winged termites|sandflies|mosquitoes|gnats|crickets|flying ants|locusts|horseflies|cicadas|bees|wasps|hornets|elephant beetles|assassin bugs) (?>flutters into a loosely-formed orbit around |forms a chaotic web of small white bodies around |starts to hover near |begins to circle |begins to circle around |begins to orbit |begins to cluster around |begins to buzz erratically around |begins to buzz around |flutters into a chaotic formation around )you
#nop ^ \* You are surrounded by a (?>handful|cloud|small swarm|large swarm|vast swarm|plague) of
#nop Arcane statuses
#nop ^(?:> )?Arcane protection status:$;

View File

@ -1,44 +1,44 @@
#CLASS {magic} {kill}; #CLASS {magic} {kill};
#CLASS {magic} {open}; #CLASS {magic} {open};
#NOP ==[Delude Levels]== #NOP ==[Delude Levels]==;
#SUB {^It has a faint octarine shadow about it that disappears if you look at it squarely.$} {%0 <858>(1/5)<898>}; #SUB {^It has a faint octarine shadow about it that disappears if you look at it squarely.$} {%0 <858>(1/5)<900>};
#SUB {^It has a faint octarine shadow about it.$} {%0 <858>(2/5)<898>}; #SUB {^It has a faint octarine shadow about it.$} {%0 <858>(2/5)<900>};
#SUB {^It has an octarine shadow about it that flickers occasionally out of the corner of your eye.$} {%0 <858>(3/5)<898>}; #SUB {^It has an octarine shadow about it that flickers occasionally out of the corner of your eye.$} {%0 <858>(3/5)<900>};
#SUB {^It has a flickering octarine shadow about it.$} {%0 <858>(4/5)<898>}; #SUB {^It has a flickering octarine shadow about it.$} {%0 <858>(4/5)<900>};
#SUB {^It has a flickering octarine haze about it.$} {%0 <858>(5/5)<898>}; #SUB {^It has a flickering octarine haze about it.$} {%0 <858>(5/5)<900>};
#HIGH {^The octarine shadow around %* deepens%*} {bold magenta} #HIGH {^The octarine shadow around %* deepens%*} {bold magenta};
#HIGH {^The octarine shadow around %* fades%*} {magenta} #HIGH {^The octarine shadow around %* fades%*} {magenta};
#NOP ==[Item Enchantment Levels]== #NOP ==[Item Enchantment Levels]==;
#SUB {It occasionally pulses with octarine light} {%0 <858>(Lvl 1)<898>}; #SUB {It occasionally pulses with octarine light} {%0 <858>(Lvl 1)<900>};
#SUB {It emits a slight octarine glow} {%0 <858>(Lvl 2)<898>}; #SUB {It emits a slight octarine glow} {%0 <858>(Lvl 2)<900>};
#SUB {It softly pulses in dull octarine shades} {%0 <858>(Lvl 3)<898>}; #SUB {It softly pulses in dull octarine shades} {%0 <858>(Lvl 3)<900>};
#SUB {It gives off a steady but dull octarine glow} {%0 <858>(Lvl 4)<898>}; #SUB {It gives off a steady but dull octarine glow} {%0 <858>(Lvl 4)<900>};
#SUB {It gives off a steady octarine glow} {%0 <858>(Lvl 5)<898>}; #SUB {It gives off a steady octarine glow} {%0 <858>(Lvl 5)<900>};
#SUB {It glows an intense octarine} {%0 <858>(Lvl 6)<898>}; #SUB {It glows an intense octarine} {%0 <858>(Lvl 6)<900>};
#SUB {It emits a bright octarine colour} {%0 <858>(Lvl 7)<898>}; #SUB {It emits a bright octarine colour} {%0 <858>(Lvl 7)<900>};
#SUB {It brightly pulses octarine} {%0 <858>(Lvl 8)<898>}; #SUB {It brightly pulses octarine} {%0 <858>(Lvl 8)<900>};
#SUB {It glows brilliant octarine shades} {%0 <858>(Lvl 9)<898>}; #SUB {It glows brilliant octarine shades} {%0 <858>(Lvl 9)<900>};
#SUB {It radiates pure octarine brilliance} {%0 <858>(Lvl 10)<898>}; #SUB {It radiates pure octarine brilliance} {%0 <858>(Lvl 10)<900>};
#NOP ==[Background Magic Levels]== #NOP ==[Background Magic Levels]==;
#SUB {There is the residual taste of magic in this place} {%0 <858>(50-149 thaums)<898>}; #SUB {There is the residual taste of magic in this place} {%0 <858>(50-149 thaums)<900>};
#SUB {This place has seen some use of magic} {%0 <858>(150-299 thaums)<898>}; #SUB {This place has seen some use of magic} {%0 <858>(150-299 thaums)<900>};
#SUB {A considerable amount of magic has been used here} {%0 <858>(300-499 thaums)<898>}; #SUB {A considerable amount of magic has been used here} {%0 <858>(300-499 thaums)<900>};
#SUB {A very large quantity of magic has been manipulated here} {%0 <858>(500-749 thaums)<898>}; #SUB {A very large quantity of magic has been manipulated here} {%0 <858>(500-749 thaums)<900>};
#NOP red; #NOP red;
#SUB {You can feel the Dungeon Dimensions trying to push in} {%0 <818>(750-1000 thaums)<898>}; #SUB {You can feel the Dungeon Dimensions trying to push in} {%0 <818>(750-1000 thaums)<900>};
#NOP bold red!; #NOP bold red!;
#SUB {Little sparks flash in from the Dungeon Dimensions} {%0 <118>(1001-1500 thaums)<098>}; #SUB {Little sparks flash in from the Dungeon Dimensions} {%0 <118>(1001-1500 thaums)<900>};
#SUB {Apparations of things with lots of tentacles seem to be on the edge of your vision} {%0 <118>(1501-2000 thaums)<098>}; #SUB {Apparations of things with lots of tentacles seem to be on the edge of your vision} {%0 <118>(1501-2000 thaums)<900>};
#SUB {So much magic has been expended here that the area is in danger of dumping itself into the Dungeon Dimensions} {%0 <118>(2001-5000 thaums)<098>}; #SUB {So much magic has been expended here that the area is in danger of dumping itself into the Dungeon Dimensions} {%0 <118>(2001-5000 thaums)<900>};
#NOP ==[PFG Damage Values]== #NOP ==[PFG Damage Values]==;
#SUB {^{The fire singes} } {%1 <019>(<<119>15<019>%)<099> }; #SUB {^{The fire singes} } {%1 <019>(<<119>15<019>%)<099> };
#SUB {^{The fire burns} } {%1 <019>(<119>15<019>-<119>30<019>%)<099> }; #SUB {^{The fire burns} } {%1 <019>(<119>15<019>-<119>30<019>%)<099> };
#SUB {^{The fire crisps} } {%1 <019>(<119>30<019>-<119>60<019>%)<099> }; #SUB {^{The fire crisps} } {%1 <019>(<119>30<019>-<119>60<019>%)<099> };
@ -47,17 +47,26 @@
#SUB {^{The fire vaporises} } {%1 <019>(><119>90<019>%)<099> }; #SUB {^{The fire vaporises} } {%1 <019>(><119>90<019>%)<099> };
#NOP ==[Replace Spell Casting]== #NOP ==[Replace Spell Casting]==;
#ACTION {^You prepare to cast %1 {at|on} %2.$} { #showme { * <138>%1<098> -> %2}; #line gag} {3} #ACTION {^You prepare to cast %1 {at|on} %2.$} { #showme { * <138>%1<099> -> %2}; #line gag} {3};
#ACTION {^You prepare to cast %1.$} { #showme { * <138>%1<098>}; #line gag} {4} #ACTION {^You prepare to cast %1.$} { #showme { * <138>%1<099>}; #line gag} {4};
#NOP ==[Colour FCI Output]== #NOP ==[Colour FCI Output]==;
#SUB {The weave indicates that %1 is a %2, with %3 charge{s?} remaining.} {The weave indicates that <138>%1<098> is a <138>%2<098> with <158>%3<098> charges remaining.}; #SUB {The weave indicates that %1 is a %2, with %3 charge{s?} remaining.} {The weave indicates that <138>%1<900> is a <138>%2<900> with <158>%3<900> charges remaining.};
#NOP ==[Library/Distortions]== #NOP ==[Library/Distortions]==
#HIGHLIGHT {^The area seems more mundane than before\.$} {green underscore}; #HIGHLIGHT {^The area seems more mundane than before\.$} {green underscore};
#HIGHLIGHT {^{?>You notice an odd rippling in the air\.|The awful sound of nails being dragged down a blackboard fills the area briefly\.|A distortion in time and space is forming!}$} {red underscore}; #HIGHLIGHT {^{?>You notice an odd rippling in the air\.|The awful sound of nails being dragged down a blackboard fills the area briefly\.|A distortion in time and space is forming!}$} {red underscore};
#NOP ==[Contemplate]==;
#SUB {^You focus your mind {once more on|on} %2.$} {You <188>focus<900> your mind %1 <138>%2<900>.};
#SUB {^With %1 at the forefront of your mind, you enter a deep trance.$} {With <138>%1<900> at the forefront of your mind, you enter a deep <188>trance<900>.};
#SUB {^You feel %1 sitting in your mind, eager to be fed again.$} {You feel <138>%1<900> sitting in your <188>mind<900>, eager to be <128>fed again<900>.};
#SUB {^You have previously contemplated %1.$} {You have previously contemplated <138>%1<900>.};
#SUB {^Your mind feels less crowded as %1 returns to its normal place.} {Your mind feels less <188>crowded<900> as <138>%1<900> returns to its <188>normal<900> place.};
#HIGHLIGHT {^You are unconscious. You can't do anything.$} {<afc>};
#HIGHLIGHT {^You emerge from your trance.$} {<caf>};
#CLASS {magic} {close}; #CLASS {magic} {close};

61
src/mdt_matchcontrol.py Normal file
View File

@ -0,0 +1,61 @@
#!/usr/bin/env python
import re
import sys
import json
class MapDoorTextControl:
colour_map = {
# http://terminal-color-builder.mudasobwa.ru/
"orange": "\033[01;38;05;214m",
"red": "\033[01;38;05;196m",
"cyan": "\033[01;38;05;37m",
"reset": "\033[00;39;49m"
}
def __init__(self):
self.custom_matches = []
# Load any additional custom matches
with open('logs/features/mdt_custom_matches.json', 'r') as custom_file:
config = json.load(custom_file)
# Strip comments from custom matches
for match in config:
if len(match) > 1:
self.custom_matches.append(match)
def _write_file(self):
with open('logs/features/mdt_custom_matches.json', 'w') as custom_file:
json.dump(self.custom_matches, custom_file)
def add_match(self, pattern, color="red", value=5, is_regex=False):
self.custom_matches.append([pattern, color, value, is_regex])
self._write_file()
def remove_match(self, pattern):
for match in self.custom_matches:
if match[0] == pattern or pattern in match[0]:
self.custom_matches.remove(match)
self._write_file()
if __name__ == '__main__':
if len(sys.argv) < 2:
#print('[error] Missing inputs. Usage: mdt_matchcontrol.py <command> <pattern>')
print(0)
sys.exit()
script, command, pattern = sys.argv.pop(0), sys.argv.pop(0), " ".join(sys.argv)
mdtc = MapDoorTextControl()
if command == "add":
mdtc.add_match(pattern)
print(1)
elif command == "remove":
mdtc.remove_match(pattern)
print(1)
else:
#print('[error] Unrecognized command, valid commands are "add" and "remove".')
print(0)

View File

@ -86,6 +86,12 @@ class MapDoorText:
with open('mdtconfig.json', 'r') as config_file: with open('mdtconfig.json', 'r') as config_file:
config = json.load(config_file) config = json.load(config_file)
# Load any additional custom matches
with open('logs/features/mdt_custom_matches.json', 'r') as custom_file:
additional_matches = json.load(custom_file)
config['custom_matches'] = config['custom_matches'] + additional_matches;
# Strip comments from custom matches # Strip comments from custom matches
for match in config['custom_matches']: for match in config['custom_matches']:
if len(match) > 1: if len(match) > 1:

View File

@ -5,8 +5,12 @@
#READ {src/missions/sausages.tin}; #READ {src/missions/sausages.tin};
#READ {src/missions/letters.tin}; #READ {src/missions/letters.tin};
#READ {src/missions/sailing.tin}; #READ {src/missions/sailing.tin};
#READ {src/missions/jobmarket.tin};
#VARIABLE {missiontimers_file} {logs/features/missiontimers_sync.tin};
#NOP ==[ Missions command reports on each modules active/retry lists ]==;
#ALIAS {missions} { #ALIAS {missions} {
#if {&missions == 0} { #if {&missions == 0} {
#return; #return;
@ -19,10 +23,8 @@
#nop ===== Sailing Missions =====; #nop ===== Sailing Missions =====;
#nop ==============================; #nop ==============================;
#if {&missions[sailing]} { #if {&missions[sailing]} {
#foreach {$missions[sailing][active_list][]} {player} { #foreach {*missions[sailing][active_list][]} {player} {
#math {mins} {$current_time - $missions[sailing][active_list][$player]}; #var {mins} {@ts_to_min{$current_time;$missions[sailing][active_list][$player]}};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {120 - $mins}; #math {mins} {120 - $mins};
#math {hours} {$mins / 60}; #math {hours} {$mins / 60};
@ -30,8 +32,14 @@
#if {$mins < 0} { #if {$mins < 0} {
#unvar {missions[sailing][active_list][$player]}; #unvar {missions[sailing][active_list][$player]};
} { };
#format {mt_display} {\t<129>%s<099> can do another sailing mission in <139>%d<099> hour and <139>%d<099> minutes.<099>} {$player}{$hours}{$mins}; #else {
#if {$hours <= 0} {
#format {mt_display} {\t<138>*<099> <acf>%s<099> can do another sailing mission in <139>%d<099> minute(s).<099>} {$player}{$mins};
};
#else {
#format {mt_display} {\t<138>*<099> <acf>%s<099> can do another sailing mission in <139>%d<099> hour and <139>%d<099> minute(s).<099>} {$player}{$hours}{$mins};
};
#list {mission_display_list[$player]} {add} {$mt_display}; #list {mission_display_list[$player]} {add} {$mt_display};
}; };
}; };
@ -42,121 +50,82 @@
#nop ===== Sausage Missions =====; #nop ===== Sausage Missions =====;
#nop ==============================; #nop ==============================;
#if {&missions[sausage]} { #if {&missions[sausage]} {
#foreach {$missions[sausage][active_list][]} {player} { #foreach {*missions[sausage][active_list][]} {player} {
#if {&missions[sausage][active_list][$player][easy]} { #if {&missions[sausage][active_list][$player][easy]} {
#math {mins} {$current_time - $missions[sausage][active_list][$player][easy]}; #var {mins} {@ts_to_min{$current_time;$missions[sausage][active_list][$player][easy]}};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins}; #math {mins} {60 - $mins};
#format {mt_display} {\t<129>%s<099> can do another unspiced sausage mission in <139>%d<099> minutes.<099>} {$player}{$mins}; #format {mt_display} {\t<138>*<099> <acf>%s<099> can do another unspiced sausage mission in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display}; #list {mission_display_list[$player]} {add} {$mt_display};
}; };
#if {&missions[sausage][active_list][$player][hard]} { #if {&missions[sausage][active_list][$player][hard]} {
#math {mins} {$current_time - $missions[sausage][active_list][$player][hard]}; #var {mins} {@ts_to_min{$current_time;$missions[sausage][active_list][$player][hard]}};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins}; #math {mins} {60 - $mins};
#format {mt_display} {\t<129>%s<099> can do another spiced sausage mission in <139>%d<099> minutes.<099>} {$player}{$mins}; #format {mt_display} {\t<138>*<099> <acf>%s<099> can do another spiced sausage mission in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display}; #list {mission_display_list[$player]} {add} {$mt_display};
}; };
}; };
#foreach {$missions[sausage][retry_list][]} {player} { #foreach {*missions[sausage][retry_list][]} {player} {
#math {mins} {$current_time - $missions[sausage][retry_list][$player]}; #var {mins} {@ts_to_min{$current_time;$missions[sausage][retry_list][$player]}};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {10 - $mins}; #math {mins} {10 - $mins};
#format {mt_display} {\t<129>%s<099> can request a new sausage mission in <139>%d<099> minutes.<099>} {$player}{$mins}; #format {mt_display} {\t<138>*<099> <acf>%s<099> can request a new sausage mission in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display}; #list {mission_display_list[$player]} {add} {$mt_display};
}; };
}; };
#nop =================================;
#nop ===== Job Market Missions =====;
#nop =================================;
#if {&missions[jobmarket]} {
#foreach {*missions[jobmarket][active_list][]} {player} {
#foreach {*missions[jobmarket][active_list][$player][]} {job} {
#var {mins} {@ts_to_min{$current_time;$missions[jobmarket][active_list][$player][$job]}};
#math {mins} {60 - $mins};
#format {mt_display} {\t<138>*<099> <acf>%s<099> can do another Job Market "%c%s%c" mission in <139>%d<099> minutes.<099>} {$player}{Jade}{$job}{<099>}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display};
};
};
#foreach {*missions[jobmarket][retry_list][]} {player} {
#var {mins} {@ts_to_min{$current_time;$missions[jobmarket][retry_list][$player]}};
#math {mins} {10 - $mins};
#format {mt_display} {\t<138>*<099> <acf>%s<099> can request a new Job Market mission in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display};
};
};
#nop ==============================; #nop ==============================;
#nop ===== Dead Letters =====; #nop ===== Dead Letters =====;
#nop ==============================; #nop ==============================;
#if {&missions[letter]} { #if {&missions[letter]} {
#foreach {$missions[letter][active_list][]} {player} { #foreach {*missions[letter][active_list][]} {player} {
#if {&missions[letter][active_list][$player][difficult]} { #foreach {*missions[letter][active_list][$player][]} {difficulty} {
#math {mins} {$current_time - $missions[letter][active_list][$player][difficult]}; #var {mins} {@ts_to_min{$current_time;$missions[letter][active_list][$player][$difficulty]}};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins}; #math {mins} {60 - $mins};
#if {$mins < 0} { #if {$mins < 0} {
#unvar {missions[letter][active_list][$player][difficult]}; #unvar {missions[letter][active_list][$player][$difficulty]};
} { } {
#format {mt_display} {\t<129>%s<099> can do another difficult customer letter in <139>%d<099> minutes.<099>} {$player}{$mins}; #format {mt_display} {\t<138>*<099> <acf>%s<099> can do another "<188><afc>%s<099>" letter in <139>%d<099> minutes.<099>} {$player}{$letter_types[$difficulty]}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display};
};
};
#if {&missions[letter][active_list][$player][distant]} {
#math {mins} {$current_time - $missions[letter][active_list][$player][distant]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins};
#if {$mins < 0} {
#unvar {missions[letter][active_list][$player][distant]};
} {
#format {mt_display} {\t<129>%s<099> can do another distant lands letter in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display};
};
};
#if {&missions[letter][active_list][$player][far]} {
#math {mins} {$current_time - $missions[letter][active_list][$player][far]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins};
#if {$mins < 0} {
#unvar {missions[letter][active_list][$player][far]};
} {
#format {mt_display} {\t<129>%s<099> can do another far away letter in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display};
};
};
#if {&missions[letter][active_list][$player][close]} {
#math {mins} {$current_time - $missions[letter][active_list][$player][close]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins};
#if {$mins < 0} {
#unvar {missions[letter][active_list][$player][close]};
} {
#format {mt_display} {\t<129>%s<099> can do another close-by letter in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display};
};
};
#if {&missions[letter][active_list][$player][local]} {
#math {mins} {$current_time - $missions[letter][active_list][$player][local]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins};
#if {$mins < 0} {
#unvar {missions[letter][active_list][$player][local]};
} {
#format {mt_display} {\t<129>%s<099> can do another local letter in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display}; #list {mission_display_list[$player]} {add} {$mt_display};
}; };
}; };
}; };
#foreach {*missions[letter][retry_list][]} {player} {
#foreach {$missions[letter][retry_list][]} {player} { #var {mins} {@ts_to_min{$current_time;$missions[letter][retry_list][$player]}};
#math {mins} {$current_time - $missions[letter][retry_list][$player]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {10 - $mins}; #math {mins} {10 - $mins};
#if {$mins < 0} { #if {$mins < 0} {
#unvar {missions[letter][retry_list][player]}; #unvar {missions[letter][retry_list][player]};
} { } {
#format {mt_display} {\t<129>%s<099> can request another letter in <139>%d<099> minutes.<099>} {$player}{$mins}; #format {mt_display} {\t<138>*<099> <acf>%s<099> can request another letter in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display}; #list {mission_display_list[$player]} {add} {$mt_display};
}; };
}; };
@ -169,16 +138,59 @@
#nop ==============================; #nop ==============================;
#list {mission_display_list} {size} {mdl_count}; #list {mission_display_list} {size} {mdl_count};
#if {$mdl_count > 0} { #if {$mdl_count > 0} {
#echo {<149>[MT] Active Mission Timers:<099>}; #echo {<acf>[<fff>missions<acf>] Active Mission Timers:<099>};
#foreach {$mission_display_list[]} {player} { #foreach {*mission_display_list[]} {player} {
#foreach {$mission_display_list[$player][%*]} {mt_display} { #foreach {$mission_display_list[$player][%*]} {mt_display} {
#showme {$mt_display}; #showme {$mt_display};
}; };
}; };
} { } {
#echo {<149>[MT] No current mission timers.<099>}; #echo {<acf>[<fff>missions<acf>] No current mission timers.<099>};
}; };
}; };
#FUNCTION {ts_to_min} {
#nop @ts_to_min{<current_time>\;<missiontime>};
#math {mins} {%1 - %2};
#math {mins} {($mins - (60 - 1)) / 60};
#return {$mins};
};
#NOP ==[ read/write from file for persistence ]==;
#ALIAS {mtsave} {
/writemissiontimerstofile;
#format {mtsync_message} {<acf>[<fff>missions<acf>] <138>*<900><acf> Saved all available mission timers from %cthis session%c to the disk.<099>} {Green}{<acf>};
#echo {$mtsync_message};
};
#ALIAS {/writemissiontimerstofile} {
#class {mtsync} {clear};
#class {mtsync} {open};
#var {missions_sync} {$missions};
#class {mtsync} {close};
#system {touch $missiontimers_file};
#class {mtsync} {write} {$missiontimers_file};
}
#ALIAS {mtload} {
#class {mtsync} {clear};
#class {mtsync} {read} {$missiontimers_file};
#nop == overwrite mission variable with loaded data;
#variable {missions} {$missions_sync};
#nop == recreate delays for all mission modules;
/sausage_recreate_delays;
/sailing_recreate_delays;
/letters_recreate_delays;
/jobmarket_recreate_delays;
#format {mtsync_message} {<acf>[<fff>missions<acf>] <138>*<900><acf> Synced all available mission timers from %clast session%c off the disk.<099>} {Green}{<188><acf>};
#echo {$mtsync_message};
};
#CLASS {missiontimers} {close}; #CLASS {missiontimers} {close};

151
src/missions/jobmarket.tin Normal file
View File

@ -0,0 +1,151 @@
#CLASS {missiontimers_jobmarket} {kill};
#CLASS {missiontimers_jobmarket} {open};
#VARIABLE {missions[jobmarket]} {
{board_codes}{}
{current_code}{0}
{current_name}{0}
};
#NOP Trigger to capture what "code" belongs to what job when reading the board;
#ACTION {^{[A-Z]{2}}) {Thirst Quencher|Gofer|Dog Walker|Advertising Manager|Street Fixer|Sett Maker|Delivery Lackey|Delivery Runner|Full-time Street Repairer|Textiles Fixer|Expert Street Maintenance Technician|Deliverer of Rare Items|Deliverer of Foreign Goods}$} {
#VARIABLE {missions[jobmarket][board_codes][%1]} {%2};
};
#NOP Alias to capture when we apply for a job at Mr Werks;
#ALIAS {^apply for{ job|} {[A-z]{2}}$} {
#FORMAT {jobcode} {%u} {%2};
#SEND {apply for job $jobcode};
#NOP Reference code in last known board_codes table to get a job name;
#VARIABLE {missions[jobmarket][current_code]} {$jobcode};
#VARIABLE {jobname} {$missions[jobmarket][board_codes][$jobcode]};
#VARIABLE {missions[jobmarket][current_name]} {$jobname};
};
#NOP Alias to capture when we resign from a job;
#ALIAS {^resign from job} {
#SEND {resign from job};
#LOCAL {current_name} {$missions[jobmarket][current_name]};
#IF {"$current_name" != "0"} {
#UNVARIABLE {missions[jobmarket][active_list][$GMCP[charinfo][capname]][$current_name]};
#FORMAT {missions[jobmarket][retry_list][$GMCP[charinfo][capname]]} {%T};
#line sub variable {
#delay {600} {
#format {jobmarket_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now apply for another Job Market mission.<099>} {$GMCP[charinfo][capname]};
#echo {$jobmarket_timer_line};
#unvar {$jobmarket_timer_line};
};
};
#unvar {delayname};
};
};
#NOP Trigger to capture the job being accepted so we get an accurate start-time stamp;
#ACTION {Mr Werks hands you an official employment writ.} {
#NOP Set a timestamp for when we began this job;
#VARIABLE {missions[jobmarket][current_name]} {$jobname};
#IF {"$missions[jobmarket][current_name]" != "0"} {
#FORMAT {missions[jobmarket][active_list][$GMCP[charinfo][capname]][$missions[jobmarket][current_name]]} {%T};
};
};
#NOP Trigger to capture time on the job expiring;
#ACTION {^The time has expired on your present job. You do not need to finish the rest of your deliveries, Mr Werks will find someone else to do this.$} {
#format {current_time} {%T};
#format {current_player} {%s} {$GMCP[charinfo][capname]};
#format {current_job} {%s} {$missions[jobmarket][current_name]};
#variable {missions[jobmarket][active_list][$current_player][$current_job]} {$current_time};
#nop == configure a message display when the timer is up ==;
#math {mins} {$current_time - $missions[jobmarket][active_list][$current_player][$current_job]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {time_left} {60 - $mins};
#line sub variable {
#delay {$time_left} {
#format {jobmarket_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another Job Market "%c%s%c" mission.<099>} {$GMCP[charinfo][capname]} {Jade} {$missions[jobmarket][current_name]} {<acf>};
#echo {$jobmarket_timer_line};
#unvar {$jobmarket_timer_line};
#unvar {missions[jobmarket][active_list][$current_player][$current_job]};
};
};
#unvar {delayname};
};
#NOP Trigger to capture reward from completing a job;
#ACTION {^You have been awarded {[0-9]{1,7}} experience points {for|for partially} completing this job%3} {
#nop Mission completed, so store current mission for current player in active_list;
#format {current_time} {%T};
#format {current_player} {%s} {$GMCP[charinfo][capname]};
#format {current_job} {%s} {$missions[jobmarket][current_name]};
#variable {missions[jobmarket][active_list][$current_player][$current_job]} {$current_time};
#nop == configure a message display when the timer is up ==;
#line sub variable {
#format {delayname} {jobmarket_%s_%s} {$current_player} {$missions[jobmarket][current_name]};
#delay {$delayname} {
#format {jobmarket_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another Job Market "%c%s%c" mission.<099>} {$GMCP[charinfo][capname]} {Jade} {$missions[jobmarket][current_name]} {<acf>};
#echo {$jobmarket_timer_line};
#unvar {$jobmarket_timer_line};
#unvar {missions[jobmarket][active_list][$current_player][$current_job]};
} {3600};
};
#unvar {delayname};
};
#ALIAS {/jobmarket_recreate_delays} {
#format {current_time} {%T};
#nop == start with retry list;
#foreach {*missions[jobmarket][retry_list][]} {player} {
#local {delay_time} {$missions[jobmarket][retry_list][$player]};
#math {delay_time} {600 - ($current_time - $delay_time)};
#if {$delay_time < 1} {
#unvar {missions[jobmarket][retry_list][$player]};
#continue;
};
#line sub variable {
#delay {$delay_time} {
#format {jobmarket_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now apply for another Job Market mission.<099>} {$player};
#echo {$jobmarket_timer_line};
#unvar {jobmarket_timer_line};
#unvar {missions[jobmarket][retry_list][$player]};
};
};
};
#nop == do all the difficulties;
#foreach {*missions[jobmarket][active_list][]} {player} {
#foreach {*missions[jobmarket][active_list][$player][]} {$job} {
#local {delay_time} {$missions[jobmarket][active_list][$player][$job]};
#math {delay_time} {3600 - ($current_time - $delay_time)};
#if {$delay_time < 1} {
#unvar {missions[jobmarket][active_list][$player][$difficulty]};
#continue;
};
#line sub variable {
#delay {$delay_time} {
#format {jobmarket_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another Job Market "%c%s%c" mission.<099>} {$player} {Jade} {$job} {<acf>};
#echo {$jobmarket_timer_line};
#unvar {jobmarket_timer_line};
#unvar {missions[jobmarket][active_list][$player][$difficulty]};
};
};
};
};
};
#CLASS {missiontimers_jobmarket} {close};

View File

@ -1,43 +1,38 @@
#CLASS {missiontimers_letters} {kill}; #CLASS {missiontimers_letters} {kill};
#CLASS {missiontimers_letters} {open}; #CLASS {missiontimers_letters} {open};
#NOP ======================= #VARIABLE {letter_types} {
#NOP ===== VARIABLES ===== {DLA}{DLA (close by\; smudged)}
#NOP ======================= {DLB}{DLB (close by\; handwriting)}
{DLC}{DLC (close by\; vague)}
#NOP [1 = Local, 2 = Close-by, 3 = Far Away, 4 = Distant Lands, 5 = Difficult Customer] {DLD}{DLD (close by\; city)}
#VAR {dead_letter_rewards} { {DLE}{DLE (far away\; smudged)}
{4 Ankh-Morpork dollars}{1} {DLF}{DLF (far away\; handwriting)}
{8 Ankh-Morpork dollars}{2} {DLG}{DLG (far away\; vague)}
{3 Djelian talents and 5 Djelian tooni}{3} {DLH}{DLH (far away\; city)}
{4 Lancre crowns and 2 Lancre shillings}{3} {DLI}{DLI (difficult customer)}
{7 Ephebian decadrachmae and 2 Ephebian stater}{3} };
{2 Ankh-Morpork ten-dollars}{3}
{2 Genuan forins and 5 Genuan livres}{3}
{1 Klatchian ten dinar and 2 Klatchian two dinar coins}{3}
{1 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu}{3}
{7 Lancre crowns and 5 Lancre shillings}{4}
{2 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu}{4}
{6 Djelian talents and 5 Djelian tooni}{4}
{4 Genuan forins and 3 Genuan livres}{4}
{3 Ankh-Morpork ten-dollars and 2 Ankh-Morpork dollars}{4}
{1 Ephebian mina and 5 Ephebian decadrachmae}{4}
{3 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu}{5}
{4 Ankh-Morpork ten-dollars and 5 Ankh-Morpork dollars}{5}
{1 Lancre sovereign and 1 Lancre tencrown}{5}
{2 Ephebian minae}{5}
{1 Genuan ducat and 2 Genuan forins}{5}
}
#VARIABLE {missions[letter]} { #VARIABLE {missions[letter]} {
{last_difficulty}{0} {last_difficulty}{0}
} }
#nop Capture offering to deliver a letter;
#ALIAS {^offer to deliver {(d|D)[A-z]{2}}$} {
#send {%0};
#format {missions[letter][last_difficulty]} {%u} {%1};
};
#nop Capture offering to return a letter;
#NOP ======================= #ALIAS {return letter} {
#NOP ===== Aliases ===== #send {return letter};
#NOP ======================= #format {missions[letter][retry_list][$GMCP[charinfo][capname]]} {%T};
/letter_returned;
};
#ACTION {^You offer to give an? {.+?} letter to Frank.$} {
#format {missions[letter][retry_list][$GMCP[charinfo][capname]]} {%T};
#nop [missions[letter][last_difficulty]];
/letter_returned;
};
#ALIAS {/letter_returned} { #ALIAS {/letter_returned} {
#format {missions[letter][retry_list][$GMCP[charinfo][capname]]} {%T}; #format {missions[letter][retry_list][$GMCP[charinfo][capname]]} {%T};
@ -45,7 +40,7 @@
#line sub variable { #line sub variable {
#format {delayname} {letter_retry_%s} {$GMCP[charinfo][capname]}; #format {delayname} {letter_retry_%s} {$GMCP[charinfo][capname]};
#delay {$delayname} { #delay {$delayname} {
#format {letter_timer_line} {%c[MT] %c*%c %s can now request another letter from Frank.} {bold blue} {bold yellow} {bold blue} {$GMCP[charinfo][capname]}; #format {letter_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now request another letter from Frank.<099>} {$GMCP[charinfo][capname]};
#echo {$letter_timer_line}; #echo {$letter_timer_line};
#unvar {letter_timer_line}; #unvar {letter_timer_line};
@ -55,127 +50,78 @@
#unvar {delayname}; #unvar {delayname};
}; };
#ALIAS {^return letter$} { #nop Capture being rewarded for completing delivery of the letter;
#send { return letter}; #ACTION {^You have been awarded {[0-9]{1,7}} experience points for delivering this letter.$} {
/letter_returned #local {last_difficulty} {$missions[letter][last_difficulty]};
};
#ALIAS {^give letter to {f|F}rank$} { #nop If we don't have a difficulty match, we can't act.;
#send { give letter to Frank}; #if {"$last_difficulty" == "0"} {
/letter_returned
};
#NOP =======================
#NOP ===== Actions =====
#NOP =======================
#ACTION {^You have been awarded %d experience points and given %2.$} {
#nop You have been awarded 60407 experience points and given 2 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu.
#var {missions[letter][last_difficulty]} {0};
#if {&dead_letter_rewards[%2]} {
#var {missions[letter][last_difficulty]} {$dead_letter_rewards[%2]};
};
};
#ACTION {^You salute smartly as you deliver a letter} {
#nop If we don't have a difficulty match, we can't act.
#if {"$missions[letter][last_difficulty]" == "0"} {
#return; #return;
}; };
#nop If we know the difficulty, set the appropriate timer;
#switch {$missions[letter][last_difficulty]} {
#case {1} {
#nop Local;
#if {&missions[letter][active_list][$GMCP[charinfo][capname]][local]} { #break; };
#format {missions[letter][active_list][$GMCP[charinfo][capname]][local]} {%T};
#line sub variable { #nop You have been awarded 60407 experience points and given 2 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu.;
#format {delayname} {letter_local_%s} {$GMCP[charinfo][capname]}; #format {missions[letter][active_list][$GMCP[charinfo][capname]][$last_difficulty]} {%T};
#delay {$delayname} {
#format {letter_timer_line} {%c[MT] %c*%c %s can now do another local letter.} {bold blue} {bold yellow} {bold blue} {$GMCP[charinfo][capname]};
#echo {$letter_timer_line};
#unvar {letter_timer_line};
#unvar {missions[letter][active_list][$GMCP[charinfo][capname]][local]}; #line sub variable {
} {3600}; #format {delayname} {letter_%s_%s} {$last_difficulty} {$GMCP[charinfo][capname]};
}; #delay {$delayname} {
#unvar {delayname}; #format {letter_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another "%c%s%c" letter.<099>} {$GMCP[charinfo][capname]} {Jade} {$letter_types[$last_difficulty]} {<acf>};
#echo {$letter_timer_line};
#unvar {letter_timer_line};
#unvar {missions[letter][active_list][$GMCP[charinfo][capname]][$last_difficulty]};
} {3600};
};
#unvar {delayname};
#variable {missions[letter][last_difficulty]} {0};
};
#ALIAS {/letters_recreate_delays} {
#format {current_time} {%T};
#nop == start with retry list;
#foreach {*missions[letter][retry_list][]} {player} {
#local {delay_time} {$missions[letter][retry_list][$player]};
#math {delay_time} {600 - ($current_time - $delay_time)};
#if {$delay_time < 1} {
#unvar {missions[letter][retry_list][$player]};
#continue;
}; };
#case {2} {
#nop Closeby;
#if {&missions[letter][active_list][$GMCP[charinfo][capname]][close]} { #break; };
#format {missions[letter][active_list][$GMCP[charinfo][capname]][close]} {%T};
#line sub variable { #line sub variable {
#format {delayname} {letter_close_%s} {$GMCP[charinfo][capname]}; #delay {$delay_time} {
#delay {$delayname} { #format {letter_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now request another letter from Frank.<099>} {$player};
#format {letter_timer_line} {%c[MT] %c*%c %s can now do another close-by letter.} {bold blue} {bold yellow} {bold blue} {$GMCP[charinfo][capname]}; #echo {$letter_timer_line};
#echo {$letter_timer_line}; #unvar {letter_timer_line};
#unvar {letter_timer_line};
#unvar {missions[letter][active_list][$GMCP[charinfo][capname]][close]}; #unvar {missions[letter][retry_list][$player]};
} {3600}; };
};
};
#nop == do all the difficulties;
#foreach {*missions[letter][active_list][]} {player} {
#foreach {*missions[letter][active_list][$player][]} {$difficulty} {
#local {delay_time} {$missions[letter][active_list][$player][$difficulty]};
#math {delay_time} {3600 - ($current_time - $delay_time)};
#if {$delay_time < 1} {
#unvar {missions[letter][active_list][$player][$difficulty]};
#continue;
};
#line sub variable {
#delay {$delay_time} {
#format {letter_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another "%c%s%c" letter.<099>} {$player} {Jade} {$letter_types[$difficulty]} {<acf>};
#echo {$letter_timer_line};
#unvar {letter_timer_line};
#unvar {missions[letter][active_list][$player][$difficulty]};
};
}; };
#unvar {delayname};
};
#case {3} {
#nop Faraway;
#if {&missions[letter][active_list][$GMCP[charinfo][capname]][far]} { #break; };
#format {missions[letter][active_list][$GMCP[charinfo][capname]][far]} {%T};
#line sub variable {
#format {delayname} {letter_far_%s} {$GMCP[charinfo][capname]};
#delay {$delayname} {
#format {letter_timer_line} {%c[MT] %c*%c %s can now do another far away letter.} {bold blue} {bold yellow} {bold blue} {$GMCP[charinfo][capname]};
#echo {$letter_timer_line};
#unvar {letter_timer_line};
#unvar {missions[letter][active_list][$GMCP[charinfo][capname]][far]};
} {3600};
};
#unvar {delayname};
};
#case {4} {
#nop Distantland;
#if {&missions[letter][active_list][$GMCP[charinfo][capname]][distant]} { #break; };
#format {missions[letter][active_list][$GMCP[charinfo][capname]][distant]} {%T};
#line sub variable {
#format {delayname} {letter_distant_%s} {$GMCP[charinfo][capname]};
#delay {$delayname} {
#format {letter_timer_line} {%c[MT] %c*%c %s can now do another distant land letter.} {bold blue} {bold yellow} {bold blue} {$GMCP[charinfo][capname]};
#echo {$letter_timer_line};
#unvar {letter_timer_line};
#unvar {missions[letter][active_list][$GMCP[charinfo][capname]][distant]};
} {3600};
};
#unvar {delayname};
};
#case {5} {
#nop Difficultcustomer;
#if {&missions[letter][active_list][$GMCP[charinfo][capname]][difficult]} { #break; };
#format {missions[letter][active_list][$GMCP[charinfo][capname]][difficult]} {%T};
#line sub variable {
#format {delayname} {letter_difficult_%s} {$GMCP[charinfo][capname]};
#delay {$delayname} {
#format {letter_timer_line} {%c[MT] %c*%c %s can now do another difficult customer letter.} {bold blue} {bold yellow} {bold blue} {$GMCP[charinfo][capname]};
#echo {$letter_timer_line};
#unvar {letter_timer_line};
#unvar {missions[letter][active_list][$GMCP[charinfo][capname]][difficult]};
} {3600};
};
#unvar {delayname};
}; };
}; };
#var {missions[letter][last_difficulty]} {0};
}; };
#CLASS {missiontimers_letters} {close}; #CLASS {missiontimers_letters} {close};

View File

@ -24,7 +24,7 @@
#line sub variable { #line sub variable {
#format {delayname} {sailing_%s} {$GMCP[charinfo][capname]}; #format {delayname} {sailing_%s} {$GMCP[charinfo][capname]};
#delay {$delayname} { #delay {$delayname} {
#format {sailing_timer_line} {%c[MT] %c*%c %s can now do another sailing mission.} {bold blue} {bold yellow} {bold blue} {$GMCP[charinfo][capname]}; #format {sailing_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another sailing mission.<099>} {$GMCP[charinfo][capname]};
#echo {$sailing_timer_line}; #echo {$sailing_timer_line};
#unvar {$sailing_timer_line}; #unvar {$sailing_timer_line};
@ -38,6 +38,9 @@
#ACTION {^As you {finish|complete} the {first|second|third} leg of your impossible voyage%*\(%d xp\)$} { #ACTION {^As you {finish|complete} the {first|second|third} leg of your impossible voyage%*\(%d xp\)$} {
#math {missions[sailing][experience]} {$missions[sailing][experience] + %4}; #math {missions[sailing][experience]} {$missions[sailing][experience] + %4};
}; };
#ACTION {^As the {kraken|serpent} sinks back beneath the waves, you {feel like the experience of confronting a terrifying sea monster has been enlightening|feel more experienced for having faced it and survived|feel your experiences settling into the back of your mind|think about the experiences you've had so far}. (%3 xp)$} {
#math {missions[sailing][experience]} {$missions[sailing][experience] + %3};
};
#NOP ==[Final XP trigger]==; #NOP ==[Final XP trigger]==;
#ACTION {^As you {finish|complete} the final leg of your impossible voyage%*\(%1 xp\)%*$} { #ACTION {^As you {finish|complete} the final leg of your impossible voyage%*\(%1 xp\)%*$} {
@ -58,81 +61,83 @@
#showme {<169>[sail] No sailing experience to report.<099>}; #showme {<169>[sail] No sailing experience to report.<099>};
}; };
}; };
#ALIAS {sailreport} {
#showme {<169>[sail] Sailing Report: $missions[sailing][experience] xp earned in @display_timestamp{$missions[sailing][duration]}.<099>};
};
#NOP ==[Monster identification highlights]==; #NOP ==[Monster identification highlights]==;
#SUB {^A massive {kraken|sea serpent} crests} {A massive <168>%1<099> crests}; #SUB {^A massive {kraken|sea serpent} crests} {A massive <168>%1<900> crests};
#SUB {^The faint popping sounds of suction cups} {The faint popping sounds of <168>suction cups<099>}; #SUB {^The faint popping sounds of suction cups} {The faint popping sounds of <168>suction cups<900>};
#SUB {^The grinding of scales against wood} {The grinding of <168>scales<099> against wood}; #SUB {^The grinding of scales against wood} {The grinding of <168>scales<900> against wood};
#NOP ==[Monster goes away]==; #NOP ==[Monster goes away]==;
#SUB {^As the {kraken|serpent} sinks back beneath the waves} {As the <168>%1<099> sinks back beneath the waves}; #SUB {^As the {kraken|serpent} sinks back beneath the waves%2} {As the <168>%1<900> sinks back beneath the waves%2};
#NOP ==[Stage transitions]==; #NOP ==[Stage transitions]==;
#ACTION {^{The ship leaves the huge bank of fog as the weather calms.|The howling winds fade away as the weather calms.|The worst of the thunderstorm passes and the clouds overhead lighten and scatter to the winds as the weather calms.|The rain of hailstones slowly peters off and the clouds overhead lighten and scatter to the winds as the weather calms.|The last of the fog seeping in from overhead dissipates.|The sound of hailstones pounding overhead gradually peters out.|The sound of thunder overhead gradually peters out.|The faint howl of the wind overhead gradually peters out.}$} { #ACTION {^{The ship leaves the huge bank of fog as the weather calms.|The howling winds fade away as the weather calms.|The worst of the thunderstorm passes and the clouds overhead lighten and scatter to the winds as the weather calms.|The rain of hailstones slowly peters off and the clouds overhead lighten and scatter to the winds as the weather calms.|The last of the fog seeping in from overhead dissipates.|The sound of hailstones pounding overhead gradually peters out.|The sound of thunder overhead gradually peters out.|The faint howl of the wind overhead gradually peters out.}$} {
#showme {<168>[sail] Calm Stage Begins<099>}; #showme {<168>[sail] ### Calm Stage Begins ###<099>};
}; };
#ACTION {^{The previously calm weather fades away as grey clouds gather overhead and hailstones begin to rain from the sky.|The howling winds fade away as grey clouds gather overhead and hailstones begin to rain from the sky.|The worst of the thunderstorm passes as hailstones begin to rain from the sky.|The ship leaves the huge bank of fog as grey clouds gather overhead and hailstones begin to rain from the sky.|The sound of pounding hail starts to filter through from the deck above.|The sound of thunder overhead gradually peters out and is replaced by the sound of pounding hail.|The faint howl of the wind overhead gradually peters out and is replaced by the sound of pounding hail.|The last of the fog seeping in from overhead dissipates as the sound of pounding hail starts to filter through from the deck above.}$} { #ACTION {^{The previously calm weather fades away as grey clouds gather overhead and hailstones begin to rain from the sky.|The howling winds fade away as grey clouds gather overhead and hailstones begin to rain from the sky.|The worst of the thunderstorm passes as hailstones begin to rain from the sky.|The ship leaves the huge bank of fog as grey clouds gather overhead and hailstones begin to rain from the sky.|The sound of pounding hail starts to filter through from the deck above.|The sound of thunder overhead gradually peters out and is replaced by the sound of pounding hail.|The faint howl of the wind overhead gradually peters out and is replaced by the sound of pounding hail.|The last of the fog seeping in from overhead dissipates as the sound of pounding hail starts to filter through from the deck above.}$} {
#showme {<168>[sail] Hail Stage Begins<099>}; #showme {<168>[sail] ### Hail Stage Begins ###<099>};
}; };
#ACTION {^{The previously calm weather fades away as a rimwards gale starts building up, the sheer force of the wind pushing the ship backwards.|The worst of the thunderstorm passes and the clouds overhead lighten and scatter to the winds just as a rimwards gale starts building up, the sheer force of the wind pushing the ship backwards.|The rain of hailstones slowly peters off and the clouds overhead lighten and scatter to the winds just as a rimwards gale starts building up, the sheer force of the wind pushing the ship backwards.|The ship leaves the huge bank of fog as a rimwards gale starts building up, the sheer force of the wind pushing the ship backwards.|The faint howling of what must be quite a strong wind begins to filter through the deck above.|The last of the fog seeping in from overhead dissipates as the faint howling of what must be quite a strong wind begins to filter through the deck above.|The sound of hailstones pounding overhead gradually peters out and is replaced by the faint howling of what must be quite a strong wind.|The sound of thunder overhead gradually peters out and is replaced by the faint howling of what must be quite a strong wind.}$} { #ACTION {^{The previously calm weather fades away as a rimwards gale starts building up, the sheer force of the wind pushing the ship backwards.|The worst of the thunderstorm passes and the clouds overhead lighten and scatter to the winds just as a rimwards gale starts building up, the sheer force of the wind pushing the ship backwards.|The rain of hailstones slowly peters off and the clouds overhead lighten and scatter to the winds just as a rimwards gale starts building up, the sheer force of the wind pushing the ship backwards.|The ship leaves the huge bank of fog as a rimwards gale starts building up, the sheer force of the wind pushing the ship backwards.|The faint howling of what must be quite a strong wind begins to filter through the deck above.|The last of the fog seeping in from overhead dissipates as the faint howling of what must be quite a strong wind begins to filter through the deck above.|The sound of hailstones pounding overhead gradually peters out and is replaced by the faint howling of what must be quite a strong wind.|The sound of thunder overhead gradually peters out and is replaced by the faint howling of what must be quite a strong wind.}$} {
#showme {<168>[sail] Gale Stage Begins<099>}; #showme {<168>[sail] ### Gale Stage Begins ###<099>};
}; };
#ACTION {^{The previously calm weather fades away as a growing wind sweeps in dark clouds from all directions, lightning flashes and thunder booms, the beginning of a thunderstorm.|The ship leaves the huge bank of fog as a growing wind sweeps in dark clouds from all directions, lightning flashes and thunder booms, the beginning of a thunderstorm.|The howling winds fade away as a growing wind sweeps in dark clouds from all directions, lightning flashes and thunder booms, the beginning of a thunderstorm.|The rain of hailstones slowly peters off as lightning flashes and thunder booms, the beginning of a thunderstorm.|The rumble of thunder comes through from the deck above.|The sound of hailstones pounding overhead gradually peters out and is replaced by the rumble of thunder.|The last of the fog seeping in from overhead dissipates as the rumble of thunder comes through from the deck above.|The faint howl of the wind overhead gradually peters out and is replaced by the rumble of thunder.}$} { #ACTION {^{The previously calm weather fades away as a growing wind sweeps in dark clouds from all directions, lightning flashes and thunder booms, the beginning of a thunderstorm.|The ship leaves the huge bank of fog as a growing wind sweeps in dark clouds from all directions, lightning flashes and thunder booms, the beginning of a thunderstorm.|The howling winds fade away as a growing wind sweeps in dark clouds from all directions, lightning flashes and thunder booms, the beginning of a thunderstorm.|The rain of hailstones slowly peters off as lightning flashes and thunder booms, the beginning of a thunderstorm.|The rumble of thunder comes through from the deck above.|The sound of hailstones pounding overhead gradually peters out and is replaced by the rumble of thunder.|The last of the fog seeping in from overhead dissipates as the rumble of thunder comes through from the deck above.|The faint howl of the wind overhead gradually peters out and is replaced by the rumble of thunder.}$} {
#showme {<168>[sail] Storm Stage Begins<099>}; #showme {<168>[sail] ### Storm Stage Begins ###<099>};
}; };
#ACTION {^{The previously calm weather fades away as the ship enters a huge bank of fog.|The rain of hailstones slowly peters off and the clouds overhead lighten and scatter to the winds just as the ship enters a huge bank of fog.|The worst of the thunderstorm passes and the clouds overhead lighten and scatter to the winds just as the ship enters a huge bank of fog.|The howling winds fade away as the ship enters a huge bank of fog.|Wisps of fog begin to drift in through tiny gaps in the deck above.|The sound of hailstones pounding overhead gradually peters out as wisps of fog begin to drift in through tiny gaps in the deck above.|The sound of thunder overhead gradually peters out as wisps of fog begin to drift in through tiny gaps in the deck above.|The faint howl of the wind overhead gradually peters out as wisps of fog begin to drift in through tiny gaps in the deck above.}$} { #ACTION {^{The previously calm weather fades away as the ship enters a huge bank of fog.|The rain of hailstones slowly peters off and the clouds overhead lighten and scatter to the winds just as the ship enters a huge bank of fog.|The worst of the thunderstorm passes and the clouds overhead lighten and scatter to the winds just as the ship enters a huge bank of fog.|The howling winds fade away as the ship enters a huge bank of fog.|Wisps of fog begin to drift in through tiny gaps in the deck above.|The sound of hailstones pounding overhead gradually peters out as wisps of fog begin to drift in through tiny gaps in the deck above.|The sound of thunder overhead gradually peters out as wisps of fog begin to drift in through tiny gaps in the deck above.|The faint howl of the wind overhead gradually peters out as wisps of fog begin to drift in through tiny gaps in the deck above.}$} {
next_stage Fog; #showme {<168>[sail] ### Fog Stage Begins ###<099>};
#showme {<168>[sail] Fog Stage Begins<099>};
}; };
#NOP ==[Ship starts/stops moving]==; #NOP ==[Ship starts/stops moving]==;
#HIGHLIGHT {^{Steam whistles from the smokestack as the ship begins to move|You feel the ship begin to move}%*} {bold cyan underscore}; #HIGHLIGHT {^{Steam whistles from the smokestack as the ship begins to move|You feel the ship begin to move}%*} {Cyan underscore};
#HIGHLIGHT {^{You feel the ship slow to a halt.|The steam from the smokestack dwindles to nothing as the ship slows to a halt.}} {bold cyan underscore}; #HIGHLIGHT {^{You feel the ship slow to a halt.|The steam from the smokestack dwindles to nothing as the ship slows to a halt.}} {Cyan underscore};
#NOP ==[Overboard drag messages]==; #NOP ==[Overboard drag messages]==;
#SUB {^The ship steams off, dragging you along by the rope tied around your waist.} {The ship steams off, dragging you along by the <128>rope<099> tied around your waist.}; #SUB {^The ship steams off, dragging you along by the rope tied around your waist.} {The ship steams off, dragging you along by the <128>rope<900> tied around your waist.};
#SUB {^The ship steams off and you hurriedly swim along to keep up with it.} {The ship steams off and you hurriedly <118>swim along<099> to keep up with it.}; #SUB {^The ship steams off and you hurriedly swim along to keep up with it.} {The ship steams off and you hurriedly <118>swim along<900> to keep up with it.};
#NOP ==[Monster phase highlights - Serpent]==; #NOP ==[Monster phase highlights - Serpent]==;
#HIGHLIGHT {^The sea serpent {reaches for|lunges towards|strikes forward swiftly at} you from %1. Run!} {bold red}; #SUB {^The sea serpent {reaches for|lunges towards|strikes forward swiftly at} you from %2. Run!} {<118>The sea serpent %1 you from <cfa>%2<118>. <488>Run<088><118>!};
#HIGHLIGHT {^%1, the sea serpent {reaches for|lunges towards|strikes forward swiftly at} you from %2. Run!} {bold red}; #SUB {^%1, the sea serpent {reaches for|lunges towards|strikes forward swiftly at} you from %3. Run!} {<118>%1, the sea serpent %2 you from <cfa>%3<118>. <488>Run<088><118>!};
#HIGHLIGHT {^The sea serpent {reaches for|lunges towards|strikes forward swiftly at} %1.$} {bold blue}; #HIGHLIGHT {^The sea serpent {reaches for|lunges towards|strikes forward swiftly at} %1.$} {Blue};
#HIGHLIGHT {^%1, the sea serpent {reaches for|lunges towards|strikes forward swiftly at} %2.$} {bold blue}; #HIGHLIGHT {^%1, the sea serpent {reaches for|lunges towards|strikes forward swiftly at} %2.$} {Blue};
#HIGHLIGHT {^The sea serpent aborts its strike and draws its head back, looking for its missing prey.} {light green}; #HIGHLIGHT {^The sea serpent aborts its strike and draws its head back, looking for its missing prey.} {light green};
#HIGHLIGHT {^The sea serpent's venomous fangs gouge long scratches in the deck as its strike misses.} {light green}; #HIGHLIGHT {^The sea serpent's venomous fangs gouge long scratches in the deck as its strike misses.} {light green};
#HIGHLIGHT {^The sea serpent chomps down on nothing but air, its prey having escaped.} {light green}; #HIGHLIGHT {^The sea serpent chomps down on nothing but air, its prey having escaped.} {light green};
#NOP ==[Monster phase highlights - Kraken]==; #NOP ==[Monster phase highlights - Kraken]==;
#HIGHLIGHT {^{Quick as lightning|Striking like a cobra|In the blink of an eye|With a blur of speed|Moving too fast to see}, the tentacle snakes around %1 legs and coils its way up to {your|his|her|its} torso, binding {you|him|her|it} in an unescapable embrace.} {bold red}; #SUB {^{Quick as lightning|Striking like a cobra|In the blink of an eye|With a blur of speed|Moving too fast to see}, the tentacle snakes around %2 legs and coils its way up to {your|his|her|its} torso, binding {you|him|her|it} in an unescapable embrace.} {<118>%1, the tentacle snakes around <fac>%2<118> legs and coils its way up to %3 torso, binding %4 in an unescapable embrace.};
#HIGHLIGHT {^%1 swing{s?} {your|his|her|its} %2at the tentacle wrapped around %2, {cutting|scoring} a {shallow|small|light} scratch into its rubbery skin.} {bold blue}; #HIGHLIGHT {^%1 swing{s?} {your|his|her|its} %2at the tentacle wrapped around %2, {cutting|scoring} a {shallow|small|light} scratch into its rubbery skin.} {Blue};
#HIGHLIGHT {^The tentacle wrapped around %1 unwraps itself and {slips|retreats|retracts} back into the sea.} {bold white}; #HIGHLIGHT {^The tentacle wrapped around %1 unwraps itself and {slips|retreats|retracts} back into the sea.} {White};
#HIGHLIGHT {^The tentacle coils tighter, making %1 go blue in the face.} {bold red}; #HIGHLIGHT {^The tentacle coils tighter, making %1 go blue in the face.} {Red};
#HIGHLIGHT {^Limbs bound tightly by the kraken's tentacle, %1 struggles to move but gets nowhere.} {yellow}; #HIGHLIGHT {^Limbs bound tightly by the kraken's tentacle, %1 struggles to move but gets nowhere.} {yellow};
#HIGHLIGHT {^%1 looks pained as the tentacle slowly constricts the life out of {her|him|it}.} {bold red}; #HIGHLIGHT {^%1 looks pained as the tentacle slowly constricts the life out of {her|him|it}.} {Red};
#HIGHLIGHT {^You feel your bones creaking as the tentacle slowly constricts the life out of you.} {bold red}; #HIGHLIGHT {^You feel your bones creaking as the tentacle slowly constricts the life out of you.} {Red};
#NOP ==[Fire related highlights]==; #NOP ==[Fire related highlights]==;
#SUB {^Long shadows dance as flickering firelight from %1 {blazes into|illuminates|casts light on} the room.} {Long shadows dance as flickering firelight from <419>%1<099> %2 the room.}; #SUB {^Long shadows dance as flickering firelight from %1 {blazes into|illuminates|casts light on} the room.} {Long shadows dance as flickering firelight from <419>%1<900> %2 the room.};
#SUB {^Flickering firelight can be seen to %1{\.$|, }} {Flickering firelight can be seen to <119>%1<099>%2}; #SUB {^Flickering firelight can be seen to %1{\.$|, }} {Flickering firelight can be seen to <119>%1<900>%2};
#HIGHLIGHT {^A small fire has started here.} {bold orange}; #HIGHLIGHT {^A small fire has started here.} {Orange};
#HIGHLIGHT {^Several small blazes are eagerly licking at the floorboards.} {bold orange}; #HIGHLIGHT {^Several small blazes are eagerly licking at the floorboards.} {Orange};
#HIGHLIGHT {^The room is filled with a huge conflagration, sparks spilling out into the nearby rooms.} {bold orange}; #HIGHLIGHT {^The room is filled with a huge conflagration, sparks spilling out into the nearby rooms.} {Orange};
#HIGHLIGHT {^Fire fills the room, burning merrily without regard for the structural integrity of the ship.} {bold orange}; #HIGHLIGHT {^Fire fills the room, burning merrily without regard for the structural integrity of the ship.} {Orange};
#NOP ==[Ice and Seaweed highlights]==; #NOP ==[Ice and Seaweed highlights]==;
#HIGHLIGHT {%1. It sounds like ice might be forming on the hull!$} {<aef>}; #HIGHLIGHT {%1. It sounds like ice might be forming on the hull!$} {<aef>};
#HIGHLIGHT {%*ice has formed%*$} {<aef>}; #HIGHLIGHT {%*ice has formed%*$} {<aef>};
#HIGHLIGHT {%*slippery layer of ice%*$} {<aef>}; #HIGHLIGHT {%*slippery layer of ice%*$} {<aef>};
#HIGHLIGHT {^The dire seaweed clinging onto the hull glows faintly, %1 its way {through|into} the {hull|wood|ship}.$} {bold jade}; #HIGHLIGHT {^The dire seaweed clinging onto the hull glows faintly, %1 its way {through|into} the {hull|wood|ship}.$} {Jade};
#HIGHLIGHT {^The ship plows through a field of floating dire seaweed, some of which glows green and latches onto the hull aggressively!$} {bold jade}; #HIGHLIGHT {^The ship plows through a field of floating dire seaweed, some of which glows green and latches onto the hull aggressively!$} {Jade};
#NOP ==[Wrangling job highlights]==; #NOP ==[Wrangling job highlights]==;
#SUB {According to the dials on the side, it seems to be %1 and %2\.} {According to the dials on the side, it seems to be <039>%1<099> and <039>%2<099>\.}; #SUB {According to the dials on the side, it seems to be %1 and %2\.} {According to the dials on the side, it seems to be <039>%1<900> and <039>%2<900>\.};
#HIGHLIGHT {^%*A little bell on the MK I Boiling Engine rings to indicate that it's out of water.%*$} {light red underscore}; #HIGHLIGHT {^%*A little bell on the MK I Boiling Engine rings to indicate that it's out of water.%*$} {light red underscore};
#HIGHLIGHT {^%*dragon looks up at %* accidentally spraying flame over the floorboards\.$} {light red underscore}; #HIGHLIGHT {^%*dragon looks up at %* accidentally spraying flame over the floorboards\.$} {light red underscore};
#HIGHLIGHT {^%*swamp dragon leaps upon the squeaky toy animal and spends an enjoyable three and a half minutes tearing it to squeaking shreds. Finally, it climbs atop the pile of rubber scraps and sits there triumphantly.%*$} {light green}; #HIGHLIGHT {^%*swamp dragon leaps upon the squeaky toy animal and spends an enjoyable three and a half minutes tearing it to squeaking shreds. Finally, it climbs atop the pile of rubber scraps and sits there triumphantly.%*$} {light green};
@ -145,40 +150,65 @@
#HIGHLIGHT {^%*where it sits down and starts breathing fire onto the Boiling Engine.} {green}; #HIGHLIGHT {^%*where it sits down and starts breathing fire onto the Boiling Engine.} {green};
#NOP ==[Deckhanding job highlights]==; #NOP ==[Deckhanding job highlights]==;
#HIGHLIGHT {You manage to shatter all the reamining sea ice on the hull.} {bold blue}; #HIGHLIGHT {You manage to shatter all the reamining sea ice on the hull.} {Cyan};
#HIGHLIGHT {You manage to hack off all the reamining dire seaweed from the hull.} {bold green}; #HIGHLIGHT {You manage to hack off all the reamining dire seaweed from the hull.} {Jade};
#HIGHLIGHT {^You feel too tired to tie any knots at the moment.$} {red}; #HIGHLIGHT {^You feel too tired to tie any knots at the moment.$} {red};
#HIGHLIGHT {^You tie %1 of rope securely in a %2 knot around %3 waist.$} {bold yellow}; #HIGHLIGHT {^You tie %1 of rope securely in a %2 knot around %3 waist.$} {Yellow};
#HIGHLIGHT {^Under the strain, your rope gives up the ghost and unravels completely into wispy threads that float away in the wind.$} {light red underscore}; #HIGHLIGHT {^Under the strain, your rope gives up the ghost and unravels completely into wispy threads that float away in the wind.$} {light red underscore};
#HIGHLIGHT {^You tie one of the cargo crates down securely %* with {(one of)?} the coil{(s)?} of rope, preventing it from sliding.} {light green}; #HIGHLIGHT {^You tie %1 cargo crates down securely %* with {the coil|one of the coils} of rope, preventing {them|it} from sliding.} {light green};
#HIGHLIGHT {^You tie one of the cargo crates down securely in a running bowline with the coil of rope, preventing it from sliding.} {light green}; #SUB {^You manage to {shatter|hack off} some of the {sea ice on|dire seaweed from} the hull.$} {You manage to %1 <bbb>some of the<900> %2 the hull.};
#HIGHLIGHT {colossal amount of sea ice} {red}; #SUB {^You manage to {shatter|hack off} all the remaining {sea ice on|dire seaweed from} the hull.$} {You manage to %1 <ecf>all the remaining<900> %2 the hull.};
#HIGHLIGHT {thick mass of sea ice} {red}; #HIGHLIGHT { colossal amount of sea ice} {red};
#HIGHLIGHT {thin layer of sea ice} {yellow}; #HIGHLIGHT { thick mass of sea ice} {red};
#HIGHLIGHT {few patches of sea ice} {yellow}; #HIGHLIGHT { thin layer of sea ice} {yellow};
#HIGHLIGHT {badly cracked} {red}; #HIGHLIGHT { few patches of sea ice} {yellow};
#HIGHLIGHT {rather dented} {yellow}; #HIGHLIGHT { badly cracked} {red};
#HIGHLIGHT {a little scuffed up} {yellow}; #HIGHLIGHT { rather dented} {yellow};
#HIGHLIGHT {in perfect condition} {green}; #HIGHLIGHT { a little scuffed up} {yellow};
#HIGHLIGHT {hanging on by a thread} {red}; #HIGHLIGHT { in perfect condition} {green};
#HIGHLIGHT {very frayed} {red}; #HIGHLIGHT { hanging on by a thread} {red};
#HIGHLIGHT {somewhat frayed} {yellow}; #HIGHLIGHT { very frayed} {red};
#HIGHLIGHT {a little frayed} {yellow}; #HIGHLIGHT { somewhat frayed} {yellow};
#HIGHLIGHT { a little frayed} {yellow};
#NOP ==[Helming job highlights]==; #NOP ==[Helming job highlights]==;
#HIGHLIGHT {^Caught in a strong backwards current, the ship shudders intensely as it zooms back a few miles.$} {light orange}; #HIGHLIGHT {^Caught in a strong backwards current, the ship shudders intensely as it zooms back a few miles.$} {light orange};
#HIGHLIGHT {^Caught in a strong forwards current, the ship vibrates intensely as it zooms ahead a few miles.$} {light green}; #HIGHLIGHT {^Caught in a strong forwards current, the ship vibrates intensely as it zooms ahead a few miles.$} {light green};
#HIGHLIGHT {The ship abruptly starts spinning in circles. After a few rounds, it manages to escape the whirlpool, heading in a different direction from before.} {bold yellow underscore}; #HIGHLIGHT {The ship abruptly starts spinning in circles. After a few rounds, it manages to escape the whirlpool, heading in a different direction from before.} {Yellow underscore};
#SUB {^The impact knocks the ship slightly off course to port.$} {<488><138>The impact knocks the ship slightly off course to port. <099><178>(TURN STARBOARD)<099>}; #SUB {^The impact knocks the ship slightly off course to %1.$} {The impact knocks the ship slightly off course to <488><afe>%1<900>.};
#SUB {^The impact knocks the ship slightly off course to starboard.$} {<488><138>The impact knocks the ship slightly off course to starboard. <099><178>(TURN PORT)<099>}; #SUB {^The powerful headwind causes the ship to drift off course towards %1.$} {The powerful headwind causes the ship to drift off course towards <488><afe>%1<900>.};
#SUB {^The powerful headwind causes the ship to drift off course towards port.$} {<488><138>The powerful headwind causes the ship to drift off course towards port. <099><178>(TURN STARBOARD)<099>}; #SUB {^A powerful gust of wind turns the ship toward %1, as if deliberately mocking all attempts to hold a steady course.$} {A powerful gust of wind turns the ship toward <488><afe>%1<900>, as if deliberately mocking all attempts to hold a steady course.};
#SUB {^The powerful headwind causes the ship to drift off course towards starboard.$} {<488><138>The powerful headwind causes the ship to drift off course towards starboard.<099><178>(TURN PORT)<099>}; #SUB {^Despite your crew's best efforts, the gusts of wind blow the ship off course in the %1 direction.$} {Despite your crew's best efforts, the gusts of wind blow the ship off course in the <488><afe>%1<900> direction.};
#NOP ==[Helming directionality or compass highlights]==; #NOP ==[Helming directionality or compass highlights]==;
#SUB {^From the compass, you can see that the ship is heading %1.} {From the compass, you can see that the ship is heading <868>%1<099>.}; #SUB {^From the compass, you can see that the ship is heading %1.} {From the compass, you can see that the ship is heading <868>%1<099>.};
#HIGHLIGHT {{Gazing up at the stars|Noting the positions of some key constellations|Reading the stars like a chart|Squinting up at the sun|Carefully looking up out of the corner of your eye|From a careful squint at the sun}, you {are confident|decide|determine|are able to ascertain|decide from the sun's position|determine from the sun's position|guess} that the ship is {currently heading|heading|heading directly} %4.} {bold pink}; #HIGHLIGHT {^You gaze up at the stars, but are too tired to figure out anything useful.$} {Red};
#HIGHLIGHT {{Gazing up at the stars|Noting the positions of some key constellations|Reading the stars like a chart|Squinting up at the sun|Carefully looking up out of the corner of your eye|From a careful squint at the sun}, you {are confident|decide|determine|are able to ascertain|decide from the sun's position|determine from the sun's position|guess} that the ship is {currently heading|heading|heading directly} %4 and that you're %5 rimwards of {Ankh-Morpork|Ephebe}.$} {bold pink}; #HIGHLIGHT {^You gaze up at the stars, but can't figure out anything from them.$} {Red underscore};
#HIGHLIGHT {{Gazing up at the stars|Noting the positions of some key constellations|Reading the stars like a chart|Squinting up at the sun|Carefully looking up out of the corner of your eye|From a careful squint at the sun}, you {are confident|decide|determine|are able to ascertain|decide from the sun's position|determine from the sun's position|guess} that the ship is {currently heading|heading|heading directly} %4 and that you're %5 rimwards and %6 miles %7 of {Ankh-Morpork|Ephebe}.$} {bold pink}; #SUB {^{Gazing up at the stars|Noting the positions of some key constellations|Reading the stars like a chart|Squinting up at the sun|Carefully looking up out of the corner of your eye|From a careful squint at the sun}, you {are confident|decide|determine|are able to ascertain|decide from the sun's position|determine from the sun's position|guess} that the ship is {currently heading|heading|heading directly} {hubwards|turnwise-hubwards|widdershins-hubwards|rimwards|turnwise-rimwards|widdershins-rimwards|turnwise|widdershins}%*} {<058>%1, you %2 that the ship is %3 <168>%4<058>%5};
#SUB {^{Gazing up at the stars|Noting the positions of some key constellations|Reading the stars like a chart|Squinting up at the sun|Carefully looking up out of the corner of your eye|From a careful squint at the sun}, you {are confident|decide|determine|are able to ascertain|decide from the sun's position|determine from the sun's position|guess} that the ship must be {currently heading|heading|heading directly} {hubwards|turnwise-hubwards|widdershins-hubwards|rimwards|turnwise-rimwards|widdershins-rimwards|turnwise|widdershins}%*} {<058>%1, you %2 that the ship must be %3 <138>%4<058>%5};
#ALIAS {/sailing_recreate_delays} {
#format {current_time} {%T};
#foreach {*missions[sailing][active_list][]} {player} {
#local {delay_time} {$missions[sailing][active_list][$player]};
#math {delay_time} {7200 - ($current_time - $delay_time)};
#if {$delay_time < 1} {
#unvar {missions[sailing][active_list][$player]};
#continue;
};
#line sub variable {
#delay {$delay_time} {
#format {sailing_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another sailing mission.<099>} {$player};
#echo {$sailing_timer_line};
#unvar {sailing_timer_line};
#unvar {missions[sailing][active_list][$player]};
};
};
};
};
#CLASS {missiontimers_sailing} {close}; #CLASS {missiontimers_sailing} {close};

View File

@ -42,7 +42,7 @@
#line sub variable { #line sub variable {
#delay {600} { #delay {600} {
#format {sausage_retry_line} {%c[MT] %c*%c %s%c can now ask for a new sausage mission from Sam Slager.} {bold blue} {bold yellow} {bold green}{$GMCP[charinfo][capname]} {bold blue}; #format {sausage_retry_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s<acf>can now ask for a new sausage mission from Sam Slager.<099>} {$GMCP[charinfo][capname]};
#echo {$sausage_retry_line}; #echo {$sausage_retry_line};
#unvar {sausage_retry_line}; #unvar {sausage_retry_line};
@ -61,7 +61,7 @@
#line sub variable { #line sub variable {
#format {delayname} {sausage_easy_%s} {$GMCP[charinfo][capname]}; #format {delayname} {sausage_easy_%s} {$GMCP[charinfo][capname]};
#delay {$delayname} { #delay {$delayname} {
#format {sausage_timer_line} {%c[MT] %c*%c %s can now do another unspiced sausage mission.} {bold blue} {bold yellow} {bold blue} {$GMCP[charinfo][capname]}; #format {sausage_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another unspiced sausage mission.<099>} {$GMCP[charinfo][capname]};
#echo {$sausage_timer_line}; #echo {$sausage_timer_line};
#unvar {sausage_timer_line}; #unvar {sausage_timer_line};
@ -76,7 +76,7 @@
#line sub variable { #line sub variable {
#format {delayname} {sausage_hard_%s} {$GMCP[charinfo][capname]}; #format {delayname} {sausage_hard_%s} {$GMCP[charinfo][capname]};
#delay {$delayname} { #delay {$delayname} {
#format {sausage_timer_line} {%c[MT] %c*%c %s can now do another spiced sausage mission.} {bold blue} {bold yellow} {bold blue} {$GMCP[charinfo][capname]}; #format {sausage_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another spiced sausage mission.<099>} {$GMCP[charinfo][capname]};
#echo {$sausage_timer_line}; #echo {$sausage_timer_line};
#unvar {sausage_timer_line}; #unvar {sausage_timer_line};
@ -88,6 +88,72 @@
}; };
}; };
#ALIAS {/sausage_recreate_delays} {
#format {current_time} {%T};
#nop == start with retry list;
#foreach {*missions[sausage][retry_list][]} {player} {
#local {delay_time} {$missions[sausage][retry_list][$player]};
#math {delay_time} {600 - ($current_time - $delay_time)};
#if {$delay_time < 1} {
#unvar {missions[sausage][retry_list][$player]};
#continue;
};
#line sub variable {
#delay {$delay_time} {
#format {sausage_retry_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s<acf> can now ask for a new sausage mission from Sam Slager.<099>} {$player};
#echo {$sausage_retry_line};
#unvar {sausage_retry_line};
#unvar {missions[sausage][retry_list][$player]};
};
};
};
#nop == easy and hard missions;
#foreach {*missions[sausage][active_list][]} {player} {
#if {&missions[sausage][active_list][$player][easy]} {
#local {delay_time} {$missions[sausage][active_list][$player][easy]};
#math {delay_time} {3600 - ($current_time - $delay_time)};
#if {$delay_time < 1} {
#unvar {missions[sausage][active_list][$player][easy]};
#continue;
};
#line sub variable {
#delay {$delay_time} {
#format {sausage_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another unspiced sausage mission.<099>} {$player};
#echo {$sausage_timer_line};
#unvar {sausage_timer_line};
#unvar {missions[sausage][active_list][$player][easy]};
};
};
};
#if {&missions[sausage][active_list][$player][hard]} {
#local {delay_time} {$missions[sausage][active_list][$player][hard]};
#math {delay_time} {3600 - ($current_time - $delay_time)};
#if {$delay_time < 1} {
#unvar {missions[sausage][active_list][$player][hard]};
#continue;
};
#line sub variable {
#delay {$delay_time} {
#format {sausage_timer_line} {<acf>[<fff>missions<acf>] <138>*<900><cfa> %s <acf>can now do another unspiced sausage mission.<099>} {$player};
#echo {$sausage_timer_line};
#unvar {sausage_timer_line};
#unvar {missions[sausage][active_list][$player][hard]};
};
};
};
};
};
#ALIAS {/sausage_mission_prep} { #ALIAS {/sausage_mission_prep} {
#action {You have four hours to deliver %%1 fresh %%2 sausages to Sam Slager.$} { #action {You have four hours to deliver %%1 fresh %%2 sausages to Sam Slager.$} {
/sausage_mission_start; /sausage_mission_start;

View File

@ -1,38 +1,56 @@
#class prompt kill;
#class prompt open;
#NOP == Prompt Update Function == #NOP == Prompt Update Function ==
#nop colors #nop colors
#function {tpa_col} #function {tpa_col}
{ {
#if {"%0" == "invisible"} #if {"%0" == "invisible"} {
#return <178>; #return <178>;
#if {"%0" == "dull red"} };
#if {"%0" == "dull red"} {
#return <018>; #return <018>;
#if {"%0" == "bright red"} };
#if {"%0" == "bright red"} {
#return <118>; #return <118>;
#if {"%0" == "wobbling orange"} };
#if {"%0" == "wobbling orange"} {
#return <fca><188>; #return <fca><188>;
#if {"%0" == "flickering yellow"} };
#if {"%0" == "flickering yellow"} {
#return <138>; #return <138>;
#return; };
#return <000>;
} }
#ALIAS {update_prompt} { #ALIAS {update_prompt} {
#nop XP monitor details; #nop XP monitor details;
xp_monitor; xp_monitor;
#format {prompt_xp} {%Gxp in %s (%Gk/h)} {$session_xp} {$uptime[display]} {$xprate};
#format {prompt_xp} {%Gxp in %s (%Gk/h)} {$window_xp} {$uptime[window][display]} {$xprate};
#format {prompt_xp} {%-40s} {$prompt_xp};
#nop TPA monitor details; #nop TPA monitor details;
#var {prompt_tpa} {}; #var {prompt_tpa} {};
#if {$tpa_status == 1} { #format {prompt_tpa} {%cTPA%c} {@tpa_col{$tpa_color}} {<098>};
#format {prompt_tpa} {%cTPA%c} {@tpa_col{$tpa_color}} {<098>};
};
#nop Quota monitor details; #nop Quota monitor details;
#var {prompt_quota} {}; #var {prompt_quota} {};
#if {&quota} { #if {&{quota}} {
#format {prompt_quota} {Quota: %s} {@quota_time_left{}}; #format {prompt_quota} {Quota: %-8s} {@quota_time_left{}};
}; };
#format {prompt_line} {%+5s %+40s %+15s} {$prompt_tpa} {$prompt_xp} {$prompt_quota}; #nop #format {prompt_line} {%+5s %+40s %+15s} {$prompt_tpa} {$prompt_xp} {$prompt_quota};
#showme {$prompt_line} {-1}; #nop #showme {$prompt_line} {2} {3};
} #showme {$prompt_tpa} {2} {3};
#showme {$prompt_xp} {2} {10};
#showme {$prompt_quota} {2} {48};
#nop Write to line 2, and start 3 columns in so we don't disrupt the box drawn;
#nop Put the time with seconds to the right hand side;
#format {clock} {%t} {%I:%M:%S %p};
#showme {$clock} {2} {-13};
};
#class prompt close;

View File

@ -87,7 +87,7 @@
#var {quota[reciepts]} {0}; #var {quota[reciepts]} {0};
#nop Quota period is over, announce it.; #nop Quota period is over, announce it.;
#format {quota_display_line} {%c[Quota] %c*%c %s's quota has %creset%c.<099>} {bold blue} {bold yellow} {bold blue} {$quota[who]} {bold red} {bold blue}; #format {quota_display_line} {<acf>[<fff>quota<acf>] <138>*<acf> %s's quota has <118>reset<acf>.<099>} {$quota[who]};
#showme {$quota_display_line}; #showme {$quota_display_line};
}; };
@ -95,19 +95,19 @@
#if {"$quota[alert]" == "on"} { #if {"$quota[alert]" == "on"} {
#nop Message an hour before; #nop Message an hour before;
#if {$quota[time][hour] == 0 && $quota[time][min] == 59 && $quota[time][sec] == 59} { #if {$quota[time][hour] == 0 && $quota[time][min] == 59 && $quota[time][sec] == 59} {
#format {quota_display_line} {%c[Quota] %c*%c %s's quota flips over in %cone hour%c.<099>} {bold blue} {bold yellow} {bold blue} {$quota[who]} {bold red} {bold blue}; #format {quota_display_line} {<acf>[<fff>quota<acf>] <138>*<acf> %s's quota flips over in <148>one hour<acf>.<099>} {$quota[who]};
#echo {$quota_display_line \a}; #echo {$quota_display_line \a};
}; };
#nop Message 30 minutes before; #nop Message 30 minutes before;
#if {$quota[time][hour] == 0 && $quota[time][min] == 29 && $quota[time][sec] == 59} { #if {$quota[time][hour] == 0 && $quota[time][min] == 29 && $quota[time][sec] == 59} {
#format {quota_display_line} {%c[Quota] %c*%c %s's quota flips over in %chalf an hour%c.<099>} {bold blue} {bold yellow} {bold blue} {$quota[who]} {bold red} {bold blue}; #format {quota_display_line} {<acf>[<fff>quota<acf>] <138>*<acf> %s's quota flips over in <148>half an hour<acf>.<099>} {$quota[who]};
#echo {$quota_display_line \a}; #echo {$quota_display_line \a};
}; };
#nop Message 10 minutes before; #nop Message 10 minutes before;
#if {$quota[time][hour] == 0 && $quota[time][min] == 9 && $quota[time][sec] == 59} { #if {$quota[time][hour] == 0 && $quota[time][min] == 9 && $quota[time][sec] == 59} {
#format {quota_display_line} {%c[Quota] %c*%c %s's quota flips over in %cten minutes%c.<099>} {bold blue} {bold yellow} {bold blue} {$quota[who]} {bold red} {bold blue}; #format {quota_display_line} {<acf>[<fff>quota<acf>] <138>*<acf> %s's quota flips over in <118>ten minutes<acf>.<099>} {$quota[who]};
#echo {$quota_display_line \a}; #echo {$quota_display_line \a};
}; };
}; };

View File

@ -2,8 +2,7 @@
#CLASS {xptimers} {open}; #CLASS {xptimers} {open};
#VARIABLE {xptimer_file} {logs/xptimers.log}; #VARIABLE {xptimer_file} {logs/xptimers.log};
#VARIABLE {xptimersyncdt_file} {logs/features/xptimers_syncdt.log}; #VARIABLE {xptimersync_file} {logs/features/xptimers_sync.tin};
#VARIABLE {xptimersyncvt_file} {logs/features/xptimers_syncvt.log};
#VARIABLE {killtimers} { #VARIABLE {killtimers} {
{Delbert}{ {Delbert}{
@ -186,7 +185,7 @@
{group}{true} {group}{true}
{respawn}{40} {respawn}{40}
} }
{the {Tang|Fang|Hong|McSweeney} captain}{ {the {Tang|Fang|Sung|Hong|McSweeney} captain}{
{time}{0} {time}{0}
{name}{bmarket} {name}{bmarket}
{group}{true} {group}{true}
@ -198,20 +197,20 @@
{group}{false} {group}{false}
{respawn}{40} {respawn}{40}
} }
} };
#VARIABLE {visittimers} { #VARIABLE {visittimers} {
{AMShades}{ {AMShades}{
{time}{0} {time}{0}
{name}{shades} {name}{shades}
{group}{false} {group}{false}
{respawn}{12} {respawn}{20}
} }
{ebff897af2b8bb6800a9a8636143099d0714be07}{ {ebff897af2b8bb6800a9a8636143099d0714be07}{
{time}{0} {time}{0}
{name}{smugglers} {name}{smugglers}
{group}{false} {group}{false}
{respawn}{12} {respawn}{20}
} }
{70546ec71867645ab5c51e9ce6087b75dcf4176f}{ {70546ec71867645ab5c51e9ce6087b75dcf4176f}{
{time}{0} {time}{0}
@ -267,7 +266,7 @@
{group}{false} {group}{false}
{respawn}{40} {respawn}{40}
} }
} };
#ALIAS {dtreset} { #ALIAS {dtreset} {
@ -279,7 +278,7 @@
#foreach {*visittimers[]} {spot} { #foreach {*visittimers[]} {spot} {
#format {visittimers[$spot][time]} {0}; #format {visittimers[$spot][time]} {0};
}; };
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting all spots to Unseen.} {<188><acf>} {Yellow} {<188><acf>}; #format {xptimer_message} {<acf>[<fff>hotspots<acf>] <138>*<acf> Resetting all spots to Unseen.<099>};
#echo {$xptimer_message}; #echo {$xptimer_message};
#variable {dtreset_all} {1}; #variable {dtreset_all} {1};
}; };
@ -295,11 +294,11 @@
#list {spot_groups} {find} {$killtimers[$spot][name]} {group_exists}; #list {spot_groups} {find} {$killtimers[$spot][name]} {group_exists};
#if {"$group_exists" == "0"} { #if {"$group_exists" == "0"} {
#list {spot_groups} {add} {$killtimers[$spot][name]}; #list {spot_groups} {add} {$killtimers[$spot][name]};
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting death timer for%c $killtimers[$spot][name]%c.} {<188><acf>} {Yellow} {<188><acf>} {Green} {<188><acf>}; #format {xptimer_message} {<acf>[<fff>hotspots<acf>] <138>*<acf> Resetting death timer for%c $killtimers[$spot][name]%c.<099>} {Green} {<acf>};
}; };
}; };
#else { #else {
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting death timer for%c $killtimers[$spot][name]%c.} {<188><acf>} {Yellow} {<188><acf>} {Green} {<188><acf>}; #format {xptimer_message} {<acf>[<fff>hotspots<acf>] <138>*<acf> Resetting death timer for%c $killtimers[$spot][name]%c.<099>} {Green} {<acf>};
}; };
#format {xp_message_check} {%L} {$xptimer_message}; #format {xp_message_check} {%L} {$xptimer_message};
@ -318,11 +317,11 @@
#list {spot_groups} {find} {$visittimers[$spot][name]} {group_exists}; #list {spot_groups} {find} {$visittimers[$spot][name]} {group_exists};
#if {"$group_exists" == "0"} { #if {"$group_exists" == "0"} {
#list {spot_groups} {add} {$visittimers[$spot][name]}; #list {spot_groups} {add} {$visittimers[$spot][name]};
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting visit timer for%c $visittimers[$spot][name]%c.} {<188><acf>} {Yellow} {<188><acf>} {Green} {<188><acf>}; #format {xptimer_message} {<acf>[<fff>hotspots<acf>] <138>*<acf> Resetting visit timer for%c $visittimers[$spot][name]%c.<099>} {Green} {<acf>};
}; };
}; };
#else { #else {
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting visit timer for%c $visittimers[$spot][name]%c.} {<188><acf>} {Yellow} {<188><acf>} {Green} {<188><acf>}; #format {xptimer_message} {<acf>[<fff>hotspots<acf>] <138>*<acf> Resetting visit timer for%c $visittimers[$spot][name]%c.<099>} {Green} {<acf>};
}; };
#format {xp_message_check} {%L} {$xptimer_message}; #format {xp_message_check} {%L} {$xptimer_message};
@ -334,7 +333,7 @@
}; };
#unvariable {dtreset_all}; #unvariable {dtreset_all};
} };
#ACTION {%1 deals the death blow to %2.} { #ACTION {%1 deals the death blow to %2.} {
#foreach {*killtimers[]} {spot} { #foreach {*killtimers[]} {spot} {
@ -342,14 +341,14 @@
#format {killtimers[$spot][time]} {%T}; #format {killtimers[$spot][time]} {%T};
}; };
}; };
} };
#ACTION {You kill %1.} { #ACTION {You kill %1.} {
#foreach {*killtimers[]} {spot} { #foreach {*killtimers[]} {spot} {
#regex {%1} {$spot} { #regex {%1} {$spot} {
#format {killtimers[$spot][time]} {%T}; #format {killtimers[$spot][time]} {%T};
}; };
}; };
} };
#FUNCTION {write_spot} { #FUNCTION {write_spot} {
#var {spotname} {%1}; #var {spotname} {%1};
@ -366,14 +365,41 @@
#math {mins} {($mins - (60 - 1)) / 60}; #math {mins} {($mins - (60 - 1)) / 60};
#nop Choose a color-code based on downtime; #nop Choose a color-code based on downtime;
#if {$mins > ($spotrespawn + 40)} { #nop #if {$mins > ($spotrespawn + 40)} {
#var {current_spot_color} {<099>}; #nop #var {current_spot_color} {<099>};
}; #nop };
#elseif {$mins > ($spotrespawn + 20)} { #nop #elseif {$mins > ($spotrespawn + 20)} {
#var {current_spot_color} {<119>}; #nop #var {current_spot_color} {<119>};
}; #nop };
#elseif {$mins >= $spotrespawn} { #nop #elseif {$mins >= $spotrespawn} {
#var {current_spot_color} {<139>}; #nop #var {current_spot_color} {<139>};
#nop };
#nop #else {
#nop #var {current_spot_color} {<099>};
#nop };
#nop 2/2026 changing scheme here;
#nop if rat is 40, 30-45 yellow, 45-60 red, beyond 60 miss;
#math {low_b} {$spotrespawn - 10};
#math {up_b} {$spotrespawn + 5};
#math {miss_b} {$spotrespawn + 20};
#nop if we're at or beyond the lower bound;
#if {$mins >= $low_b} {
#nop are we at or below upper bound? YELLOW;
#if {$mins <= $up_b} {
#var {current_spot_color} {<139>};
};
#nop are we beyond the miss zone? show grey;
#elseif {$mins > $miss_b} {
#var {current_spot_color} {<099>};
};
#nop otherwise we're in sweet spot, RED;
#else {
#var {current_spot_color} {<119>};
};
}; };
#else { #else {
#var {current_spot_color} {<099>}; #var {current_spot_color} {<099>};
@ -392,7 +418,7 @@
}; };
#return {$spotstring}; #return {$spotstring};
} };
#ALIAS {dt} { #ALIAS {dt} {
#format {current_time} {%T}; #format {current_time} {%T};
@ -454,7 +480,7 @@
}; };
#echo {\n}; #echo {\n};
} };
#ALIAS {/writetimerstofile} { #ALIAS {/writetimerstofile} {
#system {> $xptimer_file}; #system {> $xptimer_file};
@ -505,7 +531,7 @@
#continue; #continue;
}; };
#var {spotstring} {@write_spot{$visittimers[$spot][name];$visittimers[$spot][time];$visittimers[spot][respawn]}}; #var {spotstring} {@write_spot{$visittimers[$spot][name];$visittimers[$spot][time];$visittimers[$spot][respawn]}};
#line {log} {$xptimer_file} {$spotstring}; #line {log} {$xptimer_file} {$spotstring};
}; };
@ -513,7 +539,7 @@
#var {spotstring} {@write_spot{$spot;$spot_groups[$spot];$spot_groups_respawn[$spot]}}; #var {spotstring} {@write_spot{$spot;$spot_groups[$spot];$spot_groups_respawn[$spot]}};
#line {log} {$xptimer_file} {$spotstring}; #line {log} {$xptimer_file} {$spotstring};
}; };
} };
#EVENT {SEND OUTPUT} {/writetimerstofile;}; #EVENT {SEND OUTPUT} {/writetimerstofile;};
@ -522,114 +548,35 @@
#replace {spot_sync_raw} {=} {;}; #replace {spot_sync_raw} {=} {;};
#list {spot_sync} {create} {${spot_sync_raw}}; #list {spot_sync} {create} {${spot_sync_raw}};
#return {$spot_sync}; #return {$spot_sync};
} };
#ALIAS {dtload} { #ALIAS {^dtload$} {
#var {synccount} {0}; #class {dtsync} {clear};
#script {dtsync} {cat $xptimersyncdt_file}; #class {dtsync} {read} {$xptimersync_file};
#script {vtsync} {cat $xptimersyncvt_file}; #variable {killtimers} {$killtimers_sync};
#variable {visittimers} {$visittimers_sync};
#replace {dtsync[1]} {,} {;}; #showme {1};
#replace {vtsync[1]} {,} {;}; #format {dtsync_message} {<acf>[<fff>hotspots<acf>] <138>*<acf> Synced all available hotspot timers for %clast session%c from the disk.<099>} {Green}{<acf>};
#list dtsync_list create {${dtsync[1]}};
#list vtsync_list create {${vtsync[1]}};
#foreach {*dtsync_list[]} {spot} {
#var {syncitem} {@parse_spot{$dtsync_list[$spot]}};
#var {syncname} {$syncitem[1]};
#var {synctime} {$syncitem[2]};
#foreach {*killtimers[]} {spotident} {
#var {spotname} {$killtimers[$spotident][name]};
#if {"$spotname" == "$syncname"} {
#var {killtimers[$spotident][time]} {$synctime};
#math {synccount} {$synccount + 1};
};
};
};
#foreach {*vtsync_list[]} {spot} {
#var {syncitem} {@parse_spot{$vtsync_list[$spot]}};
#var {syncname} {$syncitem[1]};
#var {synctime} {$syncitem[2]};
#foreach {*visittimers[]} {spotident} {
#var {spotname} {$killtimers[$spotident][name]};
#if {"$spotname" == "$syncname"} {
#var {visittimers[$spotident][time]} {$synctime};
#math {synccount} {$synccount + 1};
};
};
};
#format {dtsync_message} {%c[XPTimer] %c*%c Synced %c%d%c spots from %clast session%c.} {<188><acf>}{Yellow}{<188><acf>}{Orange}{$synccount}{<188><acf>}{Green}{<188><acf>};
#echo {$dtsync_message}; #echo {$dtsync_message};
}; };
#ALIAS {dtsave} { #ALIAS {^dtsave$} {
/writetimerstosyncfile; /writetimerstosyncfile;
}
#showme {2};
#format {dtsync_message} {<acf>[<fff>hotspots<acf>] <138>*<acf> Saved all available hotspot timers from %cthis session%c to the disk.<099>} {Green}{<acf>};
#echo {$dtsync_message};
};
#ALIAS {/writetimerstosyncfile} { #ALIAS {/writetimerstosyncfile} {
#nop Write death timers to file; #class {dtsync} {clear};
#system {> $xptimersyncdt_file}; #class {dtsync} {open};
#var {dtsync_msg} {}; #var {killtimers_sync} {$killtimers};
#var {spot_groups} {}; #var {visittimers_sync} {$visittimers};
#var {spot_groups_respawn} {}; #class {dtsync} {close};
#foreach {*killtimers[]} {spot} { #class {dtsync} {write} {$xptimersync_file};
#if {"$killtimers[$spot][group]" == "true"} {
#if {&spot_groups[$killtimers[$spot][name]] == 0} {
#var {spot_groups[$killtimers[$spot][name]]} {$killtimers[$spot][time]};
#var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]};
};
#if {$killtimers[$spot][time] != 0 && $killtimers[$spot][time] > $spot_groups[$killtimers[$spot][name]]} {
#var {spot_groups[$killtimers[$spot][name]]} {$killtimers[$spot][time]};
#var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]};
};
#continue;
};
#format {dtsync_msg} {%s,%s=%d} {$dtsync_msg}{$killtimers[$spot][name]}{$killtimers[$spot][time]};
};
#foreach {*spot_groups[]} {spot} {
#format {dtsync_msg} {%s,%s=%d} {$dtsync_msg}{$spot}{$spot_groups[$spot]};
};
#regex {$dtsync_msg} {^,{(.+)}$} { #var {dtsync_msg} {&1}; };
#line {log} {$xptimersyncdt_file} {$dtsync_msg};
#nop Write visit timers to file;
#system {> $xptimersyncvt_file};
#var {dtsync_msg} {};
#var {spot_groups} {};
#var {spot_groups_respawn} {};
#foreach {*visittimers[]} {spot} {
#if {"$visittimers[$spot][group]" == "true"} {
#if {&spot_groups[$visittimers[$spot][name]] == 0} {
#var {spot_groups[$visittimers[$spot][name]]} {$visittimers[$spot][time]};
#var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]};
};
#if {$visittimers[$spot][time] != 0 && $visittimers[$spot][time] > $spot_groups[$visittimers[$spot][name]]} {
#var {spot_groups[$visittimers[$spot][name]]} {$visittimers[$spot][time]};
#var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]};
};
#continue;
};
#format {dtsync_msg} {%s,%s=%d} {$dtsync_msg}{$visittimers[$spot][name]}{$visittimers[$spot][time]};
};
#foreach {*spot_groups[]} {spot} {
#format {dtsync_msg} {%s,%s=%d} {$dtsync_msg}{$spot}{$spot_groups[$spot]};
};
#regex {$dtsync_msg} {^,{(.+)}$} { #var {dtsync_msg} {&1}; };
#line {log} {$xptimersyncvt_file} {$dtsync_msg};
}; };
#ACTION {%1 tells you: ruhs_dtsync=[%2] | ruhs_vtsync=[%3]} { #ACTION {%1 tells you: ruhs_dtsync=[%2] | ruhs_vtsync=[%3]} {
@ -671,9 +618,9 @@
}; };
}; };
#format {dtsync_message} {%c[XPTimer] %c*%c Synced %c%d%c spots from %c%s%c.} {<188><acf>}{Yellow}{<188><acf>}{Orange}{$synccount}{<188><acf>}{Green}{%1}{<188><acf>}; #format {dtsync_message} {<acf>[<fff>hotspots<acf>] <138>*<acf> Synced %c%d%c spots from %c%s%c.<099>} {Orange}{$synccount}{<acf>}{Green}{%1}{<acf>};
#echo {$dtsync_message}; #echo {$dtsync_message};
} };
#ALIAS {dtsync %1} { #ALIAS {dtsync %1} {
#var {dtsync_msg} {}; #var {dtsync_msg} {};
@ -696,9 +643,9 @@
#format {sync_message} {tell %s ruhs_dtsync=[%s] | ruhs_vtsync=[%s]} {%1} {$dtsync_msg} {$vtsync_msg}; #format {sync_message} {tell %s ruhs_dtsync=[%s] | ruhs_vtsync=[%s]} {%1} {$dtsync_msg} {$vtsync_msg};
#send {$sync_message}; #send {$sync_message};
} };
#nop #EVENT {IAC SB GMCP room.info IAC SE} #nop #EVENT {IAC SB GMCP room.info IAC SE};
#ALIAS {/spottimercheckroomid %1} { #ALIAS {/spottimercheckroomid %1} {
#var {room_info} {%1}; #var {room_info} {%1};
#foreach {*visittimers[]} {spot} { #foreach {*visittimers[]} {spot} {
@ -706,7 +653,7 @@
#format {visittimers[$spot][time]} {%T}; #format {visittimers[$spot][time]} {%T};
}; };
}; };
} };
#ALIAS {gsdt} { #ALIAS {gsdt} {
#var {gsdt_string} {}; #var {gsdt_string} {};
@ -803,6 +750,6 @@
#regex {$gsdt_string} {^{(.+)} \|$} {#var {gsdt_string} {&1}; }; #regex {$gsdt_string} {^{(.+)} \|$} {#var {gsdt_string} {&1}; };
#send {group say $gsdt_string}; #send {group say $gsdt_string};
} };
#CLASS {xptimers} {close}; #CLASS {xptimers} {close};

View File

@ -1,16 +1,23 @@
#CLASS {tpamonitor} {kill}; #CLASS {tpamonitor} {kill};
#CLASS {tpamonitor} {open}; #CLASS {tpamonitor} {open};
#nop ### Turn TPA indicator on ### #nop ### Turn TPA indicator on ###
#action {^ * You are surrounded by a magical impact shield.$} { #action {^ * You are surrounded by a magical impact shield.$} {
#var {tpa_status} {1}; #var {tpa_status} {1};
#var {tpa_color} {invisible}; #var {tpa_color} {invisible};
#nop Update ourselves in the group shield monitor;
#variable {group_shields[$GMCP[charinfo][capname]][tpa]} {1};
/softwritegroupshieldstofile;
update_prompt; update_prompt;
} }
#action {^ * You are surrounded by a %+ magical impact shield.$} #action {^ * You are surrounded by a %+ magical impact shield.$}
{ {
#var {tpa_status} {1}; #var {tpa_status} {1};
#var {tpa_color} {%1}; #var {tpa_color} {%1};
#nop Update ourselves in the group shield monitor;
#variable {group_shields[$GMCP[charinfo][capname]][tpa]} {1};
/softwritegroupshieldstofile;
update_prompt; update_prompt;
} }
#action {^With a noise that sounds like "Plink!", everything around you flashes red for a moment.$} { #action {^With a noise that sounds like "Plink!", everything around you flashes red for a moment.$} {
@ -20,18 +27,30 @@
#nop Update ourselves in the group shield monitor; #nop Update ourselves in the group shield monitor;
#variable {group_shields[$GMCP[charinfo][capname]][tpa]} {1}; #variable {group_shields[$GMCP[charinfo][capname]][tpa]} {1};
/writegroupshieldstofile /writegroupshieldstofile;
update_prompt update_prompt;
} }
#nop ### Turn TPA indicator off ### #nop ### Turn TPA indicator off ###
#action {^There is a sudden white flash. Your magical shield has broken.$} { #action {^There is a sudden white flash. Your magical shield has broken.$} {
#line {log} {$chat_file};
#var {tpa_status} {0}; #var {tpa_status} {0};
#var {tpa_color} {0};
#format {tpa_end} {%T}; #format {tpa_end} {%T};
/break_tpa /break_tpa;
#return @log_line_to_chat{};
} }
#action {^You do not have any arcane or divine protection.$} {
#var {tpa_status} {0};
#var {tpa_color} {0};
#nop Update ourselves in the group shield monitor;
#variable {group_shields[$GMCP[charinfo][capname]][tpa]} {0};
#variable {group_shields[$GMCP[charinfo][capname]][ccc]} {0};
#variable {group_shields[$GMCP[charinfo][capname]][ms]} {0};
#variable {group_shields[$GMCP[charinfo][capname]][kii]} {0};
};
#nop ### Track TPA colors ### #nop ### Track TPA colors ###
#action {^As your shield absorbs the impact, it becomes visible as a %1 glow.$} #action {^As your shield absorbs the impact, it becomes visible as a %1 glow.$}
@ -64,24 +83,25 @@
#math {tpa_dur} {$tpa_end - $tpa_start}; #math {tpa_dur} {$tpa_end - $tpa_start};
#math {tpa_dur} {($tpa_dur - (60 - 1)) / 60}; #math {tpa_dur} {($tpa_dur - (60 - 1)) / 60};
#echo {<168>*** TPA broken! (lasted for $tpa_dur minutes) ***<099>}; #echo {<168>*** TPA broken! (lasted for $tpa_dur minutes) ***<099>};
} };
#nop Update ourselves in the group shield monitor; #nop Update ourselves in the group shield monitor;
#variable {group_shields[$GMCP[charinfo][capname]][tpa]} {0}; #variable {group_shields[$GMCP[charinfo][capname]][tpa]} {0};
/writegroupshieldstofile /writegroupshieldstofile;
#unvar {tpa_start}; #unvar {tpa_start};
#unvar {tpa_end}; #unvar {tpa_end};
update_prompt update_prompt;
} }
#nop ### alias to reset TPA status, if it breaks and we didn't catch it ### #nop ### alias to reset TPA status, if it breaks and we didn't catch it ###;
#alias {tpareset} { #alias {tpareset} {
#unvar {tpa_start}; #unvar {tpa_start};
#unvar {tpa_end}; #unvar {tpa_end};
#var {tpa_status} {0}; #var {tpa_status} {0};
} };
#var {tpa_status} {0}; #var {tpa_status} {0};
#variable {tpa_color} {0};
#CLASS {tpamonitor} {close}; #CLASS {tpamonitor} {close};

View File

@ -1,6 +1,8 @@
#CLASS {xpmonitor} {kill}; #CLASS {xpmonitor} {kill};
#CLASS {xpmonitor} {open}; #CLASS {xpmonitor} {open};
#nop window_xp = since last reset, session_xp = overall
#ALIAS {xp_monitor} { #ALIAS {xp_monitor} {
#var {previous_xp} {$latest_xp}; #var {previous_xp} {$latest_xp};
#var {latest_xp} {$GMCP[vitals][xp]}; #var {latest_xp} {$GMCP[vitals][xp]};
@ -8,43 +10,69 @@
#if {$previous_xp != 0} { #if {$previous_xp != 0} {
#math {gained_xp} {$latest_xp - $previous_xp}; #math {gained_xp} {$latest_xp - $previous_xp};
#if {$gained_xp > 0} { #if {$gained_xp > 0} {
#math {window_xp} {$window_xp + $gained_xp};
#math {session_xp} {$session_xp + $gained_xp}; #math {session_xp} {$session_xp + $gained_xp};
}; };
}; };
#format {check_time} {%T}; #format {check_time} {%T};
#format {uptime[hours]} {%m} {($check_time - $start_time) / 60 / 60}; #nop Calculate the window XP (how much earned since last xpreset);
#format {uptime[minutes]} {%m} {($check_time - $start_time) / 60 % 60}; #format {uptime[window][hours]} {%m} {($check_time - $start_time) / 60 / 60};
#format {uptime[display]} {%th %tm} {$uptime[hours]} {$uptime[minutes]}; #format {uptime[window][minutes]} {%m} {($check_time - $start_time) / 60 % 60};
#format {uptime[window][display]} {%th %tm} {$uptime[window][hours]} {$uptime[window][minutes]};
#format {xprate} {%d} { ($window_xp / ($uptime[window][hours] + ($uptime[window][minutes] / 60.0))) * 0.001 };
#format {xprate} {%d} { ($session_xp / ($uptime[hours] + ($uptime[minutes] / 60.0))) * 0.001 }; #nop Calculate the session XP (how much earned since client started up);
} #format {uptime[session][hours]} {%m} {($check_time - $session_start_time) / 60 / 60};
#format {uptime[session][minutes]} {%m} {($check_time - $session_start_time) / 60 % 60};
#format {uptime[session][display]} {%th %tm} {$uptime[session][hours]} {$uptime[session][minutes]};
#format {session_xprate} {%d} { ($session_xp / ($uptime[session][hours] + ($uptime[session][minutes] / 60.0))) * 0.001 };
};
#ALIAS {gsxp} { #ALIAS {^gsxp$} {
#format {prompt_xp} {%Gxp in %s (%Gk/h)} {$session_xp} {$uptime[display]} {$xprate}; #format {prompt_xp} {%Gxp in %s (%Gk/h)} {$window_xp} {$uptime[window][display]} {$xprate};
#send {group say $prompt_xp}; #send {group say $prompt_xp};
} };
#ALIAS {^gsxp all$} {
#format {prompt_xp} {Window: %Gxp in %s (%Gk/h) <|> Session: %Gmil in %s (%Gk/h)} {$window_xp} {$uptime[window][display]} {$xprate} {$session_xp / 1000000.00} {$uptime[session][display]} {$session_xprate};
#send {group say $prompt_xp};
};
#ALIAS {xpreport} {
#format {xpr_window} {%Gxp total in %s @ %Gk/h} {$window_xp} {$uptime[window][display]} {$xprate};
#format {xpr_session} {%Gxp total in %s @ %Gk/h} {$session_xp} {$uptime[session][display]} {$session_xprate};
#showme {=><= XP Report =><=};
#showme {Window: $xpr_window};
#showme {Session: $xpr_session};
};
#ALIAS {xpreset} { #ALIAS {xpreset} {
#var {session_xp} {0}; #var {window_xp} {0};
#var {previous_xp} {0}; #var {previous_xp} {0};
#var {latest_xp} {0}; #var {latest_xp} {0};
#var {gained_xp} {0}; #var {gained_xp} {0};
#var {uptime[hours]} {0}; #var {uptime[window][hours]} {0};
#var {uptime[minutes]} {0}; #var {uptime[window][minutes]} {0};
#var {uptime[seconds]} {0}; #var {uptime[window][seconds]} {0};
#var {uptime[display]} {0}; #var {uptime[window][display]} {0};
#format {start_time} {%T}; #format {start_time} {%T};
#format {check_time} {%T}; #format {check_time} {%T};
#format {uptime[display]} {%th %tm} {11} {0}; #format {uptime[window][display]} {%th %tm} {11} {0};
} };
#var {window_xp} {0};
#var {previous_xp} {0}; #var {previous_xp} {0};
#var {latest_xp} {0}; #var {latest_xp} {0};
#var {gained_xp} {0}; #var {gained_xp} {0};
#var {session_xp} {0}; #var {session_xp} {0};
#var {uptime} {};
#format {start_time} {%T};
#format {check_time} {%T};
#format {session_start_time} {%T};
#CLASS {xpmonitor} {close}; #CLASS {xpmonitor} {close};