• 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!

Lua Addon creatureevent [OTX3/TFS1.2]

X X X

Newb
Joined
Jul 26, 2015
Messages
148
Reaction score
13
I'm struggling with something that I thought would be really simple but I guess it's not. What I'm trying to do is modify onChangeOutfit so that anytime a player changes their outfit, it forces both addons to be enabled.

Something like:

Lua:
function Creature:onChangeOutfit(outfit)
    local player = Creature(self)
        if(player:isPlayer()) then
            player:setOutfitAddon(3) <--I know this is wrong, I don't know how to fix)
            end
    return true
end

setOutfitAddon returns a nil value but I don't know what it is supposed to be. In searching the forums I found 2 or 3 other requests for the same thing but they all had 0 replies. All the other posts were about addon dolls and addon bonuses, none of which I need at this time.

The reason I need this is I am running on 7.72, and there is no option to enable addons in the outfit window in the default 7.72 client. I could manually merge every single outfit so that the addons are combined into the same layer in the DAT/SPR, but that would take forever and I hoped that adding the onChangeOutfit function would be quicker.

Thanks
 
Back
Top Bottom