Module: Lich::Gemstone::Group::Observer::Term

Defined in:
documented/gemstone/group.rb

Overview

Regular expressions and constants for matching group-related game output.

Constant Summary collapse

JOIN =

Matches when someone joins your group

Examples:

“<a exist="-10467645" noun="Oreh">Oreh</a> joins your group.”

%r{^<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> joins your group.\r?\n?$}
LEAVE =

Matches when someone leaves your group

Examples:

“<a exist="-10467645" noun="Oreh">Oreh</a> leaves your group”

%r{^<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> leaves your group.\r?\n?$}
ADD =

Matches when you add someone to your group

Examples:

“You add <a exist="-10467645" noun="Oreh">Oreh</a> to your group.”

%r{^You add <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> to your group.\r?\n?$}
REMOVE =

Matches when you remove someone from the group

Examples:

“You remove <a exist="-10467645" noun="Oreh">Oreh</a> from the group.”

%r{^You remove <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> from the group.\r?\n?$}
NOOP =

Matches when trying to add someone already in group

Examples:

“But <a exist="-10467645" noun="Oreh">Oreh</a> is already a member of your group!”

%r{^But <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> is already a member of your group!\r?\n?$}
HAS_LEADER =

Matches when you receive leadership

Examples:

“<a exist="-10488845" noun="Etanamir">Etanamir</a> designates you as the new leader of the group.”

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> designates you as the new leader of the group\.\r?\n?$}
SWAP_LEADER =

Matches when leadership changes to another player

Examples:

“<a exist="-10488845" noun="Etanamir">Etanamir</a> designates <a exist="-10488845" noun="Ondreian">Ondreian</a> as the new leader of the group.”

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> designates <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> as the new leader of the group.\r?\n?$}
GAVE_LEADER_AWAY =

Matches when you give away leadership

Examples:

“You designate <a exist="-10778599" noun="Ondreian">Ondreian</a> as the new leader of the group.”

%r{You designate <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> as the new leader of the group\.\r?\n?$}
DISBAND =

Matches when you disband the group

Examples:

“You disband your group.”

%r{^You disband your group}
ADDED_TO_NEW_GROUP =

Matches when you’re added to someone’s group

Examples:

“<a exist="-10488845" noun="Etanamir">Etanamir</a> adds you to <a exist="-10488845" noun="Etanamir">his</a> group.”

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> adds you to <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> group.\r?\n?$}
JOINED_NEW_GROUP =

Matches when you join someone’s group

Examples:

“You join <a exist="-10488845" noun="Etanamir">Etanamir</a>.”

%r{You join <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a>\.\r?\n?$}
LEADER_ADDED_MEMBER =

Matches when your leader adds another member

Examples:

“<a exist="-10488845" noun="Etanamir">Etanamir</a> adds <a exist="-10974229" noun="Szan">Szan</a> to <a exist="-10488845" noun="Etanamir">his</a> group.”

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> adds <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> to <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> group\.\r?\n?$}
LEADER_REMOVED_MEMBER =

Matches when your leader removes a member

Examples:

“<a exist="-10488845" noun="Etanamir">Etanamir</a> removes <a exist="-10974229" noun="Szan">Szan</a> from the group.”

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> removes <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> from the group\.\r?\n?$}
HOLD_RESERVED_FIRST =

Matches when you grab someone’s hand (reserved demeanor)

Examples:

“You grab <a exist="-10070682" noun="Dicate">Dicate’s</a> hand.”

%r{^You grab <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> hand.\r?\n?$}
HOLD_NEUTRAL_FIRST =

Matches when you hold someone’s hand (neutral demeanor)

Examples:

“You reach out and hold <a exist="-10070682" noun="Dicate">Dicate’s</a> hand.”

%r{^You reach out and hold <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> hand.\r?\n?$}
HOLD_FRIENDLY_FIRST =

Matches when you take someone’s hand (friendly demeanor)

Examples:

“You gently take hold of <a exist="-10070682" noun="Dicate">Dicate’s</a> hand.”

%r{^You gently take hold of <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> hand.\r?\n?$}
HOLD_WARM_FIRST =

Matches when you clasp someone’s hand (warm demeanor)

Examples:

“You clasp <a exist="-10070682" noun="Dicate">Dicate’s</a> hand tenderly.”

%r{^You clasp <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> hand tenderly.\r?\n?$}
HOLD_RESERVED_SECOND =

Matches when someone grabs your hand (reserved demeanor)

Examples:

“<indicator id=‘IconJOINED’ visible=‘y’/><a exist="-10966483" noun="Nisugi">Nisugi</a> grabs your hand.”

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> grabs your hand.\r?\n?$}
HOLD_NEUTRAL_SECOND =

