Browse Source

Group shield monitor, keyboard macros

pull/2/head
Brandon Cornejo 6 years ago
parent
commit
0179b0ce3b
  1. 3
      config.tin
  2. 309
      src/group.tin
  3. 36
      src/macros.tin

3
config.tin

@ -7,12 +7,14 @@
#CONFIG {MCCP} {ON}; #CONFIG {MCCP} {ON};
#CONFIG {LOG} {RAW}; #CONFIG {LOG} {RAW};
#CONFIG {BUFFER SIZE} {2000000}; #CONFIG {BUFFER SIZE} {2000000};
#config {COMMAND COLOR} {<fcf>};
#SPLIT {2} {1}; #SPLIT {2} {1};
#READ {src/channels.tin}; #READ {src/channels.tin};
#READ {src/actions.tin}; #READ {src/actions.tin};
#READ {src/aliases.tin}; #READ {src/aliases.tin};
#READ {src/macros.tin};
#READ {src/gmcp.tin}; #READ {src/gmcp.tin};
#READ {src/prompt.tin}; #READ {src/prompt.tin};
@ -26,6 +28,7 @@
#READ {src/magic.tin}; #READ {src/magic.tin};
#READ {src/missions.tin}; #READ {src/missions.tin};
#READ{src/group.tin};
#SESSION {discworld} {discworld.starturtle.net} {4242}; #SESSION {discworld} {discworld.starturtle.net} {4242};

309
src/group.tin

@ -3,15 +3,240 @@
#VARIABLE {group_shields} {}; #VARIABLE {group_shields} {};
#VARIABLE {group_shields_current} {}; #VARIABLE {group_shields_current} {};
#VARIABLE {groupshield_file} {logs/groupshields.log};
#ACTION {^Arcane protection for %1:-} { #ACTION {^Arcane protection for %1:-} {
#var {group_shields_current} {%1}; #var {group_shields_current} {%1};
} }
#ACTION {^ * %1 is surrounded by a %2 impact shield.} {
#var {group_shields[$group_shields_current]} {TPA};
#nop ======================================================;
#nop ===[ Detect shield printouts from 'group shields' ]===;
#nop ======================================================;
#nop EFF
#ACTION {^ * %1 is floating around {him|her|it}:$} {
#variable {group_shields[$group_shields_current][eff]} {1};
/writegroupshieldstofile
}
#nop TPA
#ACTION {^ * {She|He|It} is surrounded by a {(dull red |bright red |wobbling orange |flickering yellow |)?}magical impact shield\.$} {
#variable {group_shields[$group_shields_current][tpa]} {1};
/writegroupshieldstofile
} }
#nop CCC
#ACTION {^ * {Her|His|Its} skin has been {hardened|covered} {with|to}{a?} %4, although {the \w+|it} seems {weaker|not to be}} {
#variable {group_shields[$group_shields_current][ccc]} {1};
/writegroupshieldstofile
}
#ACTION {^ * Tiny threads of metal run criss-cross all over {her|his|its} skin, although it seems weaker} {
#variable {group_shields[$group_shields_current][ccc]} {1};
/writegroupshieldstofile
}
#nop MS
#ACTION {^ * {She|He|It} is {(really )?}protected by the power of {Pishe|Gufnork|Gapp|Sandelfon|Fish|Hat|Sek|Aegadon|Cubal|Reebox}} {
#variable {group_shields[$group_shields_current][ms]} {1};
/writegroupshieldstofile
}
#nop KII
#ACTION {^ * {She|He|It} is surrounded by a {handful|cloud|small swarm|large swarm|vast sawrm|plague} of} {
#variable {group_shields[$group_shields_current][kii]} {1};
/writegroupshieldstofile
};
#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};
/writegroupshieldstofile
};
#nop =========================================;
#nop ===[ Detect group join/leave actions ]===;
#nop =========================================;
#ACTION {[%1] {[A-Za-z]+} has left the group.} {
#if {&group_shields[%2]} {
#unvariable {group_shields[%2]};
/writegroupshieldstofile
};
};
#ACTION {[%1] {[A-Za-z]+} has joined the group.} {
#variable {group_shields[%2]} {{tpa}{0}{ccc}{0}{eff}{0}{ms}{0}{kii}{0}};
/writegroupshieldstofile
};
#ACTION {[%1] You have left the group.} {
#var {group_shields} {};
/writegroupshieldstofile
};
#ACTION {[%1] You have joined the group.} {
#var {group_shields} {};
#variable {group_shields[$GMCP[charinfo][capname]]} {{tpa}{0}{ccc}{0}{eff}{0}{ms}{0}{kii}{0}};
};
#nop =================================================;
#nop ===[ Detect shield drops/adds 'in the field' ]===;
#nop =================================================;
#nop EFF
#ACTION {{(?:\w+\b\w*?){1,6}} floating around {(?:\w+\b\W*?){1,8}} breaks!$} {
#variable {gs_dropname} {%2};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][eff]} {0};
/writegroupshieldstofile
};
};
};
#ACTION {^In blocking the attack {(?:.+)} floating around {(?:\w+\b\W*?){1,8}} is knocked out of orbit.$} {
#variable {gs_dropname} {%2};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][eff]} {0};
/writegroupshieldstofile
};
};
};
#ACTION {{(?:\w+\b\w*?){1,6}} begins to float around {(?:\w+\b\W*?){1,8}}.$} {
#variable {gs_dropname} {%2};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][eff]} {1};
/writegroupshieldstofile
};
};
};
#nop TPA
#ACTION {^There is a sudden white flash around {(?!a passing wizard)(\w+\b\W*?){1,8}}.$} {
#showme {\a};
#line {log} {$chat_file};
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][tpa]} {0};
/writegroupshieldstofile
};
};
};
#ACTION {^With a noise that sounds like "Plink!", the air around {(\w+\b\W*?){1,8}} flashes {yellow|red} for a moment.$} {
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][tpa]} {1};
/writegroupshieldstofile
};
};
};
#nop CCC
#ACTION {^There is a brief flash of magic, and something falls away from {(\w+\b\W*?){1,8}}'s skin.$} {
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {0};
/writegroupshieldstofile
};
};
};
#ACTION {^{(\w+\b\W*?){1,8}} scratches {himself|herself|itself}, and large pieces of skin flake off.$} {
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {0};
/writegroupshieldstofile
};
};
};
#ACTION {^{(\w+\b\W*?){1,8}}'s skin is now as {elastic|thicky covered|hard} as it can get.$} {
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {1};
/writegroupshieldstofile
};
};
};
#ACTION {^The metal powder fuses together into metal bands on {(\w+\b\W*?){1,8}}'s skin.$} {
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {1};
/writegroupshieldstofile
};
};
};
#ACTION {^{(\w+\b\W*?){1,8}}'s skin becomes {elastic as rubber|rock hard}.$} {
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][ccc]} {1};
/writegroupshieldstofile
};
};
};
#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} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][kii]} {1};
/writegroupshieldstofile
};
};
};
#ACTION {^The {lacewings|stick insects|mayflies|praying mantids|butterflies|ladybirds|dragonflies|damselflies|moths|grasshoppers|winged termites|sandflies|mosquitoes|gnats|crickets|flying ants|locusts|horseflies|cicadas|bees|wasps|hornets|elephant beetles|assassin bugs} surrounding {(\w+\b\W*?){1,8}} scatter } {
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][kii]} {1};
/writegroupshieldstofile
};
};
};
#ACTION {^{Buzzing drowsily, t|Buzzing loudly, t|Buzzing threateningly, t|Clicking and buzzing, t|Whirring gently, t|Rather clumsily, t|With a rasping noise, t|With a high-pitched whining noise, t|With a low, menacing buzzing, t|With a buzzing sound so loud and meaty it's almost like a dog growling, t|T}he {handful|cloud|small swarm|large swarm|vast swarm|plague} of {lacewings|stick insects|mayflies|praying mantids|butterflies|ladybirds|dragonflies|damselflies|moths|grasshoppers|winged termites|sandflies|mosquitoes|gnats|crickets|flying ants|locusts|horseflies|cicadas|bees|wasps|hornets|elephant beetles|assassin bugs} {flutters into a loosely-formed orbit around |forms a chaotic web of small white bodies around |starts to hover near |begins to circle |begins to circle around |begins to orbit |begins to cluster around |begins to buzz erratically around |begins to buzz around |flutters into a chaotic formation around }{(\w+\b\W*?){1,8}}{| happily| slowly|, chirping gently|, buzzing hungrily}.$} {
#variable {gs_dropname} {%1};
#replace {gs_dropname} { } {;};
#foreach {$gs_dropname} {name} {
#if {&group_shields[$name]} {
#variable {group_shields[$name][kii]} {1};
/writegroupshieldstofile
};
};
};
#nop ======================================;
#nop ===[ Aliases to show the data etc ]===;
#nop ======================================;
#ALIAS {rgs} { #ALIAS {rgs} {
#variable {group_shields} {}; #variable {group_shields} {};
#variable {group_shields_current} {}; #variable {group_shields_current} {};
@ -20,8 +245,84 @@
#ALIAS {sgs} { #ALIAS {sgs} {
#foreach {$group_shields[]} {name} { #foreach {$group_shields[]} {name} {
#showme {$name: $group_shields[$name]};
#format {gs_namelength} {%L} {$name};
#math {gs_namelength} {9 - $gs_namelength};
#if {$gs_namelength < 0} { #var {gs_namelength} {0}; };
#format {gs_displayline} { * %.9s:%+${gs_namelength}s } {$name};
#foreach {tpa;ccc;eff;ms;kii} {shield} {
#if {&group_shields[$name][$shield] && "$group_shields[$name][$shield]" == "1"} {
#format {gs_displayline} {%s <fef>%s<099>} {$gs_displayline} {$shield};
} {
#format {gs_displayline} {%s <aaa>%s<099>} {$gs_displayline} {$shield};
};
};
#showme {$gs_displayline};
}; };
}; };
#CLASS {group} {kill};
#ALIAS {/writegroupshieldstofile} {
#system {rm $groupshield_file && touch $groupshield_file};
#line {log} {$groupshield_file} {.:: Group Shields ::. \n\r};
#foreach {$group_shields[]} {name} {
#format {gs_namelength} {%L} {$name};
#math {gs_namelength} {6 - $gs_namelength};
#nop #if {$gs_namelength < 0} { #var {gs_namelength} {0}; };
#format {gs_displayline} { %.6s:%+${gs_namelength}s } {$name};
#foreach {tpa;ccc;eff;kii} {shield} {
#if {&group_shields[$name][$shield] && "$group_shields[$name][$shield]" == "1"} {
#format {gs_displayline} {%s <fef>%u<099>} {$gs_displayline} {$shield};
} {
#format {gs_displayline} {%s <aaa>%u<099>} {$gs_displayline} {$shield};
};
};
#line {log} {$groupshield_file} {$gs_displayline};
};
#return;
};
#CLASS {group} {close};
#nop EFF for you;
#nop ^(?:> )?(?P<effitem>(?:\w+\b\W*?){1,6}) floating around you breaks!$
#nop ^(?:> )?You realise that (?P<effitem>(?:\w+\b\W*?){1,6}) is no longer floating around you\.$
#nop ^(?:> )?In blocking the attack (?P<effitem>(?:\w+\b\W*?){1,6}) floating around you is knocked out of orbit\.$
#nop ^(?:> )?(?P<effitem>(?:\w+\b\W*?){1,6}) begins to float around you\.$
#nop ^ \* (?P<effitem>(?:\w+\b\W*?){1,6}) is floating around you\:$
#nop TPA for you
#nop ^(?:> )?There is a sudden white flash\. Your magical shield has broken\.$
#nop ^(?:> )?With a noise that sounds like "Plink!", everything around you flashes (?>yellow|red) for a moment\.$
#nop ^ \* You are surrounded by a (?P<colour>|dull red |bright red |wobbling orange |flickering yellow )magical impact shield\.$
#nop CCC for you
#nop ^(?:> )?With a brief flash of magic, your (?>metallic|stony|elastic) skin falls away\.$
#nop ^(?:> )?Your skin feels itchy<semicolon> large pieces flake off as you scratch it\.$
#nop ^(?:> )?The metallic network on your skin feels a fair bit stronger now\.$
#nop ^(?:> )?Your? (?>feel your skin become (?>rock hard|elastic as rubber)|skin (?>feels (?>even harder now|much more elastic now)|is now as (?>hard|elastic|thickly covered) as it can get))\.$
#nop ^ \* Tiny threads of metal run criss-cross all over your skin, although
#nop ^ \* Your skin (?>has been|has|is) (?>hardened to a rock-like form|hardened with numerous layers of a mineral-like substance|hardened with a chalk-like substance|covered with several layers of a chalk-like substance|covered with a thin layer of chalk|covered with a thick metal net|metal bands running all over it, forming a kind of net|covered with a thin metal net|covered with a thin, net-like metal coating|solidified into a rubberous form|made elastic with numerous layers of a rubber-like substance|treated with a latex-like substance|covered with several layers of a latex-like substance|covered with a thin layer of latex), although
#nop Major for you;
#nop ^(?:> )?Your divine protection expires\.$
#nop ^(?:> )?You are protected by the power of (?>Pishe|Gufnork|Gapp|Sandelfon|Fish|Hat|Sek|Aegadon|Cubal|Reebox)\.$
#nop ^ \* You are (?>(?>barely |really |perfectly )?protected|shielded) by the (?>power |protective armour |grace )of (?>Pishe|Gufnork|Gapp|Sandelfon|Fish|Hat|Sek|Aegadon|Cubal|Reebox)\. You will be protected for
#nop Bug shield for you;
#nop ^(?:> )?The last of the injured (?>lacewings|stick insects|mayflies|praying mantids|butterflies|ladybirds|dragonflies|damselflies|moths|grasshoppers|winged termites|sandflies|mosquitoes|gnats|crickets|flying ants|locusts|horseflies|cicadas|bees|wasps|hornets|elephant beetles|assassin bugs) surrounding you crash to the ground\.$
#nop ^(?:> )?The (?>lacewings|stick insects|mayflies|praying mantids|butterflies|ladybirds|dragonflies|damselflies|moths|grasshoppers|winged termites|sandflies|mosquitoes|gnats|crickets|flying ants|locusts|horseflies|cicadas|bees|wasps|hornets|elephant beetles|assassin bugs) surrounding you scatter in different directions and fly off\.$
#nop ^(?:> )?(?>Buzzing drowsily, t|Buzzing loudly, t|Buzzing threateningly, t|Clicking and buzzing, t|Whirring gently, t|Rather clumsily, t|With a rasping noise, t|With a high-pitched whining noise, t|With a low, menacing buzzing, t|With a buzzing sound so loud and meaty it's almost like a dog growling, t|T)he (?>handful|cloud|small swarm|large swarm|vast swarm|plague) of (?>lacewings|stick insects|mayflies|praying mantids|butterflies|ladybirds|dragonflies|damselflies|moths|grasshoppers|winged termites|sandflies|mosquitoes|gnats|crickets|flying ants|locusts|horseflies|cicadas|bees|wasps|hornets|elephant beetles|assassin bugs) (?>flutters into a loosely-formed orbit around |forms a chaotic web of small white bodies around |starts to hover near |begins to circle |begins to circle around |begins to orbit |begins to cluster around |begins to buzz erratically around |begins to buzz around |flutters into a chaotic formation around )you
#nop ^ \* You are surrounded by a (?>handful|cloud|small swarm|large swarm|vast swarm|plague) of
#nop Arcane statuses
#nop ^(?:> )?Arcane protection status:$;

