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

MoveEvent Map marks

Could it be possible that when the player steps into the actionid, previous map marks made by other parties get deleted before the ones I pretend to use be applied?
 
Could it be possible that when the player steps into the actionid, previous map marks made by other parties get deleted before the ones I pretend to use be applied?
no, there is no way to delete marks

also here is a revscript version for tfs 1.x users tested and working, just put on your scripts folder:

Lua:
--[[
    MAPMARK_TICK = 0,
    MAPMARK_QUESTION = 1,
    MAPMARK_EXCLAMATION = 2,
    MAPMARK_STAR = 3,
    MAPMARK_CROSS = 4,
    MAPMARK_TEMPLE = 5,
    MAPMARK_KISS = 6,
    MAPMARK_SHOVEL = 7,
    MAPMARK_SWORD = 8,
    MAPMARK_FLAG = 9,
    MAPMARK_LOCK = 10,
    MAPMARK_BAG = 11,
    MAPMARK_SKULL = 12,
    MAPMARK_DOLLAR = 13,
    MAPMARK_REDNORTH = 14,
    MAPMARK_REDSOUTH = 15,
    MAPMARK_REDEAST = 16,
    MAPMARK_REDWEST = 17,
    MAPMARK_GREENNORTH = 18,
    MAPMARK_GREENSOUTH = 19,
]]--

local config = {
    storage = 9432,
    version = 1, -- Increase this value after adding new marks, so player can step again and receive new map marks
    marks = {
        {mark = 5, pos = Position(438, 505, 7), desc = "Main City Temple"},
        {mark = 7, pos = Position(441, 520, 7), desc = "NPC with tools!"},
        {mark = 1, pos = Position(462, 497, 7)}
    }
}

local mapMark = MoveEvent()
mapMark:type("stepin")

function mapMark.onStepIn(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if not player or player:getStorageValue(config.storage) == config.version then
        return true
    end
    for _, m in pairs(config.marks) do
        player:addMapMark(m.pos, m.mark, m.desc ~= nil and m.desc or "")
    end
    player:setStorageValue(config.storage, config.version)
    return true
end

mapMark:aid(1236)
mapMark:register()
 
@Evil Puncker Hey there, i know its been a while but im trying to use that script in TFS 1.2 and i'm getting some errors...

Do you know how i can solve it ? looks like its a different distro ...

Lua:
data/movements/scripts/marks.lua:11: attempt to call global 'MoveEvent' (a nil value)
stack traceback:
        [C]: in function 'MoveEvent'
        data/movements/scripts/marks.lua:11: in main chunk
[Warning - Event::checkScript] Can not load script: scripts/marks.lua
 
@Evil Puncker Hey there, i know its been a while but im trying to use that script in TFS 1.2 and i'm getting some errors...

Do you know how i can solve it ? looks like its a different distro ...

Lua:
data/movements/scripts/marks.lua:11: attempt to call global 'MoveEvent' (a nil value)
stack traceback:
        [C]: in function 'MoveEvent'
        data/movements/scripts/marks.lua:11: in main chunk
[Warning - Event::checkScript] Can not load script: scripts/marks.lua
1.2 does not yet support the revscriptsys format, you have to either change the code or update to 1.3
 
Back
Top