I put this code in events/scripts/creature.lua and it wont work and don't show errors in distro
Lua:
local attackOutfit = Condition(CONDITION_OUTFIT, CONDITIONID_COMBAT)
local outfitTable = {
--Looktype/newLooktype/Seconds until newOutfit removes
[100] = {newOutfit = 101, outfitInterval = 3}
}
function Creature:onTargetCombat(target)
if self:isPlayer() then
local table = outfitTable[self:getOutfit().lookType]
if table then
attackOutfit:setOutfit({lookType = table.newOutfit})
attackOutfit:setTicks(table.outfitInterval * 1000)
self:addCondition(attackOutfit)
end
end
return true
end