2023-07-19 09:48:37 +01:00
|
|
|
-----------------------------------
|
|
|
|
|
-- ID: 26788
|
|
|
|
|
-- Item: Rabbit Cap
|
|
|
|
|
-- When used, you will obtain 1-2 random initial eggs
|
|
|
|
|
-----------------------------------
|
2024-08-24 12:32:37 -04:00
|
|
|
---@type TItem
|
2023-07-19 09:48:37 +01:00
|
|
|
local itemObject = {}
|
|
|
|
|
|
2026-05-25 20:42:11 -06:00
|
|
|
itemObject.onItemCheck = function(target, item, caster)
|
2023-08-30 18:47:43 -04:00
|
|
|
return xi.itemUtils.itemBoxOnItemCheck(target)
|
2023-07-19 09:48:37 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
itemObject.onItemUse = function(target)
|
2024-04-02 13:45:54 -05:00
|
|
|
npcUtil.giveItem(target, { { math.random(xi.item.A_EGG, xi.item.Z_EGG), 1 } })
|
2023-07-19 09:48:37 +01:00
|
|
|
|
|
|
|
|
if math.random(1, 5) > 4 then
|
2024-04-02 13:45:54 -05:00
|
|
|
npcUtil.giveItem(target, { { math.random(xi.item.A_EGG, xi.item.Z_EGG), 1 } })
|
2023-07-19 09:48:37 +01:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return itemObject
|