landsandboat/scripts/items/shadow_lord_shirt.lua

25 lines
838 B
Lua

-----------------------------------
-- ID: 26517
-- Item: Shadow Lord Shirt
-- Teleports user to Castle Zvahl Keep
-----------------------------------
---@type TItem
local itemObject = {}
itemObject.onItemCheck = function(target, item, caster)
local result = 0
-- Need retail verification: Is having set foot in the zone a requirement?
if not target:hasVisitedZone(xi.zone.CASTLE_ZVAHL_KEEP) then
result = xi.msg.basic.ITEM_UNABLE_TO_USE_2
end
return result
end
itemObject.onItemUse = function(target, user)
-- May need a retail capture to verify actual position
-- https://ffxiclopedia.fandom.com/wiki/Shadow_Lord_Shirt states teleports next to HP#1
target:addStatusEffect(xi.effect.TELEPORT, { power = xi.teleport.id.ZVAHL_KEEP, duration = 4, origin = user, icon = 0 })
end
return itemObject