Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes. edit

Game mechanicsNewbie guideIn developmentDDO StoreSocial Media


ChallengesClassesCollectablesCraftingEnhancementsEpic DestiniesFavorFeats

GlossaryItemsMapsMonstersPlacesQuestsRacesReincarnationSkillsSpells


Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!

Template:VIP extractor

From DDO wiki
Jump to navigation Jump to search

Usage[edit]

This template is a phantom template used in DPL calls.

It extracts the free state from a quest template that uses the following named parameters:

  • |free=

The result is a raw unformatted number usable in calculations.
It also stores the result in the variable {{#var: vipQuests}} for further use by the calling template. This is only useful if the template is not used as a phantom in DPL, in which case the variable cannot be accessed.
In case the template can't extract a value (missing parameters or unknown format), nothing is produced.

Examples[edit]

{{#dpl:
...
 | include = {Quest¦VIP extractor}
...
}}
{{Free extractor
 | free = {{{free|}}}
}}

* The below code does the following:

    1. It selects every level 1 and level 2 quest.
    2. It restricts the selection to the quests that actually use the template {{Quest}}
    3. It passes all the parameters of template {{Quest}} to {{VIP extractor}}.
    4. It declares that the output should follow the format strictly defined by the user (and not lists or tables)
    5. It defines the format of the output
      1. The output will start with "{{Add|prefix=vip"
      2. Before each result's output, the " |vip<name of the page>=" will be added.
      3. After each result's output nothing will be added
      4. At the end of the output, "}}" will be added.
  • This would pass every favor number as a parameter to a template {{Add}}.
{{#dpl:
 | category = Level 1 quests¦Level 2 quests
 | uses = Template:Quest
 | include = {Quest¦VIP extractor}
 | mode = userformat
 | listseparators = {{Add{{!}}prefix=vip,{{!}}vip%PAGE%=,,}}
}}
{{Add|prefix=vip |vipThe Grotto=0 |vipThe Storehouse's Secret=0 |vipHeyton's Rest=0 |vipThe Cannith Crystal=0 |vipThe Collaborator=0 |vipNecromancer's Doom=0 |vipStopping the Sahuagin=0 |vipSacrifices=0 |vipRedemption (quest)=0 |vipHall of the Mark=0 |vipThe Bugbear Bandits=1 |vipTreasure Hunt=1 |vipCaged Beast=1 |vipObstructing the Orcs=1 |vipThe Hobgoblin Horde=1 |vipViolent Delights=1 |vipWatch Your Step=1 |vipDurk's Got A Secret=0 |vipWalk the Butcher's Path=0 |vipThe Smuggler's Warehouse=0 |vipProtect Baudry's Interests=0 |vipInformation is Key=0 |vipStop Hazadill's Shipment=0 |vipRetrieve the Stolen Goods=0 |vipGarrison's Missing Pack=0 |vipStealthy Repossession=0 |vipRecovering the Lost Tome=0 |vipArachnophobia=0 |vipThe Miller's Debt=0 |vipHaverdasher=0 |vipMisery's Peak=0 |vipBringing the Light=0 |vipTotal Chaos=1 |vipThe Kobolds' New Ringleader=0}}
8

CODE[edit]

0