• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Monsters can't walk in itemid tfs 1.2

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi folks! How I can make to monsters can't walk in itemid 9285?

Thanks.
 
Code:
function onStepIn(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then
        creature:teleportTo(fromPosition, true)
    end
end
Try this, it should push it back
 
Hi folks! How I can make to monsters can't walk in itemid 9285?

Thanks.
Code:
function onStepIn(creature, item, position, fromPosition)
    local thing = creature:isMonster() and Creature(creature:getId()) or nil
    if thing then
        thing:teleportTo(fromPosition, true)
    end
    return false
end
or
Code:
function onStepIn(creature, item, position, fromPosition)
    local thing = (creature:isMonster() or creature:isPlayer()) and Creature(creature:getId()) or nil
    if thing then
        thing:teleportTo(fromPosition, true)
    end
    return false
end
 
@Summ, changes made on the otb, does not require dat edit aswell. Or which attributes does not req dat edit?
 
You need to make that item blocking in the monster's pathfinding process, .otb edit might affect players mapclicking.
 
You can change it here:
https://github.com/otland/forgotten...6a137c5e45ce29b254edddadf8/src/items.cpp#L294

Like this:
Code:
    iType.blockPathFind = serverId == 9285 ? true : hasBitSet(FLAG_BLOCK_PATHFIND, flags);

That should work i guess, not tested

Monsters still can walk on the itemid..

lgzqmvQ.png
 
Hello, you can insert a new lua callback onMove to src to avoid the monsters walk.
Its not the same to players, since you need a client editing.
 
Back
Top