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

Really tiny problem please check it out!

Kakha

Premium User
Premium User
Joined
Dec 21, 2008
Messages
233
Reaction score
4
Hello!

I need a script that "changes your home town" like if i want to become citizen of thais i walk in a special tile and i become citizen of thais and when you die you get teleported to that city.

King regards,

Kakha.
 
movements.xml
LUA:
<movevent type="StepIn" itemid="1387" event="script" value="citizen.lua"/>
citizen.lua
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
 
Back
Top