Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
I want to make it so that once a player goes through a portal in my nub island leading to the main, their town id changes. How would I script this and where would I put the script?
Citzen.lua - save this file in data/movements/scripts
Code:
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
notice that the tp id needs to be 9773 in this situation
Now after you've placed citizen.lua correctly and fixed movements.xml you need to decide what your TP's action ID will be. This can be easily figured out by using the following formula:
Code:
30020 + (town id) = action id
So if your town is thais with an id of 5 your action id for the teleporter will be 30025.
Thanks,
AmpedRPG staff /Justin
- - - Updated - - -
Let me know if this works for you! I'm pretty sure everything here is explained properly =)