local config = {
actionId = 1234,
itemId = 2377, -- two handed sword
transformTo = 2393, -- giant sword
time = 30 * 1000, -- decay time
}
local moveItem = MoveEvent()
function moveItem.onStepIn(creature, item, position, fromPosition)
if item:getId() == config.itemId then
addEvent(
function()
item:transform(config.transformTo)
end,
config.time
)
end
return true
end
moveItem:type("stepin")
moveItem:aid(config.actionId)
moveItem:register()