years worth of changes...

This commit is contained in:
Brandon Cornejo 2025-11-23 00:12:11 -06:00
parent 479236e93a
commit 331ebbe2f2
18 changed files with 524 additions and 88 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
*.log *.log
notes/
src/quow.db.old

View File

@ -23,32 +23,39 @@ if [ -n "$TMUX" ] || [ "$DISC_SESSION_CREATE" = "1" ]; then
fi fi
# Create the chat monitor window on top # Create the chat monitor window on top
tmux split-window -v -b -l 4 echo "Making chat monitor window"
#tmux split-window -v -b -l 4
tmux split-window -v -b -l 6
tmux send-keys 'clear && tail -fs .5 logs/chat.log' 'C-m' tmux send-keys 'clear && tail -fs .5 logs/chat.log' 'C-m'
# Did we ask for the full layout? # Did we ask for the full layout?
if [[ $1 == "full" ]]; then if [[ $1 == "full" || $1 != "full" ]]; then
# Horizontal split and load spottimers # Horizontal split and load spottimers
tmux select-pane -t discworld:0.0 echo "Making death timer window"
tmux select-pane -t discworld:0.1
tmux split-window -h -l 28 tmux split-window -h -l 28
tmux send-keys './bin/dt' 'C-m' tmux send-keys './bin/dt' 'C-m'
# Splice a section for group shield monitor # Splice a section for group shield monitor
echo "Making group shield window"
tmux split-window -v -p 50 tmux split-window -v -p 50
tmux send-keys './bin/grp' 'C-m' tmux send-keys './bin/grp' 'C-m'
# Place the ASCII map at the bottom # Place the ASCII map at the bottom
echo "Making map window"
tmux split-window -v -p 50 tmux split-window -v -p 50
tmux send-keys './bin/map' 'C-m' tmux send-keys './bin/map' 'C-m'
fi fi
# Cut back to main window, vertical split for mapdoortext # Cut back to main window, vertical split for mapdoortext
tmux select-pane -t discworld:0.0 echo "Making MDT window"
tmux split-window -v -b -l 5 tmux select-pane -t discworld:0.4
#tmux split-window -v -b -l 5
tmux split-window -v -b -l 6
tmux send-keys './bin/mdt' 'C-m' tmux send-keys './bin/mdt' 'C-m'
# Select main pane again and load TinTin++ with our config # Select main pane again and load TinTin++ with our config
tmux select-pane -t discworld:0.0 tmux select-pane -t discworld:0.1
tmux send-keys 'clear && tt++ -G config.tin' 'C-m' tmux send-keys 'clear && tt++ -G config.tin' 'C-m'
fi fi

View File

@ -3,7 +3,7 @@
# clear && watch --color -t -n 0.4 'python src/mdtparse.py logs/mapdoortext.log | tail -n `tput lines`' # clear && watch --color -t -n 0.4 'python src/mdtparse.py logs/mapdoortext.log | tail -n `tput lines`'
clear && while true; do clear && while true; do
output=$(printf "\ec"; python src/mdtparse.py logs/mapdoortext.log | tail -n `tput lines`); output=$(printf "\ec"; python3 src/mdtparse.py logs/mapdoortext.log | tail -n `tput lines`);
echo "$output"; echo "$output";
sleep 0.5; sleep 0.5;
done done

View File

@ -32,6 +32,7 @@
#READ {src/group.tin}; #READ {src/group.tin};
#SESSION {discworld} {discworld.starturtle.net} {4242}; #SESSION {discworld} {discworld.starturtle.net} {4242};
#nop #SESSION {discworld} {disctemp.starturtle.net} {23};
#FORMAT {log_file} {logs/active/%t.log} {%Y-%m-%d}; #FORMAT {log_file} {logs/active/%t.log} {%Y-%m-%d};
#LOG {APPEND} {$log_file}; #LOG {APPEND} {$log_file};

View File

@ -52,9 +52,11 @@
["Ramtops Highlights"], ["Ramtops Highlights"],
["headless horse rider", "red", 8, false], ["headless horse rider", "red", 8, false],
["wandering trollish locksmith", "red", 5, false],
["Ankh-Morpork Highlights"], ["Ankh-Morpork Highlights"],
["barbarian", "red", 5, false], ["barbarian", "red", 5, false],
["watchman", "red", 5, false],
["Genua Highlights"], ["Genua Highlights"],
["Tfat Chick", "red", 10, false], ["Tfat Chick", "red", 10, false],

View File

