Skip to content
This repository was archived by the owner on Dec 4, 2020. It is now read-only.

Commit e88fd65

Browse files
authored
Merge pull request #1466 from Nireya/cotton-coin-purse
Add cotton coin purse item
2 parents 0b6467c + ec251db commit e88fd65

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
------------------------------------
2+
-- ID: 5735
3+
-- Ctn. Purse (Alx.)
4+
-- Breaks up a Cotton Purse
5+
-----------------------------------------
6+
require("scripts/globals/msg")
7+
-----------------------------------------
8+
9+
function onItemCheck(target)
10+
local result = 0
11+
if target:getFreeSlotsCount() == 0 then
12+
result = tpz.msg.basic.ITEM_NO_USE_INVENTORY
13+
end
14+
return result
15+
end
16+
17+
function onItemUse(target)
18+
target:addItem(2488, math.random(5, 20))
19+
end

0 commit comments

Comments
 (0)