Anonymous

Module:Skills/Gathering: Difference between revisions

From Melvor Idle
J/K thieving minimum GP is actually 1, code was misread. Undo revision 51446 by Falterfire (talk)
(Updated Thieving tables to properly reflect NPC minimum GP being 1% of max)
(J/K thieving minimum GP is actually 1, code was misread. Undo revision 51446 by Falterfire (talk))
Tag: Undo
Line 444: Line 444:
--Five sections here: GP, normal loot, area loot, rare loot, and unique item
--Five sections here: GP, normal loot, area loot, rare loot, and unique item
--First up, GP:
--First up, GP:
local minGP = math.max(1, math.floor(npc.maxGP * 0.01))
local gpTxt = 'Successfully pickpocketing the '..npc.name..' will always give '..Icons.GP(1, npc.maxGP)
local gpTxt = 'Successfully pickpocketing the '..npc.name..' will always give '..Icons.GP(minGP, npc.maxGP)
table.insert(sectionTxt, gpTxt)
table.insert(sectionTxt, gpTxt)


Line 596: Line 595:
result = result..'||'..Icons.Icon({npc.name, type='thieving', noicon=true})
result = result..'||'..Icons.Icon({npc.name, type='thieving', noicon=true})


local minGP = math.max(1, math.floor(npc.maxGP * 0.01))
local area = p.getThievingNPCArea(npc)
local area = p.getThievingNPCArea(npc)
result = result..'||'..area.name
result = result..'||'..area.name
Line 603: Line 601:
result = result..'||style="text-align:right"|'..(npc.maxHit * 10)
result = result..'||style="text-align:right"|'..(npc.maxHit * 10)
result = result..'||style="text-align:right"|'..npc.perception
result = result..'||style="text-align:right"|'..npc.perception
result = result..'||data-sort-value="' .. npc.maxGP .. '"|'..Icons.GP(minGP, npc.maxGP)
result = result..'||data-sort-value="' .. npc.maxGP .. '"|'..Icons.GP(1, npc.maxGP)
if npc.uniqueDrop ~= nil and npc.uniqueDrop.itemID > -1 then
if npc.uniqueDrop ~= nil and npc.uniqueDrop.itemID > -1 then
local uniqueDrop = Items.getItemByID(npc.uniqueDrop.itemID)
local uniqueDrop = Items.getItemByID(npc.uniqueDrop.itemID)