@ -21,12 +21,13 @@
#HIGHLIGHT {^When you open the %1 you think you can hear a faint rumbling sound from it.$} {red underscore}; #HIGHLIGHT {^When you open the %1 you think you can hear a faint rumbling sound from it.$} {red underscore};
#HIGHLIGHT {^Whoops! You tried to carry too many things and fumbled %1} {red underscore}; #HIGHLIGHT {^Whoops! You tried to carry too many things and fumbled %1} {red underscore};
#HIGHLIGHT {%1 juggles around his stuff and fumbles %2} {red underscore}; #HIGHLIGHT {%1 juggles around his stuff and fumbles %2} {red underscore};
#HIGHLIGHT {^The sparkles around you fall to the ground and vanish.$} {red underscore};
#NOP ==[Command Color Highlighting]== #NOP ==[Command Color Highlighting]==
#SUB {%w %w with a total of %* item} {<148>%1 %2<099> with a total of <148>%3<099> item}; #SUB {%w %w with a total of %* item} {<148>%1 %2<099> with a total of <148>%3<099> item};
#NOP ==[Truffle Found]== #NOP ==[Truffle Found]==
#HIGHLIGHT {The young truffle pig unearths a truffle from the ground.} {bold green}; #HIGHLIGHT {truffle pigs? unearths a truffle from the ground.} {bold green};
#NOP ==[Attention Soul(s)]== #NOP ==[Attention Soul(s)]==
#ACTION {^{(?!Ryattenoki).+} tugs on your sleeve in a desperate attempt to get some attention.$} { #ACTION {^{(?!Ryattenoki).+} tugs on your sleeve in a desperate attempt to get some attention.$} {
@ -35,28 +36,44 @@
#NOP ==[Copperhead Mines]== #NOP ==[Copperhead Mines]==
#SUB {you think that %1 of the surrounding crates contain} {you think that <138>%1<099> of the surrounding crates contain}; #SUB {you think that %1 of the surrounding crates contain} {you think that <138>%1<099> of the surrounding crates contain};
#SUB {a hammer chip would break %1 of rock} {a hammer chip would break <138>%1<099> of rock};
#SUB {pickaxe strike would break %1 inches.} {pickaxe strike would break <138>%1<099> inches.};
#SUB {You determine that directly behind this wall is a small gem vein of %1, exactly %2 deep.} {You determine that directly behind this wall is a small gem vein of %1, exactly <138>%2<099> deep.};
#HIGHLIGHT {You shake your pan gently, as glittering purple gathers under the cloudy water.} {bold magenta};
#HIGHLIGHT {You shake your pan from side to side, as the last of the sediment leaves the pan and the water runs clear for just a moment.} {bold magenta};
#HIGHLIGHT {Something doesn't smell right. You take a sniff but the faint odour of rotten eggs makes you cough.} {bold green underscore}; #HIGHLIGHT {Something doesn't smell right. You take a sniff but the faint odour of rotten eggs makes you cough.} {bold green underscore};
#HIGHLIGHT {Somewhere above you, you hear the rumble of falling rock.} {bold green underscore}; #HIGHLIGHT {Somewhere above you, you hear the rumble of falling rock.} {bold green underscore};
#ACTION {Something doesn't smell right. You take a sniff but the faint odour of rotten eggs makes you cough.} { #HIGHLIGHT {You suddenly feel like you can't breathe.} {bold green underscore};
#showme {\a}; #HIGHLIGHT {You collapse on the ground, your muscles spasming uncontrollably.} {bold green underscore};
}; #HIGHLIGHT {You can't smell it any more, but you're getting a dizzy sort of headache. Maybe you should get out of here.} {bold green underscore};
#ACTION {Somewhere above you, you hear the rumble of falling rock.} { #HIGHLIGHT {The air here is just as choking as before.} {bold green underscore};
#showme {\a}; #ACTION {You shake your pan gently, as glittering purple gathers under the cloudy water.} { #showme {\a}; };
}; #ACTION {You shake your pan from side to side, as the last of the sediment leaves the pan and the water runs clear for just a moment.} { #showme {\a}; };
#ACTION {Something doesn't smell right. You take a sniff but the faint odour of rotten eggs makes you cough.} { #showme {\a}; };
#ACTION {Somewhere above you, you hear the rumble of falling rock.} { #showme {\a}; };
#ACTION {You suddenly feel like you can't breathe.} { #showme {\a}; };
#ACTION {You collapse on the ground, your muscles spasming uncontrollably.} { #showme {\a}; };
#ACTION {You can't smell it any more, but you're getting a dizzy sort of headache. Maybe you should get out of here.} { #showme {\a}; };
#ACTION {The air here is just as choking as before.} { #showme {\a}; };
#NOP ==[Gemcutting/Finesmithing]== #NOP ==[Gemcutting/Finesmithing]==
#HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and delicately chip %1} {bold green}; #HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and delicately chip %1} {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 chip away %1} {bold red};
#HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and, struggling with %1} {bold red}; #HIGHLIGHT {You take the diamond-tipped chisel from your roll of gemcutting tools and, struggling with %1} {bold red};
#HIGHLIGHT {With a start, you realise that you've been going about this all wrong, %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}; #SUB {You estimate that the %1 is worth A$%2. You} {You estimate that the <149>%1<099> is worth A$<139>%2<099>. You};
#NOP ==[Achievements]== #NOP ==[Achievements]==
#ACTION {^It is your turn to fight... enter the combat ring.$} { #HIGHLIGHT {the {green|aqua|cyan|blue|yellow|red|orange|beige|brown|grey|black|violet|mauve|pink|purple} ball} {bold cyan};
#ACTION {^The %1 duellist has yielded to you, if this satisfies you then enter "accept surrender from duellist" to accept} {
#showme {\a}; #showme {\a};
} }
#ACTION {^The %1 camel gallops away abruptly.$} { #HIGHLIGHT {blackbird} {violet};
#showme {[Pushover] %0}; #HIGHLIGHT {old {men|man|women|woman|shopper|shoppers|beggar|beggars}} {bold magenta};
} #ACTION {^One of the truffle pigs unearths a truffle from the ground.$} {
#delay {120} { #showme {<ccc>CAN TRUFFLE FARM AGAIN<999>} }
};
#NOP ==[PK Actions]== #NOP ==[PK Actions]==
#HIGHLIGHT {You reach towards your goal but apuse suddenly as %1 seems to sense something. {She|He|It} doesn't spot you and %2} {bold green}; #HIGHLIGHT {You reach towards your goal but apuse suddenly as %1 seems to sense something. {She|He|It} doesn't spot you and %2} {bold green};
@ -77,6 +94,45 @@
#HIGHLIGHT {^%1 giant spiders climb up from below!} {bold violet}; #HIGHLIGHT {^%1 giant spiders climb up from below!} {bold violet};
#HIGHLIGHT {^%1 spiders scuttle up from below and join the fight!} {bold violet}; #HIGHLIGHT {^%1 spiders scuttle up from below and join the fight!} {bold violet};
#NOP ==[Sailing]==
#HIGHLIGHT {^%1 kraken reaches for you from %2. Run!$} {bold red};
#HIGHLIGHT {^%1 kraken %2, then {whips|launches} it {towards|forward at} you from %3. Run!$} {bold red};
#HIGHLIGHT {^%1 kraken reaches for %2.$} {bold blue};
#HIGHLIGHT {^%1 kraken %2, then {whips|launches} it {towards|forward at} %3.$} {bold blue};
#HIGHLIGHT {^{Quick as lightning|Striking like a cobra|In the blink of an eye|With a blur of speed|Moving too fast to see}, the tentacle snakes around %1 legs and coils its way up to {your|his|her|its} torso, binding {you|him|her|it} in an unescapable embrace.} {bold red};
#HIGHLIGHT {^The tentacle wrapped around %1 unwraps itself and {slips|retreats} back into the sea.} {bold white};
#HIGHLIGHT {^The tentacle coils tighter, making %1 go blue in the face.} {bold red};
#HIGHLIGHT {^Limbs bound tightly by the kraken's tentacle, %1 struggles to move but gets nowhere.} {yellow};
#HIGHLIGHT {^%1 looks pained as the tentacle slowly constricts the life out of {her|him|it}.} {bold red};
#HIGHLIGHT {^%1 swing{s?} {your|his|her|its} %2at the tentacle wrapped around %2, scoring a light scratch into its rubbery skin.} {bold blue};
#HIGHLIGHT {^The sea serpent {reaches for|lunges towards|strikes forward swiftly at} you from %1. Run!} {bold red};
#HIGHLIGHT {^%1, the sea serpent {reaches for|lunges towards|strikes forward swiftly at} you from %2. Run!} {bold red};
#HIGHLIGHT {^The sea serpent {reaches for|lunges towards|strikes forward swiftly at} %1.$} {bold blue};
#HIGHLIGHT {^%1, the sea serpent {reaches for|lunges towards|strikes forward swiftly at} %2.$} {bold blue};
#HIGHLIGHT {%1. It sounds like ice might be forming on the hull!$} {<aef>};
#HIGHLIGHT {^A small fire has started here. } {bold orange};
#HIGHLIGHT {^Several small blazes are eagerly licking at the floorboards. } {bold orange};
#HIGHLIGHT {^The room is filled with a huge conflagration, sparks spilling out into the nearby rooms.} {bold orange};
#HIGHLIGHT {^Fire fills the room, burning merrily without regard for the structural integrity of the ship.} {bold orange};
#HIGHLIGHT {^The dire seaweed clinging onto the hull glows faintly, %1 its way through the hull.$} {bold jade};
#HIGHLIGHT {^The ship plows through a field of floating dire seaweed, some of which glows green and latches onto the hull aggressively!$} {bold jade};
#HIGHLIGHT {^{Squinting|Gazing} up at the {sun|stars}, you determine that the ship is heading %1.$} {bold pink};
#HIGHLIGHT {^{Squinting|Gazing} up at the {sun|stars}, you guess that the ship is heading %1.$} {bold tan};
#HIGHLIGHT {^You feel too tired to tie any knots at the moment.$} {red};
#NOP ==[Horses]==
#HIGHLIGHT {brindle horse} orange;
#NOP ==[Tab Completions]==
#ACTION {^[%1 has gained the %2 achievement %3]$} {
#tab {%1};
}
#NOP ==[End Session On Quit]== #NOP ==[End Session On Quit]==
#ACTION {Thanks for playing. See you next time.} { #ACTION {Thanks for playing. See you next time.} {

