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

Lua broken amphora enter banuta 1.5

bpm91

Intermediate OT User
Joined
May 23, 2019
Messages
928
Solutions
7
Reaction score
127
Location
Brazil
YouTube
caruniawikibr
Does anyone have the script that breaks the amphoras to open the teleport to enter the banuta? tf 1.5 7.72
 
break 4 amphora

21:39 You see canopic jar.
Item ID: 4996
Position: 32823, 32525, 10

and when breaking all the teleport is born, but the teleport does not close. only on server save
 
break 4 amphora

21:39 You see canopic jar.
Item ID: 4996
Position: 32823, 32525, 10

and when breaking all the teleport is born, but the teleport does not close. only on server save
Ah, i know now, after breaking four amphoras you can use the teleport, the problem is that the amphora is not returning to id 4996 after you break it, right ?

You have the teleport script or its only using rme pos?
 
I actually don't have the script. but I'll let you know how it works

in fact, the script resets everything in 5 minutes, the teleport disappears, and the amphoras are born again

Screenshot_2.png
 
I actually don't have the script. but I'll let you know how it works

in fact, the script resets everything in 5 minutes, the teleport disappears, and the amphoras are born again

View attachment 73905
You need to set in items.xml the large amphora as an item that player can break, then, set the id of the trash(id 4997?) to decay to 4996 after 5 min.

Then do a teleport script that check the 4 broken amphoras and teleport player to the coordenates if all is broken.
Lua:
local banuta = MoveEvent()
-- amphoras location
local config = {Position(100, 100, 8), Position(100, 101, 8), Position(100, 102, 8), Position(100, 103, 8)}
function banuta.onStepin(creature, item, position, fromPosition)
    local player = creature:getPlayer()
--    if player need storage, remove -- and add storage and value below
--    if player:getStorageValue(storage) < value then
--            player:teleportTo(fromPosition)
--            player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
--        return true
--    end

    for i = 1, #config do
        if not Tile(config[i]):getItemById(4997) then
            player:teleportTo(fromPosition)
            player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
            return true
        end
    end

    local destination = Position(100, 100, 9)
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
    player:teleportTo(destination)
    destination:sendMagicEffect(CONST_ME_TELEPORT)

    return true
end
banuta:type("stepin")
banuta:uid(10000)
banuta:register()

Dont know if gonna work, here is rev
 
Last edited:
tag:
Code:
<movevent event="StepIn" uniqueid="12129" script="quests/the ape city/Mission9TheDeepestCatacombsteleport.lua" />

create a file in movements/scripts/quest/theapecity/Mission9TheDeepestCatacombsteleport.lua

