FANDOM


local p = {}
function p.main(frame)
	local items = {"Arrow shaft", "Logs", "Headless arrow", "Feather", "Bronze arrow", "Bronze arrowheads", "Iron arrow", "Iron arrowheads", "Steel arrow", "Steel arrowheads", "Mithril arrow", "Mithril arrowheads", "Broad arrowheads", "Adamant arrow", "Adamant arrowheads", "Rune arrow", "Rune arrowheads", "Dragon arrow", "Dragon arrowheads", "Bronze dart", "Bronze dart tip", "Off-hand bronze dart", "Iron dart", "Iron dart tip", "Off-hand iron dart", "Steel dart", "Steel dart tip", "Off-hand steel dart", "Mithril dart", "Mithril dart tip", "Off-hand mithril dart", "Adamant dart", "Adamant dart tip", "Off-hand adamant dart", "Rune dart", "Rune dart tip", "Off-hand rune dart", "Dragon dart", "Dragon dart tip", "Off-hand dragon dart", "Shortbow (u)", "Shieldbow (u)", "Oak shortbow (u)", "Oak logs", "Oak shieldbow (u)", "Willow shortbow (u)", "Willow logs", "Willow shieldbow (u)", "Maple shortbow (u)", "Maple logs", "Maple shieldbow (u)", "Yew shortbow (u)", "Yew logs", "Yew shieldbow (u)", "Magic shortbow (u)", "Magic logs", "Magic shieldbow (u)", "Shortbow", "Bowstring", "Shieldbow", "Oak shortbow", "Oak shieldbow", "Willow shortbow", "Willow shieldbow", "Maple shortbow", "Maple shieldbow", "Yew shortbow", "Yew shieldbow", "Magic shortbow", "Magic shieldbow", "Wooden stock", "Oak stock", "Willow stock", "Teak stock", "Teak logs", "Maple stock", "Mahogany stock", "Mahogany logs", "Yew stock", "Magic stock", "Bronze c'bow (u)", "Bronze limbs", "Iron c'bow (u)", "Iron limbs", "Steel c'bow (u)", "Steel limbs", "Mithril c'bow (u)", "Mithril limbs", "Adamant c'bow (u)", "Adamantite limbs", "Runite c'bow (u)", "Runite limbs", "Dragon c'bow (u)", "Dragon limbs", "Bronze crossbow", "Crossbow string", "Off-hand bronze crossbow", "Bronze 2h crossbow", "Iron crossbow", "Off-hand iron crossbow", "Iron 2h crossbow", "Steel crossbow", "Off-hand steel crossbow", "Steel 2h crossbow", "Mith crossbow", "Off-hand mithril crossbow", "Mithril 2h crossbow", "Adamant crossbow", "Off-hand adamant crossbow", "Adamant 2h crossbow", "Rune crossbow", "Off-hand rune crossbow", "Rune 2h crossbow", "Dragon crossbow", "Off-hand dragon crossbow", "Dragon 2h crossbow", "Bronze bolts", "Bronze bolts (unf)", "Iron bolts", "Iron bolts (unf)", "Silver bolts", "Silver bolts (unf)", "Steel bolts", "Steel bolts (unf)", "Mithril bolts", "Mithril bolts (unf)", "Broad-tipped bolts", "Unfinished broad bolts", "Adamant bolts", "Adamant bolts (unf)", "Runite bolts", "Runite bolts (unf)", "Opal bolts", "Opal bolt tips", "Pearl bolts", "Pearl bolt tips", "Topaz bolts", "Topaz bolt tips", "Barbed bolts", "Barb bolttips", "Sapphire bolts", "Sapphire bolt tips", "Emerald bolts", "Emerald bolt tips", "Ruby bolts", "Ruby bolt tips", "Diamond bolts", "Diamond bolt tips", "Dragon bolts", "Dragon bolt tips", "Onyx bolts", "Onyx bolt tips", "Ascension bolts", "Ascension shard", "Opal", "Jade bolt tips", "Jade", "Oyster pearl", "Oyster pearls", "Red topaz", "Sapphire", "Emerald", "Ruby", "Diamond", "Dragonstone", "Onyx", "Bronze brutal", "Flighted ogre arrow", "Bronze nails", "Iron brutal", "Iron nails", "Steel brutal", "Steel nails", "Black brutal", "Black nails", "Mithril brutal", "Mithril nails", "Adamant brutal", "Adamantite nails", "Rune brutal", "Rune nails", "Elder logs", "Elder shortbow (u)", "Elder shieldbow (u)", "Dark arrowheads", "Arrow shaft", "Headless arrow", "Bronze arrow", "Iron arrow", "Steel arrow", "Mithril arrow", "Adamant arrow", "Rune arrow", "Dragon arrow", "Bronze dart", "Off-hand bronze dart", "Iron dart", "Off-hand iron dart", "Steel dart", "Off-hand steel dart", "Mithril dart", "Off-hand mithril dart", "Adamant dart", "Off-hand adamant dart", "Rune dart", "Off-hand rune dart", "Dragon dart", "Off-hand dragon dart", "Shortbow (u)", "Shieldbow (u)", "Oak shortbow (u)", "Oak shieldbow (u)", "Willow shortbow (u)", "Willow shieldbow (u)", "Maple shortbow (u)", "Maple shieldbow (u)", "Yew shortbow (u)", "Yew shieldbow (u)", "Magic shortbow (u)", "Magic shieldbow (u)", "Shortbow", "Shieldbow", "Oak shortbow", "Oak shieldbow", "Willow shortbow", "Willow shieldbow", "Maple shortbow", "Maple shieldbow", "Yew shortbow", "Yew shieldbow", "Magic shortbow", "Magic shieldbow", "Wooden stock", "Oak stock", "Willow stock", "Teak stock", "Maple stock", "Mahogany stock", "Yew stock", "Magic stock", "Bronze c'bow (u)", "Iron c'bow (u)", "Steel c'bow (u)", "Mithril c'bow (u)", "Adamant c'bow (u)", "Runite c'bow (u)", "Dragon c'bow (u)", "Bronze crossbow", "Off-hand bronze crossbow", "Bronze 2h crossbow", "Iron crossbow", "Off-hand iron crossbow", "Iron 2h crossbow", "Steel crossbow", "Off-hand steel crossbow", "Steel 2h crossbow", "Mith crossbow", "Off-hand mithril crossbow", "Mithril 2h crossbow", "Adamant crossbow", "Off-hand adamant crossbow", "Adamant 2h crossbow", "Rune crossbow", "Off-hand rune crossbow", "Rune 2h crossbow", "Dragon crossbow", "Off-hand dragon crossbow", "Dragon 2h crossbow", "Bronze bolts", "Iron bolts", "Silver bolts", "Steel bolts", "Mithril bolts", "Broad-tipped bolts", "Adamant bolts", "Runite bolts", "Opal bolts", "Pearl bolts", "Topaz bolts", "Barbed bolts", "Sapphire bolts", "Emerald bolts", "Ruby bolts", "Diamond bolts", "Dragon bolts", "Onyx bolts", "Ascension bolts", "Opal bolt tips", "Jade bolt tips", "Pearl bolt tips", "Pearl bolt tips", "Topaz bolt tips", "Sapphire bolt tips", "Emerald bolt tips", "Ruby bolt tips", "Diamond bolt tips", "Dragon bolt tips", "Onyx bolt tips", "Bronze brutal", "Iron brutal", "Steel brutal", "Black brutal", "Mithril brutal", "Adamant brutal", "Rune brutal", "Elder shortbow (u)", "Elder shieldbow (u)", "Elder shortbow", "Elder shieldbow", "Dark arrow"}
 
	local function get_price(name)
		local n = tonumber(frame:expandTemplate({title = 'GEP', args = {name}}))
 
		if n == nil then
			n = 0/0 -- nan, math.nan doesn't seem to work
		end
 
		return n
	end
 
	local total = 0
	for i, name in ipairs(items) do
		total = total + get_price(name)
	end
	return tostring(total)
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.