View File

@ -1,5 +1,4 @@
#ALIAS {setsize} {rows 300;cols 148}; #ALIAS {setsize} {rows 300;cols 999};
#ALIAS {setmsize} {rows 300;cols 60};
#ALIAS {^clear$} { #ALIAS {^clear$} {
#system {tput clear}; #system {tput clear};
@ -57,32 +56,40 @@
#nop Resizing aliases for when we're in "cols 999" mode; #nop Resizing aliases for when we're in "cols 999" mode;
#ALIAS {^skills%1} { #ALIAS {^skills%1} {
#send {cols 130}; #send {cols 60};
#send {skills %1}; #send {skills %1};
#send {cols 999}; #send {cols 999};
}; };
#ALIAS {^{speak|language}$} { #ALIAS {^{speak|language}$} {
#send {cols 130}; #send {cols 60};
#send {speak}; #send {speak};
#send {cols 999}; #send {cols 999};
}; };
#ALIAS {^spells$} { #send {cols 130}; #send {spells}; #send {cols 999}; }; #ALIAS {^spells$} { #send {cols 60}; #send {spells}; #send {cols 999}; };
#ALIAS {^rituals$} { #send {cols 130}; #send {rituals}; #send {cols 999}; }; #ALIAS {^rituals$} { #send {cols 60}; #send {rituals}; #send {cols 999}; };
#ALIAS {^group status$} { #send {cols 130}; #send {group status}; #send {cols 999}; }; #ALIAS {^group status$} { #send {cols 60}; #send {group status}; #send {cols 999}; };
#ALIAS {^{who$|who (.+)$}} { #ALIAS {^{who$|who (.+)$}} {
#send {cols 130}; #send {cols 60};
#send {%0}; #send {%0};
#send {cols 999}; #send {cols 999};
}; };
#ALIAS {^help %1} { #ALIAS {^help %1} {
#send {cols 130}; #send {cols 60};
#send {help %1}; #send {help %1};
#send {cols 999}; #send {cols 999};
}; };
#ALIAS {^nickname$} { #ALIAS {^nickname$} {
#send {cols 130}; #send {cols 60};
#send {nickname}; #send {nickname};
#send {cols 999}; #send {cols 999};
}; };
#ALIAS {^sotp} {
#send {stop};
}
#ALIAS {gatherstones} {
#10 get rock;put white rocks&white stones&white pebbles in knapsack;bury rocks in me&stones in me&pebbles in me
}

View File

@ -11,12 +11,16 @@
#ACTION {^You {tell|ask|exclaim to} %1:%2} {#return @log_line_to_chat{};}; #ACTION {^You {tell|ask|exclaim to} %1:%2} {#return @log_line_to_chat{};};
#ACTION {^%1 {tells|asks|exclaims to} %*you{|(?: in \w+)?}: %4} {#return @log_line_to_chat{};}; #ACTION {^%1 {tells|asks|exclaims to} %*you{|(?: in \w+)?}: %4} {#return @log_line_to_chat{};};
#ACTION {^[%1] %2{:|} %3} {#return @log_line_to_chat{};}; #ACTION {^[%1] %2{:|} %3} {
#tab {%2};
#return @log_line_to_chat{};
};
#ACTION {^(They Might Be Alts) } {#return @log_line_to_chat{};}; #ACTION {^(They Might Be Alts) } {#return @log_line_to_chat{};};
#ACTION {^(The Unsinkables) } {#return @log_line_to_chat{};};
#ACTION {^(newbiehelpers)} {#return @log_line_to_chat{};}; #ACTION {^(newbiehelpers)} {#return @log_line_to_chat{};};
#ACTION {^You newbiehelper-tell:%1} {#return @log_line_to_chat{};}; #ACTION {^You newbiehelpers-tell:%1} {#return @log_line_to_chat{};};
#ACTION {^(newbie)} {#return @log_line_to_chat{};}; #ACTION {^(newbie)} {#return @log_line_to_chat{};};
#ACTION {^You newbie-tell:%1} {#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 special-tell:%1} {#return @log_line_to_chat{};};
@ -28,9 +32,6 @@
#return @log_line_to_chat{}; #return @log_line_to_chat{};
}; };
}; };
#ACTION {(>CTF<) %1} {
#return @log_line_to_chat{};
};
#ACTION {%1Inform: %2} { #ACTION {%1Inform: %2} {
#return @log_line_to_chat{}; #return @log_line_to_chat{};
}; };

View File

