2021-01-18 12:51:02 -05:00
|
|
|
-----------------------------------
|
2018-05-30 23:51:33 -04:00
|
|
|
-- ID: 6413
|
|
|
|
|
-- Item: Astral Cube
|
|
|
|
|
-- Item Effect: Grant Astral cube key item
|
2021-01-18 12:51:02 -05:00
|
|
|
-----------------------------------
|
2024-08-24 12:32:37 -04:00
|
|
|
---@type TItem
|
2022-10-06 17:25:46 +03:00
|
|
|
local itemObject = {}
|
2018-05-30 23:51:33 -04:00
|
|
|
|
2021-04-01 15:10:15 -04:00
|
|
|
local keyItemId = xi.ki.ASTRAL_CUBE
|
2018-05-30 23:51:33 -04:00
|
|
|
|
2026-05-25 20:42:11 -06:00
|
|
|
itemObject.onItemCheck = function(target, item, caster)
|
2018-05-31 08:54:46 -04:00
|
|
|
if target:hasKeyItem(keyItemId) then
|
2021-04-01 15:10:15 -04:00
|
|
|
return xi.msg.basic.ALREADY_HAVE_KEY_ITEM, 0, keyItemId
|
2018-05-30 23:51:33 -04:00
|
|
|
end
|
2022-11-22 14:45:21 -05:00
|
|
|
|
2018-05-30 23:51:33 -04:00
|
|
|
return 0
|
|
|
|
|
end
|
|
|
|
|
|
2022-10-06 17:25:46 +03:00
|
|
|
itemObject.onItemUse = function(target)
|
2018-05-30 23:51:33 -04:00
|
|
|
target:addKeyItem(keyItemId)
|
2026-02-26 05:00:15 -07:00
|
|
|
target:messageBasic(xi.msg.basic.OBTAINED_KEY_ITEM, xi.item.ASTRAL_CUBE, keyItemId)
|
2018-05-30 23:51:33 -04:00
|
|
|
end
|
2021-01-17 11:55:03 -05:00
|
|
|
|
2022-10-06 17:25:46 +03:00
|
|
|
return itemObject
|