Difference between revisions of "Template:AutocatWeapon"

From TheKolWiki
Jump to: navigation, search
(Adding shotgun/Shotguns to the arrays. My first Template edit; hopefully this doesn't crash the wiki...)
(Adding some weapon sets I found in Other Weapons: drill, gun, knuckles, machine gun, rattle, wand)
Line 3: Line 3:
 
$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) {
   $wt=array('accordion','axe','banjo','bazooka','blowgun','boomerang','bow','chefstaff','claw','club','crossbow','drum','flail','flute','forearm replacement','guitar','horn','knife','pistol','polearm','radio','rifle','saucepan','shotgun','slingshot','spear','staff','sword','umbrella','utensil','whip','whistle','yoyo');
+
   $wt=array('accordion','axe','banjo','bazooka','blowgun','boomerang','bow','chefstaff','claw','club','crossbow','drill','drum','flail','flute','forearm replacement','guitar','gun','horn','knife','knuckles','machine gun','pistol','polearm','radio','rattle','rifle','saucepan','shotgun','slingshot','spear','staff','sword','umbrella','utensil','wand','whip','whistle','yoyo');
   $wtc=array('Accordions','Axes','Banjos','Bazookas','Blowguns','Boomerangs','Bows','Chefstaves','Claws','Clubs','Crossbows','Drums','Flails','Flutes','Forearm replacements','Guitars','Horns','Knives','Pistols','Polearms','Radios','Rifles','Saucepans','Shotguns','Slingshots','Spears','Staves','Swords','Umbrellas','Utensils','Whips','Whistles','Yoyos');
+
   $wtc=array('Accordions','Axes','Banjos','Bazookas','Blowguns','Boomerangs','Bows','Chefstaves','Claws','Clubs','Crossbows','Drills','Drums','Flails','Flutes','Forearm replacements','Guitars','Guns','Horns','Knives','Knuckles','Machine guns','Pistols','Polearms','Radios','Rattles','Rifles','Saucepans','Shotguns','Slingshots','Spears','Staves','Swords','Umbrellas','Utensils','Wands','Whips','Whistles','Yoyos');
 
   $mw=array('saucepan','chefstaff','utensil','artsything');
 
   $mw=array('saucepan','chefstaff','utensil','artsything');
 
   $c='Melee';
 
   $c='Melee';

Revision as of 00:31, 28 February 2016

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).