Compare commits

...

16 Commits

Author SHA1 Message Date
45208414dc merge remote readme changes 2019-09-20 22:51:00 -05:00
55246dcdd3 Update readme file 2019-09-20 22:47:49 -05:00
090e539875 add {area} search param to db queries 2019-09-20 22:16:51 -05:00
c82e391529 Spot timer group-spots fix 2019-09-20 21:52:17 -05:00
594252cb8c Mission times fix, dead letter bugfixes 2019-09-20 21:50:54 -05:00
7c132d3ce4 various bugfixes 2019-09-20 21:48:28 -05:00
59a85ed6ce Check by difficulty, define search string for when it doesnt match letter string 2019-09-20 21:47:19 -05:00
3047093255 Add CTF global channel and Informs to chat log 2019-09-20 21:44:30 -05:00
7ac5d978da auto-cols for skills/speak/lang/who/help/nickname/spells/rituals/group status commands 2019-09-20 21:44:00 -05:00
9160a7671b Add various highlights for Shelox fight 2019-09-20 21:42:50 -05:00
347911f2fc MDTconfig player_value, dt watch change 2019-09-20 21:41:57 -05:00
21c6ea7c1d Do a NPC search when we match a letter target 2019-06-04 19:36:36 -05:00
a635c94177 filch/snatch actions, self-tpa update in group shield minitor, various fixes 2019-03-11 22:20:40 -05:00
029c20cfe9 add timestamps to logged channels 2019-03-11 22:17:22 -05:00
1324bc1217 minesolve python oneliner alias to determine pickaxe/hammer strikes needed 2019-03-11 22:16:38 -05:00
322527753e Upate Discworld file, add full/compact layouts 2019-03-11 22:15:31 -05:00
18 changed files with 1596 additions and 328 deletions

View File

@ -1,16 +1,59 @@
cd ~/documents/MUD/Discworld
# No existing discworld session? Then create one
if [[ ! $(tmux ls -F '#S') =~ discworld ]]; then
rm logs/minimap.log && touch logs/minimap.log
rm logs/mapdoortext.log && touch logs/mapdoortext.log
rm logs/chat.log && touch logs/chat.log
# Flag that we've just created a session
DISC_SESSION_CREATE=1
tmux new-session -d -A -D -s discworld 'tail -fs .5 logs/chat.log'
tmux select-window -t discworld:0
tmux split-window -v -p 85 'sh mdt'
tmux split-window -v -p 85 'bash'
tmux send-keys 'tt++ -G config.tin' 'C-m'
# clear && watch -n10 logs/xptimers.log
# Zero out log files to keep size down
# rm logs/minimap.log && touch logs/minimap.log
# rm logs/mapdoortext.log && touch logs/mapdoortext.log
# rm logs/chat.log && touch logs/chat.log
# Start a new tmux session named "discworld"
tmux new-session -d -A -D -s discworld
fi
tmux -2 attach-session -t discworld -d
# If we're in TMUX, or we just created a new session, make a layout
if [ -n "$TMUX" ] || [ "$DISC_SESSION_CREATE" = "1" ]; then
# Kill any existing panes but the one we're "starting" in if in tmux already
if [ -n "$TMUX" ]; then
tmux kill-pane -a -t discworld:0.0
fi
# Create the chat monitor window on top
tmux split-window -v -b -l 4
tmux send-keys 'clear && tail -fs .5 logs/chat.log' 'C-m'
# Did we ask for the full layout?
if [[ $1 == "full" ]]; then
# Horizontal split and load spottimers
tmux select-pane -t discworld:0.0
tmux split-window -h -l 28
tmux send-keys './bin/dt' 'C-m'
# Splice a section for group shield monitor
tmux split-window -v -p 50
tmux send-keys './bin/grp' 'C-m'
# Place the ASCII map at the bottom
tmux split-window -v -p 50
tmux send-keys './bin/map' 'C-m'
fi
# Cut back to main window, vertical split for mapdoortext
tmux select-pane -t discworld:0.0
tmux split-window -v -b -l 5
tmux send-keys './bin/mdt' 'C-m'
# Select main pane again and load TinTin++ with our config
tmux select-pane -t discworld:0.0
tmux send-keys 'clear && tt++ -G config.tin' 'C-m'
fi
if [ -z "$TMUX" ]; then
echo "Not already in TMUX, so let's attach"
# If we aren't already inside of TMUX, then attach to our session
tmux -2 attach-session -t discworld -d
fi

View File

@ -7,7 +7,7 @@ A collection of configurations and scripts for use with [DiscworldMUD](http://di
For reference, I host this configuration on a Linux VPS and thus am able to "take over" the Tmux session as I move between devices/lose internet without being disconnected from the game. This may help to explain some decisions made.
![Screenshot](https://i.imgur.com/WVZaQwn.png)
![Screenshot](https://i.imgur.com/dZkaqR6.png)
## Features and Bits
@ -107,6 +107,25 @@ Results for gatherables matching "thyme".
[7]: some thyme found in cottage herb garden, Ramtops Regions
```
##### Search Filter By Area
>`db room temple {djb}`
>`db npc guard {am}`
>`db npcitem sword {ramtops}`
All of the above searches (room, npc, npcitem, item) are filterable by area, just include the area name in curly braces after your search terms. See below for a breakdown of possible areas.
```
am/ankh-morpork
bp/bes pelargic
djb/djelibeybi
ephebe
genua
ramtops
sto
sto plains
sto-lat
```
#### Speedwalking
* Files: `src/maproute.py`, `src/gmcp.tin`, `src/db.tin`
* Route-finding logic and of course the database taken directly from [Quow's](http://quow.co.uk) lovely MUSHclient package.
@ -162,6 +181,19 @@ RuhsSpeedRun: s;e;e;n $*$
We found a way there, and our speedwalking alias was updated. Now typing `speedwalk` would walk us over to the Mended Drum (s;e;e;n).
#### Thiefey Things
* File: `src/quota.tin`
Parses the output of 'read quota brief'. I recommend adding this to the .afterinventory alias of your thief characters so it kicks in right away. Has a number of different features:
##### Status Bar Quota Time Left
Shows a HOURS:MINUTES countdown until your quota is due in the top bar near the TPA/XP monitors. This timer changes to a bright color when you near the final hour.
##### Quota Flipping Alerts
A bright blue alert pops up an hour, thirty minutes and ten minutes before your quota flips over. There is a follow-up alert when your quota actually flips. On a per-session basis these alerts can be disabled with `quota alert off` and re-enabled with `quota alert on`.
##### Left to Steal Calculation
When you 'read quota brief' a new line will be inserted calculating how much you have left to steal.
#### Hunting Hotspot Timers (with Syncing!)
* File: `src/spottimers.tin`
@ -233,18 +265,22 @@ Note that because the tell containing sync information is full of lengthy unix t
#### Group Shield Monitor
* File `src/group.tin`
> Show the shield output inline: `sgs` (show group shields)
> Reset the monitor and re-capture: `rgs` (reset group shields)
Window appears above the ASCII map to display output at all times.
* File: `src/group.tin`
Actions/Triggers capture the shield-status of your groupmates and keeps track of who is protected by what. These get written to a file in grid-form for display in the UI and are also displayed by command in the regular output.
##### See group shields
> `sgs`
Shows the grid of allies and their shields in the MUD window. I use this when on mobile/small-terminal and don't have the grid up in its own pane - useful because its unaffected by queued commands unlike a fresh "group shields".
##### Reset group shields
> `rgs`
Clears out all current group shield data, and then runs "group shields" again to refresh itself. The system isn't perfect, if something is wonky, use this to get a fresh start.
### Highlights/Actions/Other
* HP loss and XP gain notifications
* Dagger/Unarmed outgoing attacks
* Outgoing special attempts/lands/fails
* Outgoing backstabs
* Incoming attacks
* Shelox fight highlights
* TPA shield drops
* T-Shop rooms
* Snatch/Filch
@ -271,8 +307,6 @@ You can find Quow's work on his website: <http://quow.co.uk>
### Oki
I've never even met Oki in game, but I stumbled upon their repository of tintin scripts some time ago and happily copied some of their magic/combat substitutions and highlights for my own use.
There's some cool stuff in here I haven't gotten around to copying over yet but plan to, like Thief quota monitoring etc.
You can find Oki's repository here: <https://git.tubul.net/richard/tt_dw.git>

3
bin/dt
View File

@ -1 +1,2 @@
clear && watch -c -t -n 5 'clear && cat logs/xptimers.log'
# clear && watch -c -t -n 5 'clear && cat logs/xptimers.log'
watch -ctn 0.4 'clear;cat logs/xptimers.log'

View File

@ -3,5 +3,3 @@ minimap:
timers:
clear && watch -t -n 5 cat xptimers.log

View File

@ -1,6 +1,6 @@
{
"default_npc_value": 1,
"bonus_player_value": -1,
"bonus_player_value": 0,
"minimum_room_value": 1,
"show_hidden_room_count": false,
"custom_matches": [
@ -53,6 +53,12 @@
["Ramtops Highlights"],
["headless horse rider", "red", 8, false],
["Ankh-Morpork Highlights"],
["barbarian", "red", 5, false],
["Genua Highlights"],
["Tfat Chick", "red", 10, false],
["Valid colours: orange, red"]
]
}

View File

@ -15,6 +15,8 @@
#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};
#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};
#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};
#HIGHLIGHT {^As %1 dies %2 drops %3 in shock.$} {bold green 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};
@ -46,11 +48,34 @@
#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 chip away %1} {bold red};
#HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and, struggling with %1} {bold 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};
#NOP ==[Kick Consortium]==
#NOP ==[Achievements]==
#ACTION {^It is your turn to fight... enter the combat ring.$} {
#showme {\a};
}
#ACTION {^The %1 camel gallops away abruptly.$} {
#showme {[Pushover] %0};
}
#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 try to filch %1 from %2 but {she|he|it} notices you and manages to %3} {bold red};
#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}; };
#HIGHLIGHT {A stream of expletives drifts down from above with %1} {bold red underscore};
#HIGHLIGHT {There is the faintest of sounds, as of a gnat yawning, then a WHOOSH sound. %2} {bold red underscore};
#NOP ==[Shelox]==
#HIGHLIGHT {^Screaming echoes throughout the lair!$} {bold red};
#HIGHLIGHT {^You see a thick string of web hurtling at you and then everything suddenly goes black.$} {bold green};
#HIGHLIGHT {^Webbing shoots out from the frog that looks an awful lot like Queen Shelox's abdomen and slams into %1.$} {bold green};
#HIGHLIGHT {^Webbing shoots out from Queen Shelox's abdomen and slams into %1.$} {bold green};
#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}; };
#HIGHLIGHT {^%1 giant spiders climb up from below!} {bold violet};
#HIGHLIGHT {^%1 spiders scuttle up from below and join the fight!} {bold violet};
#NOP ==[End Session On Quit]==

View File

@ -23,7 +23,6 @@
setsize;
};
#ALIAS {colourpalette}
{
#foreach {a;b;c;d;e;f} {cnt1}
@ -40,6 +39,50 @@
}
}
#ALIAS {easyvote} {
#system {lynx http://www.topmudsites.com/vote-pinkfish.html};
#ALIAS {minesolve %1 %2 %3} {
#var {total} {%1};
#var {hammer} {%2};
#var {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]);'};
#script {result} {$solvecommand};
#replace {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};
#echo {$minesolvedisplay};
};
#nop Resizing aliases for when we're in "cols 999" mode;
#ALIAS {^skills%1} {
#send {cols 130};
#send {skills %1};
#send {cols 999};
};
#ALIAS {^{speak|language}$} {
#send {cols 130};
#send {speak};
#send {cols 999};
};
#ALIAS {^spells$} { #send {cols 130}; #send {spells}; #send {cols 999}; };
#ALIAS {^rituals$} { #send {cols 130}; #send {rituals}; #send {cols 999}; };
#ALIAS {^group status$} { #send {cols 130}; #send {group status}; #send {cols 999}; };
#ALIAS {^{who$|who (.+)$}} {
#send {cols 130};
#send {%0};
#send {cols 999};
};
#ALIAS {^help %1} {
#send {cols 130};
#send {help %1};
#send {cols 999};
};
#ALIAS {^nickname$} {
#send {cols 130};
#send {nickname};
#send {cols 999};
};

View File

@ -1,48 +1,62 @@
#CLASS {channels} {kill};
#CLASS {channels} {open};
#VARIABLE {talker_log_toggle} {1};
#VARIABLE {talker_log_toggle} {0};
#ACTION {^You {tell|ask|exclaim to} %1:%2} {#LINE {LOG} {$chat_file}};
#ACTION {^%1 {tells|asks|exclaims to} %*you{|(?: in \w+)?}: %4} {#LINE {LOG} {$chat_file}};
#ACTION {^[%1] %2{:|} %3} {#LINE {LOG} {$chat_file}};
#FUNCTION {log_line_to_chat} {
#script {ts} {date +"%I:%M%P"};
#line {log} {$chat_file} {$ts[1] \};
#line {log} {$chat_file}
};
#ACTION {^(They Might Be Alts) } {#LINE {LOG} {$chat_file}};
#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] %2{:|} %3} {#return @log_line_to_chat{};};
#ACTION {^(newbiehelpers)} {#LINE {LOG} {$chat_file}};
#ACTION {^You newbiehelper-tell:%1} {#LINE {LOG} {$chat_file}};
#ACTION {^(newbie)} {#LINE {LOG} {$chat_file}};
#ACTION {^You newbie-tell:%1} {#LINE {LOG} {$chat_file}};
#ACTION {^You special-tell:%1} {#LINE {LOG} {$chat_file}};
#ACTION {^You cre-tell:%1} {#LINE {LOG} {$chat_file}};
#ACTION {^(They Might Be Alts) } {#return @log_line_to_chat{};};
#ACTION {^(newbiehelpers)} {#return @log_line_to_chat{};};
#ACTION {^You newbiehelper-tell:%1} {#return @log_line_to_chat{};};
#ACTION {^(newbie)} {#return @log_line_to_chat{};};
#ACTION {^You newbie-tell:%1} {#return @log_line_to_chat{};};
#ACTION {^You special-tell:%1} {#return @log_line_to_chat{};};
#ACTION {^You cre-tell:%1} {#return @log_line_to_chat{};};
#ACTION {^(Playerkillers) %1 wisps{:|} %2} {
#if {"$talker_log_toggle" == "1"} {
#LINE {LOG} {$chat_file}
#return @log_line_to_chat{};
};
};
#ACTION {(>CTF<) %1} {
#return @log_line_to_chat{};
};
#ACTION {%1Inform: %2} {
#return @log_line_to_chat{};
};
#ACTION {^(Thieves) %1 wisps{:|} %2} {
#if {"$talker_log_toggle" == "1"} {
#LINE {LOG} {$chat_file}
#return @log_line_to_chat{};
};
};
#ACTION {^(Wizards) %1 wisps{:|} %2} {
#if {"$talker_log_toggle" == "1"} {
#LINE {LOG} {$chat_file}
#return @log_line_to_chat{};
};
};
#ACTION {^(Igame) %1 wisps{:|} %2} {
#if {"$talker_log_toggle" == "1"} {
#LINE {LOG} {$chat_file}
#return @log_line_to_chat{};
};
};
#ALIAS {talker log %1} {
#if {%1 == "on"} {
#if {"%1" == "on"} {
#echo {<149>[Talker] Now logging talker chat to monitor.<099>};
#var {talker_log_toggle} {1};
};
#if {%1 == "off"} {
#if {"%1" == "off"} {
#echo {<149>[Talker] No longer logging talker chat to monitor.<099>};
#var {talker_log_toggle} {0};
};
};

View File

@ -1,5 +1,5 @@
#CLASS {quow} {kill};
#CLASS {quow} {open};
#CLASS {database} {kill};
#CLASS {database} {open};
#VARIABLE {map_id_names} {
{1}{Ankh-Morpork}
@ -60,6 +60,26 @@
{57}{Skund Wolf Trail}
}
#FUNCTION {map_parse} {
#unvar {map_term} {search_map};
#format {search_map} {%l} {%1};
#regex {$search_map} {^am} { #var {map_term} {1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 51} };
#regex {$search_map} {^ankh-morpork$} { #var {map_term} {1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 51} };
#regex {$search_map} {^bp$} { #var {map_term} {17, 18, 19, 20, 21} };
#regex {$search_map} {^bes pelargic$} { #var {map_term} {17, 18, 19, 20, 21} };
#regex {$search_map} {^djb$} { #var {map_term} {23, 24} };
#regex {$search_map} {^djelibeybi} { #var {map_term} {23, 24} };
#regex {$search_map} {^ephebe$} { #var {map_term} {25, 26} };
#regex {$search_map} {^genua$} { #var {map_term} {27, 28, 16} };
#regex {$search_map} {^ramtops$} { #var {map_term} {38, 32, 54, 55} };
#regex {$search_map} {^sto$} { #var {map_term} {29, 45} };
#regex {$search_map} {^sto plains$} { #var {map_term} {29, 45} };
#regex {$search_map} {^sto-lat$} { #var {map_term} {39, 40, 41, 42, 43} };
#return {$search_map};
};
#LIST {last_query_list} {create};
#ALIAS {db gatherable %1} {
@ -105,15 +125,23 @@
}
}
#ALIAS {db npc %1} {
#unvariable {npc_display};
#ALIAS {db npc {[^{}\n]+}{( \{([\w\s-]+)\})?}$} {
#unvariable {npc_display} {search_term} {query};
#variable {search_term} {%1};
#replace {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};
#nop If we found an area name in curly braces, try to match a map-set;
#var {search_map} {@map_parse{%4}};
#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};
};
#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 {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
#script {npc_query_result} {$db_command};
#list {npc_query_result} {size} {npc_result_size};
@ -148,15 +176,23 @@
}
};
#ALIAS {db npcitem %1} {
#unvariable {npcitem_display};
#ALIAS {db npcitem {[^{}\n]+}{( \{([\w\s-]+)\})?}$} {
#unvariable {npcitem_display} {search_term} {query};
#variable {search_term} {%1};
#replace {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};
#nop If we found an area name in curly braces, try to match a map-set;
#var {search_map} {@map_parse{%4}};
#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};
};
#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 {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
#script {npcitem_query_result} {$db_command};
#list {npcitem_query_result} {size} {npcitem_result_size};
@ -192,22 +228,30 @@
}
};
#ALIAS {db item %1} {
#unvariable {item_display};
#ALIAS {^db item {[^{}\n]+}{( \{([\w\s-]+)\})?}$} {
#unvariable {item_display} {search_term} {query};
#variable {search_term} {%1};
#replace {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};
#nop If we found an area name in curly braces, try to match a map-set;
#var {search_map} {@map_parse{%4}};
#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};
};
#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 {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
#script {item_query_result} {$db_command};
#list {item_query_result} {size} {item_result_size};
#list {last_query_list} {clear};
#if {$item_result_size > 0} {
#format {item_display} {%cResults for items items matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue};
#format {item_display} {%cResults for items matching "%c%s%c":} {bold blue}{yellow}{%1}{bold blue};
#echo {$item_display};
#var {item_count} {0};
@ -229,22 +273,32 @@
#variable {last_query_list[$item_count]} {$item_info};
#math {item_count} {$item_count + 1};
}
};
} {
#format {item_display} {%cQuery Result: %c%s%c was not found.} {bold blue}{green}{%1}{bold blue};
#echo {$item_display};
}
}
};
};
#ALIAS {db room %1} {
#unvariable {room_display};
#ALIAS {^db room {[^{}\n]+}{( \{([\w\s-]+)\})?}$} {
#unvariable {room_display} {search_term} {query};
#variable {search_term} {%1};
#replace {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};
#nop If we found an area name in curly braces, try to match a map-set;
#var {search_map} {@map_parse{%4}};
#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};
};
#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};
}
#showme {Search Map: $query};
#format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
#script {room_query_result} {$db_command};
#list {room_query_result} {size} {room_result_size};
@ -317,4 +371,4 @@
#send {RuhsSpeedRun};
}
#CLASS {quow} {close};
#CLASS {database} {close};

View File

@ -1,62 +1,793 @@
#CLASS {deadletter} {kill};
#CLASS {deadletter} {open};
#var {letter_difficulty} {none};
#VAR {difficult_customer_targets} {
{Triad Boss}{Triad [Boss]}
{Queen Shelox}{Queen Shelox}
{Ice Giants}{Ice Giants}
{Security guards}{Security Guards}
{Smuggler Captain}{Smuggler Captain}
{The Clown}{Ha'pennywise the Clown}
{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}{Boy [Willie]}
{Disembowel-Meself-Honourably Dibhala}{Disembowel-Meself-Honourably [Dibhala]}
{Glod-san}{[Glod-san]}
{Laggy-san}{[Laggy-san]}
{Lon Fah Lo}{Lon Fah [Lo]}
{Mad Hamish}{Mad [Hamish]}
{No Go Wan}{No Go [Wan]}
{Quisoda}{[Quisoda]}
{Ruto of Fish}{[Ruto] of Fish}
{Ryattenoki}{[Ryattenoki]}
{Shi Do Gai}{Shi Do [Gai]}
{Lap-lip}{[Lap-lip]}
{Lip-phon Lap-top}{Lip-phon [Lap-top]}
{Mihk-gran-bohp}{Mihk-gran-[bohp]}
{Phos-phor}{[Phos]-phor}
{Very Reverend Khepresh}{Very Reverend [Khepresh]}
{Yclept}{[Yclept]}
{Tuffy}{[Tuffy]}
{Casanunda}{[Casanunda]}
{Greig Schwitz}{Greig [Schwitz]}
{Noobie}{[Noobie]}
{Tfat Chick}{Tfat [Chick]}
{Cut Me Own Hand Off Dhblah}{Cut Me Own Hand Off [Dhblah]}
{Miss Pennie Laced}{Miss Pennie [Laced]}
{Berti Boggis}{[Berti] Boggis}
{The Proprietor}{The Proprietor}
}
{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} {_} {%.};
#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]} {bold blue};
#echo {$letter_solution_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];
};
};
}
}
#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]} {bold blue};
#echo {$letter_solution_line};
};
#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};
};
};
@ -64,27 +795,27 @@
#NOP ==[Halt Parsing Letter]==
#alias {/stopparsingletter} {
#unvar {parsing_dead_letter};
/solveletter;
/solveletter
};
#action {^Deliver by %1.$} {
#if {&{parsing_dead_letter}} {
/stopparsingletter;
/stopparsingletter
}
};
#action {does not have anything written on it.} {
#if {&{parsing_dead_letter}} {
/stopparsingletter;
/stopparsingletter
}
};
#action {Cannot find "letter", no match.} {
#if {&{parsing_dead_letter}} {
/stopparsingletter;
/stopparsingletter
}
};
#action {You are too busy fighting to read at the moment.} {
#if {&{parsing_dead_letter}} {
/stopparsingletter;
/stopparsingletter
}
};
@ -106,4 +837,25 @@
#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

@ -58,7 +58,6 @@
#VAR GMCP[room][info] {%0};
/spottimercheckroomid $GMCP[room][info][identifier]
#nop Run our spot timer logic against new identifier
}
#EVENT {IAC SB GMCP room.map IAC SE}

View File

@ -49,11 +49,11 @@
#nop No shields at all
#ACTION {^{(\w+\b\W*?){1,8}} has no arcane protection.$} {
#variable {group_shields[$group_shields_current][ccc]} {0};
#variable {group_shields[$group_shields_current][tpa]} {0};
#variable {group_shields[$group_shields_current][eff]} {0};
#variable {group_shields[$group_shields_current][kii]} {0};
#variable {group_shields[$group_shields_current][ms]} {0};
#variable {group_shields[%1][ccc]} {0};
#variable {group_shields[%1][tpa]} {0};
#variable {group_shields[%1][eff]} {0};
#variable {group_shields[%1][kii]} {0};
#variable {group_shields[%1][ms]} {0};
/writegroupshieldstofile
};
@ -241,6 +241,7 @@
#variable {group_shields} {};
#variable {group_shields_current} {};
#send {group shields};
/writegroupshieldstofile
};
#ALIAS {sgs} {

View File

@ -53,7 +53,7 @@
#NOP ==[Colour FCI Output]==
#SUB {The weave indicates that %1 is a %2, with %3 charges 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<098> is a <138>%2<098> with <158>%3<098> charges remaining.};
#NOP ==[Library/Distortions]==
#HIGHLIGHT {^The area seems more mundane than before\.$} {green underscore};

View File

@ -19,7 +19,9 @@
#if {&missions[sausage]} {
#foreach {$missions[sausage][active_list][]} {player} {
#if {&missions[sausage][active_list][$player][easy]} {
#math {mins} { (($current_time - $missions[sausage][active_list][$player][easy]) + 0.5) / 60 };
#math {mins} {$current_time - $missions[sausage][active_list][$player][easy]};
#math {mins} {($mins - (60 - 1)) / 60};
#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};
@ -27,7 +29,9 @@
};
#if {&missions[sausage][active_list][$player][hard]} {
#math {mins} { (($current_time - $missions[sausage][active_list][$player][hard]) + 0.5) / 60 };
#math {mins} {$current_time - $missions[sausage][active_list][$player][hard]};
#math {mins} {($mins - (60 - 1)) / 60};
#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};
@ -36,7 +40,9 @@
};
#foreach {$missions[sausage][retry_list][]} {player} {
#math {mins} { (($current_time - $missions[sausage][retry_list][$player]) + 0.5) / 60 };
#math {mins} {$current_time - $missions[sausage][retry_list][$player]};
#math {mins} {($mins - (60 - 1)) / 60};
#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};
@ -50,48 +56,84 @@
#if {&missions[letter]} {
#foreach {$missions[letter][active_list][]} {player} {
#if {&missions[letter][active_list][$player][difficult]} {
#math {mins} { (($current_time - $missions[letter][active_list][$player][difficult]) + 0.5) / 60 };
#math {mins} {$current_time - $missions[letter][active_list][$player][difficult]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins};
#format {mt_display} {\t<129>%s<099> can do another difficult customer letter in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display};
#if {$mins < 0} {
#unvar {missions[letter][active_list][$player][difficult]};
} {
#format {mt_display} {\t<129>%s<099> can do another difficult customer letter in <139>%d<099> minutes.<099>} {$player}{$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]) + 0.5) / 60 };
#math {mins} {$current_time - $missions[letter][active_list][$player][distant]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins};
#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 {$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]) + 0.5) / 60 };
#math {mins} {$current_time - $missions[letter][active_list][$player][far]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins};
#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 {$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]) + 0.5) / 60 };
#math {mins} {$current_time - $missions[letter][active_list][$player][close]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins};
#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 {$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]) + 0.5) / 60 };
#math {mins} {$current_time - $missions[letter][active_list][$player][local]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {60 - $mins};
#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};
#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};
};
};
};
#foreach {$missions[letter][retry_list][]} {player} {
#format {missions[letter][retry_list][$GMCP[charinfo][capname]]} {%T};
#math {mins} { (($current_time - $missions[letter][retry_list][$player]) + 0.5) / 60 };
#math {mins} {$current_time - $missions[letter][retry_list][$player]};
#math {mins} {($mins - (60 - 1)) / 60};
#math {mins} {10 - $mins};
#format {mt_display} {\t<129>%s<099> can request another letter in <139>%d<099> minutes.<099>} {$player}{$mins};
#list {mission_display_list[$player]} {add} {$mt_display};
#if {$mins < 0} {
#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};
#list {mission_display_list[$player]} {add} {$mt_display};
};
};
};

View File

@ -5,7 +5,7 @@
#NOP ===== VARIABLES =====
#NOP =======================
#NOP [1 = Local, 2 = Far Away, 3 = Distant Lands, 4 = Difficult Customer]
#NOP [1 = Local, 2 = Close-by, 3 = Far Away, 4 = Distant Lands, 5 = Difficult Customer]
#VAR {dead_letter_rewards} {
{4 Ankh-Morpork dollars}{1}
{8 Ankh-Morpork dollars}{2}
@ -22,10 +22,10 @@
{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}
{1 Agatean Empire fifty-rhinu and 2 Agatean Empire ten-rhinu}{5}
{9 Ankh-Morpork ten-dollars}{5}
{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}
{3 Ephebian minae and 5 Ephebian decadrachmae}{5}
{2 Ephebian minae}{5}
{1 Genuan ducat and 2 Genuan forins}{5}
}
@ -55,34 +55,21 @@
#unvar {delayname};
};
#ALIAS {return letter} {
#send {return letter};
#format {missions[letter][retry_list][$GMCP[charinfo][capname]]} {%T};
#line sub variable {
#format {delayname} {letter_retry_%s} {$GMCP[charinfo][capname]};
#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]};
#echo {$letter_timer_line};
#unvar {letter_timer_line};
#unvar {missions[letter][retry_list][$GMCP[charinfo][capname]]};
} {600};
};
#unvar {delayname};
#nop /letter_returned;
#ALIAS {^return letter$} {
#send { return letter};
/letter_returned
};
#ALIAS {^give letter to {f|F}rank$} {
#send { give letter to Frank};
/letter_returned
};
#NOP =======================
#NOP ===== Actions =====
#NOP =======================
#ACTION {^You offer to give a letter to Frank} {
#nop letter_returned;
};
#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.
@ -108,7 +95,7 @@
#format {missions[letter][active_list][$GMCP[charinfo][capname]][local]} {%T};
#line sub variable {
#format {delayname} {letter_distant_%s} {$GMCP[charinfo][capname]};
#format {delayname} {letter_local_%s} {$GMCP[charinfo][capname]};
#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};
@ -125,7 +112,7 @@
#format {missions[letter][active_list][$GMCP[charinfo][capname]][close]} {%T};
#line sub variable {
#format {delayname} {letter_distant_%s} {$GMCP[charinfo][capname]};
#format {delayname} {letter_close_%s} {$GMCP[charinfo][capname]};
#delay {$delayname} {
#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};
@ -142,7 +129,7 @@
#format {missions[letter][active_list][$GMCP[charinfo][capname]][far]} {%T};
#line sub variable {
#format {delayname} {letter_distant_%s} {$GMCP[charinfo][capname]};
#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};
@ -176,7 +163,7 @@
#format {missions[letter][active_list][$GMCP[charinfo][capname]][difficult]} {%T};
#line sub variable {
#format {delayname} {letter_distant_%s} {$GMCP[charinfo][capname]};
#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};

View File

@ -87,7 +87,7 @@
#var {quota[reciepts]} {0};
#nop Quota period is over, announce it.;
#format {quota_display_line} {%c[Quota] %c*%c %s's quota has %creset%c.} {bold blue} {bold yellow} {bold blue} {$quota[who]} {bold red} {bold blue};
#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};
#showme {$quota_display_line};
};
@ -95,19 +95,19 @@
#if {"$quota[alert]" == "on"} {
#nop Message an hour before;
#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.} {bold blue} {bold yellow} {bold blue} {$quota[who]} {bold red} {bold blue};
#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};
#echo {$quota_display_line \a};
};
#nop Message 30 minutes before;
#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.} {bold blue} {bold yellow} {bold blue} {$quota[who]} {bold red} {bold blue};
#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};
#echo {$quota_display_line \a};
};
#nop Message 10 minutes before;
#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.} {bold blue} {bold yellow} {bold blue} {$quota[who]} {bold red} {bold blue};
#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};
#echo {$quota_display_line \a};
};
};

View File

@ -4,62 +4,211 @@
#VARIABLE {xptimer_file} {logs/xptimers.log};
#VARIABLE {killtimers} {
{Delbert}{0}
{the Triad boss}{0}
{the bandit leader}{0}
{Hlakket the Bartender}{0}
{the Zoon Liar}{0}
{Slim Stevie}{0}
{the %* grflx worker}{0}
{the %* student}{0}
{the ceremonial guard}{0}
{the giant leader}{0}
{the %* rujona}{0}
{the %* lion}{0}
{Louis Accardo}{0}
{Marlon Gumboni}{0}
}
#VARIABLE {killtimer_names} {
{Delbert}{delbert}
{the Triad boss}{medina boss}
{the bandit leader}{bandit leader}
{Hlakket the Bartender}{hlakket}
{the Zoon Liar}{zoon liar}
{Slim Stevie}{rogues}
{the %* grflx worker}{grflx}
{the %* student}{dojo}
{the ceremonial guard}{cguards}
{the giant leader}{giant leader}
{the %* rujona}{snail}
{the %* lion}{shaker lions}
{Louis Accardo}{stables}
{Marlon Gumboni}{casino}
{Delbert}{
{time}{0}
{name}{delbert}
{group}{false}
{respawn}{30}
}
{the Triad boss}{
{time}{0}
{name}{medina boss}
{group}{false}
{respawn}{30}
}
{the bandit leader}{
{time}{0}
{name}{bandit leader}
{group}{false}
{respawn}{30}
}
{Hlakket the Bartender}{
{time}{0}
{name}{hlakket}
{group}{false}
{respawn}{30}
}
{the Zoon Liar}{
{time}{0}
{name}{zoon liar}
{group}{false}
{respawn}{30}
}
{Slim Stevie}{
{time}{0}
{name}{rogues}
{group}{false}
{respawn}{30}
}
{the %* grflx worker}{
{time}{0}
{name}{grflx}
{group}{false}
{respawn}{30}
}
{the %* student}{
{time}{0}
{name}{dojo}
{group}{false}
{respawn}{30}
}
{the ceremonial guard}{
{time}{0}
{name}{cguards}
{group}{false}
{respawn}{30}
}
{the smuggler captain}{
{time}{0}
{name}{smug captain}
{group}{false}
{respawn}{30}
}
{the giant leader}{
{time}{0}
{name}{giants}
{group}{false}
{respawn}{30}
}
{the %* rujona}{
{time}{0}
{name}{snail}
{group}{true}
{respawn}{30}
}
{the %* nitsuni}{
{time}{0}
{name}{snail}
{group}{true}
{respawn}{30}
}
{the Ome outlaw}{
{time}{0}
{name}{snail}
{group}{true}
{respawn}{30}
}
{the %* lion}{
{time}{0}
{name}{shaker lions}
{group}{false}
{respawn}{30}
}
{Louis Accardo}{
{time}{0}
{name}{stables}
{group}{true}
{respawn}{30}
}
{Samuel Casso}{
{time}{0}
{name}{stables}
{group}{true}
{respawn}{30}
}
{Enrico Persuica}{
{time}{0}
{name}{stables}
{group}{true}
{respawn}{30}
}
{Joe Corrola}{
{time}{0}
{name}{stables}
{group}{true}
{respawn}{30}
}
{Marlon Gumboni}{
{time}{0}
{name}{casino}
{group}{true}
{respawn}{30}
}
{Frankie Harvard}{
{time}{0}
{name}{casino}
{group}{true}
{respawn}{30}
}
{Geraldo Ciaco}{
{time}{0}
{name}{casino}
{group}{true}
{respawn}{30}
}
{Charles Marchella}{
{time}{0}
{name}{casino}
{group}{true}
{respawn}{30}
}
}
#VARIABLE {visittimers} {
{AMShades}{0}
{ebff897af2b8bb6800a9a8636143099d0714be07}{0}
{70546ec71867645ab5c51e9ce6087b75dcf4176f}{0}
{f6c60dd36ed38707eb954c3a670f2f9370a79399}{0}
{3862c5fd0fe83f4080bdb9b94519bf8da89d5015}{0}
{AMShades}{
{time}{0}
{name}{shades}
{group}{false}
{respawn}{12}
}
{ebff897af2b8bb6800a9a8636143099d0714be07}{
{time}{0}
{name}{smugglers}
{group}{false}
{respawn}{12}
}
{70546ec71867645ab5c51e9ce6087b75dcf4176f}{
{time}{0}
{name}{offler}
{group}{false}
{respawn}{30}
}
{f6c60dd36ed38707eb954c3a670f2f9370a79399}{
{time}{0}
{name}{black market}
{group}{true}
{respawn}{30}
}
{e4646eab906aef1187a9dd3e980441b8f6b8d68c}{
{time}{0}
{name}{black market}
{group}{true}
{respawn}{30}
}
{0ae9d8c4f2b48f4fcc4cb57fd85443399be2ecc5}{
{time}{0}
{name}{black market}
{group}{true}
{respawn}{30}
}
{c7c6f5720d2c587f80696b6f0ec7f9ac0f084b06}{
{time}{0}
{name}{black market}
{group}{true}
{respawn}{30}
}
{3862c5fd0fe83f4080bdb9b94519bf8da89d5015}{
{time}{0}
{name}{parades}
{group}{true}
{respawn}{30}
}
{cca9645565f2bb0d017ea9b1dcc9d1b3e9fcfe72}{
{time}{0}
{name}{cabbage}
{group}{false}
{respawn}{30}
}
}
#VARIABLE {visittimer_names} {
{AMShades}{shades}
{ebff897af2b8bb6800a9a8636143099d0714be07}{smugglers}
{70546ec71867645ab5c51e9ce6087b75dcf4176f}{offler}
{f6c60dd36ed38707eb954c3a670f2f9370a79399}{black market}
{3862c5fd0fe83f4080bdb9b94519bf8da89d5015}{parades}
}
#ALIAS {dtreset} {
#regex {%1} {all} {
#foreach {$killtimers[]} {spot} {
#format {killtimers[$spot]} {0};
#format {killtimers[$spot][time]} {0};
}
#foreach {$visittimers[]} {spot} {
#format {visittimers[$spot]} {0};
#format {visittimers[$spot][time]} {0};
}
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting all spots to Unseen.} {bold blue} {bold yellow} {bold blue};
#echo {$xptimer_message};
@ -67,17 +216,29 @@
};
#if {$dtreset_all < 1} {
#foreach {$killtimer_names[]} {spot} {
#regex {%1 %2} {$killtimer_names[$spot]} {
#format {killtimers[$spot]} {%T};
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting death timer for %c$killtimer_names[$spot]%c.} {bold blue} {bold yellow} {bold blue} {bold green} {bold blue};
#foreach {$killtimers[]} {spot} {
#regex {%1 %2} {$killtimers[$spot][name]} {
#format {killtimers[$spot][time]} {%T};
#if {"$killtimers[$spot][group]" == "true"} {
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting death timer for%c $killtimers[$spot][name] ($spot)%c.} {bold blue} {bold yellow} {bold blue} {bold green} {bold blue};
};
#else {
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting death timer for%c $killtimers[$spot][name]%c.} {bold blue} {bold yellow} {bold blue} {bold green} {bold blue};
};
#echo {$xptimer_message};
};
}
#foreach {$visittimer_names[]} {spot} {
#regex {%1 %2} {$visittimer_names[$spot]} {
#format {visittimers[$spot]} {%T};
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting visit timer for %c$visittimer_names[$spot]%c.} {bold blue} {bold yellow} {bold blue} {bold green} {bold blue};
#foreach {$visittimers[]} {spot} {
#regex {%1 %2} {$visittimers[$spot][name]} {
#format {visittimers[$spot][time]} {%T};
#if {"$visittimers[$spot][group]" == "true"} {
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting visit timer for%c $visittimers[$spot][name] ($spot)%c.} {bold blue} {bold yellow} {bold blue} {bold green} {bold blue};
};
#else {
#format {xptimer_message} {%c[XPTimer] %c*%c Resetting visit timer for%c $visittimers[$spot][name]%c.} {bold blue} {bold yellow} {bold blue} {bold green} {bold blue};
};
#echo {$xptimer_message};
};
}
@ -89,119 +250,178 @@
#ACTION {%1 deals the death blow to %2.} {
#foreach {$killtimers[]} {spot} {
#regex {%2} {$spot} {
#format {killtimers[$spot]} {%T};
#format {killtimers[$spot][time]} {%T};
};
}
}
#ACTION {You kill %1.} {
#foreach {$killtimers[]} {spot} {
#regex {%1} {$spot} {
#format {killtimers[$spot]} {%T};
#format {killtimers[$spot][time]} {%T};
};
}
}
#ALIAS {dt} {
#echo {.:: Death Timers ::.};
#format {current_time} {%T};
#foreach {$killtimers[]} {spot} {
#format {spotname} {$killtimer_names[$spot]};
#FUNCTION {write_spot} {
#var {spotname} {%1};
#var {spottime} {%2};
#var {spotrespawn} {%3};
#if {$killtimers[$spot] == 0} {
#format {spotstring} { - (???) %s } {$spotname};
#format {current_time} {%T};
#if {$spottime == 0} {
#format {spotstring} { - (???) %s } {$spotname};
};
#else {
#math {mins} {$current_time - $spottime};
#math {mins} {($mins - (60 - 1)) / 60};
#nop Choose a color-code based on downtime;
#if {$mins > ($spotrespawn + 40)} {
#var {current_spot_color} {<099>};
};
#elseif {$mins > ($spotrespawn + 20)} {
#var {current_spot_color} {<119>};
};
#elseif {$mins > $spotrespawn} {
#var {current_spot_color} {<139>};
};
#else {
#math {mins} { (($current_time - $killtimers[$spot]) + 0.5) / 60 };
#if {$mins > 99} { #var {mins} {99} };
#if {$mins > 10} {
#format {spotstring} { - (%dm) %s } {$mins} {$spotname};
};
#else {
#format {spotstring} { - (0%dm) %s } {$mins} {$spotname};
}
#var {current_spot_color} {<099>};
}
#if {$mins > 99} { #var {mins} {99} };
#nop Format the line to print;
#if {$mins >= 10} {
#format {spotstring} { - (%dm) %c%s<099> } {$mins} {$current_spot_color} {$spotname};
};
#else {
#nop Zero pad under 10 mins;
#format {spotstring} { - (0%dm) %c%s<099> } {$mins} {$current_spot_color} {$spotname};
}
};
#return {$spotstring};
}
#ALIAS {dt} {
#format {current_time} {%T};
#var {spot_groups} {};
#var {spot_groups_respawn} {};
#echo {.:: Death Timers ::.};
#foreach {$killtimers[]} {spot} {
#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] < $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;
};
#var {spotstring} {@write_spot{$killtimers[$spot][name];$killtimers[$spot][time];$killtimers[$spot][respawn]}};
#echo {$spotstring};
}
#foreach {$spot_groups[]} {spot} {
#var {spotstring} {@write_spot{$spot;$spot_groups[$spot];$spot_groups_respawn[$spot]}};
#echo {$spotstring};
}
#echo {\n};
#var {spot_groups} {};
#var {spot_groups_respawn} {};
#echo {.:: Visit Timers ::.};
#format {current_time} {%T};
#foreach {$visittimers[]} {spot} {
#format {spotname} {$visittimer_names[$spot]};
#if {$visittimers[$spot] == 0} {
#format {spotstring} { - (???) %s } {$spotname};
};
#else {
#math {mins} { (($current_time - $visittimers[$spot]) + 0.5) / 60 };
#if {$mins > 99} { #var {mins} {99} };
#if {$mins > 10} {
#format {spotstring} { - (%dm) %s } {$mins} {$spotname};
#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] < $spot_groups[$visittimers[$spot][name]]} {
#var {spot_groups[$visittimers[$spot][name]]} {$visittimers[$spot][time]};
#var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]};
};
#else {
#format {spotstring} { - (0%dm) %s } {$mins} {$spotname};
}
}
#continue;
};
#var {spotstring} {@write_spot{$visittimers[$spot][name];$visittimers[$spot][time];$visittimers[$spot][respawn]}};
#echo {$spotstring};
}
#foreach {$spot_groups[]} {spot} {
#var {spotstring} {@write_spot{$spot;$spot_groups[$spot];$spot_groups_respawn[$spot]}};
#echo {$spotstring};
}
#echo {\n};
}
#ALIAS {writetimerstofile} {
#system {rm $xptimer_file && touch $xptimer_file};
#system {> $xptimer_file};
#format {current_time} {%T};
#var {spot_groups} {};
#var {spot_groups_respawn} {};
#line {log} {$xptimer_file} {.:: Death Timers ::. };
#foreach {$killtimers[]} {spot} {
#format {spotname} {$killtimer_names[$spot]};
#if {$killtimers[$spot] == 0} {
#format {spotstring} { - (???) %s } {$spotname};
};
#else {
#math {mins} { (($current_time - $killtimers[$spot]) + 0.5) / 60 };
#if {$mins > 99} { #var {mins} {99} };
#if {$mins > 10} {
#format {spotstring} { - (%dm) %s } {$mins} {$spotname};
#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]};
};
#else {
#format {spotstring} { - (0%dm) %s } {$mins} {$spotname};
}
}
#continue;
};
#var {spotstring} {@write_spot{$killtimers[$spot][name];$killtimers[$spot][time];$killtimers[$spot][respawn]}};
#line {log} {$xptimer_file} {$spotstring};
}
#foreach {$spot_groups[]} {spot} {
#var {spotstring} {@write_spot{$spot;$spot_groups[$spot];$spot_groups_respawn[$spot]}};
#line {log} {$xptimer_file} {$spotstring};
}
#line {log} {$xptimer_file} {\n\r\n\r.:: Visit Timers ::. };
#var {spot_groups} {};
#var {spot_groups_respawn} {};
#foreach {$visittimers[]} {spot} {
#format {spotname} {$visittimer_names[$spot]};
#if {$visittimers[$spot] == 0} {
#format {spotstring} { - (???) %s } {$spotname};
};
#else {
#math {mins} { (($current_time - $visittimers[$spot]) + 0.5) / 60 };
#if {$mins > 99} { #var {mins} {99} };
#if {$mins > 10} {
#format {spotstring} { - (%dm) %s } {$mins} {$spotname};
#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]};
};
#else {
#format {spotstring} { - (0%dm) %s } {$mins} {$spotname};
}
}
#continue;
};
#var {spotstring} {@write_spot{$visittimers[$spot][name];$visittimers[$spot][time];$visittimers[spot][respawn]}};
#line {log} {$xptimer_file} {$spotstring};
}
#foreach {$spot_groups[]} {spot} {
#var {spotstring} {@write_spot{$spot;$spot_groups[$spot];$spot_groups_respawn[$spot]}};
#line {log} {$xptimer_file} {$spotstring};
}
}
@ -231,13 +451,11 @@
#var {syncname} {$syncitem[1]};
#var {synctime} {$syncitem[2]};
#foreach {$killtimer_names[]} {spotident} {
#var {spotname} {$killtimer_names[$spotident]};
#foreach {$killtimers[]} {spotident} {
#var {spotname} {$killtimers[$spotident][name]};
#if {"$spotname" == "$syncname"} {
#if {$killtimers[$spotident] < $synctime} {
#var {killtimers[$spotident]} {$synctime};
#math {synccount} {$synccount + 1};
};
#var {killtimers[$spotident][time]} {$synctime};
#math {synccount} {$synccount + 1};
};
}
}
@ -247,13 +465,11 @@
#var {syncname} {$syncitem[1]};
#var {synctime} {$syncitem[2]};
#foreach {$visittimer_names[]} {spotident} {
#var {spotname} {$visittimer_names[$spotident]};
#foreach {$visittimers[]} {spotident} {
#var {spotname} {$killtimers[$spotident][name]};
#if {"$spotname" == "$syncname"} {
#if {$visittimers[$spotident] < $synctime} {
#var {visittimers[$spotident]} {$synctime};
#math {synccount} {$synccount + 1};
};
#var {visittimers[$spotident][time]} {$synctime};
#math {synccount} {$synccount + 1};
};
}
}
@ -266,16 +482,16 @@
#var {dtsync_msg} {};
#var {vtsync_msg} {};
#foreach {$killtimer_names[]} {spotident} {
#if {$killtimers[$spotident] > 0} {
#format {dtsync_msg} {%s,%s=%d} {$dtsync_msg}{$killtimer_names[$spotident]}{$killtimers[$spotident]};
#foreach {$killtimers[]} {spotident} {
#if {$killtimers[$spotident][time] > 0} {
#format {dtsync_msg} {%s,%s=%d} {$dtsync_msg}{$killtimers[$spotident][name]}{$killtimers[$spotident][time]};
};
}
#regex {$dtsync_msg} {^,{(.+)}$} { #var {dtsync_msg} {&1}; };
#foreach {$visittimer_names[]} {spotident} {
#if {$visittimers[$spotident] > 0} {
#format {vtsync_msg} {%s,%s=%d} {$vtsync_msg}{$visittimer_names[$spotident]}{$visittimers[$spotident]};
#foreach {$visittimers[]} {spotident} {
#if {$visittimers[$spotident][time] > 0} {
#format {vtsync_msg} {%s,%s=%d} {$vtsync_msg}{$visittimers[$spotident][name]}{$visittimers[$spotident][time]};
};
}
#regex {$vtsync_msg} {^,{(.+)}$} { #var {vtsync_msg} {&1}; };
@ -290,22 +506,27 @@
#var {room_info} {%1};
#foreach {$visittimers[]} {spot} {
#regex {$room_info} {$spot} {
#format {visittimers[$spot]} {%T};
#format {visittimers[$spot][time]} {%T};
}
}
}
#ALIAS {gsdt} {
#var {gsdt_string} {};
#var {spot_groups} {};
#var {group_spot_label} {};
#foreach {$killtimers[]} {spot} {
#format {spotname} {$killtimer_names[$spot]};
#format {spotname} {$killtimers[$spot][name]};
#var {mins} {???};
#if {$killtimers[$spot] == 0} {
#if {$killtimers[$spot][time] == 0} {
#format {spotstring} {%s: ??? |} {$spotname};
};
#else {
#math {mins} { (($current_time - $killtimers[$spot]) + 0.5) / 60 };
#math {mins} {$current_time - $killtimers[$spot][time]};
#math {mins} {($mins - (60 - 1)) / 60};
#if {$mins > 99} { #var {mins} {99} };
#if {$mins < 10} {
@ -316,18 +537,40 @@
};
}
#if {"$killtimers[$spot][group]" == "true"} {
#if {&spot_groups[$killtimers[$spot][name]] == 0} {
#var {spot_groups[$killtimers[$spot][name]]} {$killtimers[$spot][time]};
#var {group_spot_label[$killtimers[$spot][name]]} {$spotstring};
};
#if {$killtimers[$spot][time] < $spot_groups[$killtimers[$spot][name]]} {
#var {spot_groups[$killtimers[$spot][name]]} {$killtimers[$spot][time]};
#var {group_spot_label[$killtimers[$spot][name]]} {$spotstring};
};
#continue;
};
#format {gsdt_string} {%s %s} {$gsdt_string} {$spotstring};
}
#foreach {$spot_groups} {spot} {
#format {gsdt_string} {%s %s} {$gsdt_string} {$group_spot_label[$spot]};
};
#var {spot_groups} {};
#var {group_spot_label} {};
#foreach {$visittimers[]} {spot} {
#format {spotname} {$visittimer_names[$spot]};
#format {spotname} {$visittimers[$spot][name]};
#var {mins} {???};
#if {$visittimers[$spot] == 0} {
#if {$visittimers[$spot][time] == 0} {
#format {spotstring} {%s: ??? |} {$spotname};
};
#else {
#math {mins} { (($current_time - $visittimers[$spot]) + 0.5) / 60 };
#math {mins} {$current_time - $visittimers[$spot][time]};
#math {mins} {($mins - (60 - 1)) / 60};
#if {$mins > 99} { #var {mins} {99} };
#if {$mins < 10} {
@ -338,9 +581,26 @@
};
}
#if {"$visittimers[$spot][group]" == "true"} {
#if {&spot_groups[$visittimers[$spot][name]] == 0} {
#var {spot_groups[$visittimers[$spot][name]]} {$visittimers[$spot][time]};
#var {group_spot_label[$visittimers[$spot][name]]} {$spotstring};
};
#if {$visittimers[$spot][time] < $spot_groups[$visittimers[$spot][name]]} {
#var {spot_groups[$visittimers[$spot][name]]} {$visittimers[$spot][time]};
#var {group_spot_label[$visittimers[$spot][name]]} {$spotstring};
};
#continue;
};
#format {gsdt_string} {%s %s} {$gsdt_string} {$spotstring};
}
#foreach {$spot_groups} {spot} {
#format {gsdt_string} {%s %s} {$gsdt_string} {$group_spot_label[$spot]};
};
#regex {$gsdt_string} {^{(.+)} \|$} {#var {gsdt_string} {&1}; };
#send {group say $gsdt_string};

View File

@ -17,7 +17,11 @@
#var {tpa_status} {1};
#var {tpa_color} {invisible};
#format {tpa_start} {%T};
update_prompt;
#nop Update ourselves in the group shield monitor;
#variable {group_shields[$GMCP[charinfo][capname]][tpa]} {1};
/writegroupshieldstofile
update_prompt
}
@ -57,13 +61,18 @@
#alias {/break_tpa} {
#showme {\a\a};
#if {&{tpa_start}} {
#math {tpa_dur} { (($tpa_end - $tpa_start) + 0.5) / 60 };
#math {tpa_dur} {$tpa_end - $tpa_start};
#math {tpa_dur} {($tpa_dur - (60 - 1)) / 60};
#echo {<168>*** TPA broken! (lasted for $tpa_dur minutes) ***<099>};
}
#nop Update ourselves in the group shield monitor;
#variable {group_shields[$GMCP[charinfo][capname]][tpa]} {0};
/writegroupshieldstofile
#unvar {tpa_start};
#unvar {tpa_end};
update_prompt;
update_prompt
}
#nop ### alias to reset TPA status, if it breaks and we didn't catch it ###