focost
New Member
- Joined
- Jul 22, 2009
- Messages
- 20
- Reaction score
- 0
/events/scripts/creature.lua
Like a "allowChangeColors = false", but on tfs 1.1.
I only could do this with addEvent otherwise i get this: "[Error - Events::eventCreatureOnChangeOutfit] Call stack overflow"
Does anyone have a suggestion on how to do it any other better way in TFS 1.1?
Code:
function Player.noChangeBlue(self)
local outfit_blue = {lookType = 106, lookHead = 106, lookBody = 106, lookLegs = 106, lookFeet = 106, lookAddons = 106}
self:setStorageValue(900, 1)
self:setOutfit(outfit_blue)
end
Code:
function Creature:onChangeOutfit(outfit)
if self:getStorageValue(900) == 1 then -- to avoid infinite loop
self:setStorageValue(900, 0)
return true
else
addEvent(function() self:noChangeBlue() end, 10)
end
return true
end
Like a "allowChangeColors = false", but on tfs 1.1.
I only could do this with addEvent otherwise i get this: "[Error - Events::eventCreatureOnChangeOutfit] Call stack overflow"
Does anyone have a suggestion on how to do it any other better way in TFS 1.1?
Last edited: