Hello,
I would like help, how to add the coordinates for the script to work on the chosen tile?
Does it only work with aid?
the tiles would be 284, 176, 7 and 284, 177, 7
I would like help, how to add the coordinates for the script to work on the chosen tile?
Does it only work with aid?
the tiles would be 284, 176, 7 and 284, 177, 7
Lua:
local coal_basin = MoveEvent()
coal_basin:type("stepin")
function coal_basin.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local coal_basin = Tile(Position(283, 175, 7)):getItemById(1484)
if not coal_basin then
Game.createItem(1484,1, Position(coal_basin))
player:getPosition():sendMagicEffect(14)
return true
end
return true
end
coal_basin:register()
local coal_basin = MoveEvent()
coal_basin:type("stepout")
local coal_basin = MoveEvent()
function coal_basin.onStepOut(creature, item, position, fromPosition)
if not creature:isPlayer() then
return false
end
pos = Position(283, 175, 7)
coal_basin = Tile(pos):getItemById(1484)
if coal_basin then
coal_basin:remove()
end
end
coal_basin:register()