When I attack a monster if I have the outfit 100, it change to 101 for 3 seconds and it back to the normal outfit 100.
This script is working only 1 time, to work again I need attack the monster again, how fix it?
This script is working only 1 time, to work again I need attack the monster again, how fix it?
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)
print("Its Working ?")
end
end
return true
end