Skip to content

Instantly share code, notes, and snippets.

@mstefarov
Last active August 29, 2015 14:02

Revisions

  1. mstefarov revised this gist Jun 8, 2014. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions gistfile1.xml
    Original file line number Diff line number Diff line change
    @@ -72,7 +72,10 @@
    <Criterion fromRank="veteran#yuSfyiJ7AvuE0nc8" toRank="op#INQ2cjle601IDwig">
    <AND>
    <ConditionPreviousRank val="op#INQ2cjle601IDwig" op="Eq" />
    <!-- Here we are assuming that AutoRank will check this rule and promote the player
    within 5 minutes of them logging in. -->
    <ConditionIntRange field="LastSeen" val="300" op="Lte" />
    <!-- This check is needed to avoid accidentally re-promoting manually demoted ops. -->
    <ConditionRankChangeType val="AutoDemoted" />
    </AND>
    </Criterion>
  2. mstefarov revised this gist Jun 8, 2014. 1 changed file with 60 additions and 60 deletions.
    120 changes: 60 additions & 60 deletions gistfile1.xml
    Original file line number Diff line number Diff line change
    @@ -10,71 +10,71 @@
    if either of the condition sets is met. -->
    <OR>
    <AND>
    <!-- Conditions come in three flavors: ConditionIntRange (for numeric ranges),
    ConditionRankChangeType, and ConditionPreviousRank.
    For ConditionIntRange and ConditionPreviousRank, "op" (comparison operation) can be:
    - Lt (less than)
    - Gt (greater than)
    - Lte (less than or equal)
    - Gte (greater than or equal)
    - Eq (equal)
    - Neq (not equal)
    For ConditionIntRange, "field" can be:
    - TimeSinceFirstLogin (in seconds)
    - TimeSinceLastLogin (in seconds)
    - LastSeen (time since last log-off, in seconds)
    - BlocksBuilt (by hand)
    - BlocksDeleted (by hand)
    - BlocksChanged (BlocksBuilt + BlocksDeleted)
    - BlocksDrawn (with commands)
    - TimesVisited (starts at 1 for first-time players)
    - MessagesWritten
    - TimesKicked
    - TotalTime (in seconds)
    - TimeSinceRankChange (in seconds)
    - TimeSinceLastKick (in seconds) -->
    <ConditionIntRange field="TimesKicked" val="0" op="eq" />
    <ConditionIntRange field="MessagesWritten" val="500" op="gte" />
    <ConditionIntRange field="BlocksChanged" val="30000" op="gte" />
    <ConditionIntRange field="TotalTime" val="90000" op="gte" />
    <ConditionIntRange field="TimeSinceLastLogin" val="250000" op="lte" />
    <!-- For ConditionRankChangeType, "val" can be:
    - Default (rank has never been changed)
    - Promoted (promoted manually by another player or by console)
    - Demoted (demoted manually by another player or by console)
    - AutoPromoted (promoted automatically by AutoRank)
    - AutoDemoted (demoted automatically by AutoRank) -->
    <NAND><ConditionRankChangeType val="Demoted" /></NAND>
    </AND>
    <AND>
    <!-- This is the second alternative set of conditions for promotion. -->
    <ConditionIntRange field="TimesKicked" val="1" op="eq" />
    <ConditionIntRange field="MessagesWritten" val="600" op="gte" />
    <ConditionIntRange field="BlocksChanged" val="40000" op="gte" />
    <ConditionIntRange field="TotalTime" val="100000" op="gte" />
    <ConditionIntRange field="TimeSinceLastLogin" val="250000" op="lte" />
    <ConditionIntRange field="TimeSinceLastKick" val="250000" op="gte" />
    <NAND><ConditionRankChangeType val="Demoted" /></NAND>
    </AND>
    </OR>
    </Criterion>
    <!-- Conditions come in three flavors: ConditionIntRange (for numeric ranges),
    ConditionRankChangeType, and ConditionPreviousRank.
    For ConditionIntRange and ConditionPreviousRank, "op" (comparison operation) can be:
    - Lt (less than)
    - Gt (greater than)
    - Lte (less than or equal)
    - Gte (greater than or equal)
    - Eq (equal)
    - Neq (not equal)
    For ConditionIntRange, "field" can be:
    - TimeSinceFirstLogin (in seconds)
    - TimeSinceLastLogin (in seconds)
    - LastSeen (time since last log-off, in seconds)
    - BlocksBuilt (by hand)
    - BlocksDeleted (by hand)
    - BlocksChanged (BlocksBuilt + BlocksDeleted)
    - BlocksDrawn (with commands)
    - TimesVisited (starts at 1 for first-time players)
    - MessagesWritten
    - TimesKicked
    - TotalTime (in seconds)
    - TimeSinceRankChange (in seconds)
    - TimeSinceLastKick (in seconds) -->
    <ConditionIntRange field="TimesKicked" val="0" op="eq" />
    <ConditionIntRange field="MessagesWritten" val="500" op="gte" />
    <ConditionIntRange field="BlocksChanged" val="30000" op="gte" />
    <ConditionIntRange field="TotalTime" val="90000" op="gte" />
    <ConditionIntRange field="TimeSinceLastLogin" val="250000" op="lte" />
    <!-- For ConditionRankChangeType, "val" can be:
    - Default (rank has never been changed)
    - Promoted (promoted manually by another player or by console)
    - Demoted (demoted manually by another player or by console)
    - AutoPromoted (promoted automatically by AutoRank)
    - AutoDemoted (demoted automatically by AutoRank) -->
    <NAND><ConditionRankChangeType val="Demoted" /></NAND>
    </AND>
    <AND>
    <!-- This is the second alternative set of conditions for promotion. -->
    <ConditionIntRange field="TimesKicked" val="1" op="eq" />
    <ConditionIntRange field="MessagesWritten" val="600" op="gte" />
    <ConditionIntRange field="BlocksChanged" val="40000" op="gte" />
    <ConditionIntRange field="TotalTime" val="100000" op="gte" />
    <ConditionIntRange field="TimeSinceLastLogin" val="250000" op="lte" />
    <ConditionIntRange field="TimeSinceLastKick" val="250000" op="gte" />
    <NAND><ConditionRankChangeType val="Demoted" /></NAND>
    </AND>
    </OR>
    </Criterion>

    <!-- This example auto-demotes ops to veterans for inactivity... -->
    <Criterion fromRank="op#INQ2cjle601IDwig" toRank="veteran#yuSfyiJ7AvuE0nc8">
    <AND>
    <ConditionIntRange field="LastSeen" val="7776000" op="Gt" />
    </AND>
    <AND>
    <ConditionIntRange field="LastSeen" val="7776000" op="Gt" />
    </AND>
    </Criterion>
    <!-- But automatically re-promotes them if they come back! -->
    <Criterion fromRank="veteran#yuSfyiJ7AvuE0nc8" toRank="op#INQ2cjle601IDwig">
    <AND>
    <ConditionPreviousRank val="op#INQ2cjle601IDwig" op="Eq" />
    <ConditionIntRange field="LastSeen" val="300" op="Lte" />
    <ConditionRankChangeType val="AutoDemoted" />
    </AND>
    <AND>
    <ConditionPreviousRank val="op#INQ2cjle601IDwig" op="Eq" />
    <ConditionIntRange field="LastSeen" val="300" op="Lte" />
    <ConditionRankChangeType val="AutoDemoted" />
    </AND>
    </Criterion>

    </fCraftAutoRank>
    </fCraftAutoRank>
  3. mstefarov revised this gist Jun 8, 2014. No changes.
  4. mstefarov revised this gist Jun 8, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.xml
    Original file line number Diff line number Diff line change
    @@ -5,9 +5,9 @@
    they meet either of the two condition sets. -->
    <Criterion fromRank="builder#mTaSFlmnBk1QYVqN" toRank="veteran#yuSfyiJ7AvuE0nc8">
    <!-- Tags like <OR>, <AND>, <NOR>, and <NAND> logically combine conditions.
    In this example, several groups of conditions are grouped with <AND>.
    These groups are combined by <OR>, which will trigger the criterion
    if any of the <AND> groups trigger. -->
    In this example, two alternative sets of conditions are grouped with <AND>.
    These groups are then combined by <OR>, which will trigger the promotion
    if either of the condition sets is met. -->
    <OR>
    <AND>
    <!-- Conditions come in three flavors: ConditionIntRange (for numeric ranges),
  5. mstefarov revised this gist Jun 8, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.xml
    Original file line number Diff line number Diff line change
    @@ -10,8 +10,8 @@
    if any of the <AND> groups trigger. -->
    <OR>
    <AND>
    <!-- Conditions come in three flavors:
    ConditionIntRange (for numeric ranges), ConditionRankChangeType, and ConditionPreviousRank.
    <!-- Conditions come in three flavors: ConditionIntRange (for numeric ranges),
    ConditionRankChangeType, and ConditionPreviousRank.
    For ConditionIntRange and ConditionPreviousRank, "op" (comparison operation) can be:
    - Lt (less than)
  6. mstefarov revised this gist Jun 8, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.xml
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    <?xml version="1.0" encoding="utf-8"?>
    <fCraftAutoRank>
    <!-- Each <Criterion> tag is a rule.
    <!-- Each <Criterion> tag is a rule. Either short or fully-qualified rank names can be used.
    This example automatically promotes players from builder to veteran rank if
    they meet either of the two condition sets. -->
    <Criterion fromRank="builder#mTaSFlmnBk1QYVqN" toRank="veteran#yuSfyiJ7AvuE0nc8">
  7. mstefarov created this gist Jun 8, 2014.
    80 changes: 80 additions & 0 deletions gistfile1.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,80 @@
    <?xml version="1.0" encoding="utf-8"?>
    <fCraftAutoRank>
    <!-- Each <Criterion> tag is a rule.
    This example automatically promotes players from builder to veteran rank if
    they meet either of the two condition sets. -->
    <Criterion fromRank="builder#mTaSFlmnBk1QYVqN" toRank="veteran#yuSfyiJ7AvuE0nc8">
    <!-- Tags like <OR>, <AND>, <NOR>, and <NAND> logically combine conditions.
    In this example, several groups of conditions are grouped with <AND>.
    These groups are combined by <OR>, which will trigger the criterion
    if any of the <AND> groups trigger. -->
    <OR>
    <AND>
    <!-- Conditions come in three flavors:
    ConditionIntRange (for numeric ranges), ConditionRankChangeType, and ConditionPreviousRank.
    For ConditionIntRange and ConditionPreviousRank, "op" (comparison operation) can be:
    - Lt (less than)
    - Gt (greater than)
    - Lte (less than or equal)
    - Gte (greater than or equal)
    - Eq (equal)
    - Neq (not equal)
    For ConditionIntRange, "field" can be:
    - TimeSinceFirstLogin (in seconds)
    - TimeSinceLastLogin (in seconds)
    - LastSeen (time since last log-off, in seconds)
    - BlocksBuilt (by hand)
    - BlocksDeleted (by hand)
    - BlocksChanged (BlocksBuilt + BlocksDeleted)
    - BlocksDrawn (with commands)
    - TimesVisited (starts at 1 for first-time players)
    - MessagesWritten
    - TimesKicked
    - TotalTime (in seconds)
    - TimeSinceRankChange (in seconds)
    - TimeSinceLastKick (in seconds) -->
    <ConditionIntRange field="TimesKicked" val="0" op="eq" />
    <ConditionIntRange field="MessagesWritten" val="500" op="gte" />
    <ConditionIntRange field="BlocksChanged" val="30000" op="gte" />
    <ConditionIntRange field="TotalTime" val="90000" op="gte" />
    <ConditionIntRange field="TimeSinceLastLogin" val="250000" op="lte" />

    <!-- For ConditionRankChangeType, "val" can be:
    - Default (rank has never been changed)
    - Promoted (promoted manually by another player or by console)
    - Demoted (demoted manually by another player or by console)
    - AutoPromoted (promoted automatically by AutoRank)
    - AutoDemoted (demoted automatically by AutoRank) -->
    <NAND><ConditionRankChangeType val="Demoted" /></NAND>
    </AND>
    <AND>
    <!-- This is the second alternative set of conditions for promotion. -->
    <ConditionIntRange field="TimesKicked" val="1" op="eq" />
    <ConditionIntRange field="MessagesWritten" val="600" op="gte" />
    <ConditionIntRange field="BlocksChanged" val="40000" op="gte" />
    <ConditionIntRange field="TotalTime" val="100000" op="gte" />
    <ConditionIntRange field="TimeSinceLastLogin" val="250000" op="lte" />
    <ConditionIntRange field="TimeSinceLastKick" val="250000" op="gte" />
    <NAND><ConditionRankChangeType val="Demoted" /></NAND>
    </AND>
    </OR>
    </Criterion>

    <!-- This example auto-demotes ops to veterans for inactivity... -->
    <Criterion fromRank="op#INQ2cjle601IDwig" toRank="veteran#yuSfyiJ7AvuE0nc8">
    <AND>
    <ConditionIntRange field="LastSeen" val="7776000" op="Gt" />
    </AND>
    </Criterion>
    <!-- But automatically re-promotes them if they come back! -->
    <Criterion fromRank="veteran#yuSfyiJ7AvuE0nc8" toRank="op#INQ2cjle601IDwig">
    <AND>
    <ConditionPreviousRank val="op#INQ2cjle601IDwig" op="Eq" />
    <ConditionIntRange field="LastSeen" val="300" op="Lte" />
    <ConditionRankChangeType val="AutoDemoted" />
    </AND>
    </Criterion>

    </fCraftAutoRank>