Module:Armory: Difference between revisions

Created page with "local hc = require('Module:Paramtest').has_content local yn = require('Module:Yesno') local QUERY_SIZE = 8 local p = {} local cellDef = { name = { header = 'Item', class..."
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 7: Line 7:
local cellDef = {
local cellDef = {
     name = { header = 'Item', class = 'armory-name', type = 'eq_string' },
     name = { header = 'Item', class = 'armory-name', type = 'eq_string' },
     ['Equipment tier'] = { header = 'Tier', class = 'armory-tier', type = 'eq_number' },
     ['Mod tier'] = { header = 'Tier', class = 'armory-tier', type = 'eq_number' },
     ['Combat class'] = { header = 'Class', class = 'armory-class', type = 'eq_image' },
     ['Combat class'] = { header = 'Class', class = 'armory-class', type = 'eq_image' },
     ['Equipment type'] = { header = 'Type', class = 'armory-type', type = 'eq_string' },
     ['Mod type'] = { header = 'Type', class = 'armory-type', type = 'eq_string' },
     ['Attack style'] = { header = 'Style', class = 'armory-style', type = 'eq_number' },
     ['Attack style'] = { header = 'Style', class = 'armory-style', type = 'eq_number' },
     ['Equipment armour'] = { header = 'Armour', class = 'armory-armour', type = 'eq_number' },
     ['Mod armor'] = { header = 'Armor', class = 'armory-armor', type = 'eq_number' },
     ['Equipment life points'] = { header = 'Life<br />points', class = 'armory-lifepoints', type = 'eq_number' },
     ['Mod life points'] = { header = 'Life<br />points', class = 'armory-lifepoints', type = 'eq_number' },
     ['Strength bonus'] = { header = 'Strength<br />bonus', class = 'armory-strength', type = 'eq_number' },
     ['Strength bonus'] = { header = 'Strength<br />bonus', class = 'armory-strength', type = 'eq_number' },
     ['Magic bonus'] = { header = 'Magic<br />bonus', class = 'armory-magic', type = 'eq_number' },
     ['Magic bonus'] = { header = 'Magic<br />bonus', class = 'armory-magic', type = 'eq_number' },
Line 27: Line 27:
ranged = '[[File:Ranged.png|x24px|link=Ranged]]',
ranged = '[[File:Ranged.png|x24px|link=Ranged]]',
magic = '[[File:Magic.png|x24px|link=Magic]]',
magic = '[[File:Magic.png|x24px|link=Magic]]',
hybrid = '[[File:CombatSwords.png|x24px|link=Armour#Hybrid]]',
hybrid = '[[File:CombatSwords.png|x24px|link=Armor#Hybrid]]',
all = '[[File:CombatSwords.png|x24px|link=Armour#All]]',
all = '[[File:CombatSwords.png|x24px|link=Armor#All]]',
none = ''
none = ''
}
}
Line 41: Line 41:
utility = 1,
utility = 1,
},
},
     {'Combat class', 'Equipment tier', 'Equipment type', 'Equipment armour', 'Equipment life points', 'Strength bonus', 'Magic bonus', 'Ranged bonus', 'Prayer bonus'}, --armour
     {'Combat class', 'Mod tier', 'Mod type', 'Mod armor', 'Mod life points', 'Strength bonus', 'Magic bonus', 'Ranged bonus', 'Prayer bonus'}, --armor
     {'Combat class', 'Equipment tier', 'Equipment type', 'Attack style', 'Weapon accuracy', 'Weapon damage', 'Prayer bonus', 'Weapon attack speed', 'Attack range'}, --mh/2h weapons
     {'Combat class', 'Mod tier', 'Mod type', 'Attack style', 'Weapon accuracy', 'Weapon damage', 'Prayer bonus', 'Weapon attack speed', 'Attack range'}, --mh/2h weapons
     {'Combat class', 'Equipment tier', 'Equipment type', 'Attack style', 'Weapon accuracy', 'Weapon damage', 'Equipment armour', 'Equipment life points', 'Prayer bonus', 'Weapon attack speed', 'Attack range'}, --offhands inc shields
     {'Combat class', 'Mod tier', 'Mod type', 'Attack style', 'Weapon accuracy', 'Weapon damage', 'Mod armor', 'Mod life points', 'Prayer bonus', 'Weapon attack speed', 'Attack range'}, --offhands inc shields
     {'Combat class', 'Equipment tier', 'Equipment armour', 'Strength bonus', 'Magic bonus', 'Ranged bonus', 'Prayer bonus'}, -- ring neck pocket
     {'Combat class', 'Mod tier', 'Mod armor', 'Strength bonus', 'Magic bonus', 'Ranged bonus', 'Prayer bonus'}, -- ring neck pocket
     {'Combat class', 'Equipment tier', 'Weapon damage', 'Prayer bonus', 'Strength bonus', 'Magic bonus', 'Ranged bonus', 'Equipment armour' }, -- ammo
     {'Combat class', 'Mod tier', 'Weapon damage', 'Prayer bonus', 'Strength bonus', 'Magic bonus', 'Ranged bonus', 'Mod armor' }, -- ammo
     {'Combat class', 'Equipment tier', 'Strength bonus', 'Magic bonus', 'Ranged bonus', 'Equipment armour' }, -- sigil pocket default
     {'Combat class', 'Mod tier', 'Strength bonus', 'Magic bonus', 'Ranged bonus', 'Mod armor' }, -- sigil pocket default
}
}


local sorts = {
local sorts = {
['Name'] = nil,
['Name'] = nil,
['Tier'] = 'Equipment tier',
['Tier'] = 'Mod tier',
['ID'] = 'Item ID',
['ID'] = 'Item ID',
}
}
Line 78: Line 78:
if rowtype then
if rowtype then
table.insert(query, '[[Equipment slot::'..args.slot..']]')
table.insert(query, '[[Mod slot::'..args.slot..']]')
else
else
error('Please provide a valid equipment slot')
error('Please provide a valid Mod slot')
end
end
Line 111: Line 111:
local t_min = tonumber(args.tier_min)
local t_min = tonumber(args.tier_min)
local t_max = tonumber(args.tier_max)
local t_max = tonumber(args.tier_max)
if args.enable_tier_min == 'true' and t_min and t_min > 0 and not no_tier_search[args.slot] then
if args.enable_tier_min == 'true' and t_min and t_min > 100 and not no_tier_search[args.slot] then
table.insert(query, '[[Equipment tier::≥'..t_min..']]')
table.insert(query, '[[Mod tier::≥'..t_min..']]')
end
end
if args.enable_tier_max =='true' and t_max and t_max < 120 and not no_tier_search[args.slot] then
if args.enable_tier_max =='true' and t_max and t_max < 500 and not no_tier_search[args.slot] then
table.insert(query, '[[Equipment tier::≤'..t_max..']]')
table.insert(query, '[[Mod tier::≤'..t_max..']]')
end
end
querySize = 0
querySize = 0