Hello, how can i add a exaust of 1000 after this code part
Lua:
if target:isCreature() and target == player then
if item:getFluidType() == FLUID_NONE then
player:sendCancelMessage("It is empty.")
Lua:
function onUse(player, item, fromPosition, target, toPosition)
local targetItemType = ItemType(target:getId())
if targetItemType and targetItemType:isFluidContainer() then
if target:getFluidType() == 0 and item:getFluidType() ~= 0 then
target:transform(target:getId(), item:getFluidType())
item:transform(item:getId(), 0)
return true
elseif item:getFluidType() == 0 and target:getFluidType() ~= 0 then
return false
elseif target:getFluidType() ~= 0 and item:getFluidType() == 0 then
target:transform(target:getId(), 0)
item:transform(item:getId(), target:getFluidType())
return true
end
end
if target:isCreature() and target == player then
if item:getFluidType() == FLUID_NONE then
player:sendCancelMessage("It is empty.")
else
local self = target == player
if self and item:getFluidType() == FLUID_BEER or item:getFluidType() == FLUID_WINE then
player:addCondition(drunk)
elseif self and item:getFluidType() == FLUID_SLIME then
player:addCondition(poison)
elseif item:getFluidType() == FLUID_MANAFLUID then
target:addMana(math.random(400, 800))
target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
elseif item:getFluidType() == FLUID_LIFEFLUID then
target:addHealth(math.random(500, 900))
target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
end