Compare commits

..

No commits in common. "15b96bd0955f592db46ee085c4793c0d512e2d76" and "d0c648193f1f0d265d7daba473b95eaa871d849f" have entirely different histories.

12 changed files with 41 additions and 2587 deletions

View File

@ -1,7 +1,7 @@
#VARIABLE {chat_file} {logs/chat.log}
#CONFIG {SPEEDWALK} {OFF};
#CONFIG {PACKET PATCH} {0.75}; #nop not perfect, yet to find a value that stops all broken lines;
#CONFIG {PACKET PATCH} {5};
#CONFIG {COLOR PATCH} {ON};
#CONFIG {MCCP} {ON};
#CONFIG {MOUSE} {ON};
@ -24,10 +24,11 @@
#READ {src/quota.tin};
#READ {src/combat.tin};
#READ {src/deadletter.tin};
#READ {src/db.tin};
#READ {src/magic.tin};
#READ {src/missions.tin}; #nop this file loads all the individual mission files (sailing, sausage, werks);
#READ {src/missions.tin};
#READ {src/group.tin};
#READ {src/personal.tin};

View File

@ -1,7 +0,0 @@
#CLASS {dbsync} OPEN
#VARIABLE {bookmark_sync}
{
}
#CLASS {dbsync} CLOSE

View File

@ -1,7 +0,0 @@
#CLASS {mindsync} OPEN
#VARIABLE {mindspace_sync}
{
}
#CLASS {mindsync} CLOSE

View File

@ -108,15 +108,6 @@
#NOP ==[Horses]==
#HIGHLIGHT {brindle horse} orange;
#NOP ==[Magic Items]==;
#SUB {^You feel you have regained enough strength to invoke a flame weapon again.$} {You feel you have regained enough strength to <fff>invoke<900> a <fcb>flame<900> weapon again.};
#ACTION {^You feel you have regained enough strength to invoke a flame weapon again.$} { #showme {\a}; };
#SUB {^You zap your balsa wand at %1.$} {You <ffb>zap<900> your <bfe>balsa wand<900> at <fff>%1<900>.};
#SUB {^A pulse of light leaves the balsa wand and envelops %1.$} {A <ffb>pulse of light<900> leaves the <bfe>balsa wand<900> and envelops <fff>%1<900>.};
#SUB {^A pulse of pure night leaves the balsa wand and envelops you.$} {A <ffb>pulse<900> of <bbd>pure night<900> leaves <bfe>the balsa wand<900> and envelops <fff>you<900>.};
#SUB {^A pulse of pure night leaves the balsa wand and envelops you, while %1 fizzles slightly and dims.$} {A <ffb>pulse<900> of <bbd>pure night<900> leaves <bfe>the balsa wand<900> and envelops <fff>you<900>, while the <fff>black diamond nostril stud<900> fizzles slightly and <bbd>dims<900>.};
#HIGHLIGHT {^You feel your skin start to ripple uncomfortably...$} {<bbf>};
#NOP ==[Tab Completions]==
#ACTION {^[%1 has gained the %2 achievement %3]$} {
#tab {%1};

View File

@ -65,7 +65,7 @@
#send {speak};
#send {cols 999};
};
#nop #ALIAS {^spells$} { #send {cols 60}; #nop #send {spells}; #nop #send {cols 999}; #nop };
#ALIAS {^spells$} { #send {cols 60}; #send {spells}; #send {cols 999}; };
#ALIAS {^rituals$} { #send {cols 60}; #send {rituals}; #send {cols 999}; };
#ALIAS {^group status$} { #send {cols 60}; #send {group status}; #send {cols 999}; };

View File

@ -1,8 +1,6 @@
#CLASS {database} {kill};
#CLASS {database} {open};
#VARIABLE {dbbookmark_file} {logs/features/dbbookmarksync.tin};
#VARIABLE {map_id_names} {
{1}{Ankh-Morpork}
{2}{AM Assassins}
@ -115,18 +113,17 @@
{map_name}{$map_id_names[$gatherable_results[4]]}
};
#showme {<acf> [<cfe>@dbroute_link{$gather_count;$gather_count}<acf>]: <cfa>@dbroute_link{$gather_count;$gatherable_info[item_name]}<acf> found in <fca>@dbroute_link{$gather_count;$gatherable_info[room_short]}<acf>,<fca> $gatherable_info[map_name]<099>};
#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};
#variable {last_query_list[$gather_count]} {$gatherable_info};
#math {gather_count} {$gather_count + 1};
};
#showme {<acf>Generate a walking path with "<cfa>db route #<acf>" or *clicking* the number or name of one of the results above.};
#showme {};
}
} {
#format {gatherable_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$gatherable_display};
};
};
}
}
#ALIAS {db npc {[^{}\n]+}{( \{([\w\s-]+)\})?}$} {
#unvariable {npc_display} {search_term} {query};
@ -167,13 +164,12 @@
{room_short}{$npc_results[4]}
};
#showme {<acf> [<cfe>@dbroute_link{$npc_count;$npc_count}<acf>]: <cfa>@dbroute_link{$npc_count;$npc_info[npc_name]}<acf> found in <fca>@dbroute_link{$npc_count;$npc_info[room_short]}<acf>,<fca> $npc_info[map_name]<099>};
#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};
#variable {last_query_list[$npc_count]} {$npc_info};
#math {npc_count} {$npc_count + 1};
};
#showme {<acf>Generate a walking path with "<cfa>db route #<acf>" or *clicking* the number or name of one of the results above.};
#showme {};
}
} {
#format {npc_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$npc_display};
@ -220,13 +216,12 @@
{room_short}{$npcitem_results[5]}
};
#showme {<acf> [<cfe>@dbroute_link{$npcitem_count;$npcitem_count}<acf>]: <cfa>@dbroute_link{$npcitem_count;$npcitem_info[item_name]}<acf> found on <fff>$npcitem_info[npc_name]<acf> in <fca>@dbroute_link{$npcitem_count;$npcitem_info[room_short]}<acf>,<fca> $npcitem_info[map_name]<099>};
#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};
#variable {last_query_list[$npcitem_count]} {$npcitem_info};
#math {npcitem_count} {$npcitem_count + 1};
};
#showme {<acf>Generate a walking path with "<cfa>db route #<acf>" or *clicking* the number or name of one of the results above.};
#showme {};
}
} {
#format {npcitem_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$npcitem_display};
@ -273,15 +268,12 @@
{map_name}{$map_id_names[$item_results[5]]}
};
#nop #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};
#nop #echo {$item_display};
#showme {<acf> [<cfe>@dbroute_link{$item_count;$item_count}<acf>]: <cfa>@dbroute_link{$item_count;$item_info[item_name]}<acf> (<ffa>$item_info[sale_price]<acf>) found in <fca>@dbroute_link{$item_count;$item_info[room_short]}<acf>,<fca> $item_info[map_name]<099>};
#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};
#variable {last_query_list[$item_count]} {$item_info};
#math {item_count} {$item_count + 1};
};
#showme {<acf>Generate a walking path with "<cfa>db route #<acf>" or *clicking* the number or name of one of the results above.};
#showme {};
} {
#format {item_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$item_display};
@ -327,14 +319,12 @@
{room_type}{$room_results[4]}
};
#nop #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};
#showme {<acf> [<cfe>@dbroute_link{$room_count;$room_count}<acf>]: <cfa>@dbroute_link{$room_count;$room_info[room_short]} <acf>(<ffa>$room_info[room_type]<acf>) found in <fca>$room_info[map_name]<099>};
#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};
#variable {last_query_list[$room_count]} {$room_info};
#math {room_count} {$room_count + 1};
};
#showme {<acf>Generate a walking path with "<cfa>db route #<acf>" or *clicking* the number or name of one of the results above.};
#showme {};
}
} {
#format {room_display} {%cQuery Result: %c%s%c was not found.<099>} {Azure}{Green}{%1}{Azure};
#echo {$room_display};
@ -366,7 +356,7 @@
#list {route_length} {create} {$route_length};
#list {route_length} {size} {route_length};
#format {route_confirm} {<acf>[<fff>speedwalk<acf>] A route was found, type "%c@dbspeedwalk_link{}<acf>" to fast travel. [%c%g<acf> steps]<099>} {Green}{Cyan}{$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};
} {
#format {route_display} {<acf>[<fff>speedwalk<acf>] No previous query data found, try searching first.<099>};
@ -376,11 +366,11 @@
#ALIAS {speedwalk} {
#send {RuhsSpeedRun};
};
}
#ALIAS {db routeto %1} {
#var {target_room} {%1};
#format {route_display} {<acf>[<fff>speedwalk<acf>] Generating speedwalk from current location to specified room. <aaa>%s<099>} {%1};
#format {route_display} {<acf>[<fff>speedwalk<acf>] Generating speedwalk from current location to specified id <cfa>%s<acf>.<099>} {%1};
#echo {$route_display};
@ -403,184 +393,24 @@
#list {route_length} {create} {$route_length};
#list {route_length} {size} {route_length};
#format {route_confirm} {<acf>[<fff>speedwalk<acf>] A route was found, type %c@dbspeedwalk_link{}<acf> to fast travel. [%c%g<acf> steps]<099>} {Green}{Cyan}{$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};
};
#ALIAS {^db$} {
#showme {<acf>[<fff>speedwalk<acf>] Try "<afa>db help<acf>" for usage instructions.<099>};
#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 { <138>*<acf> "<bdc>db room <bbd><query><acf>" - search for a room by name<099>};
#showme { <138>*<acf> "<bdc>db item <bbd><query><acf>" - search for an item in shops by name<099>};
#showme { <138>*<acf> "<bdc>db npc <bbd><query><acf>" - search for an NPC by name<099>};
#showme { <138>*<acf> "<bdc>db npcitem <bbd><query><acf>" - search for an item in NPC inventories by name<099>};
#showme { <138>*<acf> "<bdc>db gatherable <bbd><query><acf>" - search for a gatherable item by name<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 "<bdc>db route <bbd><#><acf>", where "<bbd><#><acf>" is the row number shown in the results. You can then type "<afa>speedwalk<acf>" to start moving. Alternatively, <fbe>mouse-click<acf> on a result to generate a route, then click "<afa>speedwalk<acf>" to begin moving.<099>};
#showme {<099>};
#showme {<acf>There's also a bookmark system for frequently used rooms, see "<afa>db bookmark help<acf>" for details.<099>};
#showme {<099>};
#showme {<acf>Tips:<099>};
#showme { <138>*<acf> When searching, the "<bbd>query<acf>" is case-sensitive.<099>};
#showme { <138>*<acf> Searches may be filtered to certain maps by providing a second parameter like "<bbd>\{map_name\}<acf>".<099>};
#showme { <138>*<acf> Example, to find swords in the Ramtops, you could "<bdc>db item <bbd>sword \{ramtops\}<acf>".<099>};
#showme { <138>*<acf> Valid map names include:<099>};
#showme { <138>* <dcf>am/ankh-morpork <138>* <dcf>bp/bes pelargic<acf><099>};
#showme { <138>* <dcf>djb/djelibeybi <138>* <dcf>ephebe<acf><099>};
#showme { <138>* <dcf>genua <138>* <dcf>ramtops<acf><099>};
#showme { <138>* <dcf>sto/sto plains <138>* <dcf>sto-lat<acf> <099>};
};
#nop *** BOOKMARK SYSTEM IMPLEMENTATION ***;
#ALIAS {^db bookmark help$} {
#showme {<acf>[<fff>speedwalk<acf>] Speedwalk Bookmark System Commands:<099>};
#showme { <138>*<acf> "<bdc>db bookmark <bbd>add here<acf>" - add current location to bookmarks.<099>};
#showme { <138>*<acf> "<bdc>db bookmark <bbd>list<acf>" - show a list of saved locations.<099>};
#showme { <138>*<acf> "<bdc>db bookmark <bbd>remove <#><acf>" - remove bookmark at index..<099>};
#showme {<099>};
#showme {<acf>Generate a route from your current location to a bookmark using "<afa>db bookmark route <bbd><#><acf>" or <fbe>mouse-clicking<acf> on a result from "<afa>db bookmark list<acf>". You can then click or type "<afa>speedwalk<acf> to start moving.<099>};
};
#nop sync database speedwalk bookmarks from file on load;
#class {dbsync} {clear};
#class {dbsync} {read} {$dbbookmark_file};
#variable {db_bookmark_list} {$bookmark_sync};
#class {dbsync} {kill};
#ALIAS {^db bookmark list$} {
#showme {<acf>[<fff>speedwalk<acf>] Speedwalk Saved Bookmarks:<099>};
#list {db_bookmark_list} {size} {db_bookmark_size};
#if {$db_bookmark_size > 0} {
#var {bookmark_count} {0};
#foreach {$db_bookmark_list[%*]} {bookmark_result} {
#math {bookmark_list_index} {$bookmark_count + 1};
#variable {bookmark_room_id} {$db_bookmark_list[$bookmark_list_index][id]};
#showme {<acf> [<cfe>@dbrouteto_link{$bookmark_room_id;$bookmark_count}<acf>]: Room "<cfa>@dbrouteto_link{$bookmark_room_id;$bookmark_result[name]}<acf>" in <fca>$bookmark_result[map]<acf> (<cde>$bookmark_result[type]<acf>).<099>};
#math {bookmark_count} {$bookmark_count + 1};
};
};
#else {
#showme {<acf> No saved bookmarks found, add one with "<cfa>db bookmark add here<acf>" or refer to "<cfa>db bookmark help<acf>".<099>};
};
};
#ALIAS {^db bookmark add here$} {
#nop first - are we at our bookmark capacity?;
#list {db_bookmark_list} {size} {db_bookmark_size};
#if {$db_bookmark_size > 19} {
#showme {<acf>[<fff>speedwalk<acf>] Maximum allowed number of bookmarks already set, remove one first.<099>};
#return;
};
#nop next - do we already have this place bookmarked?;
#foreach {$db_bookmark_list[%*]} {bookmark_result} {
#if {"$bookmark_result[id]" == "$GMCP[room][info][identifier]"} {
#showme {<acf>[<fff>speedwalk<acf>] This room is already bookmarked and entitled "<cfa>$bookmark_result[name]<acf>".<099>};
#return;
};
};
#nop TODO if we decide to allow nicknames then need to check for duplicates there as well;
#nop TODO saving class to file each time we add/remove so it persists;
#nop some places don't have a "name" (e.g. Medina or Shades), don't allow bookmarking those for now.;
#if {"$GMCP[room][info][name]" == ""} {
#showme {<acf>[<fff>speedwalk<acf>] This room is not able to be bookmarked.<099>};
#return;
};
#nop go to the database to get a MapID to store;
#format {query} {SELECT room_id, map_id, room_short, room_type FROM rooms WHERE room_id = '%s' LIMIT 1;} {$GMCP[room][info][identifier]};
#format {db_command} {sqlite3 -separator ";" src/quow.db "%s"} {$query};
#script {room_query_result} {$db_command};
#format {room_query_result} {$room_query_result[1]};
#replace {room_query_result} {\\} {};
#list {room_results} {create} {${room_query_result}};
#variable {room_info} {
{room_id}{$room_results[1]}
{map_name}{$map_id_names[$room_results[2]]}
{room_short}{$room_results[3]}
{room_type}{$room_results[4]}
};
#nop finally put the new bookmark in our list;
#list {db_bookmark_list} {add} {{
{id}{$room_info[room_id]}
{name}{$room_info[room_short]}
{map}{$room_info[map_name]}
{type}{$room_info[room_type]}
}};
#showme {<acf>[<fff>speedwalk<acf>] Added a new bookmark for "<cfa>$GMCP[room][info][name]<acf>" in <fca>$room_info[map_name]<acf> (<cde>$room_info[room_type]<acf>).<099>};
/writedbbookmarkstofile;
};
#ALIAS {^db bookmark remove %d$} {
#math {bookmark_removal_index} {%1 + 1};
#nop is this index in valid range?;
#list {db_bookmark_list} {size} {db_bookmark_size};
#if {$db_bookmark_size < $bookmark_removal_index} {
#showme {<acf>[<fff>speedwalk<acf>] No bookmark with number "<cfa>%1<acf>" set, check "<fca>db bookmark list<acf>".<099>};
#return;
};
#nop otherwise seems valid, so remove it;
#list {db_bookmark_list} {get} {$bookmark_removal_index} {removed_bookmark};
#list {db_bookmark_list} {delete} {$bookmark_removal_index};
#showme {<acf>[<fff>speedwalk<acf>] Removed an existing bookmark for "<cfa>$removed_bookmark[name]<acf>" at index "<fca>$bookmark_removal_index<acf>".<099>};
/writedbbookmarkstofile;
};
#ALIAS {^db bookmark route %d$} {
#math {bookmark_route_index} {%1 + 1};
#nop is this index in valid range?;
#list {db_bookmark_list} {size} {db_bookmark_size};
#if {$db_bookmark_size < $bookmark_route_index} {
#showme {<acf>[<fff>speedwalk<acf>] No bookmark with number "<cfa>%1<acf>" set, check "<fca>db bookmark list<acf>".<099>};
#return;
};
#nop otherwise seems valid, so lets route to it;
db routeto $db_bookmark_list[$bookmark_route_index][id];
};
#ALIAS {^/writedbbookmarkstofile} {
#class {dbsync} {clear};
#class {dbsync} {open};
#var {bookmark_sync} {$db_bookmark_list};
#class {dbsync} {close};
#system {touch $dbbookmark_file};
#class {dbsync} {write} {$dbbookmark_file};
};
#nop *** END BOOKMARK SYSTEM IMPLEMENTATION ***;
#nop ===[ Handle Events for Clickable Links... for the newbs ]===;
#nop handle DBROUTE click events;
#EVENT {PRESSED SECURE LINK DBROUTE MOUSE BUTTON ONE} {
db route %4;
};
#EVENT {PRESSED SECURE LINK DBROUTETO MOUSE BUTTON ONE} {
db routeto %4;
};
#nop handle SPEEDWALK click events;
#EVENT {PRESSED SECURE LINK DBSPEEDWALK MOUSE BUTTON ONE} {
speedwalk;
};
#nop ===[ Functions to generate the clickable links ]===;
#FUNCTION {dbroute_link} {
#nop %1 = query result index, %2 = text to display the link as;
#return {\e]68;2;DBROUTE;%1\a\e[4;24m%2\e[24m};
};
#FUNCTION {dbrouteto_link} {
#nop %1 = id to route to, %2 = text to display the link as;
#return {\e]68;2;DBROUTETO;%1\a\e[4;24m%2\e[24m};
};
#FUNCTION {dbspeedwalk_link} {
#return {\e]68;2;DBSPEEDWALK;;\a\e[4mspeedwalk\e[24m};
#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>};
};

View File

@ -78,8 +78,7 @@
#nop reset prompt details;
#var {tpa_status} {0};
#var {tpa_color} {0};
#nop #var {tpa_start} {0};
#unvar {tpa_start};
#var {tpa_start} {0};
#unvar {quota};
#nop re-split the screen to wipe out the prompt from last character;

View File

@ -33,13 +33,13 @@
}
#nop CCC
#ACTION {^ * {Her|His|Its} skin {is|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}} {
#if {"$group_shields_current" != ""} {
#variable {group_shields[$group_shields_current][ccc]} {1};
/softwritegroupshieldstofile;
};
}
#ACTION {^ * Your skin {is|has been} {hardened|covered} {with|to}{a?} %4, although {the \w+|it} seems {weaker|not to be}} {
#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;
};
@ -57,13 +57,9 @@
/softwritegroupshieldstofile;
};
}
#ACTION {^ * You are {(really )?}protected by the power of {Pishe|Gufnork|Gapp|Sandelfon|Fish|Hat|Sek|Aegadon|Cubal|Reebox}} {
#variable {group_shields[$GMCP[charinfo][capname]][ms]} {1};
/softwritegroupshieldstofile;
}
#nop KII
#ACTION {^ * {You|She|He|It} {is|are} surrounded by a {handful|cloud|small swarm|large swarm|vast sawrm|plague} of} {
#ACTION {^ * {You|She|He|It} are surrounded by a {handful|cloud|small swarm|large swarm|vast sawrm|plague} of} {
#if {"%1" == "You"} {
#variable {group_shields[$GMCP[charinfo][capname]][kii]} {1};
};
@ -260,7 +256,7 @@
};
#nop KII;
#nop KII
#ACTION {^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 {(\w+\b\W*?){1,8}} crash to the ground.$} {
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
@ -292,16 +288,6 @@
};
};
#nop MS;
#ACTION {^You are protected by the power of {Pishe|Gufnork|Gapp|Sandelfon|Fish|Hat|Sek|Aegadon|Cubal|Reebox}.$} {
#variable {group_shields[$GMCP[charinfo][capname]][ms]} {1};
/writegroupshieldstofile;
};
#ACTION {^Your divine protection expires.$} {
#variable {group_shields[$GMCP[charinfo][capname]][ms]} {0};
/writegroupshieldstofile;
};
#nop ======================================;
@ -381,11 +367,11 @@
#format {gs_displayline} {%.6s: } {$name};
#format {gs_displayline} {%-8s} {$gs_displayline};
#foreach {tpa;ccc;eff;kii;ms} {shield} {
#foreach {tpa;ccc;eff;kii} {shield} {
#if {&group_shields[$name][$shield] && "$group_shields[$name][$shield]" == "1"} {
#format {gs_displayline} {%s <eee>%u<099>} {$gs_displayline} {$shield};
#format {gs_displayline} {%s <fef>%u<099>} {$gs_displayline} {$shield};
} {
#format {gs_displayline} {%s <bbb>%u<099>} {$gs_displayline} {$shield};
#format {gs_displayline} {%s <aaa>%u<099>} {$gs_displayline} {$shield};
};
};
#line {log} {$groupshield_file} {$gs_displayline};

