• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Remove wall stepin/stepout function?

DaveNorth

New Member
Joined
Jan 8, 2019
Messages
13
Reaction score
1
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:

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:
Solution
E
I tried to just switch the itemID to poison fields but, it just added poison fields ontop of the walls lol. Ah man, im such a newbie with code. Anyone give me some pointers, please?
delete the script file and remove the walls from the map using the map editor
I tried to just switch the itemID to poison fields but, it just added poison fields ontop of the walls lol. Ah man, im such a newbie with code. Anyone give me some pointers, please?
 
I tried to just switch the itemID to poison fields but, it just added poison fields ontop of the walls lol. Ah man, im such a newbie with code. Anyone give me some pointers, please?
delete the script file and remove the walls from the map using the map editor
 
Solution
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:

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()
how do i implement this script in my movements to check if both players are standing on each tiles? i mean there are two squares how do i place the ids? or where do i register it?

EDIT: Ok I figured out that i have to place the script at scripts folder, but when i try to walk on the tile i get the following message
22:55 The tile seems to be protected against unwanted intruders.
also im recieving this error at console
Lua:
e\data\scripts\dqh_walls.lua:callback
\data\scripts\dqh_walls.lua:48: attempt to call method 'hasCreature' (a nil value)
stack traceback:

FIXED it was a missing function at data/lib/core/positon.lua
 
Last edited:
Back
Top