• 0

    posted a message on allods: Auto Loot
    Greetings,

    Am trying to make code to auto loot bags when they appear in allods.

    function AutoLootBag()
        local action = avatar.GetContextActions()
        for i, id in action do
            local actioninfo = avatar.GetContextActionInfo( id )
                if actioninfo.sysType == "ENUM_CONTEXT_ACTION_TYPE_LOOT" then
                    avatar.RunContextAction( id )
                end
        end				
    end
    
    --------------------------------------------------------------------------------
    -- INITIALIZATION
    --------------------------------------------------------------------------------
    function Init()
    	common.RegisterEventHandler( AutoLootBag, "EVENT_CONTEXT_ACTIONS_CHANGED" ) 
    end
    --------------------------------------------------------------------------------
    Init()
    Posted in: Need Help?
  • To post a comment, please or register a new account.