slaw
Software Developer
When player step on tile, he receive map marks
Works with any distro, including OTServ, TFS 0.2, TFS 0.3 and TFS 0.4!
~~ INSTALLATION ~~
Create new file:
movements/scripts/mapmarks.lua
Add new line to:
movements/movements.xml
* TFS 0.2
* TFS 0.3+
UPDATE:
Available as mod: http://tfs-mods.googlecode.com/svn/trunk/map-marks.xml
List of map marks in game: (by orzeleagle)
Works with any distro, including OTServ, TFS 0.2, TFS 0.3 and TFS 0.4!
~~ INSTALLATION ~~
Create new file:
movements/scripts/mapmarks.lua
Code:
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 = {x = 166, y = 439, z = 7}, desc = "Main City Temple"},
{mark = 7, pos = {x = 300, y = 200, z = 7}, desc = "NPC with tools!"},
{mark = 1, pos = {x = 666, y = 666, z = 6}}
}
}
local f_addMark = doPlayerAddMapMark
if(not f_addMark) then f_addMark = doAddMapMark end
function onStepIn(cid, item, position, fromPosition)
if(isPlayer(cid) ~= TRUE or getPlayerStorageValue(cid, config.storage) == config.version) then
return
end
for _, m in pairs(config.marks) do
f_addMark(cid, m.pos, m.mark, m.desc ~= nil and m.desc or "")
end
setPlayerStorageValue(cid, config.storage, config.version)
return TRUE
end
Add new line to:
movements/movements.xml
* TFS 0.2
Code:
<movevent event="StepIn" actionid="YOUR_ACTION_ID" script="mapmarks.lua"/>
* TFS 0.3+
Code:
<movevent type="StepIn" actionid="YOUR_ACTION_ID" event="script" value="mapmarks.lua"/>
UPDATE:
Available as mod: http://tfs-mods.googlecode.com/svn/trunk/map-marks.xml
List of map marks in game: (by orzeleagle)
Last edited: