• 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!

How to block browse field?

Kubakos

Well-Known Member
Joined
Mar 3, 2010
Messages
987
Solutions
2
Reaction score
59
Hello, I'm using tfs 1.2 and I would like to know if there is any possibility to block browse field on few sqms? It's for quest items that are used to present the quest in teleport room. Same possibility to block throwing items on theses sqms?

I would be glad for some help with that.

Greetings
 
Solution
that's what i was asking, with a script you can identify if an item has sparkles above it, and if so, you can return false
like so:
LUA:
function Player:onBrowseField(position)
    local tile = Tile(position)
    -- check for sparkles on the tile
    if tile:getItemById(8047) or tile:getItemById(8046) then
        self:sendCancelMessage("You cannot browse this field.")
        return false
    end
    return true
end
are you using sparkles above the items? it's much easier to block browse field if you have a constant itemid that's supposed to be blocking an item underneath (so you don't have to define multiple positions or itemids within the script)
 
Sparkles doesn't help man :/ they can still use browse field. I tried to block items underneath and with sparkles but they can still get them with browse field. I think that this need a script unfortunatly
 
that's what i was asking, with a script you can identify if an item has sparkles above it, and if so, you can return false
like so:
LUA:
function Player:onBrowseField(position)
    local tile = Tile(position)
    -- check for sparkles on the tile
    if tile:getItemById(8047) or tile:getItemById(8046) then
        self:sendCancelMessage("You cannot browse this field.")
        return false
    end
    return true
end
 
Solution
that's what i was asking, with a script you can identify if an item has sparkles above it, and if so, you can return false
like so:
LUA:
function Player:onBrowseField(position)
    local tile = Tile(position)
    -- check for sparkles on the tile
    if tile:getItemById(8047) or tile:getItemById(8046) then
        self:sendCancelMessage("You cannot browse this field.")
        return false
    end
    return true
end


Working well, thanks!
 
Back
Top