Unable to use item

Post Reply
Hoku
Posts: 6
Joined: Tue Jan 03, 2017 1:11 am

Unable to use item

Post by Hoku » Sun Apr 19, 2020 2:28 pm

I am trying to get Cotton Coin Purse to be usable. There are no errors in the game server.

I have added/made sure the cotton_coin_purse exists in the Item_Basic and Item_Usable. Compared this to Water Cluster which works.

I created the lua file for the cotton_coin_purse using Water Cluster lua as an example.

Code: Select all

-----------------------------------------
-- ID: 5735
-- Cotton Coin Pouch
-- Turn into 4-20 Piece_of_Alexandrite
-----------------------------------------
require("scripts/globals/msg")
require("scripts/globals/settings")
-----------------------------------------

function onItemCheck(target)
    local result = 0
    if target:getFreeSlotsCount() == 0 then
        result = tpz.msg.basic.ITEM_NO_USE_INVENTORY
    end
    return result
end

function onItemUse(target)
    target:addItem(2488, 20)
end
Linen Coin Purse and Heavy Metal Pouch work. I have scripted the Cotton Coin Purse to be identical as these two and still get 'Unable to use item'

Any ideas on what I am missing?

Thanks!

Post Reply