@ -1,50 +1,119 @@
#CLASS {combat} {kill}; #CLASS {combat} {kill};
#CLASS {combat} {open}; #CLASS {combat} {open};
#VARIABLE {my_attacks_color} {orange}; #nop == Colors ==;
#VARIABLE {enemy_attack_color} {red}; #VARIABLE {color_special_prep} {<afb>};
#VARIABLE {color_special_fail} {<eaa>};
#NOP ==[My Specials]== #VARIABLE {color_melee_out_fail} {<fec>};
#HIGHLIGHT {^You attempt to prepare %1} {bold red}; #VARIABLE {color_melee_out_success} {<cda>};
#HIGHLIGHT {^You prepare to {stab|slice|trip|shove|impale|kick|punch} %2} {bold green}; #VARIABLE {color_special_out_fail} {<eaa>};
#HIGHLIGHT {^You attempt to launch a powerful attack. %1} {bold red}; #VARIABLE {color_special_out_success} {<bfa>};
#HIGHLIGHT {^You launch a powerful attack. %1} {bold green};
#HIGHLIGHT {^You launch a powerful attack, landing a %1} {bold green}; #VARIABLE {color_melee_inc_fail} {<bcb>};
#HIGHLIGHT {^You try to {trip|shove} %1} {bold red}; #VARIABLE {color_melee_inc_success} {<baa>};
#HIGHLIGHT {^You shove %1} {bold green}; #VARIABLE {color_special_inc_fail} {<fca>};
#HIGHLIGHT {^You trip %1} {bold green}; #VARIABLE {color_special_inc_success} {<faa>};
#HIGHLIGHT {^You lose the moment.} {bold red};
#VARIABLE {color_melee_third_fail} {<bbc>};
#VARIABLE {color_melee_third_success} {<bbb>};
#VARIABLE {color_special_third_fail} {<bbd>};
#VARIABLE {color_special_third_success} {<cbb>};
#NOP ==[Backstabs]== #nop Hash marks are 110 and 148 characters, typical widths for me
#HIGHLIGHT {^You {skilfully |silently |}sneak around %1 without being spotted and manage to %2.$} {bold green}; #HIGHLIGHT {^12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890#234567890123456789012345678901234567#90};
#HIGHLIGHT {^You hold your cover as you {skillfully |silently |}sneak around %1 and manage to catch %w by surprise.$} {bold green};
#HIGHLIGHT {^You %1 with %2 but despite the surprise %3.$} {bold red} {2}; #nop ==[My Specials]==
#HIGHLIGHT {^Moving {swiftly|quickly|too fast to see}, you %1 {with|right through} %2.$} {bold green}; #nop special prep;
#HIGHLIGHT {^Catching %w {by surprise|off balance}, you %1 {with|right through} %2.$} {bold green}; #HIGHLIGHT {^You prepare to {bash|beat|chop|feint|hack|kick|pierce|punch|riposte|shove|slash|smash|stab|trip|crush|behead|impale|flick|launch a wildswing attack} %1} {$color_special_prep};
#HIGHLIGHT {^With {a blur of speed|surprising speed}, you %1 {with|right through} %2.$} {bold green}; #nop special fail;
#HIGHLIGHT {^Quick as lightning, you %1 {with|right through} %2.$} {bold green}; #HIGHLIGHT {^You attempt to prepare a special attack but {(?:\w+\b\W*?){1,8}} feels too unwieldy and you lose the initiative.$} {$color_special_fail};
#HIGHLIGHT {Striking like a cobra, you %1 {with|right through} %2.$} {bold green}; #nop special out fail;
#HIGHLIGHT {^You attempt to launch a powerful attack. %1} {$color_special_out_fail};
#HIGHLIGHT {^You attempt to {shove|trip} %2, but cannot find an opportunity} {$color_special_out_fail};
#HIGHLIGHT {^You try to {trip |shove }{(?:\w+\b\W*?){1,8}} but fail %3} {$color_special_out_fail};
#HIGHLIGHT {^You lose the moment\.$} {$color_special_out_fail};
#HIGHLIGHT {^You move as though about to launch a powerful attack on {(?:\w+\b\W*?){1,8}}\. {?>He|She|It} sees through your feint and doesn't react\.$} {$color_special_out_fail};
#nop special out success;
#HIGHLIGHT {^You launch a powerful attack{.|,} %1} {$color_special_out_success};
#HIGHLIGHT {^You {shove|trip} {(?!the corpse of).+}} {$color_special_out_success};
#HIGHLIGHT {^You move as though about to launch a powerful attack on %1\. {She|He|It} falls for your feint, leaving %3} {$color_special_out_success};
#NOP ==[Me Attacking Them]== #nop ==[Backstabs]==
#HIGHLIGHT {^You {viciously |messily |barely |neatly |}{thrust|snick|fillet|poke|chop up|chop|jab|scratch|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer|take} {a sliver off |into |}%1{'?s?} %2 {on|with} %3} {$my_attacks_color}; #HIGHLIGHT {^You %1 with %2 but despite the surprise %3.$} {$color_special_out_fail} {2};
#HIGHLIGHT {^You {viciously |messily |barely |neatly |}stab %1 {deeply |}in %2 with %3} {$my_attacks_color}; #HIGHLIGHT {^You {skilfully |silently |}sneak around %1 without being spotted and manage to %2.$} {$color_special_out_success};
#HIGHLIGHT {^You stab %1 right through %2's %3} {$my_attacks_color}; #HIGHLIGHT {^You hold your cover as you {skillfully |silently |}sneak around %1 and manage to catch %w by surprise.$} {$color_special_out_success};
#HIGHLIGHT {^You {viciously |messily |barely |neatly |}{poke|kick|punch|jab|boot|tickle|kick out} %1 in %2} {$my_attacks_color}; #HIGHLIGHT {^Moving {swiftly|quickly|too fast to see}, you %1 {with|right through} %2.$} {$color_special_out_success};
#HIGHLIGHT {^You {punch|kick out} at %1 but {his|her} %2 absorbs {some|most} of the blow\.$} {$my_attacks_color}; #HIGHLIGHT {^Catching %w {by surprise|off balance}, you %1 {with|right through} %2.$} {$color_special_out_success};
#HIGHLIGHT {^With {a blur of speed|surprising speed}, you %1 {with|right through} %2.$} {$color_special_out_success};
#HIGHLIGHT {^Quick as lightning, you %1 {with|right through} %2.$} {$color_special_out_success};
#HIGHLIGHT {Striking like a cobra, you %1 {with|right through} %2.$} {$color_special_out_success};
#NOP == [Them Attacking Me]== #nop ==[Me Attacking Them]==
#HIGHLIGHT {%1 but your %2 absorbs {some|most} of the blow.$} {$enemy_attack_color}; #HIGHLIGHT {^You {thrust|slash|swing} at %1 with {one of }your %2 but{,?} %3} {$color_melee_out_fail};
#HIGHLIGHT {%1 runs you through the %2 with %3.$} {$enemy_attack_color}; #HIGHLIGHT {^You {tap |bruise |smash |viciously |messily |barely |neatly |}{snick|fillet|poke|chop up|chop|jab|scratch|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer|take} {a sliver off |into |}%1{'?s?} %2 {on|with} %3} {$color_melee_out_success};
#HIGHLIGHT {%1 {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s %w %3 into your %4.$} {$enemy_attack_color}; #HIGHLIGHT {^You slice your %1 {deeply |}into %2's %3.$};
#HIGHLIGHT {%1 {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s your %2 {into pieces |}{with|on} %w %4.$} {$enemy_attack_color}; #HIGHLIGHT {^You {viciously |messily |barely |neatly |}stab %1 {deeply |}in %2 with %3} {$color_melee_out_success};
#HIGHLIGHT {%1 {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s into your %2 with %w %3.$} {$enemy_attack_color}; #HIGHLIGHT {^You beat %1 to a pulp\.$} {$color_melee_out_success};
#HIGHLIGHT {%1 {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s you {deeply |}in the %2.$} {$enemy_attack_color}; #HIGHLIGHT {^You stab %1 right through %2's %3} {$color_melee_out_success};
#HIGHLIGHT {%1 {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s you {deeply |}in the %2 with %3.$} {$enemy_attack_color}; #HIGHLIGHT {^You {viciously |messily |barely |neatly |}{poke|kick|punch|jab|boot|tickle|kick out} %1 in %2} {$color_melee_out_success};
#HIGHLIGHT {%1 pierces your %2 with %3.$} {$enemy_attack_color}; #HIGHLIGHT {^You {punch|kick out} at %1 but {his|her} %2 absorbs {some|most} of the blow\.$} {$color_melee_out_success};
#HIGHLIGHT {%1 hitting your %2.$} {$enemy_attack_color};
#nop ==[Their Specials At Me]==
#nop specials incoming failures;
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} reaches for you and stumbles.$} {$color_special_inc_fail};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} {trips|shoves} you, causing you to stumble slightly before regaining your balance.$} {$color_special_inc_fail};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} moves as though about to launch a powerful attack but you realise it is a feint and do not react\.$} {$color_special_inc_fail};
#HIGHLIGHT {^You suddenly {?>sense a presence|hear a noise} behind you and turn around to {?>see|find} {(?:\w+\b\W*?){1,8}} preparing to backstab you\. %4} {$color_special_inc_fail};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} attempts to launch a powerful attack. %2 at you {(with (his|her|its) .+)?}but %3} {$color_special_inc_fail};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} attempts to launch a powerful attack, landing %2 but {you|your} %3} {$color_special_inc_fail};
#HIGHLIGHT {^{(?!You )(?:\w+\b\W*?){1,8}} launches a powerful attack{\. |,} {.*} you {.*} but you{r?} {(?!\w+ skin).+}} {$color_special_inc_fail};
#nop specials incoming success;
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} moves as though about to launch a powerful attack and you prepare to defend yourself\. Too{.*}} {$color_special_inc_success};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} attacks you from behind\. You recall {?>him|her|it} standing right in front of you just a second ago\.$} {$color_special_inc_success};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} launches a powerful attack{\. |,} {(?!.*but).*} you{r?} {(?!.*but).*}} {$color_special_inc_success};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} launches a powerful attack{\. |,} {.*} you {.*} but your {.*} skin{.*}} {$color_special_inc_success};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} {trips|shoves} you, {causing you to stumble|sending you crashing to the ground}.$} {$color_special_inc_success};
#nop ==[Them Attacking Me]==
#nop melee incoming fail
#HIGHLIGHT {^{?:(?!(You|.* powerful) )(.*)} {at|to gore|on|bite} you {(with (one of )?(?:his|her|its) .* )?}but{( despite the surprise)?, although unable to defend, | }you{r?} {((?!.* skin ).*)}} {$color_melee_inc_fail};
#nop melee incoming success
#HIGHLIGHT {^{(?!(You|.* powerful) )(\w+\b\W*?){1,8}} {visciously |messily |barely |neatly |}{crushe|strike|batter|smashe|bruise|ventilate|poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer|punche|spike}s you {(deeply )?}in the {.*} with {(one of )?}{his|her|its} {.*} but your {.*} skin{.*}} {$color_melee_inc_success};
#HIGHLIGHT {^{(?!(You|.* powerful) )(\w+\b\W*?){1,8}} {visciously |messily |barely |neatly |}{crushe|strike|batter|smashe|bruise|ventilate|poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer|punche|spike}s you {deeply |}in the {.*} with {(one of )?}{his|her|its} {(?!.* but).*}} {$color_melee_inc_success};
#nop #HIGHLIGHT {{?:(?!powerful )(?:\w\+\b\W*?){1,8}} {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s %w %3 into your %4.$} {$color_melee_inc_success};
#nop #HIGHLIGHT {{?:(?!powerful )(?:\w\+\b\W*?){1,8}} {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s your %2 {into pieces |}{with|on} %w %4.$} {$color_melee_inc_success};
#nop #HIGHLIGHT {{?:(?!powerful )(?:\w\+\b\W*?){1,8}} {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s into your %2 with %w %3.$} {$color_melee_inc_success};
#nop #HIGHLIGHT {{?:(?!powerful )(?:\w\+\b\W*?){1,8}} {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s you {deeply |}in the %2.$} {$color_melee_inc_success};
#nop #HIGHLIGHT {{?:(?!powerful )(?:\w\+\b\W*?){1,8}} {viciously |messily |barely |neatly |}{poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer}s you {deeply |}in the %2 with %3.$} {$color_melee_inc_success};
#HIGHLIGHT {%1 runs you through the %2 with %3.$} {$color_melee_inc_success};
#nop ==[Specials Not Directed At Me]==
#nop specials third fail
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} moves towards {?:(?!you )(?:\w+\b\W*?){1,8}} as though about to launch a powerful attack\. {?:(?!You )(?:\w+\b\W*?){1,8}} does not react, %4} {$color_special_third_fail};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} reaches for {?:(?!you )(?:\w+\b\W*?){1,8}} and stumbles\.$} {$color_special_third_fail};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} attempts to launch a powerful attack. %2 at {?:(?!you )(.*)}} {$color_special_third_fail};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} launches a powerful attack{\. |,} {?:(?!.*(Y|y)ou )(.*)} but {his|her|its|he|she|it} {(?!.*skin).*}} {$color_special_third_fail};
#nop specials third success
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} launches a powerful attack{\. |,} {(?!.*((Y|y)ou|but) )(.*)}} {$color_special_third_success};
#HIGHLIGHT {^{?:(?!You )(?:\w+\b\W*?){1,8}} launches a powerful attack{\. |,} {?:(?!.*(Y|y)ou )(.*)} but {his|her|its|he|she|it} {.*} skin{.*}} {$color_special_third_success};
#nop ==[Attacks Not Directed At Me]==
#nop melee third fail
#HIGHLIGHT {^{?:(?!(You |.+powerful))(?:\w+\b\W*?){1,8}}{(?!.+powerful)(.+)} {crushe|strike|batter|smashe|bruise|ventilate|poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer|punche|spike|swing}s {((his|her|its).+)?}at {?:(?!(You |.+powerful))(?:\w+\b\W*?){1,8}} but {(?!.+ skin)}{.*}} {$color_melee_third_fail};
#HIGHLIGHT {^{?:(?!(You |.+powerful))(?:\w+\b\W*?){1,8}}{(?!.+powerful)(.+)} {thrust|swing|slashe}s {(his|her|its).*}?at {?:(?!You )(.*)} but{,?} {(?!.+ skin)}{.+}} {$color_melee_third_fail};
#nop melee third success
#HIGHLIGHT {^{(?!.+powerful).+} {crushe|strike|batter|smashe|bruise|ventilate|poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer|punche|spike}s {his|her|its} %4 {across|into} %6} {$color_melee_third_success};
#HIGHLIGHT {^{(?!.+powerful).+} {crushe|strike|batter|smashe|bruise|ventilate|poke|chop|jab|scratche|boot|kick|hit|tickle|hack|prick|shred|nick|cut|stab|perforate|pierce|impale|slice|skewer|punche|spike}s %3 {with|on} %5} {$color_melee_third_success};
#HIGHLIGHT {{?:(?!You )(?:\w+\b\W*?){1,8}} runs %2 through %3 with {his|her|its} %4} {$color_melee_third_success};
#HIGHLIGHT {{?:(?!You )(?:\w+\b\W*?){1,8}} takes a sliver off %2 with {his|her|its} %3} {$color_melee_third_success};
#CLASS {combat} {close}; #CLASS {combat} {close};

View File

@ -341,7 +341,7 @@
#var {route_current_room_id} {$GMCP[room][info][identifier]}; #var {route_current_room_id} {$GMCP[room][info][identifier]};
#var {route_target_room_id} {$target_room[room_id]}; #var {route_target_room_id} {$target_room[room_id]};
#format {route_command} {python src/maproute.py %s %s} {$route_current_room_id} {$route_target_room_id}; #format {route_command} {python3 src/maproute.py %s %s} {$route_current_room_id} {$route_target_room_id};
#script {speedwalk_result} {$route_command}; #script {speedwalk_result} {$route_command};
#if {"$speedwalk_result[1]" == "0"} { #if {"$speedwalk_result[1]" == "0"} {
@ -369,4 +369,34 @@
#send {RuhsSpeedRun}; #send {RuhsSpeedRun};
} }
#ALIAS {db routeto %1} {
#var {target_room} {%1};
#format {route_display} {[speedwalk] Generating speedwalk from current location to specified id %s.} {%1};
#echo {$route_display};
#var {route_current_room_id} {$GMCP[room][info][identifier]};
#var {route_target_room_id} {%1};
#format {route_command} {python3 src/maproute.py %s %s} {$route_current_room_id} {$route_target_room_id};
#script {speedwalk_result} {$route_command};
#if {"$speedwalk_result[1]" == "0"} {
#format {route_error} {%c[speedwalk] Unable to find route to %c%s%c or unknown current room.} {bold blue}{green}{$target_room[room_short]}{bold blue};
#echo {$route_error};
#return;
}
#send {$speedwalk_result[1]};
#variable {route_length} {$speedwalk_result[1]};
#replace {route_length} {\\\;} {;};
#replace {route_length} { } {};
#list {route_length} {create} {$route_length};
#list {route_length} {size} {route_length};
#format {route_confirm} {%c[speedwalk] A route was found, type "%cspeedwalk%c" to fast travel. [%g steps]} {bold blue}{green}{bold blue}{$route_length};
#echo {$route_confirm};
};
#CLASS {database} {close}; #CLASS {database} {close};

