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
using this only tells u that you have became a member of that town and sets ur id which just using the item itself normally a portal would work just fineYou need the script aswell otherwise it wont work...
LUA: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