T
tejdi
Guest
Hello, it's my script:
meadcup.lua:
and actions.xml:
But it doesn't check that is cup with mead. It can be empty cup, how can edit that?
meadcup.lua:
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if target.itemid ~= 2012 then
return false
end
item:remove(1)
player:addCondition(CONDITION_DRUNK)
toPosition:sendMagicEffect(CONST_ME_POFF)
return true
end
and actions.xml:
Code:
<action itemid="2012" script="mateusz/meadcup.lua"/>
But it doesn't check that is cup with mead. It can be empty cup, how can edit that?