Module: Lich::Gemstone::Infomon::XMLParser::Pattern
- Defined in:
- documented/gemstone/infomon/xmlparser.rb
Constant Summary collapse
- Group_Short =
A regular expression pattern that matches various group-related messages.
/(?:group|following you|IconJOINED)|^You are leading|(?:'s<\/a>|your) hand(?: tenderly)?\.\r?\n?$/- Also_Here_Arrival =
A regular expression pattern that matches arrival messages indicating other players are present.
/^Also here: /- NpcDeathPrefix =
Regexp.union( /The fire in the/, /With a surprised grunt, the/, /A sudden blue fire bursts over the hair of a/, /You hear a sound like a weeping child as a white glow separates itself from the/, /A low gurgling sound comes from deep within the chest of the/, /(?:The|An?)/, /One last prolonged bovine moan escapes from the/, /The spectral form of the/, /All that remains of the/, /The lights in(?: a)?/, /The light in the/, /With a final squeal the/, /The head in/, /The skeletal structure of( the)?/, )
- NpcDeathPostfix =
Regexp.union( /body as it rises, disappearing into the heavens/, /falls to the ground and dies(?:, its feelers twitching)?/, /falls back into a heap and dies/, /body goes rigid and collapses to the ground, dead/, /body goes rigid and collapses to the floor, dead/, /slowly settles to the ground and begins to dissipate/, /falls to the ground motionless/, /body goes rigid and <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> eyes roll back into <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> head as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> dies/, /growls one last time, and crumples to the ground in a heap/, /spins backwards and collapses dead/, /falls to the ground as the stillness of death overtakes <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/>/, /crumples to the ground motionless/, /howls in agony one last time and dies/, /howls in agony while falling to the ground motionless/, /moans pitifully as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> is released/, /careens to the ground and crumples in a heap/, /hisses one last time and dies/, /flutters its wings one last time and dies/, /slumps to the ground with a final snarl/, /horn dims as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> lifeforce fades away/, /blinks in astonishment, then collapses in a motionless heap/, /collapses in a heap, its huge girth shaking the floor around it/, /goes limp and .*? falls over as the fire slowly fades from .*? eyes/, /eyes slowly fades/, /sputters violently, cascading flames all around as .*? collapses in a final fiery display/, /falls to the ground in a clattering, motionless heap/, /goes limp and .*? falls over as the fire slowly fades from .*? eyes/, /collapses to the ground and shudders once before finally going still/, /crumbles into a pile of rubble/, /shudders once before .*? finally goes still/, /totters for a moment and then falls to the ground like a pillar, breaking into pieces that fly out in every direction/, /collapses into a pile of rubble/, /rumbles in agony as .*? teeters for a moment, then falls directly at you/, /twists and coils violently in .*? death throes, finally going still/, /twitches one final time before falling still upon the floor/, /, consuming .*? form in the space of a breath/, /screams one last time and dies/, /breathes .*? last gasp and dies/, /rolls over and dies/, /as .*? falls (?:slack|still) against the (?:floor|ground)/, /collapses to the ground, emits a final squeal, and dies/, /cries out in pain one last time and dies/, /crumples to a heap on the ground and dies/, /collapses to the ground, emits a final sigh, and dies/, /crumples to the ground and dies/, /lets out a final caterwaul and dies/, /screams evilly one last time and goes still/, /gurgles eerily and collapses into a puddle of water/, /shudders, then topples to the ground/, /shudders one last time before lying still/, /violently for a moment, then goes still/, /grumbles in pain one last time before lying still/, /rumbles in agony and goes still/, /falls to the ground dead/, /collapses to the ground, emits a final bleat, and dies/, /topples to the ground motionless/, /shudders violently for a moment, then goes still/, /rumbles in agony as .*? teeters for a moment, then tumbles to the ground with a thundering crash/, /sinks to the ground, the fell light in <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> eyes guttering before going out entirely/, /is sliced neatly in two/, /falls back and dies/, /bellows in rage one last time and dies/, /looks up with hatred as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> lets out <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> final breath/, /falls on its side and lets out one last whimpering sigh of (?:sparks and blue mist|chartreuse vapors|water droplets)/, /lets out one last whimpering sigh of (?:sparks and blue mist|chartreuse vapors|water droplets) and dies/, /coughs up some blood and dies/, /lets out a final, shrill shriek and dies/, /crashes to the ground, (?:dead|motionless)/, /falls to the ground, cursing, and dies/, /falls to the ground in a crumpled heap/, /clicks one last time and dies/, /falls over with a curse, then dies/, /crumples to the ground, spits out a curse, and dies/, /screams silently one last time and dies/, /eyes dim and finally go out/, /vainly struggles to rise, then goes still/, /dies; vitreous fluids escape its body/, /drops to the ground and shudders a final time/, /dies in a squirming, quivering heap/, /shudders a final time and goes still/, /collapses heavily into a heap on the ground and dies/, /lets out a blood-curdling roar and dies/, /stumbles and falls to the ground, twitches and dies/, /gives a last angry stare and falls to the ground dead/, /shudders violently as it dies/, /is a charred ashen figure of its former self lying upon the floor/, /rears up its head, then (?:falls to the ground and )?curls up into a ball, dead/, /rolls over on its back, emits a final screech and dies/, /arches its back in a tortured spasm and dies/, /shudders violently before scattering into a disorganized pile/, /shudders violently, before falling to the ground in a disorganized pile/, /gurgles eerily and collapses into the water/, /crumples to the ground, dead/, /collapses and <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> eyes roll up as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> dies/, /eyes roll up as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> dies/, /writhes in agony, <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> wings flapping fruitlessly as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> dies/, /curses through <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> teeth as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> dies/, /screams wickedly with both mouths as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> falls and dies/, /spasms uncontrollably as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> goes into shock and dies/, /sinks to <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> knees as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> chokes on <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> own blood and dies/, /curses the day <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> was created and dies/, /lets out a final curse as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> dies/, /chest spits out blood just before <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> dies/, /collapses to the floor with a splash, gurgling once with a wrathful look on <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> face before expiring/, /gurgles once and goes still, a wrathful look on <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> face/, /gives a plaintive wail before <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> slumps to <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> side and dies/, /tenses in agony as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> begins to dissolve from the bottom up/, /collapses, gurgling once with a wrathful look on <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> face before expiring/, /clutches at <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> wounds as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> falls, the life fading from <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> eyes/, /chokes on <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> blood, gurgling noisily before finally dying/, /attempts to get up but the effort drains the last of <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> life and <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> collapses dead/, /eyes goes out and <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> ceases to move/, /emits a hollow scream as ribbons of essence begin to wend away from <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> and into nothingness/, /screams with rage as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> falls to the ground and dies/, )
- NpcDeathMessage =
A regular expression pattern that matches NPC death messages in XML format.
/^(?:<pushBold\/>)?#{NpcDeathPrefix} (?:<pushBold\/>)?(?:(?:an?|some) )?<a.*?exist=["'](?<npc_id>\-?[0-9]+)["'].*?>.*?<\/a>(?:<popBold\/>)?(?:'s)? #{NpcDeathPostfix}[\.!]\r?\n?$/- StowListOutputStart =
the following are for parsing STOW LIST and setting of STOW containers
/^You have the following containers set as stow targets:\r?\n?$/- StowListContainer =
/^ (?:(?:an?|some) )?(?<before>[^<]+)?<a exist="(?<id>\d+)" noun="(?<noun>[^"]+)">(?<name>[^<]+)<\/a>(?<after> [^\(]+)? \((?<type>box|gem|herb|skin|wand|scroll|potion|trinket|reagent|lockpick|treasure|forageable|collectible|default)\)\r?\n?$/- StowSetContainer1 =
/^Set "(?:(?:an?|some) )?(?<before>[^<]+)?<a exist="(?<id>[^"]+)" noun="(?<noun>[^"]+)">(?<name>[^<]+)<\/a>(?<after> [^"]+)?" to be your STOW (?<type>BOX|GEM|HERB|SKIN|WAND|SCROLL|POTION|TRINKET|REAGENT|LOCKPICK|TREASURE|FORAGEABLE|COLLECTIBLE) container\.\r?\n?$/- StowSetContainer2 =
/Set "(?:(?:an?|some) )?(?<before>[^<]+)?<a exist="(?<id>[^"]+)" noun="(?<noun>[^"]+)">(?<name>[^<]+)<\/a>(?<after> [^"]+)?" to be your (?<type>default) STOW container\.\r?\n?$/- ReadyListOutputStart =
the following are for parsing READY LIST and setting of READY items
/^Your current settings are:\r?\n?$/- ReadyListNormal =
/^ (?<type>shield|(?:secondary |ranged )?weapon|ammo bundle|wand): \(?<d cmd=['"](?:store|ready) (?:SHIELD|2?WEAPON|RANGED|AMMO|WAND)(?: clear)?['"]>(?:(?:(?:an?|some) )?(?<before>[^<]+)?<a exist="(?<id>[^"]+)" noun="(?<noun>[^"]+)">(?<name>[^<]+)<\/a>(?<after> [^<]+)?|none)<\/d>\)? \(<d cmd='store set'>(?<store>worn if possible, stowed otherwise|stowed|put in (?:secondary )?sheath)<\/d>\)\r?\n?$/- ReadyListAmmo2 =
/^ (?<type>ammo2 bundle): <d cmd="store AMMO2 clear">(?:(?:an?|some) )?(?<before>[^<]+)?<a exist="(?<id>[^"]+)" noun="(?<noun>[^"]+)">(?<name>[^<]+)<\/a>(?<after> [^<]+)?<\/d>\r?\n?$/- ReadyListSheathsSet =
/^ (?<type>(?:secondary )?sheath): <d cmd="store 2?SHEATH clear">(?:(?:an?|some) )?(?<before>[^<]+)?<a exist="(?<id>[^"]+)" noun="(?<noun>[^"]+)">(?<name>[^<]+)<\/a>(?<after> [^<]+)?<\/d>\r?\n?$/- ReadyListFinished =
/To change your default item for a category that is already set, clear the category first by clicking on the item in the list above. Click <d cmd="ready list">here<\/d> to update the list\.\r?\n?$/- ReadyItemClear =
/^Cleared your default (?<type>shield|(?:secondary |ranged )?weapon|ammo2? bundle|(?:secondary )?sheath|wand)\.\r?\n?$/- ReadyItemSet =
/^Setting (?:(?:an?|some) )?(?<before>[^<]+)?<a exist="(?<id>[^"]+)" noun="(?<noun>[^"]+)">(?<name>[^<]+)<\/a>(?<after> [^<]+)? to be your default (?<type>shield|(?:secondary |ranged )?weapon|ammo2? bundle|(?:secondary )?sheath|wand)\.\r?\n?$/- ReadyStoreSet =
/^When storing your (?<type>shield|(?:ranged |secondary )?weapon|ammo bundle|wand), it will be (?<store>worn if possible and stowed if not|stowed|stored in your (?:secondary )?sheath)\.\r?\n?$/- StatusPrompt =
/<prompt time="[0-9]+">/- Overwatch_Short =
Overwatch patterns - simplified reference to the observer patterns
Overwatch::Observer::Term::ANY
- All =
Regexp.union(NpcDeathMessage, Group_Short, Also_Here_Arrival, StowListOutputStart, StowListContainer, StowSetContainer1, StowSetContainer2, ReadyListOutputStart, ReadyListNormal, ReadyListAmmo2, ReadyListSheathsSet, ReadyListFinished, ReadyItemClear, ReadyItemSet, ReadyStoreSet, StatusPrompt, Overwatch_Short)