Hello, i use http://otland.net/threads/map-marks.36915/ how convert to "actions"?
Item ID: 1956 (Map)
Client: TFS 0.4, 8.60
How to convert script:
use item ID: 1956 ---> all marks add to minimap
Thanks for help, im newbie to lua and green
Item ID: 1956 (Map)
Client: TFS 0.4, 8.60
How to convert script:
use item ID: 1956 ---> all marks add to minimap
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 = 1042, y = 1011, z = 6}, desc = "Temple"},
{mark = 4, pos = {x = 1070, y = 1050, z = 7}, desc = "Premium tower"},
{mark = 19, pos = {x = 1057, y = 1014, z = 6}, desc = ""},
{mark = 19, pos = {x = 1041, y = 1026, z = 6}, desc = ""},
{mark = 11, pos = {x = 1056, y = 1025, z = 7}, desc = "Depo"},
{mark = 8, pos = {x = 1015, y = 1026, z = 7}, desc = "Expowisko"},
{mark = 8, pos = {x = 1028, y = 1043, z = 7}, desc = "Rotwormy"},
{mark = 8, pos = {x = 1042, y = 986, z = 7}, desc = "Expowisko"},
{mark = 8, pos = {x = 1042, y = 986, z = 7}, desc = "Expowisko"},
{mark = 8, pos = {x = 1079, y = 979, z = 7}, desc = "Expowisko"}
}
}
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
Thanks for help, im newbie to lua and green