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

Easy chanse to get reputation(town id problem) :)

richux

Tibera.org
Joined
Aug 18, 2008
Messages
3,666
Reaction score
26
Location
---------
Hello dear tibians! :P Can someone tell me how TownId system works? I want to make teleport that could change my characters residence to town I want. For example-If my character is registred in venore, I go in teleport(up in thais temple) and after entering it my char gets registred in thais(that means after dieing char will be teleported to thais).

It is probably not hard, please tell me! I will reward you with reputation!


THank you!
 
Script it using actionId ( set it on teleport )

and use lua movement script with this function:
Code:
doPlayerSetTown(cid, townid)
 
You need to use movement with function "onStepIn", this script already comes with your server when you downloaded it so he is an explanation of how to make it work :D!

So in any tile with your mapeditor set action to 30021 and the town id will changed to 1...
How it works:
30021 - 30020 = 1
30022 - 30020 = 2
30023 - 30020 = 3

And so on :D

Your script is at data/movements/scripts/citizen.lua if you whant to change something like a teleport or a message... etc
 
You need to use movement with function "onStepIn", this script already comes with your server when you downloaded it so he is an explanation of how to make it work :D!

So in any tile with your mapeditor set action to 30021 and the town id will changed to 1...
How it works:
30021 - 30020 = 1
30022 - 30020 = 2
30023 - 30020 = 3

And so on :D

Your script is at data/movements/scripts/citizen.lua if you whant to change something like a teleport or a message... etc

THanks alot(rep added)! =*
 
Back
Top