Module:Skills/Archaeology: Difference between revisions

attempting to fixxxxxx
No edit summary
(attempting to fixxxxxx)
Line 114: Line 114:
plusOneMinimumRefinementValue = plusOneMinimumRefinementValue + (dropChance * thisItem.sellsFor * (((row.minQuantity+1) + (row.maxQuantity+1))/ 2))
plusOneMinimumRefinementValue = plusOneMinimumRefinementValue + (dropChance * thisItem.sellsFor * (((row.minQuantity+1) + (row.maxQuantity+1))/ 2))
--Checking if item is a consumable, then adding its value a second time
--Checking if item is a consumable, then adding its value a second time
if thisItem._canItemUseSlot({thisItem}, 'Consumable') then
if thisItem._canItemUseSlot({thisItem.name, type='item'}, 'Consumable') ~= nil then
doubleConsumableRefinementValue = lootValue + (dropChance * thisItem.sellsFor * ((row.minQuantity + row.maxQuantity)/ 2))
doubleConsumableRefinementValue = lootValue + (dropChance * thisItem.sellsFor * ((row.minQuantity + row.maxQuantity)/ 2))
end
end
Line 122: Line 122:
table.insert(result, '\r\nThe average value of one action is '..Icons.GP(Shared.round(lootValue, 2, 0))..'.')
table.insert(result, '\r\nThe average value of one action is '..Icons.GP(Shared.round(lootValue, 2, 0))..'.')
table.insert(result, '\r\nThe average value of one action with the +1 Minimum Items refinement is '..Icons.GP(Shared.round(plusOneMinimumRefinementValue, 2, 0))..'.')
table.insert(result, '\r\nThe average value of one action with the +1 Minimum Items refinement is '..Icons.GP(Shared.round(plusOneMinimumRefinementValue, 2, 0))..'.')
if doubleConsumableRefinementValue>lootValue then
if doubleConsumableRefinementValue > lootValue then
table.insert(result, '\r\nThe average value of one action with the x2 Consumables refinement is '..Icons.GP(Shared.round(doubleConsumableRefinementValue, 2, 0))..'.')
table.insert(result, '\r\nThe average value of one action with the x2 Consumables refinement is '..Icons.GP(Shared.round(doubleConsumableRefinementValue, 2, 0))..'.')
end
end
587

edits