I using TFS 1.2, but I think there is no differenceYeah, must be the client.
The source / script is identical from yours to mine.
I tested with OTC and TFS 1.3.
I don't know how much of a difference OTC to the regular client makes though.
<event type="login" name="mapmarks" script="mapmarks.lua" />
local marks = {
{Position(1011, 1023, 7), 3, "Temple"},
}
function onLogin(player)
if player:getLastLoginSaved() <= 0 then -- remove if want always
for i = 1, #marks do
player:addMapMark(marks[i][1], marks[i][2], marks[i][3])
end
end -- remove if want always
return true
end
--[[--
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,
--]]
function onLogin(player)
--Add Marks
--if player:getLastLoginSaved() <= 0 then
marks = {
[0] = {pos = {x = 31997, y = 32276, z = 7}, type = MAPMARK_STAR, description = "Marco Polo"},
[1] = {pos = {x = 32480, y = 32314, z = 7}, type = MAPMARK_STAR, description = "Tibian Cortes"}
}
for i = 0, #marks do
player:addMapMark(marks[i].pos, marks[i].type, marks[i].description)
end
--end
return true
end
<event type="login" name="MapMarks" script="MapMarks.lua" />
login.lua?I tested and it should work without any issues but anyways try this one, I had it on my server (Don't remember where I got it) works perfect for me on cipsoft 8.6 client.
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, --]] function onLogin(player) --Add Marks --if player:getLastLoginSaved() <= 0 then if player:getLevel() > 1 then return true end marks = { [0] = {pos = {x = 31997, y = 32276, z = 7}, type = MAPMARK_STAR, description = "Marco Polo"}, [1] = {pos = {x = 32480, y = 32314, z = 7}, type = MAPMARK_STAR, description = "Tibian Cortes"} } for i = 0, #marks do player:addMapMark(marks[i].pos, marks[i].type, marks[i].description) end --end return true end
XML:<event type="login" name="MapMarks" script="MapMarks.lua" />
This script did not debug, but did not add anything to the map and there was also no error in the distro.I tested and it should work without any issues but anyways try this one, I had it on my server (Don't remember where I got it) works perfect for me on cipsoft 8.6 client.
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, --]] function onLogin(player) --Add Marks --if player:getLastLoginSaved() <= 0 then if player:getLevel() > 1 then return true end marks = { [0] = {pos = {x = 31997, y = 32276, z = 7}, type = MAPMARK_STAR, description = "Marco Polo"}, [1] = {pos = {x = 32480, y = 32314, z = 7}, type = MAPMARK_STAR, description = "Tibian Cortes"} } for i = 0, #marks do player:addMapMark(marks[i].pos, marks[i].type, marks[i].description) end --end return true end
XML:<event type="login" name="MapMarks" script="MapMarks.lua" />
because the player level was more than 1, there is something wrong about your fileslogin.lua?
Post automatically merged:
This script did not debug, but did not add anything to the map and there was also no error in the distro.
source?because the player level was more than 1, there is something wrong about your files
ya, debug, I changed the type and keeps debugging.Removed the level lock, copy it and try again.
Maybe it won't debug, If it debugged try changing the mark type.
yea or maybe core or libs i have no idea tbhsource?
If you remember something, feel free to postyea or maybe core or libs i have no idea tbh
If you remember something, feel free to post
Do you have link to engine/source you are using as base?
https://otland.net/threads/tfs-1-2-8-0.263797/
Look at the last line of the debug message, it says unknown packet type, which would lead me to believe that the 8.0 client actually doesn't support this packet yet, and that support for sending map marks to the client was added in a later version than 8.0.The client is debugging the first time of the login, and then he enters normally but the mark does not appear.
View attachment 47297
So the problem is not with the client and not with the server?Yeah as @Alpha already mentioned, that packet 221 converted to hexadecimal is 0xDD which is being sent here:
and the lua function:forgottenserver/src/protocolgame.cpp at ce2f90e5af49988e4e64ac2cc63d6ed0d913c8c4 · celohere/forgottenserver
Contribute to celohere/forgottenserver development by creating an account on GitHub.github.com
I tried to see if there was another 8.0 engine that sent a different packet but I didn't find any. But if you use Otclient then you can add it yourself.