landsandboat/scripts/items/mistmelt.lua
Skold 256d6fd5f2 [lua] [sql] Ouryu Cometh
Implements the battlefield Ouryu Cometh
2026-04-11 01:05:59 +02:00

26 lines
628 B
Lua

-----------------------------------
-- ID: 5265
-- Item: Mistmelt
-- Item Effect: Forces Ouryu to land
-----------------------------------
local itemObject = {}
itemObject.onItemCheck = function(target, item, param, player)
local result = 0
if target:getName() ~= 'Ouryu' then
result = xi.msg.basic.ITEM_UNABLE_TO_USE
elseif target:checkDistance(player) > 10 then
result = xi.msg.basic.TOO_FAR_AWAY
end
return result
end
itemObject.onItemUse = function(target, player)
if target:getAnimationSub() == 1 then
target:setLocalVar('mistmeltUsed', 1)
end
end
return itemObject