20
edits
m (Another fix for item icon) |
m (Kills/Damage required) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1,117: | Line 1,117: | ||
table.insert(output, '{| class="wikitable" style="width: 100%;"') | table.insert(output, '{| class="wikitable" style="width: 100%;"') | ||
table.insert(output, '{| class="wikitable sortable" style="width: 100%;"') | table.insert(output, '{| class="wikitable sortable" style="width: 100%;"') | ||
table.insert(output, '! style="width: 25%;"|'..Icons.Icon({itemName, notext=true, size=50, type= | table.insert(output, '! style="width: 25%;"|'..Icons.Icon({itemName, notext=true, size=50, type="item"})..' x'..quantity) | ||
table.insert(output, '! colspan="3"|[['..itemName..']]') | table.insert(output, '! colspan="3"|[['..itemName..']]') | ||
table.insert(output, '!') | table.insert(output, '!') | ||
table.insert(output, '|-') | table.insert(output, '|-') | ||
table.insert(output, '! Monster') | table.insert(output, '! Monster') | ||
table.insert(output, '! { | table.insert(output, '! '..Icons.Icon({"Hitpoints", notext=true, type="skill"})..' Effective HP<br> (including DR)') | ||
table.insert(output, '! Drop Chance') | table.insert(output, '! Drop Chance') | ||
table.insert(output, '! Avg. Kills') | table.insert(output, '! Avg. Kills') | ||
Line 1,136: | Line 1,136: | ||
for i, v in ipairs(monsterResults) do | for i, v in ipairs(monsterResults) do | ||
local killsRequired = Shared.round2(quantity/(v.dropChance/100), 0) | |||
table.insert(output, '|-') | table.insert(output, '|-') | ||
table.insert(output, ' | table.insert(output, '| '..Icons.Icon({v.monster.name, type="monster"})) | ||
table.insert(output, ' | table.insert(output, '| '..Shared.formatnum(v.effectiveHp)) | ||
table.insert(output, '| '..v.dropChance..'%') | table.insert(output, '| '..v.dropChance..'%') | ||
table.insert(output, '| | table.insert(output, '| '..Shared.formatnum(killsRequired)) | ||
table.insert(output, '| | table.insert(output, '| '..Shared.formatnum(killsRequired * v.effectiveHp)) | ||
end | end | ||
edits