LUA:
function onUseAccessKey(player, item, fromPosition, target, toPosition, isHotkey)
local WATER = {4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 4630, 4631}
local targetId, targetActionId = target.itemid, target.actionid
if isInArray(WATER, targetId) then
target:transform(671)
addEvent(target:transform(targetId)
end, 3000, targetId:getPosition(), onUseAccessKey(toPosition):getItemById(671))
else
return false
end
return true
end
I for the life of me can not understand why this will not work...
I intend to use an item on only the water tiles in the table.
The water tile should turn to ice 671.
3 seconds later it should turn back to the same type of water tile.
(i could simply turn it back to a specfic water tile with decay but i may wish to use this item to change any item into another temporarily, and have it change back.. that's my theory anyways!)
Please.. any assistance would be lovely.
Last edited by a moderator: