Hello, I want my script to check if I'm bellow 100 cap, and if I am I want it to disable Looter. The thing is that I want him to check that cap amount ONLY while specified corpse is open (in this situation it's cyclops corpse). Thanks to that I will be able to modify my Looter content while off the corpse, and the script will turn it off or on only while on the corpse.

I tried something like this, but this does not work:
Code:
local container = Container:Name()
local dead = "Dead Cyclops"

if (container == dead) then
	Module.New("checkCap", function()
			if (Self.Cap() < 100) then
				setLooterEnabled(false)
			else
				setLooterEnabled(true)
			end
	end)
end