View File

@ -1,138 +0,0 @@
#class {mindspace} {kill};
#class {mindspace} {open};
#nop ============================================================================= ;
#nop mindspace.tin - Mindspace calculation (spells in head, used/total/free) ;
#nop Reads spelldata.tin so spell_data is available. Use #read mindspace.tin to load. ;
#nop ============================================================================= ;
#read {src/mindspace/spelldata.tin};
#read {src/mindspace/spellbook.tin};
#nop --- Data: list of spell names currently memorized (filled by triggers in later steps) --- ;
#list {mindspace_spells} {create};
#nop --- State: current category, in-list flag, running totals, delay-finish control --- ;
#var {mindspace_category} {};
#var {mindspace_category_display} {};
#var {mindspace_in_list} {0};
#var {mindspace_used_total} {0};
#var {mindspace_category_used} {0};
#var {mindspace_category_count} {0};
#var {mindspace_pending_finish} {0};
#var {mindspace_done} {0};
#nop --- Step 6/9: per-char data (max capacity, prev spell set). Key = GMCP[charinfo][capname]. Single var for persistence. --- ;
#var {mindspace_data} {};
#var {mindspace_waiting_skills} {0};
#nop --- Load data from disk on load if we have a previous run --- ;
#variable {mindspace_file} {logs/features/mindspace_sync.tin};
#class {mindsync} {clear};
#class {mindsync} {read} {$mindspace_file};
#variable {mindspace_data} {$mindspace_sync};
#class {mindsync} {kill};
#nop --- Alias: capture max mindspace from "skills ma.sp.sp raw" (special bonus + 30). --- ;
#alias {^mindspace skills$} {
#var {mindspace_waiting_skills} {1};
#send {cols 60};
#send {skills ma.sp.sp raw};
#send {cols 999};
};
#nop --- Action: parse magic.spells.special. Table format (configurable MUD output). %1 = bonus. --- ;
#action {^| | special......... %+1..4d %+1..4d$} {
#if {"$mindspace_waiting_skills" == "1"} {
#math {mindspace_data[$GMCP[charinfo][capname]][max]} {%2 + 30};
#var {mindspace_waiting_skills} {0};
/writemindspacetofile;
#delay {1} {#showme {<aee>Mindspace max set to <fff>$mindspace_data[$GMCP[charinfo][capname]][max]<aee> (raw bonus + 30).<099>}};
};
};
#nop --- Action: parse magic.spells.special. Raw/full-path format (other MUD output option). %1 = bonus. --- ;
#action {^magic\.spells\.special %+1..4d %+1..4d$} {
#if {"$mindspace_waiting_skills" == "1"} {
#math {mindspace_data[$GMCP[charinfo][capname]][max]} {%2 + 30};
#var {mindspace_waiting_skills} {0};
/writemindspacetofile;
#delay {1} {#showme {<aee>Mindspace max set to <fff>$mindspace_data[$GMCP[charinfo][capname]][max]<aee> (raw bonus + 30).<099>}};
};
};
#nop --- Alias: set cols 60, send "spells", enable spell-line action, reset state and memorized list --- ;
#alias {^spells$} {
#list {mindspace_spells} {clear};
#var {mindspace_used_total} {0};
#var {mindspace_done} {0};
#var {mindspace_pending_finish} {0};
#send {cols 60};
#nop Step 5: spell-line. Pattern = title-like line only (avoids Columns, prompt, digits). Alternatives: OR all spell names (huge regex), require two capitals, negative prefix (Columns|You |<). ;
#action {^{[A-Z][a-zA-Z'\- ]{10,}}$} {
#if {$mindspace_in_list} {
#foreach {*spell_data[%*]} {mindspace_spell} {
#if {"%%1" == "$mindspace_spell"} {
#list {mindspace_spells} {add} {$mindspace_spell};
#math {mindspace_used_total} {$mindspace_used_total + $spell_data[$mindspace_spell][mindspace]};
#math {mindspace_category_used} {$mindspace_category_used + $spell_data[$mindspace_spell][mindspace]};
#math {mindspace_category_count} {$mindspace_category_count + 1};
#break;
};
};
};
};
#nop Step 5: blank line. End-of-category summary, set pending and 1s delay. Unactioned in /mindspace_do_finish. ;
#action {^$} {
#if {$mindspace_in_list} {
#showme { <fca>$mindspace_category_display: $mindspace_category_used [${mindspace_category_count} spells]<099>};
#var {mindspace_in_list} {0};
#var {mindspace_pending_finish} {1};
#undelay {mindspace_finish};
#delay {mindspace_finish} {/mindspace_do_finish} {1};
};
};
#send {spells};
#send {cols 999};
};
#nop --- Step 4: category header - set current category and enable line capture --- ;
#action {^You know the following {defensive|offensive|misc} magic spell{s?}:$} {
#var {mindspace_pending_finish} {0};
#var {mindspace_category} {%1};
#format {mindspace_category_display} {%n} {%1};
#var {mindspace_in_list} {1};
#var {mindspace_category_used} {0};
#var {mindspace_category_count} {0};
};
#nop --- Finish: only called when named delay fires (1s after last blank). Categories vary (1-3) so we always use delay. --- ;
#nop Step 8: /spellbook_do_gained_lost (in spellbook.tin) does diff, report, save. --- ;
#alias {/mindspace_do_finish} {
#undelay {mindspace_finish};
#unaction {^{[A-Z][a-zA-Z'\- ]{10,}}$};
#unaction {^$};
#list {mindspace_spells} {size} {mindspace_spell_count};
#if {"$mindspace_data[$GMCP[charinfo][capname]][max]" != "" && "$mindspace_data[$GMCP[charinfo][capname]][max]" != "0"} {
#math {mindspace_free} {$mindspace_data[$GMCP[charinfo][capname]][max] - $mindspace_used_total};
#showme {<fca>Total Mindspace: $mindspace_used_total / $mindspace_data[$GMCP[charinfo][capname]][max] [${mindspace_spell_count} spells, $mindspace_free free]<099>};
} {
#showme {<fca>Total Mindspace: $mindspace_used_total [${mindspace_spell_count} spells]<119> (run 'mindspace skills' to set total)<099>};
};
/spellbook_do_gained_lost;
/writemindspacetofile;
#var {mindspace_pending_finish} {0};
};
#nop --- Alias to write out mindspace data to file so we can recall it later --- ;
#alias {^/writemindspacetofile$} {
#class {mindsync} {clear};
#class {mindsync} {open};
#var {mindspace_sync} {$mindspace_data};
#class {mindsync} {close};
#class {mindsync} {write} {$mindspace_file};
};
#class {mindspace} {close};

