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

TFS 1.X+ how to create a teleport?

gritness

New Member
Joined
May 26, 2021
Messages
30
Reaction score
3
If u want to have any custom teleport You can make a new movements script for example :

local tpDest = {x = 1265, y = 1125, z = 7}


function onStepIn(creature, item, position, fromPosition)

if
creature:isPlayer() then
creature:teleportTo(tpDest)

-- HERE IS PLACE FOR YOUR CUSTOM ACTIONS LIKE THIS, U CAN DO HERE EVERYTHING WHAT U NEED

creature:getPosition():sendMagicEffect(CONST_ME_BIGCLOUDS)
creature:setTown(Town(1))
creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Check Your Questlog - 2 new missions available ")

end
end


also u have to make teleport uniqueID and put it in movemenst.xml like this :

<movevent event="StepIn" uniqueid="35000" script="new/tp.lua" />
 
Top