Ir para conteúdo

Featured Replies

Postado

Estou usando este script [TFS 1.2] Teleport Pad System (Rewrite) de outro forum, porem estou tentando utiliza-lo no tfs 1.3, segue os erros abaixo.

 

ACTIONS

floo_powder = {
    tileID = 24618,
    unlockMsg = "You have unlocked ",
-- Window Configuration
    titleMsg = "Floo Powder Teleport System",
    mainMsg = "Select a location to be teleported too.\n\nYou are currently at:\n",
-- End Window Configuration

-- Teleport Spots
    teleport_spots = {
        [1] = {
            name = "Karmia", -- Name of the spot (What is shown in the window)
            storage = 10001, -- This storage tells the system what spots are unlocked
            uid = 2291, -- The unique ID of the teleport spot "This is more for your records really.. "
            direction = DIRECTION_SOUTH, -- This is the direction your player will face when he is teleported to another pad IT MUST BE CAPITALS!
            description = "Karmia Temple",
        },
      
        [2] = {
            name = "Harry Potter",
            storage = 10023,
            uid = 2311,
            direction = DIRECTION_SOUTH,
            description = "Shops!",
        },
    },
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local tile = Tile(target:getPosition())
local items = tile:getItems()
local spot = nil
    if items then
        for i = 1, #items do
            if items[i]:getId() == floo_powder.tileID then
                local spot = items[i]:getUniqueId()
                if target:isPlayer() then
                    player:sendFlooPowderWindow(spot, target)
                    return true
                else
                    player:say("Maybe I should get in the fireplace first..", TALKTYPE_MONSTER_SAY)
                end
            end
        end
    end
end

MOVEMENTS

function onStepIn(player, item, position, fromPosition)

local index = nil
for i = 1, #floo_powder.teleport_spots do
    if floo_powder.teleport_spots[i].uid == item.uid then
        index = i
        break
    end
end

    if index == nil then
        print("Error::Cannot find the tile Unique ID in your config table.")
        return true
    end
    
    if player:getStorageValue(floo_powder.teleport_spots[index].storage) < 1 then
        player:setStorageValue(floo_powder.teleport_spots[index].storage, 1)
        player:say(floo_powder.unlockMsg..floo_powder.teleport_spots[index].name.."!", TALKTYPE_MONSTER_SAY)
    end
end

ERRO

98b98bb7d28f7cafbbb5af0491ab7b92.png

 

 

obrigado de qualquer jeito :)

Editado por elefanteafrican (veja o histórico de edições)

Postado

Tenta isso, se não funcionar me explica melhor oque sistema deveria fazer pois eu não conheço.

floo_powder = {
    tileID = 24618,
    unlockMsg = "You have unlocked ",
-- Window Configuration
    titleMsg = "Floo Powder Teleport System",
    mainMsg = "Select a location to be teleported too.\n\nYou are currently at:\n",
-- End Window Configuration

-- Teleport Spots
    teleport_spots = {
        [1] = {
            name = "Karmia", -- Name of the spot (What is shown in the window)
            storage = 10001, -- This storage tells the system what spots are unlocked
            uid = 2291, -- The unique ID of the teleport spot "This is more for your records really.. "
            direction = DIRECTION_SOUTH, -- This is the direction your player will face when he is teleported to another pad IT MUST BE CAPITALS!
            description = "Karmia Temple",
        },
      
        [2] = {
            name = "Harry Potter",
            storage = 10023,
            uid = 2311,
            direction = DIRECTION_SOUTH,
            description = "Shops!",
        },
    },
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local target = creature:getPosition()
local tile = Tile(target:getPosition(target))
local items = tile:getItems()
local spot = nil
    if items then
        for i = 1, #items do
            if items[i]:getId() == floo_powder.tileID then
                local spot = items[i]:getUniqueId()
                if target:isPlayer() then
                    player:sendFlooPowderWindow(spot, target)
                    return true
                else
                    player:say("Maybe I should get in the fireplace first..", TALKTYPE_MONSTER_SAY)
                end
            end
        end
    end
end

 

Editado por .Smile (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo