XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 2 of 2

Thread: Need help with corpse:isopen with module

  1. #1

    Join Date
    Apr 2021
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with corpse:isopen with module

    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

  2. #2

    Join Date
    Apr 2021
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, I figured it out.

    Code:
    Module.New("checkCap", function()
    	local cont = Container.New("Dead Cyclops")
    	while cont:isOpen() do
    		if (Self.Cap() < 100) then
    			setLooterEnabled(false)
    		else
    			setLooterEnabled(true)
    		end
    	end
    end)
    Ofc main script needs to have Looter.Start() line somewhere at the start of the hunt route. Just in case someone will ever be looking for something like this.
    Last edited by Pirus; 04-25-2021 at 06:24 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •