local moveEvent = MoveEvent('blockWalk')
function moveEvent.onStepIn(player, item, position, fromPosition)
player:teleportTo(fromPosition)
return true
end
-- moveEvent:id(ITEM_ID)
-- moveEvent:aid(ACTION_ID)
moveEvent:register()
Maybe you mean this in config.lua?how do i make a title so players cant walk thourh them?
TFS 1.3 Revscirpt
allowWalkthrough = true
No but realy thank for ur aswer (love ur scripts) just some randomdtitles, not all.Maybe you mean this in config.lua?
allowWalkthrough = true
YES! exacly, so when i want to make the title no walk-thourhg, i habe to put thereThis?
LUA:local moveEvent = MoveEvent('blockWalk') function moveEvent.onStepIn(player, item, position, fromPosition) player:teleportTo(fromPosition) return true end -- moveEvent:id(ITEM_ID) -- moveEvent:aid(ACTION_ID) moveEvent:register()
my imaginary ID and them in RME in title?-- moveEvent:aid(ACTION_ID)
thank u!!!!Yes, you can set actionid in the script and RME on the tiles you want to block walking on.
example:
LUA:moveEvent:aid(14156)
RME:
View attachment 57660
local blockedPositions = {
Position(3189, 1814, 7),
Position(3191, 1809, 7)
}
local event = MoveEvent()
function event.onStepIn(creature, item, pos, fromPosition)
if creature:isPlayer() then
creature:teleportTo(fromPosition, false)
end
return true
end
event:position(unpack(blockedPositions))
event:register()
If you don't want to handle actionIds, you can use a table of positions and define blocked tiles
LUA:local blockedPositions = { Position(3189, 1814, 7), Position(3191, 1809, 7) } local event = MoveEvent() function event.onStepIn(creature, item, pos, fromPosition) creature:teleportTo(fromPosition, false) return true end event:position(unpack(blockedPositions)) event:register()
Ant cant evem walk on the titlei want to walk on it but players cant walk trought themself, like old tibia system
still nothing, cant walk on title, it 'push' back.my bad uwu![]()
RevScripts - No walk through
how do i make a title so players cant walk thourh them? TFS 1.3 Revscirptotland.net
isn't that what you wanted to achieve? ..to push back players who try walking over a tile?still nothing, cant walk on title, it 'push' back.
ohh, i think i had said to wrongisn't that what you wanted to achieve? ..to push back players who try walking over a tile?
have you tried depot tiles? 11062/11063ohh, i think i had said to wrong, i mean player cant walk through plaayer. There is a 'queue' in my event, so player have to stay in 'line' something like1title-1player. And this is for onlny 10 sqaures (titles) not the all MAP!
Like some1 up said 'allowWalkthrough = true' but no all game, just some titles.
stupid me, gonna test it xDhave you tried depot tiles? 11062/11063
local blockedPositions = {
Position(3189, 1814, 7),
Position(3191, 1809, 7)
}
local event = MoveEvent()
function event.onStepIn(creature, item, pos, fromPosition)
if not creature:isPlayer() then
return true
end
local tile = Tile(pos)
if tile then
if #tile:getCreatures() > 1 then
creature:teleportTo(fromPosition, false)
return true
end
and
return true
end
event:position(unpack(blockedPositions))
event:register()
from
& to
position.local config = {
from = Position(3189, 1814, 7),
to = Position(3191, 1809, 7)
}
local function preparePositions(callback)
local blockedPositions = {}
local z = config.from.z
for x = config.from.x, config.to.x do
for y = config.from.y, config.to.y do
table.insert(blockedPositions, Position(x, y, z))
end
end
callback(blockedPositions)
end
preparePositions(function(args)
local event = MoveEvent('test')
function event.onStepIn(creature, item, pos, fromPosition)
if not creature:isPlayer() then
return true
end
local tile = Tile(pos)
if tile then
if #tile:getCreatures() > 1 then
creature:teleportTo(fromPosition, false)
return true
end
end
return true
end
event:position(unpack(args))
event:register()
end)