I need to be able to check party items for a "gold_key". Does anyone have some example script
that I can utilize. I keep getting a "nil" on the champion command.
Code: Select all
party.party:isCarrying("gold_key")
Code: Select all
function(champion, target)
for i=1,ItemSlot.MaxSlots do
local item = champion:getItem(i)
if item then
if item.go.name = target then
return true
else
local container = item.go.containeritem
if container then
local capacity = container:getCapacity()
for j=1,capacity do
local item2 = container:getItem(j)
if item2 = champion:getItem(i)
return true
end
end
end
end
end
end
return
end