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

How do I create a Temple?

alltus

Active Member
Joined
Aug 5, 2020
Messages
49
Reaction score
31
Hey guys, I have a little question here:
I made this temple (and already made the town ID) and I want to make the player choose if he wants to be a citizen of this city or not clicking in the temple sculpture or entering in a portal of citizenship. How do I properly make this?
Thanks!!
 

Attachments

  • screenshot_2020-08-5-19-49-21.png
    screenshot_2020-08-5-19-49-21.png
    1.2 MB · Views: 23 · VirusTotal
Wrong section, This one is for posting tutorials post your next threads Here
What server are you using? TFS version?
Citizen script will be located somewhere in your data\movements\scripts, Should look like this.
Lua:
local config = {
    [9056] = 4,
    [9057] = 2,
    [9058] = 1,
    [9934] = 5,
    [9060] = 3,
    [9061] = 10,
    [9062] = 9,
    [9063] = 11,
    [9064] = 7,
    [9065] = 8,
    [9935] = 12,
    [9067] = 13,
    [9068] = 14,
    [9240] = 28,
    [9500] = 29,
    [9510] = 33
}

function onStepIn(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then
        return true
    end

    local townId = config[item.uid]
    if not townId then
        return true
    end

    local town = Town(townId)
    if not town then
        return true
    end

    player:setTown(town)
    player:teleportTo(town:getTemplePosition())
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You are now a citizen of ' .. town:getName() .. '.')
    return true
end
Little explain, [9056] = 4 | 9056 is the action id which you have to put in portal using map editor and 4 is your town id, So you'll need to edit your citizen script a little to suit your needs.
If you wanna make it on the sculpture you'll have to create a different citizen script onuse instead of onmove you can request one on Requests board.
 
Last edited:
if you use tfs 1.x (latest one), just add a teleport to your temple (id 1387) and set an action ID to it, 30020 + your townID (for example if your town ID is 1, set action ID 30021)


PS: the teleport doesn't need to lead you anywhere
 
Wrong section, This one is for posting tutorials post your next threads Here
What server are you using? TFS version?
Citizen script will be located somewhere in your data\movements\scripts, Should look like this.
Lua:
local config = {
    [9056] = 4,
    [9057] = 2,
    [9058] = 1,
    [9934] = 5,
    [9060] = 3,
    [9061] = 10,
    [9062] = 9,
    [9063] = 11,
    [9064] = 7,
    [9065] = 8,
    [9935] = 12,
    [9067] = 13,
    [9068] = 14,
    [9240] = 28,
    [9500] = 29,
    [9510] = 33
}

function onStepIn(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then
        return true
    end

    local townId = config[item.uid]
    if not townId then
        return true
    end

    local town = Town(townId)
    if not town then
        return true
    end

    player:setTown(town)
    player:teleportTo(town:getTemplePosition())
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You are now a citizen of ' .. town:getName() .. '.')
    return true
end
Little explain, [9056] = 4 | 9056 is the action id which you have to put in portal using map editor and 4 is your town id, So you'll need to edit your citizen script a little to suit your needs.
If you wanna make it on the sculpture you'll have to create a different citizen script onuse instead of onmove you can request one on Requests board.
Thanks for noting that I'm in the wrong thread, heh
I'm using the 10.98 version
if you use tfs 1.x (latest one), just add a teleport to your temple (id 1387) and set an action ID to it, 30020 + your townID (for example if your town ID is 1, set action ID 30021)


PS: the teleport doesn't need to lead you anywhere
I'm gonna try to do here, thanks!
 
Not the client version, You'll need to post your TFS server (forgotten server) or where you got it because every version is different in scripting system/functions.
You can read more about how to create proper Support thread/title in here.
 
Not the client version, You'll need to post your TFS server (forgotten server) or where you got it because every version is different in scripting system/functions.
You can read more about how to create proper Support thread/title in here.
Oh, I see, it's the version 1.2 of it.
Post automatically merged:

if you use tfs 1.x (latest one), just add a teleport to your temple (id 1387) and set an action ID to it, 30020 + your townID (for example if your town ID is 1, set action ID 30021)


PS: the teleport doesn't need to lead you anywhere
This way?

1596672018889.png

Not the client version, You'll need to post your TFS server (forgotten server) or where you got it because every version is different in scripting system/functions.
You can read more about how to create proper Support thread/title in here.

I tried to do here, but I don't think it worked. Am I doing some mistake?

1596672018889.png1596672129595.png
 
Last edited:
Back
Top