38
src/disctime.py Normal file
View File

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

107
src/gems.tin Normal file
View File

@ -0,0 +1,107 @@
#CLASS {gems} {kill};
#CLASS {gems} {open};
#var {gem} {};
#action {^It is a{n|} %2 quality %3 that could be cut into a %4 gem with one of the following forms: %5\; or could be tumbled and then cut into %6.$} {
#var {gem[quality]} {%2};
#var {gem[type]} {%3};
#var {gem[size]} {%4};
#nop ==[Parse the cut output]==;
#var {gem[cut_list]} {%5};
#nop What's our best available cut?;
#var {gem[best_cut]} {octagonal step};
#regex {$gem[cut_list]} {trillion} {#var {gem[best_cut]}{trillion};};
#regex {$gem[cut_list]} {pear\-shaped} {#var {gem[best_cut]}{pear-shaped};};
#regex {$gem[cut_list]} {cushion} {#var {gem[best_cut]} {cushion};};
#regex {$gem[cut_list]} {rose} {#var {gem[best_cut]} {rose};};
#regex {$gem[cut_list]} {marquise} {#var {gem[best_cut]} {marquise};};
#regex {$gem[cut_list]} {brilliant} {#var {gem[best_cut]} {brilliant};};
#regex {$gem[cut_list]} {heart\-shaped} {#var {gem[best_cut]} {heart-shaped};};
#regex {$gem[cut_list]} {oval\-shaped} {#var {gem[best_cut]} {oval-shaped};};
#regex {$gem[cut_list]} {teardrop} {#var {gem[best_cut]} {teardrop};};
#regex {$gem[cut_list]} {princess} {#var {gem[best_cut]} {princess};};
#if {$gem[active] == 1} {
#if {"$gem[size]" != "tiny"} {
#echo {<149>[Gemcrafting] Found a non-tiny gem, chipping and returning to crate<099>};
#send {chip uncut gem with gemcutting tool};
#send {put gems in crate};
#return;
};
#else {
#echo {<149>[Gemcrafting] Found a $gem[size] $gem[type], cutting to a $gem[best_cut] cut.<099>};
#send {cut uncut gem into a tiny $gem[best_cut] cut gem with gemcutting tools};
#send {grind gem on wheel};
#send {polish gem with cloth};
#send {put gems in crate};
};
#var {gem[active]} {0};
};
};
#alias {workgem} {
#nop Get a gem and appraise it;
#send {get uncut gem from crate in me};
#send {appraise uncut gem};
#var {gem[active]} {1};
};
#alias {workgem2} {
#send {get uncut gem from crate in me};
#send {appraise gem};
#action { cabochon cut} {
#unaction { cabochon cut};
#if {$gem[size] != "tiny"} {
#echo {<149>[Gemcrafting] Found a non-tiny gem, chipping and returning to crate<099>};
#send {chip gem with gemcutting tool};
#send {put gems in crate};
#return;
};
#echo {<149>[Gemcrafting] Found a $gem[size] $gem[type], cutting to a $gem[best_cut] cut.<099>};
#send {cut gem into a tiny $gem[best_cut] cut gem with gemcutting tools};
#send {put gems in crate};
};
#action {^It is a %1 quality %2 that could be cut into a %3 gem with one of the following forms: %4} {
#var {gem[quality]} {%1};
#var {gem[type]} {%2};
#var {gem[size]} {%3};
};
#action {octagonal step cut{, | }{[\w\s-,]+}} {
#var {gem[cut_list]} {%2};
#nop Turn the raw cuts into a proper list
#replace {gem[cut_list]} { cut} {};
#replace {gem[cut_list]} {, } {;};
#replace {gem[cut_list]} { and } {;};
#nop What's our best available cut?;
#var {gem[best_cut]} {octagonal step};
#regex {$gem[cut_list]} {trillion} {#var {gem[best_cut]}{trillion};};
#regex {$gem[cut_list]} {pear\-shaped} {#var {gem[best_cut]}{pear-shaped};};
#regex {$gem[cut_list]} {cushion} {#var {gem[best_cut]} {cushion};};
#regex {$gem[cut_list]} {rose} {#var {gem[best_cut]} {rose};};
#regex {$gem[cut_list]} {marquise} {#var {gem[best_cut]} {marquise};};
#regex {$gem[cut_list]} {brilliant} {#var {gem[best_cut]} {brilliant};};
#regex {$gem[cut_list]} {heart\-shaped} {#var {gem[best_cut]} {heart-shaped};};
#regex {$gem[cut_list]} {oval\-shaped} {#var {gem[best_cut]} {oval-shaped};};
#regex {$gem[cut_list]} {teardrop} {#var {gem[best_cut]} {teardrop};};
#regex {$gem[cut_list]} {princess} {#var {gem[best_cut]} {princess};};
};
};
#CLASS {gems} {close};

