ImaG
Active Member
Hello i have a problem.
When an item is in the backpack, it disappears.
When an item is on the ground, it disappears.
When it's in the browse box... I can click on it at will and it doesn't disappear.
How to fix it?
Screenshot:
When an item is in the backpack, it disappears.
When an item is on the ground, it disappears.
When it's in the browse box... I can click on it at will and it doesn't disappear.
How to fix it?
Screenshot:
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local itemId = item:getId()
if itemId == 16102 then
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
addEvent(function()
local monster = Game.createMonster("Chicken", player:getPosition())
player:removeItem(itemId, 1)
player:sendTextMessage(MESSAGE_INFO_DESCR, "!")
local tile = Tile(toPosition)
if tile then
local items = tile:getItems()
for i = 1, #items do
local groundItem = items[i]
if groundItem:getId() == itemId then
groundItem:remove(1)
break
end
end
end
end, 1500)
end
end