Code: Select all
sDone = false
shownOnce = false
gotTreasure = false
questAccepted = false
questComplete = false
function fight()
local ratling = findEntity("dialogue_demo_ratling")
if (ratling) then
ratling.brain:enable()
end
isDone = true
end
function treasure()
setMouseItem(spawn("cheese").item)
isDone = true
end
function hasItem()
local champion = party:getChampion(0) -- Slot 0 = first champion "The getChampion error is nil"
-- Loop through all items in the champion's inventory
for i = 1, 32 do -- Each champion has up to 32 inventory slots
local item = champion:getItem(i)
if item and item.go.name == "gold_key" then
return true
end
end
return false
end
What error message(s), and can you elaborate upon exactly how this script is used, aside from it enabling the ratling. and searching the champion's inventory for the key?supercell1970 wrote: ↑Sat Apr 19, 2025 7:41 pm I keep getting this error message and need help to get the script right.