Year of the Dragon: Through April 23rd, claim the adventure pack Slice of Life for free! Speak to Xatheral in the Hall of Heroes.

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:IsValidClassAndLevel

From DDO wiki
Jump to navigation Jump to search

Purpose[edit]

  • Determine whether supplied value is a valid class abbreviation [with an optional level as second word]
  • Template accepts one argument, checks the first word against the class list (Alc,Art,...) and second word to verify it is an integer between 1 and 20
    • Any words past the second word are ignored (may want to add a check to kick back 0 if argument consists of 3 or more words)
  • Returns 0 on failue, or 1 on success

Usage[edit]

{{IsValidClassAndLevel
  | = default : <empty> (will return 0) // First argument is the value to use in conditional expression
}}

Examples[edit]

code result
{{IsValidClassAndLevel}} 0
{{IsValidClassAndLevel|}} 0
{{IsValidClassAndLevel|Bad}} 0
{{IsValidClassAndLevel|Art}} 1
{{IsValidClassAndLevel|Art Art}} 0
{{IsValidClassAndLevel|Art 0}} 0
{{IsValidClassAndLevel|Art 6}} 1

Categorization[edit]

Coding[edit]

0