Lua:
function onStepIn(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then
        return true
    end
    if item.uid == 12129 then
    if player:getStorageValue(Storage.TheApeCity.Questline) >= 17 then
        player:teleportTo({x = 32749, y = 32536, z = 10})
    else
        player:teleportTo(fromPosition)
        player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have access to this area.')
    end

    position:sendMagicEffect(CONST_ME_TELEPORT)
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
    return true
end
-- 2 --
local config = {
    amphoraPositions = {
        Position(32792, 32527, 10),
        Position(32823, 32525, 10),
        Position(32876, 32584, 10),
        Position(32744, 32586, 10)
    },
    brokenAmphoraId = 2252 --4997
}
    if item.uid == 12130 then
    local player = creature:getPlayer()
    if not player then
        return true
    end
    for i = 1, #config.amphoraPositions do
        local amphoraItem = Tile(config.amphoraPositions[i]):getItemById(config.brokenAmphoraId)
        if not amphoraItem then
            player:teleportTo({x = 32852, y = 32544, z = 10})
            position:sendMagicEffect(CONST_ME_TELEPORT)
            player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
            player:sendTextMessage(MESSAGE_STATUS_SMALL, "There are 4 large amphoras that must be broken in order to open the teleporter.")
            return true
        end
    end

    player:teleportTo({x = 32885, y = 32632, z = 11})
    position:sendMagicEffect(CONST_ME_TELEPORT)
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
    return true
end
end
 
I'm going to test, in fact the teleport is born when breaking all the amphoras, the teleport is born in a place on the map.
Ah, my bad, i thought that you can only teleport if all four is broken.

I update the script, even if you not using it, just use in another thing or as model
 
Ah, my bad, i thought that you can only teleport if all four is broken.

I update the script, even if you not using it, just use in another thing or as model
ty mano, i will try all scripts <3
Post automatically merged:

tag:
Code:
<movevent event="StepIn" uniqueid="12129" script="quests/the ape city/Mission9TheDeepestCatacombsteleport.lua" />

create a file in movements/scripts/quest/theapecity/Mission9TheDeepestCatacombsteleport.lua

Lua:
function onStepIn(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then
        return true
    end
    if item.uid == 12129 then
    if player:getStorageValue(Storage.TheApeCity.Questline) >= 17 then
        player:teleportTo({x = 32749, y = 32536, z = 10})
    else
        player:teleportTo(fromPosition)
        player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have access to this area.')
    end

    position:sendMagicEffect(CONST_ME_TELEPORT)
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
    return true
end
-- 2 --
local config = {
    amphoraPositions = {
        Position(32792, 32527, 10),
        Position(32823, 32525, 10),
        Position(32876, 32584, 10),
        Position(32744, 32586, 10)
    },
    brokenAmphoraId = 2252 --4997
}
    if item.uid == 12130 then
    local player = creature:getPlayer()
    if not player then
        return true
    end
    for i = 1, #config.amphoraPositions do
        local amphoraItem = Tile(config.amphoraPositions[i]):getItemById(config.brokenAmphoraId)
        if not amphoraItem then
            player:teleportTo({x = 32852, y = 32544, z = 10})
            position:sendMagicEffect(CONST_ME_TELEPORT)
            player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
            player:sendTextMessage(MESSAGE_STATUS_SMALL, "There are 4 large amphoras that must be broken in order to open the teleporter.")
            return true
        end
    end

    player:teleportTo({x = 32885, y = 32632, z = 11})
    position:sendMagicEffect(CONST_ME_TELEPORT)
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
    return true
end
end
in this case it would not be a step in, but an action, because I don't need the storage part to enter, I just need 4 amphoras broken into positions. and create a teleport at a location that sends it to a location. I believe you would have to have action id in amphoras. and in stepin
 
Last edited:
ty mano, i will try all scripts <3
Post automatically merged:


in this case it would not be a step in, but an action, because I don't need the storage part to enter, I just need 4 amphoras broken into positions. and create a teleport at a location that sends it to a location. I believe you would have to have action id in amphoras. and in stepin
I'm not sure about the "break and create teleport" because you can use all weapons to do that, are you REALLY sure about the break and create teleport? Not break and can teleport?

When you need to create/remove things, quest have levers or switchs to use after meet some conditions
 
I remember that in banuta in the original form, you have to break 4 amphoras, for the teleport to be created and then you enter the teleport. after 5 minutes the teleport disappears, and the amphoras are born again for someone else to open
 
I remember that the original teleport is already in its defined location, but the player is only teleported if the amphoras are broken, automatic respawn of the amphoras, on my server it works the way I told you
 
I remember that the original teleport is already in its defined location, but the player is only teleported if the amphoras are broken, automatic respawn of the amphoras, on my server it works the way I told you
Thats how I remember too, so I simple do a script that meet that

With my small(1%) knowledge about scripts, I really cant remember how to do what he wants without a specific weapon... like crowbar as exemple or even a sword or a switch.

Or a change in the "break items" system

Maybe changing in this part of actions

Yes, u can do using that I think, its the break item system ?
 
Last edited:
I remember that the original teleport is already in its defined location, but the player is only teleported if the amphoras are broken, automatic respawn of the amphoras, on my server it works the way I told you
Got it, I'll try to adapt the script without the first part of the storage quest
 
Back
Top