36
src/macros.tin

@ -0,0 +1,36 @@
#nop ==[Keyboard macros]==
#nop Function key macros for JuiceSSH keyboard
#nop F1 F2 F3 F4 F5 F6
#nop F7 F8 F9 F10 F11 F12
#macro {[[A} {ka};
#macro {[[B} {north};
#macro {[[C} {ba};
#macro {[[E} {stab};
#macro {[17~} {k elephant};
#macro {[[D} {tpa};
#macro {[18~} {west};
#macro {[19~} {south};
#macro {[20~} {east};
#macro {[21~} {ha};
#macro {[23~} {bandage me};
#macro {[24~} {afk Mobile and idle, expect that I don't see this;afk on};
#nop Number pad key macros
#macro {OQ} {sac}; #nop /;
#macro {OR} {stab}; #nop *;
#macro {OS} {}; #nop -;
#macro {Ow} {northwest}; #nop 7;
#macro {Ox} {north}; #nop 8;
#macro {Oy} {northeast}; #nop 9;
#macro {Ot} {west}; #nop 4;
#macro {Ou} {ka}; #nop 5;
#macro {Ov} {east}; #nop 6;
#macro {Oq} {southwest}; #nop 1;
#macro {Or} {south}; #nop 2;
#macro {Os} {southeast}; #nop 3;
#macro {Op} {id}; #nop 0;
#macro {On} {}; #nop .;
#macro {Ol} {}; #nop +;
Loading…
Cancel
Save