2,875
edits
(Add function to grab item value (sellsfor) based on item name or item object) |
m (Improve getItemValue function) |
||
Line 115: | Line 115: | ||
function p.getItemValue(item) | function p.getItemValue(item) | ||
if type(item) == 'string' then | if type(item) == 'string' then | ||
if | -- Specific check if the item is GP (value of 1) | ||
return 1 | if Shared.compareString('GP', item, true) | ||
or Shared.compareString('Gold Pieces', item, true) then | |||
return 1 | |||
end | end | ||
item = p.getItem(item) | item = p.getItem(item) | ||
end | end |
edits