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

Live in th city by teleport

just put this in the script

doPlayerSetTown(cid, 1)
1= the id of the town.

edit: better version

Code:
doPlayerSendTextMessage(cid,19,"From now you are citizen from [I]yourtownhere[/I]!")
pos = {x=100, y=100, z=7}
doTeleportThing(cid,pos, 0)
doPlayerSetTown(cid, 1)
 
Last edited:
doPlayerSendTextMessage(cid,19,"From now you are citizen from yourtownhere!") -- text when player change living city
pos = {x=100, y=100, z=7} -- position to new temple
doTeleportThing(cid,pos, 0) -- teleporting player to new temple
doPlayerSetTown(cid, 1) -- setting player town temple.
 
bumb, altough its outdated - i am someone who actually uses the search function


so, could anyone help me?
how to use that code? make it an actionid/unique id? explain please.
 
bumb, altough its outdated - i am someone who actually uses the search function


so, could anyone help me?
how to use that code? make it an actionid/unique id? explain please.

Good that you do that ;)

First look at this code:
just put this in the script

doPlayerSetTown(cid, 1)
1= the id of the town.

edit: better version

Code:
doPlayerSendTextMessage(cid,19,"From now you are citizen from [I]yourtownhere[/I]!")
pos = {x=100, y=100, z=7}
doTeleportThing(cid,pos, 0)
doPlayerSetTown(cid, 1)

Give the teleport an action/unique id. then just add this to your actions. ( sorry I can't explain it better since my computer is broken for like a year now, so havn't using OT in a long time:O.) If you don't understand it, I will download a server and will look for you how to do it correct:)
 
Appreciated, Lobnig.

Go to your data\movements\movements.xml and put
Code:
    <movevent event="StepIn" actionid="[COLOR=Red]ACTIONID[/COLOR]" function="settown1.lua"/>
Then make a file called settown1.lua in your \data\movements\scripts and put the code
Code:
doPlayerSendTextMessage(cid,19,"From now you are citizen from [I]yourtownhere[/I]!")
pos = {x=100, y=100, z=7}
doTeleportThing(cid,pos, 0)
doPlayerSetTown(cid, 1)
in it. Then put the actionID where you want it on the map.
 
Back
Top