View File

@ -1,77 +0,0 @@
#class {spellbook} {kill};
#class {spellbook} {open};
#nop ============================================================================= ;
#nop spellbook.tin - Gained/lost spell tracking (Step 8). Called via /spellbook_do_gained_lost from mindspace. ;
#nop Expects: mindspace_spells (list), mindspace_spell_count (set by mindspace). ;
#nop Uses: spell_data (from spelldata, read by mindspace). ;
#nop ============================================================================= ;
#nop --- Previous run is in mindspace_data[char][prev] directly, no working copy. --- ;
#list {mindspace_current_shorts} {create};
#list {mindspace_gained} {create};
#list {mindspace_lost} {create};
#nop --- Build current acronym list, diff vs previous, report gained/lost, save current as previous. --- ;
#alias {/spellbook_do_gained_lost} {
#list {mindspace_current_shorts} {clear};
#if {$mindspace_spell_count > 0} {
#loop 1 $mindspace_spell_count {idx} {
#var {mindspace_sn} {$mindspace_spells[$idx]};
#var {mindspace_acr} {$spell_data[$mindspace_sn][short]};
#list {mindspace_current_shorts} {add} {$mindspace_acr};
};
};
#list {mindspace_current_shorts} {size} {mindspace_cur_size};
#nop --- Previous for current char is mindspace_data[char][prev]. get size (0 if empty/missing). --- ;
#if {"$mindspace_data[$GMCP[charinfo][capname]][prev]" == ""} {
#var {mindspace_prev_size} {0};
} {
#list {mindspace_data[$GMCP[charinfo][capname]][prev]} {size} {mindspace_prev_size};
};
#if {$mindspace_prev_size == 0} {
#nop Fresh load: no previous data. Save current for next run, no reporting. --- ;
#var {mindspace_data[$GMCP[charinfo][capname]][prev]} {$mindspace_current_shorts};
#return;
};
#nop --- Gained: in current but not in previous --- ;
#list {mindspace_gained} {clear};
#loop 1 $mindspace_cur_size {ci} {
#var {mindspace_acr} {$mindspace_current_shorts[$ci]};
#var {mindspace_in_prev} {0};
#loop 1 $mindspace_prev_size {pj} {
#if {"$mindspace_acr" == "$mindspace_data[$GMCP[charinfo][capname]][prev][$pj]"} { #var {mindspace_in_prev} {1} };
};
#if {$mindspace_in_prev == 0} { #list {mindspace_gained} {add} {$mindspace_acr} };
};
#nop --- Lost: in previous but not in current --- ;
#list {mindspace_lost} {clear};
#loop 1 $mindspace_prev_size {pi} {
#var {mindspace_acr} {$mindspace_data[$GMCP[charinfo][capname]][prev][$pi]};
#var {mindspace_in_cur} {0};
#loop 1 $mindspace_cur_size {cj} {
#if {"$mindspace_acr" == "$mindspace_current_shorts[$cj]"} { #var {mindspace_in_cur} {1} };
};
#if {$mindspace_in_cur == 0} { #list {mindspace_lost} {add} {$mindspace_acr} };
};
#list {mindspace_gained} {size} {mindspace_gained_count};
#list {mindspace_lost} {size} {mindspace_lost_count};
#if {$mindspace_gained_count > 0} {
#var {mindspace_gained_line} {};
#loop 1 $mindspace_gained_count {gi} {
#if {"$mindspace_gained_line" != ""} { #var {mindspace_gained_line} {$mindspace_gained_line, $mindspace_gained[$gi]} } { #var {mindspace_gained_line} {$mindspace_gained[$gi]} };
};
#showme {<aee>You have GAINED the following spell(s) since last update: <fff>$mindspace_gained_line<099>};
};
#if {$mindspace_lost_count > 0} {
#var {mindspace_lost_line} {};
#loop 1 $mindspace_lost_count {li} {
#if {"$mindspace_lost_line" != ""} { #var {mindspace_lost_line} {$mindspace_lost_line, $mindspace_lost[$li]} } { #var {mindspace_lost_line} {$mindspace_lost[$li]} };
};
#showme {<119>You have LOST the following spell(s) since last update: <fff>$mindspace_lost_line<099>};
};
#nop --- Save current as previous for current char. --- ;
#var {mindspace_data[$GMCP[charinfo][capname]][prev]} {$mindspace_current_shorts};
};
#class {spellbook} {close};

File diff suppressed because it is too large Load Diff

View File

@ -353,7 +353,7 @@
#nop The smuggler captain dies.
#ACTION {^%1 dies.$} {
#foreach {*killtimers[]} {spot} {
#nop Force case insensitivity on the match due to "The" "A" being capitalized;
#nop Force case insensitivity on the match due to "The" "A" being capitalized
#regex {%1} {%i$spot} {
#format {killtimers[$spot][time]} {%T};
};