View File

@ -26,11 +26,12 @@
#VAR GMCP[oldvitals] {$GMCP[vitals]}; #VAR GMCP[oldvitals] {$GMCP[vitals]};
#VAR GMCP[vitals] {%0}; #VAR GMCP[vitals] {%0};
#nop TODO: If oldvitals doesnt exist, skip this (to prevent HP loss alerts on SU)
#math {hploss} {$GMCP[vitals][hp] - $GMCP[oldvitals][hp]}; #math {hploss} {$GMCP[vitals][hp] - $GMCP[oldvitals][hp]};
#if {$hploss < -150} { #if {$hploss < -150} {
#format {hp_loss_display} {<139>HP IS FALLING! CAREFUL! (Lost %s HP)<099>} {$hploss}; #format {hp_loss_display} {<139>HP IS FALLING! CAREFUL! (Lost %s HP)<099>} {$hploss};
#echo {$hp_loss_display}; #echo {$hp_loss_display};
#showme {\a\a}; #showme {\a};
} }
#math {xpgain} {$GMCP[vitals][xp] - $GMCP[oldvitals][xp]}; #math {xpgain} {$GMCP[vitals][xp] - $GMCP[oldvitals][xp]};
@ -49,6 +50,8 @@
#VAR GMCP[charinfo] {%0}; #VAR GMCP[charinfo] {%0};
#nop New login, invalidate stale info; #nop New login, invalidate stale info;
#unvar {GMCP[oldvitals]};
#var {tpa_status} {0};
#unvar {quota}; #unvar {quota};
} }

View File

@ -70,6 +70,7 @@
}; };
}; };
#ACTION {[%1] {[A-Za-z]+} has joined the group.} { #ACTION {[%1] {[A-Za-z]+} has joined the group.} {
#tab {%2};
#variable {group_shields[%2]} {{tpa}{0}{ccc}{0}{eff}{0}{ms}{0}{kii}{0}}; #variable {group_shields[%2]} {{tpa}{0}{ccc}{0}{eff}{0}{ms}{0}{kii}{0}};
/writegroupshieldstofile /writegroupshieldstofile
}; };
@ -265,7 +266,7 @@
#ALIAS {/writegroupshieldstofile} { #ALIAS {/writegroupshieldstofile} {
#system {rm $groupshield_file && touch $groupshield_file}; #system {rm $groupshield_file && touch $groupshield_file};
#line {log} {$groupshield_file} {.:: Group Shields ::. \n\r}; #line {log} {$groupshield_file} {.:: Group Shields ::.};
#foreach {$group_shields[]} {name} { #foreach {$group_shields[]} {name} {
#format {gs_namelength} {%L} {$name}; #format {gs_namelength} {%L} {$name};
#math {gs_namelength} {6 - $gs_namelength}; #math {gs_namelength} {6 - $gs_namelength};

View File

@ -31,6 +31,6 @@
#macro {Oq} {southwest}; #nop 1; #macro {Oq} {southwest}; #nop 1;
#macro {Or} {south}; #nop 2; #macro {Or} {south}; #nop 2;
#macro {Os} {southeast}; #nop 3; #macro {Os} {southeast}; #nop 3;
#macro {Op} {id}; #nop 0; #macro {Op} {enc}; #nop 0;
#macro {On} {}; #nop .; #macro {On} {}; #nop .;
#macro {Ol} {}; #nop +; #macro {Ol} {}; #nop +;

View File

@ -73,9 +73,9 @@ class MapRoute:
while bDone == False: while bDone == False:
# Loop through all the rooms we have yet to do # Loop through all the rooms we have yet to do
iPreviousTotal = iTotalRooms iPreviousTotal = iTotalRooms
for iN in xrange(iNextRoom - 1, iPreviousTotal): for iN in range(iNextRoom - 1, iPreviousTotal):
# Loop through all exits from this room # Loop through all exits from this room
for sKey, sExitData in self.exits_by_id[sDoRoom[iN]].iteritems(): for sKey, sExitData in self.exits_by_id[sDoRoom[iN]].items():
# Make sure we aren't looping back around on ourselves, and that we haven't already finished # Make sure we aren't looping back around on ourselves, and that we haven't already finished
if sKey != start_id and bEverDone.get(sKey) == None and iFinalRoom == 0: if sKey != start_id and bEverDone.get(sKey) == None and iFinalRoom == 0:
iTotalRooms = iTotalRooms + 1 iTotalRooms = iTotalRooms + 1
@ -131,7 +131,7 @@ class MapRoute:
if iCurRoom == 1: if iCurRoom == 1:
bDone = True bDone = True
sRealPath = "" sRealPath = ""
for iN in xrange(len(sPath), 0, -1): for iN in range(len(sPath), 0, -1):
if sRealPath != "": if sRealPath != "":
sRealPath = "{};".format(sRealPath) sRealPath = "{};".format(sRealPath)
sRealPath = "{}{}".format(sRealPath, sPath[iN-1]) sRealPath = "{}{}".format(sRealPath, sPath[iN-1])

View File

