This is my first OT... Do you have the script for that?What TFS version?
Generally.. set an actionid that is not used on the map editor, then make a movement script.
Make it teleport the player to the temple position of the town, and set the players town id.
This is my first OT... Do you have the script for that?
What TFS version?
This is my first OT.
function onStepIn(cid, item, position, fromPosition)
if item.actionid > 30020 and item.actionid < 30050 then
local player = Player(cid)
if not player then
return false
end
local town = Town(item.actionid - 30020)
player:setTown(town)
end
return true
end
--- Unique ID // Town ID ---
local config = {
[50001] = 1,
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local townId = config[item.uid]
if not townId then
return true
end
local town = Town(townId)
if not town then
return true
end
player:setTown(town)
player:teleportTo(town:getTemplePosition())
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You are now a citizen of ' .. town:getName() .. '.')
return true
end
ThanksFound in 0.2.15 data/movements/scripts/citizen.luaCode:function onStepIn(cid, item, position, fromPosition) if item.actionid > 30020 and item.actionid < 30050 then local player = Player(cid) if not player then return false end local town = Town(item.actionid - 30020) player:setTown(town) end return true end
Action id must be 30020+town number
I.E.
Thais is town #1
Set the action id of the TP in thais to 30021
Venore is town #2
Set the action id of the TP in venore to 30022, etc etc