Matches when someone holds your hand (neutral demeanor)

Examples:

“<a exist="-10966483" noun="Nisugi">Nisugi</a> reaches out and holds your hand.”

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> reaches out and holds your hand.\r?\n?$}
HOLD_FRIENDLY_SECOND =

Matches when someone takes your hand (friendly demeanor)

Examples:

“<a exist="-10966483" noun="Nisugi">Nisugi</a> gently takes hold of your hand.”

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> gently takes hold of your hand.\r?\n?$}
HOLD_WARM_SECOND =

Matches when someone clasps your hand (warm demeanor)

Examples:

“<a exist="-10966483" noun="Nisugi">Nisugi</a> clasps your hand tenderly.”

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> clasps your hand tenderly.\r?\n?$}
HOLD_RESERVED_THIRD =

Matches when you observe someone grabbing another’s hand (reserved demeanor)

Examples:

“<a exist="-10966483" noun="Nisugi">Nisugi</a> grabs <a exist="-10070682" noun="Dicate">Dicate’s</a> hand.”

%r{^<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> grabs <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> hand.\r?\n?$}
HOLD_NEUTRAL_THIRD =

Matches when you observe someone holding another’s hand (neutral demeanor)

Examples:

“<a exist="-10966483" noun="Nisugi">Nisugi</a> reaches out and holds <a exist="-10070682" noun="Dicate">Dicate’s</a> hand.”

%r{^<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> reaches out and holds <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> hand.\r?\n?$}
HOLD_FRIENDLY_THIRD =

Matches when you observe someone taking another’s hand (friendly demeanor)

Examples:

“<a exist="-10966483" noun="Nisugi">Nisugi</a> gently takes hold of <a exist="-10070682" noun="Dicate">Dicate’s</a> hand.”

%r{^<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> gently takes hold of <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> hand.\r?\n?$}
HOLD_WARM_THIRD =

Matches when you observe someone clasping another’s hand (warm demeanor)

Examples:

“<a exist="-10966483" noun="Nisugi">Nisugi</a> clasps <a exist="-10070682" noun="Dicate">Dicate’s</a> hand tenderly.”

%r{^<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> clasps <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> hand tenderly.\r?\n?$}
OTHER_JOINED_GROUP =

Matches when someone else joins another’s group

Examples:

“<a exist="-10154507" noun="Zoleta">Zoleta</a> joins <a exist="-10966483" noun="Nisugi">Nisugi’s</a> group.”

%r{^<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>\w+?)</a> joins <a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a> group.\r?\n?$}
NO_GROUP =

Matches when not in any group

Examples:

/^You are not currently in a group/

/^You are not currently in a group/
MEMBER =

Matches group member listing from GROUP command

Examples:

“You are leading PlayerName, PlayerName2.”

“You are grouped with LeaderName, PlayerName.”

/^You are (?:leading|grouped with) (.*)/
STATUS =

Matches group status line

Examples:

“Your group status is currently open.”

/^Your group status is currently (?<status>open|closed)\./
GROUP_EMPTIED =

UI indicator showing group is empty

%[<indicator id='IconJOINED' visible='n'/>]
GROUP_EXISTS =

UI indicator showing group exists

%[<indicator id='IconJOINED' visible='y'/>]
GIVEN_LEADERSHIP =

Text indicating leadership transfer

%[designates you as the new leader of the group.]
ANY =

Combined regex matching any group-related message

Regexp.union(
  JOIN,
  LEAVE,
  ADD,
  REMOVE,
  DISBAND,
  NOOP,
  STATUS,
  NO_GROUP,
  MEMBER,
  HAS_LEADER,
  SWAP_LEADER,
  LEADER_ADDED_MEMBER,
  LEADER_REMOVED_MEMBER,
  ADDED_TO_NEW_GROUP,
  JOINED_NEW_GROUP,
  GAVE_LEADER_AWAY,
  HOLD_RESERVED_FIRST,
  HOLD_NEUTRAL_FIRST,
  HOLD_FRIENDLY_FIRST,
  HOLD_WARM_FIRST,
  HOLD_RESERVED_SECOND,
  HOLD_NEUTRAL_SECOND,
  HOLD_FRIENDLY_SECOND,
  HOLD_WARM_SECOND,
  HOLD_RESERVED_THIRD,
  HOLD_NEUTRAL_THIRD,
  HOLD_FRIENDLY_THIRD,
  HOLD_WARM_THIRD,
  OTHER_JOINED_GROUP,
)
EXIST =

Regex for extracting character data from XML tags

%r{<a exist="(?<id>[\d-]+)" noun="(?<noun>[A-Za-z]+)">(?<name>[\w']+?)</a>}