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

Change town ID

miklus

New Member
Joined
Feb 17, 2009
Messages
64
Reaction score
0
Location
Poland, Belchatow
Hello!

i have problem on mine server... i can't change town id... i enter teleport but always i respawn on town 1 ( i want town number 2 ). PLease script for change town !! TFS 0.3.4PL2 !!

Code:
function onStepIn(cid, item, pos)
if item.actionid == 9000 then
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Enigma.')
doPlayerSetTown(cid,1)
elseif item.actionid == 9001 then
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Edron.')
doPlayerSetTown(cid,2)
elseif item.actionid == 9002 then
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Endhoria.')
doPlayerSetTown(cid,3)
end
return 1
end

PS. In map editor i have 3 tows, alls great... only script doesn't work.
 
Last edited:
PHP:
function onStepIn(cid, item, fromPos, item2, toPos)
	if (item.actionid == 9000) then
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Enigma.')
		doPlayerSetTown(cid,1)
	elseif (item.actionid == 9001) then
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Edron.')
		doPlayerSetTown(cid,2)
	elseif (item.actionid == 9002) then
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Endhoria.')
		doPlayerSetTown(cid,3)
	end
	return TRUE
end
 
Back
Top Bottom