Hey!
I'm trying to remove the walls normally opened by stepping on the two tiles, in the demon helmet quest. I want it disabled and the walls gone permanently but cant figure it out.
Appreciate any help!
Lua looks like this:
I'm trying to remove the walls normally opened by stepping on the two tiles, in the demon helmet quest. I want it disabled and the walls gone permanently but cant figure it out.
Appreciate any help!
Lua looks like this:
Lua:
local tilesPositions = {
{x = 33190, y = 31629, z = 13},
{x = 33191, y = 31629, z = 13}
}
local wallsPositions = {
{x = 33210, y = 31630, z = 13},
{x = 33211, y = 31630, z = 13},
{x = 33212, y = 31630, z = 13}
}
local walls = MoveEvent()
walls:type("stepin")
function walls.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
for i = 1, #tilesPositions do
local creature = Tile(tilesPositions[I]):getTopCreature()
if creature then
for i = 1, #wallsPositions do
Tile(wallsPositions[I]):getItemById(1050):remove()
end
end
end
return true
end
for index, value in pairs(tilesPositions) do
walls:position(value)
end
walls:register()
walls = MoveEvent()
walls:type("stepout")
function walls.onStepOut(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
for i = 1, #wallsPositions do
Position:hasCreature(wallsPositions[I], {x = 33211, y = 31631, z = 13})
Game.createItem(1050, 1, wallsPositions[I])
end
return true
end
for index, value in pairs(tilesPositions) do
walls:position(value)
end
walls:register()
Last edited: