• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Lua How to check queryadd in this script 1.2

gubbo123

New Member
Joined
Aug 15, 2017
Messages
151
Solutions
1
Reaction score
3
Example: this is my doors script
Lua:
    door = openVerticalDoors[item:getId()]
    if door then
        local doorCreature = Tile(item:getPosition()):getTopCreature()
        if doorCreature then
            doorCreature:teleportTo(item:getPosition():moveRel(1, 0, 0), true)
        end
        item:transform(door, 1)
        item:decay()
        return true
    end

how can a check be made if there is a blocking item or creature the player will be moved to, if there is something there, the player is moved in the opposite direction

This is the actually behavior

This the expected
 

Xikini

I whore myself out for likes
Senator
Joined
Nov 17, 2010
Messages
6,304
Solutions
547
Reaction score
4,566
data/lib/core/tile.lua
Lua:
function Tile.isWalkable(self)
Lua:
if not tile:isWalkable then
    print("can't walk here")
else
    print("can walk")
end

This should be what you are looking for.
 
Top