• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

check cap tfs 1x

theduck

Member
Joined
Dec 6, 2018
Messages
246
Reaction score
20
Code:
 if TESTEAutoLootList.players[playerId] ~= nil then
         local lootList = TESTEAutoLootList.players[playerId].lootList
         if lootList ~= nil then
            if corpse:getType():isCorpse() then
                for a = corpse:getSize() - 1, 0, -1 do
                    local containerItem = corpse:getItem(a)
                    if containerItem then
                        local containerItemId = containerItem:getId()
                        for i=1, #lootList do
                            local lootItemId = lootList[i]
                            if lootItemId == containerItemId then
							 
				  if   player:getFreeCapacity() > 100 and player:getStorageValue(9398329) == 0    then 
                                   containerItem:moveTo(bag)
								   
                                   elseif player:getFreeCapacity() > 100 and player:getStorageValue(9398329) == 1     then
                                    containerItem:moveTo(player)
								 
								   else  							
                                  player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, string.format(" It is too heavy or you have not enough space."))
								  
                                end
                            end
                        end
                    end
                end
            end
        end  
	 end     
 end

I still have not had success even putting it to jump to the next option if the cap is less than 100 it ignores the check cap
 
it's just this function that I'm having problems as other functions are okay .. they are separated there is no way this has no reason for everything loot auto loot.
Who are you to decide what's important to give for others to help you if you have no idea what you're doing?
That's the kind of thing people will refuse to help you for.
 
Who are you to decide what's important to give for others to help you if you have no idea what you're doing?
That's the kind of thing people will refuse to help you for.
why should I post everything? Is the problem only in one function?
if you do not want help just do not help.
 
Back
Top