• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua How to edit storagevalue teleport to a simple teleport without value? =)

danne3131

Well-Known Member
Joined
Jun 26, 2008
Messages
391
Solutions
1
Reaction score
50
So basicly i want to remove this Check Storage value, but ive tried alot of different things since im not a Lua Expert i either change it so it doesnt work at all or it just says Not activated.. Please help me scripters of otland! :D

Code:
local config = {
    [12380] = {storageKey = Storage.WrathoftheEmperor.Questline, toPosition = {Position(33138, 31248, 6), Position(33211, 31065, 9)}},
    [12381] = {storageKey = Storage.WrathoftheEmperor.Questline, toPosition = {Position(33211, 31065, 9), Position(33138, 31248, 6)}}
}

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

    local targetTile = config[item.actionid]
    if not targetTile then
        return true
    end

    local hasStorageValue = player:getStorageValue(targetTile.storageKey) >= 5
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
    player:teleportTo(targetTile.toPosition[hasStorageValue and 1 or 2])
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
    if not hasStorageValue then
        player:say('This portal is not activated', TALKTYPE_MONSTER_SAY)
    end
    return true
end

What should i edit/Delete in order to just make it work as an teleport? =)
 
Just remove the scripts from the teleports and just add destination positions to the teleports through RME.
 
I dont want this to effect the quests (Wrath of the emperor) In a way that it wont e able to do.. mabye it just checks value so it doesnt matter? =D
 
Evan already gave the answer. :p
In remeres map editor change the teleport to actionid 0 and uniqueid 0, and change the x. y. z. co-ordinates.
This will make a simple teleport that can be used by anyone at anytime.
 
Back
Top