@ -61,6 +61,14 @@ class MapDoorText:
"sw": "sw", "sw": "sw",
"w": "w", "w": "w",
"nw": "nw", "nw": "nw",
"fore": "f",
"aft": "a",
"starboard": "s",
"port": "p",
"port aft": "pa",
"port fore": "pf",
"starboard aft": "sa",
"starboard fore": "sf"
} }
colour_map = { colour_map = {
# http://terminal-color-builder.mudasobwa.ru/ # http://terminal-color-builder.mudasobwa.ru/
@ -179,6 +187,30 @@ class MapDoorText:
elif entry.startswith("west"): elif entry.startswith("west"):
is_direction = 1 is_direction = 1
this_direction = "west" this_direction = "west"
elif entry.startswith("port fore"):
is_direction = 1
this_direction = "port fore"
elif entry.startswith("port aft"):
is_direction = 1
this_direction = "port aft"
elif entry.startswith("starboard fore"):
is_direction = 1
this_direction = "starboard fore"
elif entry.startswith("starboard aft"):
is_direction = 1
this_direction = "starboard aft"
elif entry.startswith("port"):
is_direction = 1
this_direction = "port"
elif entry.startswith("starboard"):
is_direction = 1
this_direction = "starboard"
elif entry.startswith("fore"):
is_direction = 1
this_direction = "fore"
elif entry.startswith("aft"):
is_direction = 1
this_direction = "aft"
if is_direction == 1: if is_direction == 1:
if not data['ignoring_exits']: if not data['ignoring_exits']:

View File

@ -18,7 +18,7 @@
} }
{the bandit leader}{ {the bandit leader}{
{time}{0} {time}{0}
{name}{bandit leader} {name}{bandits}
{group}{false} {group}{false}
{respawn}{30} {respawn}{30}
} }
@ -60,7 +60,7 @@
} }
{the smuggler captain}{ {the smuggler captain}{
{time}{0} {time}{0}
{name}{smug captain} {name}{smug cap}
{group}{false} {group}{false}
{respawn}{30} {respawn}{30}
} }
@ -90,10 +90,16 @@
} }
{the %* lion}{ {the %* lion}{
{time}{0} {time}{0}
{name}{shaker lions} {name}{shaker}
{group}{false} {group}{false}
{respawn}{30} {respawn}{30}
} }
{the %* crocodile}{
{time}{0}
{name}{offler}
{group}{false}
{respawn}{25}
}
{Louis Accardo}{ {Louis Accardo}{
{time}{0} {time}{0}
{name}{stables} {name}{stables}
@ -142,6 +148,66 @@
{group}{true} {group}{true}
{respawn}{30} {respawn}{30}
} }
{a %* hermit}{
{time}{0}
{name}{oasis}
{group}{true}
{respawn}{30}
}
{a %* patroller}{
{time}{0}
{name}{oasis}
{group}{true}
{respawn}{30}
}
{a %* captain}{
{time}{0}
{name}{oasis}
{group}{true}
{respawn}{30}
}
{a %* desert nomad}{
{time}{0}
{name}{oasis}
{group}{true}
{respawn}{30}
}
{a peacekeeper commander}{
{time}{0}
{name}{oasis}
{group}{true}
{respawn}{30}
}
{a %* mystic}{
{time}{0}
{name}{oasis}
{group}{true}
{respawn}{30}
}
{the Tang captain}{
{time}{0}
{name}{bmarket}
{group}{true}
{respawn}{30}
}
{the Fang captain}{
{time}{0}
{name}{bmarket}
{group}{true}
{respawn}{30}
}
{the McSweeney captain}{
{time}{0}
{name}{bmarket}
{group}{true}
{respawn}{30}
}
{the citadel guard}{
{time}{0}
{name}{citguard}
{group}{false}
{respawn}{30}
}
} }
#VARIABLE {visittimers} { #VARIABLE {visittimers} {
@ -163,27 +229,33 @@
{group}{false} {group}{false}
{respawn}{30} {respawn}{30}
} }
{2950a174f65ef8e38eee444295c9b4832d36ab60}{
{time}{0}
{name}{dragon}
{group}{false}
{respawn}{30}
}
{f6c60dd36ed38707eb954c3a670f2f9370a79399}{ {f6c60dd36ed38707eb954c3a670f2f9370a79399}{
{time}{0} {time}{0}
{name}{black market} {name}{bmarket}
{group}{true} {group}{true}
{respawn}{30} {respawn}{30}
} }
{e4646eab906aef1187a9dd3e980441b8f6b8d68c}{ {e4646eab906aef1187a9dd3e980441b8f6b8d68c}{
{time}{0} {time}{0}
{name}{black market} {name}{bmarket}
{group}{true} {group}{true}
{respawn}{30} {respawn}{30}
} }
{0ae9d8c4f2b48f4fcc4cb57fd85443399be2ecc5}{ {0ae9d8c4f2b48f4fcc4cb57fd85443399be2ecc5}{
{time}{0} {time}{0}
{name}{black market} {name}{bmarket}
{group}{true} {group}{true}
{respawn}{30} {respawn}{30}
} }
{c7c6f5720d2c587f80696b6f0ec7f9ac0f084b06}{ {c7c6f5720d2c587f80696b6f0ec7f9ac0f084b06}{
{time}{0} {time}{0}
{name}{black market} {name}{bmarket}
{group}{true} {group}{true}
{respawn}{30} {respawn}{30}
} }
@ -199,6 +271,12 @@
{group}{false} {group}{false}
{respawn}{30} {respawn}{30}
} }
{7377f4483763eca72e0b97a87f71c5266e33f2cd}{
{time}{0}
{name}{cocoons}
{group}{false}
{respawn}{30}
}
} }
@ -317,7 +395,7 @@
#var {spot_groups[$killtimers[$spot][name]]} {$killtimers[$spot][time]}; #var {spot_groups[$killtimers[$spot][name]]} {$killtimers[$spot][time]};
#var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]}; #var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]};
}; };
#if {$killtimers[$spot][time] < $spot_groups[$killtimers[$spot][name]]} { #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[$killtimers[$spot][name]]} {$killtimers[$spot][time]};
#var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]}; #var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]};
}; };
@ -347,7 +425,7 @@
#var {spot_groups[$visittimers[$spot][name]]} {$visittimers[$spot][time]}; #var {spot_groups[$visittimers[$spot][name]]} {$visittimers[$spot][time]};
#var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]}; #var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]};
}; };
#if {$visittimers[$spot][time] < $spot_groups[$visittimers[$spot][name]]} { #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[$visittimers[$spot][name]]} {$visittimers[$spot][time]};
#var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]}; #var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]};
}; };
@ -381,7 +459,7 @@
#var {spot_groups[$killtimers[$spot][name]]} {$killtimers[$spot][time]}; #var {spot_groups[$killtimers[$spot][name]]} {$killtimers[$spot][time]};
#var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]}; #var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]};
}; };
#if {$killtimers[$spot][time] != 0 && $killtimers[$spot][time] < $spot_groups[$killtimers[$spot][name]]} { #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[$killtimers[$spot][name]]} {$killtimers[$spot][time]};
#var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]}; #var {spot_groups_respawn[$killtimers[$spot][name]]} {$killtimers[$spot][respawn]};
}; };
@ -408,7 +486,7 @@
#var {spot_groups[$visittimers[$spot][name]]} {$visittimers[$spot][time]}; #var {spot_groups[$visittimers[$spot][name]]} {$visittimers[$spot][time]};
#var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]}; #var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]};
}; };
#if {$visittimers[$spot][time] != 0 && $visittimers[$spot][time] < $spot_groups[$visittimers[$spot][name]]} { #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[$visittimers[$spot][name]]} {$visittimers[$spot][time]};
#var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]}; #var {spot_groups_respawn[$visittimers[$spot][name]]} {$visittimers[$spot][respawn]};
}; };
@ -522,6 +600,7 @@
#if {$killtimers[$spot][time] == 0} { #if {$killtimers[$spot][time] == 0} {
#format {spotstring} {%s: ??? |} {$spotname}; #format {spotstring} {%s: ??? |} {$spotname};
#continue;
}; };
#else { #else {
#math {mins} {$current_time - $killtimers[$spot][time]}; #math {mins} {$current_time - $killtimers[$spot][time]};
@ -566,6 +645,7 @@
#if {$visittimers[$spot][time] == 0} { #if {$visittimers[$spot][time] == 0} {
#format {spotstring} {%s: ??? |} {$spotname}; #format {spotstring} {%s: ??? |} {$spotname};
#continue;
}; };
#else { #else {
#math {mins} {$current_time - $visittimers[$spot][time]}; #math {mins} {$current_time - $visittimers[$spot][time]};