Difference between revisions of "Template:AutocatWeapon"

From TheKolWiki
Jump to: navigation, search
(for autocatting weapons)
 
Line 1: Line 1:
<includeonly><foxway>
+
<includeonly><phptag>
 
$a = preg_match('/(ranged weapon)?(weapon)? \(([123])-handed (.*)\)/',$argv[1],$x);
 
$a = preg_match('/(ranged weapon)?(weapon)? \(([123])-handed (.*)\)/',$argv[1],$x);
 
if ($a) {
 
if ($a) {
Line 23: Line 23:
 
   }
 
   }
 
}
 
}
</foxway></includeonly><noinclude>
+
</phptag></includeonly><noinclude>
 
This template enables automatic categorization of weapon types.
 
This template enables automatic categorization of weapon types.
  

Revision as of 13:50, 10 March 2015

This template enables automatic categorization of weapon types.

Usage

  • first argument: The type field of the item description.
  • second argument (optional): The statreq field of the item description (only important for for classifying mysticality weapons that are not saucepans, utensils, chefstaves, or artsythings).