ParrotPLPL
Banned User
- Joined
- May 19, 2024
- Messages
- 8
- Reaction score
- 2
Lua:
local config = {
itemIds = {2445, 2550, 2436, 6101, 2408, 7435, 7429, 5803},
position = {x = 156, y = 58, z = 7}
}
local currentIndex = 1
function onThink(cid, interval)
local tile = getThingfromPos(config.position)
local item = nil
for _, id in ipairs(config.itemIds) do
item = getTileItemById(config.position, id)
if item.uid ~= 0 then
doTransformItem(item.uid, config.itemIds[currentIndex])
doSendMagicEffect(config.position, CONST_ME_MAGIC_GREEN)
currentIndex = (currentIndex % #config.itemIds) + 1
break
end
end
return true
end
if you move item on top nothing happens
Lua:
function onAddItem(moveItem, tileItem, position, cid)
if isPlayer(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You cannot drop items on this tile.")
-- Move the item back to the player's inventory
local playerPosition = getPlayerPosition(cid)
doTeleportThing(moveItem.uid, playerPosition, true)
end
end
this item returns from below the player
I want nothing to happen
I wanted it to stay like this
Last edited: