Module: Lich::Gemstone::Infomon::Parser::Pattern

Defined in:
documented/gemstone/infomon/parser.rb

Constant Summary collapse

CharRaceProf =

Regex patterns grouped for Info, Exp, Skill and PSM parsing - calls upsert_batch to reduce db impact Regex pattern for character race and profession. Used for parsing character information.

/^Name:\s+(?<name>[A-z\s'-]+)\s+Race:\s+(?<race>[A-z]+|[A-z]+(?: |-)[A-z]+)\s+Profession:\s+(?<profession>[-A-z]+)/.freeze
CharGenderAgeExpLevel =

Regex pattern for character gender, age, experience, and level. Used for parsing character information.

/^Gender:\s+(?<gender>[A-z]+)\s+Age:\s+(?<age>[,0-9]+)\s+Expr:\s+(?<experience>[0-9,]+)\s+Level:\s+(?<level>[0-9]+)/.freeze
Stat =

Regex pattern for character statistics. Used for parsing character stats.

/^\s*(?<stat>[A-z]+)\s\((?:STR|CON|DEX|AGI|DIS|AUR|LOG|INT|WIS|INF)\):\s+(?<value>[0-9]+)\s\((?<bonus>-?[0-9]+)\)\s+[.]{3}\s+(?<enhanced_value>\d+)\s+\((?<enhanced_bonus>-?\d+)\)/.freeze
StatEnd =

Regex pattern for the end of character statistics. Used for parsing character stats.

/^Mana:\s+-?\d+\s+Silver:\s(?<silver>-?[\d,]+)$/.freeze
Fame =

Regex pattern for character fame. Used for parsing character fame information.

/^\s+Level: \d+\s+Fame: (?<fame>-?[\d,]+)$/.freeze
RealExp =

Regex pattern for real experience. Used for parsing experience information.

%r{^\s+Experience: [\d,]+\s+Field Exp: (?<fxp_current>[\d,]+)/(?<fxp_max>[\d,]+)$}.freeze
AscExp =

Regex pattern for ascension experience. Used for parsing ascension experience information.

/^\s+Ascension Exp: (?<ascension_experience>[\d,]+)\s+Recent Deaths: [\d,]+$/.freeze
TotalExp =

Regex pattern for total experience. Used for parsing total experience information.

/^\s+Total Exp: (?<total_experience>[\d,]+)\s+Death's Sting: (?<deaths_sting>None|Light|Moderate|Sharp|Harsh|Piercing|Crushing)$/.freeze
LTE =

Regex pattern for long-term experience. Used for parsing long-term experience information.

/^\s+Long-Term Exp: (?<long_term_experience>[\d,]+)\s+Deeds: (?<deeds>\d+)$/.freeze
ExprEnd =

Regex pattern for the end of experience parsing. Used for parsing experience information.

/^\s+Exp (?:until lvl|to next TP): -?[\d,]+/.freeze
SkillStart =

Regex pattern for the start of skill parsing. Used for parsing skill information.

/^\s\w+\s\(at level \d+\), your current skill bonuses and ranks/.freeze
Skill =

Regex pattern for individual skills. Used for parsing skill information.

/^\s+(?<name>[[a-zA-Z]\s\-']+)\.+\|\s+(?<bonus>\d+)\s+(?<ranks>\d+)/.freeze
SpellRanks =

Regex pattern for spell ranks. Used for parsing spell rank information.

/^\s+(?<name>[\w\s\-']+)\.+\|\s+(?<rank>\d+).*$/.freeze
SkillEnd =

Regex pattern for the end of skill parsing. Used for parsing skill information.

/^Training Points: \d+ Phy \d+ Mnt/.freeze
GoalsDetected =

Regex pattern for detecting skill goals. Used for parsing skill goal information.

/^Skill goals updated!$/.freeze
GoalsEnded =

Regex pattern for the end of skill goals. Used for parsing skill goal information.

/^Further information can be found in the FAQs\.$/.freeze
PSMStart =

Regex pattern for the start of PSM parsing. Used for parsing PSM information.

/^\w+, the following (?<cat>Ascension Abilities|Armor Specializations|Combat Maneuvers|Feats|Shield Specializations|Weapon Techniques) are available:$/.freeze
PSM =

Regex pattern for individual PSMs. Used for parsing PSM information.

/^\s+(?<name>[A-z\s\-':]+)\s+(?<command>[a-z]+)\s+(?<ranks>\d+)\/(?<max>\d+).*$/.freeze
PSMEnd =

Regex pattern for the end of PSM parsing. Used for parsing PSM information.

/^   Subcategory: all$/.freeze
Levelup =

Single / low impact - single db write Regex pattern for level-up messages. Used for parsing level-up information.

/^\s+(?<stat>\w+)\s+\(\w{3}\)\s+:\s+(?<value>\d+)\s+(?:\+1)\s+\.\.\.\s+(?<bonus>\d+)(?:\s+\+1)?$/.freeze
SpellsSolo =

Regex pattern for solo spells. Used for parsing spell information.

/^(?<name>Bard|Cleric|Empath|Minor (?:Elemental|Mental|Spiritual)|Major (?:Elemental|Mental|Spiritual)|Paladin|Ranger|Savant|Sorcerer|Wizard)(?: Base)?\.+(?<rank>\d+).*$/.freeze
Citizenship =

Regex pattern for citizenship status. Used for parsing citizenship information.

/^You currently have .*? citizenship in (?<town>.*)\.$/.freeze
NoCitizenship =

Regex pattern for no citizenship status. Used for parsing citizenship information.

/^You don't seem to have citizenship\./.freeze
Society =

Regex pattern for society membership. Used for parsing society information.

/^\s+You are a (?<standing>Master|member) (?:in|of) the (?<society>Order of Voln|Council of Light|Guardians of Sunfist)(?: at (?:rank|step) (?<rank>[0-9]+))?\.$/.freeze
NoSociety =

Regex pattern for no society membership. Used for parsing society information.

/^\s+You are not a member of any society at this time./.freeze
SocietyStep =

Regex pattern for society steps. Used for parsing society information.

/^(?:Zarak|Faylanna|Draelox|Marl|Vindar|Taryn|Meaha|Oxanna|Cyndelle) traces the outline of a sigil into the air before you and says|^The High Taskmaster looks at you, consults (?:her|his) notes, and then announces in a loud voice|^The monk concludes ceremoniously,/.freeze
SocietyJoin =

Regex pattern for joining a society. Used for parsing society information.

/^The Grandmaster says, "Welcome to the Order|^The Grandmaster says, "You are now a member of the Guardians of Sunfist|^The Grand Poohbah smiles broadly.  "Welcome to the Lodge," he cries/.freeze
SocietyResign =

Regex pattern for resigning from a society. Used for parsing society information.

/^The Grandmaster says, "I'm sorry to hear that.  You are no longer in our service.|^The Poohbah looks at you sternly.  "I had high hopes for you," he says, "but if this be your decision, so be it\.  I hereby strip you of membership|^The Grandmaster says, "I'm sorry to hear that,.+I wish you well with any of your future endeavors./.freeze
Warcries =

Regex pattern for warcries. Used for parsing warcry information.

/^\s+(?<name>(?:Bertrandt's Bellow|Yertie's Yowlp|Gerrelle's Growl|Seanette's Shout|Carn's Cry|Horland's Holler))$/.freeze
NoWarcries =

Regex pattern for no warcries. Used for parsing warcry information.

/^You must be an active member of the Warrior Guild to use this skill\.$/.freeze
LearnPSM =

Regex pattern for learning PSMs. Used for parsing PSM information.

/^You have now achieved rank (?<rank>\d+) of (?<psm>[A-z\s]+), costing \d+ (?<cat>[A-z]+) .*?points\.$/
LearnTechnique =

Technique covers Specialization (Armor and Shield), Technique (Weapon), and Feat Regex pattern for learning techniques. Used for parsing technique information.

/^\[You have (?:gained|increased to) rank (?<rank>\d+) of (?<cat>[A-z]+).*: (?<psm>[A-z\s\-':]+)\.\]$/.freeze
UnlearnPSM =

Regex pattern for unlearning PSMs. Used for parsing PSM information.

/^You decide to unlearn rank (?<rank>\d+) of (?<psm>[A-z\s\-':]+), regaining \d+ (?<cat>[A-z]+) .*?points\.$/
UnlearnTechnique =

Regex pattern for unlearning techniques. Used for parsing technique information.

/^\[You have decreased to rank (?<rank>\d+) of (?<cat>[A-z]+).*: (?<psm>[A-z\s\-':]+)\.\]$/.freeze
LostTechnique =

Regex pattern for losing techniques. Used for parsing technique information.

/^\[You are no longer trained in (?<cat>[A-z]+) .*: (?<psm>[A-z\s\-':]+)\.\]$/.freeze
Resource =

Regex pattern for resources. Used for parsing resource information.

/^(?:Essence|Necrotic Energy|Lore Knowledge|Motes of Tranquility|Devotion|Nature's Grace|Grit|Luck Inspiration|Guile|Vitality): (?<weekly>[0-9,]+)\/50,000 \(Weekly\)\s+(?<total>[0-9,]+)\/200,000 \(Total\)$/.freeze
Suffused =

Regex pattern for suffused resources. Used for parsing resource information.

/^Suffused (?<type>(?:Essence|Necrotic Energy|Lore Knowledge|Motes of Tranquility|Devotion|Nature's Grace|Grit|Luck Inspiration|Guile|Vitality)): (?<suffused>[0-9,]+)$/.freeze
VolnFavor =

Regex pattern for Voln favor. Used for parsing resource information.

/^Voln Favor: (?<favor>[-\d,]+)$/.freeze
CovertArtsCharges =

Regex pattern for Covert Arts charges. Used for parsing resource information.

/^Covert Arts Charges: (?<charges>[-\d,]+)\/200$/.freeze
GigasArtifactFragments =

Regex pattern for gigas artifact fragments. Used for parsing resource information.

/^You are carrying (?<gigas_artifact_fragments>[\d,]+) gigas artifact fragments?\.$/.freeze
RedsteelMarks =

Regex pattern for redsteel marks. Used for parsing resource information.

/^(?:\s* Redsteel Marks:           |You are carrying) (?<redsteel_marks>[\d,]+)(?: redsteel marks?\.)?$/.freeze
GemstoneDust =

Regex pattern for gemstone dust. Used for parsing resource information.

/^You are carrying (?<gemstone_dust>[\d,]+) Dust in your reserves?\.$/.freeze
TicketGeneral =

Regex pattern for general tickets. Used for parsing resource information.

/^\s*General - (?<tickets>[\d,]+) tickets?\.$/.freeze
TicketBlackscrip =

Regex pattern for blackscrip tickets. Used for parsing resource information.

/^\s*Troubled Waters - (?<blackscrip>[\d,]+) blackscrip\.$/.freeze
TicketBloodscrip =

Regex pattern for bloodscrip tickets. Used for parsing resource information.

/^\s*Duskruin Arena - (?<bloodscrip>[\d,]+) bloodscrip\.$/.freeze
TicketEtherealScrip =

Regex pattern for ethereal scrip tickets. Used for parsing resource information.

/^\s*Reim - (?<ethereal_scrip>[\d,]+) ethereal scrip\.$/.freeze
TicketSoulShards =

Regex pattern for soul shards. Used for parsing resource information.

/^\s*Ebon Gate - (?<soul_shards>[\d,]+) soul shards?\.$/.freeze
TicketRaikhen =

Regex pattern for Raikhen tickets. Used for parsing resource information.

/^\s*Rumor Woods - (?<raikhen>[\d,]+) raikhen\.$/.freeze
WealthSilver =

Regex pattern for wealth in silver. Used for parsing wealth information.

/^You have (?<silver>no|[,\d]+|but one) silver with you\./.freeze
WealthSilverContainer =

Regex pattern for wealth in silver containers. Used for parsing wealth information.

/^You are carrying (?<silver>[\d,]+) silver stored within your /.freeze
AccountName =

Regex pattern for account name. Used for parsing account information.

/^Account Name:     (?<name>[\w\d\-\_]+)$/.freeze
AccountSubscription =

Regex pattern for account subscription type. Used for parsing account information.

/^Account Type:     (?<subscription>F2P|Standard|Premium|Platinum)(?: with Shattered)?(?: \(\w+\))?$/.freeze
ProfileStart =

Regex pattern for the start of profile information. Used for parsing profile information.

/^PERSONAL INFORMATION$/.freeze
ProfileName =

Regex pattern for profile name. Used for parsing profile information.

/^Name: (?<name>[\w\s]+)$/.freeze
ProfileHouseCHE =

Regex pattern for profile house. Used for parsing profile information.

/^[A-Za-z\- ]+? (?:of House of the |of House of |of House |of )(?<house>Argent Aspis|Rising Phoenix|Paupers|Arcane Masters|Brigatta|Twilight Hall|Silvergate Inn|Sovyn|Sylvanfair|Helden Hall|White Haven|Beacon Hall|Rone Academy|Willow Hall|Moonstone Abbey|Obsidian Tower|Cairnfang Manor)(?: Archive)?$|^(?<none>No House affiliation)$/.freeze
ResignCHE =

Regex pattern for resigning from a house. Used for parsing profile information.

/^(?:Once you have resigned from your House, you will be unable to rejoin without being inducted again by the |If you wish to renounce your membership in the |Before you can resign from the )(?<house>Argent Aspis|Rising Phoenix|Paupers|Arcane Masters|Brigatta|Twilight Hall|Silvergate Inn|Sovyn|Sylvanfair|Helden Hall|White Haven|Beacon Hall|Rone Academy|Willow Hall|Moonstone Abbey|Obsidian Tower|Cairnfang Manor)(?: Archive)?|^(?<none>The RESIGN command is for resigning your membership in a House, but you don't currently belong to any of the Cooperative Houses of Elanthia)\.$/.freeze
SleepActive =

TODO: refactor / streamline? Regex pattern for active sleep status. Used for parsing sleep information.

/^Your mind goes completely blank\.$|^You close your eyes and slowly drift off to sleep\.$|^You slump to the ground and immediately fall asleep\.  You must have been exhausted!$|^That is impossible to do while unconscious$/.freeze
SleepNoActive =

Regex pattern for inactive sleep status. Used for parsing sleep information.

/^Your thoughts slowly come back to you as you find yourself lying on the ground\.  You must have been sleeping\.$|^You wake up from your slumber\.$|^You are awoken|^You awake|^You slowly come back to alertness and realize you must have been sleeping\.$/.freeze
BindActive =

Regex pattern for active bind status. Used for parsing bind information.

/^An unseen force (?:envelops|entangles) you, restricting (?:all|your) movement|^You are caught fast, the light of (?:Liabo|Lornon|Tilaok|Makiri|the moon) arresting your movements/.freeze
BindNoActive =

Regex pattern for inactive bind status. Used for parsing bind information.

/^The restricting force that envelops you dissolves away\.|^You shake off the immobilization that was restricting your movements!|^The restricting force enveloping you fades away\./.freeze
SilenceActive =

Regex pattern for active silence status. Used for parsing silence information.

/^A pall of silence settles over you\.|^The pall of silence settles more heavily over you\./.freeze
SilenceNoActive =

Regex pattern for inactive silence status. Used for parsing silence information.

/^The pall of silence leaves you\./.freeze
CalmActive =

Regex pattern for active calm status. Used for parsing calm information.

/^A calm washes over you\./.freeze
CalmNoActive =

Regex pattern for inactive calm status. Used for parsing calm information.

/^You are enraged by .*? attack!|^The feeling of calm leaves you\./.freeze
CutthroatActive =

Regex pattern for active cutthroat status. Used for parsing cutthroat information.

/slices deep into your vocal cords!$|^All you manage to do is cough up some blood\.$/.freeze
CutthroatNoActive =

Regex pattern for inactive cutthroat status. Used for parsing cutthroat information.

/^\s*The horrible pain in your vocal cords subsides as you spit out the last of the blood clogging your throat\.$|^That tingles, but there are no head injuries to repair\.$/.freeze
ThornPoisonStart =

Regex pattern for the start of thorn poison status. Used for parsing thorn poison information.

/^One of the vines surrounding .*? lashes out at you, driving a thorn into your skin!  You feel poison coursing through your veins\.$/.freeze
ThornPoisonProgression =

Regex pattern for thorn poison progression status. Used for parsing thorn poison information.

/^You begin to feel a strange fatigue, spreading throughout your body\.$|^The strange lassitude is growing worse, making it difficult to keep up with any strenuous activities\.$|^You find yourself gradually slowing down, your muscles trembling with fatigue\.$|^It\'s getting increasingly difficult to move. It feels almost as if the air itself is growing thick as molasses\.$|^No longer able to fight this odd paralysis, you collapse to the ground, as limp as an old washrag\.$/.freeze
ThornPoisonDeprogression =

Regex pattern for thorn poison deprogression status. Used for parsing thorn poison information.

/^With a shaky gasp and trembling muscles, you regain at least some small ability to move, however slowly\.$|Although you can\'t seem to move as quickly as you usually can, you\'re feeling better than you were just moments ago\.$|^Fine coordination is difficult, but at least you can move at something close to your normal speed again\.$|^While you\'re still a bit shaky, your muscles are responding better than they were\.$/.freeze
ThornPoisonEnd =

Regex pattern for the end of thorn poison status. Used for parsing thorn poison information.

/^Your body begins to respond normally again\.$|^Your skin takes on a more pinkish tint\.$/.freeze
SpellUpMsgs =

Adding spell regexes. Does not save to infomon.db. Used by Spell and by ActiveSpells Regex pattern for spell up messages. Used for parsing spell information.

/^#{Lich::Common::Spell.upmsgs.join('$|^')}$/o.freeze
SpellDnMsgs =

Regex pattern for spell down messages. Used for parsing spell information.

/^#{Lich::Common::Spell.dnmsgs.join('$|^')}$/o.freeze
SpellsongRenewed =

Regex pattern for renewed spellsong messages. Used for parsing spellsong information.

/^Your songs? renews?/.freeze
All =
Regexp.union(CharRaceProf, CharGenderAgeExpLevel, Stat, StatEnd, Fame, RealExp, AscExp, TotalExp, LTE,
ExprEnd, SkillStart, Skill, SpellRanks, SkillEnd, PSMStart, PSM, PSMEnd, Levelup, SpellsSolo,
Citizenship, NoCitizenship, Society, NoSociety, SleepActive, SleepNoActive, BindActive,
BindNoActive, SilenceActive, SilenceNoActive, CalmActive, CalmNoActive, CutthroatActive,
CutthroatNoActive, SpellUpMsgs, SpellDnMsgs, Warcries, NoWarcries, SocietyJoin, SocietyStep,
SocietyResign, LearnPSM, UnlearnPSM, LostTechnique, LearnTechnique, UnlearnTechnique,
Resource, Suffused, VolnFavor, GigasArtifactFragments, RedsteelMarks, TicketGeneral,
TicketBlackscrip, TicketBloodscrip, TicketEtherealScrip, TicketSoulShards, TicketRaikhen,
WealthSilver, WealthSilverContainer, GoalsDetected, GoalsEnded, SpellsongRenewed,
ThornPoisonStart, ThornPoisonProgression, ThornPoisonDeprogression, ThornPoisonEnd, CovertArtsCharges,
AccountName, AccountSubscription, ProfileStart, ProfileName, ProfileHouseCHE, ResignCHE, GemstoneDust)