I know binded is not the right word, but i can't think of it right now. I'm looking for a script that when you walk through it that is now your town. I don't know what it would be called, so i can't search for it. please help! 
function onStepIn(cid, item, position, fromPosition)
if(item.actionid > 30020 and item.actionid < 30100) then
local townId = (item.actionid - 30020)
doPlayerSetTown(cid, townId)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are the newest resident of " .. getTownName(townId) .. ".")
end
return true
end
function onStepIn(cid, item, pos)
local thais = {x=32369, y=32241, z=7}
if item.actionid == 30023 then
doPlayerSetTown(cid,3)
doTeleportThing(cid,thais)
doSendMagicEffect(getCreaturePosition(cid),12)
doCreatureSay(cid, "You are now a citizen of Thais", TALKTYPE_ORANGE_1)
end
return 1
end
<movevent type="StepIn" actionid="30023" event="script" value="Hometown/Thais_Citizen.lua" />
you can also do it the way i've done it.
make a movement lua for each city this one is for thais so its ext is Thais_Citizen.lua
Code:function onStepIn(cid, item, pos) local thais = {x=32369, y=32241, z=7} if item.actionid == 30023 then doPlayerSetTown(cid,3) doTeleportThing(cid,thais) doSendMagicEffect(getCreaturePosition(cid),12) doCreatureSay(cid, "You are now a citizen of Thais", TALKTYPE_ORANGE_1) end return 1 end
then this in your movements.xml
Code:<movevent type="StepIn" actionid="30023" event="script" value="Hometown/Thais_Citizen.lua" />
after you have set the script up now all you have to do is go into your map editor and set it up.
to do so select a raw teleport, place where you want. select its properties then type the action id to that teleport. no need to set a position on the teleport, the script does the teleport for you!
hope this helps!![]()