Ir para conteúdo

Featured Replies

Postado
Script.. logo abaixo
 
PastaOT/data/actions/scripts
 
local config = {
    -- level needed to make the quest
    level = 500,


    -- if players should be able to do the quest unlimited amount of times (not conflicting quest rewards)
    redo = {
        status = true, -- true = unlimited, false = once
        storageValue = 10035 -- only if status is false this will be used
    },


    -- vocation requirement, positions and item configuration
    {
        vocations = {1, 5},
        itemId = 2229,
        playerPos = {x=71, y=208, z=7},
        newPos = {x=60, y=236, z=7},
        itemPos = {x=72, y=208, z=7}
    },


    {
        vocations = {2, 6},
        itemId = 11225,
        playerPos = {x=75, y=208, z=7},
        newPos = {x=60, y=243, z=7},
        itemPos = {x=74, y=208, z=7}
    },


    {
        vocations = {3, 7},
        itemId = 10311,
        playerPos = {x=73, y=210, z=7},
        newPos = {x=64, y=233, z=7},
        itemPos = {x=73, y=209, z=7}
    },


    {
        vocations = {4, 8},
        itemId = 5954,
        playerPos = {x=73, y=206, z=7},
        newPos = {x=64, y=245, z=7},
        itemPos = {x=73, y=207, z=7}
    }
}


function onUse(cid)
    local players = {}
    for _, v in ipairs(config) do


        v.playerPos.stackpos = 253
        local player = getThingfromPos(v.playerPos).uid


        if isPlayer(player) == FALSE then
            return doPlayerSendCancel(cid, "There are not enough players.")
        elseif getPlayerLevel(player) < config.level then
            players.level = true
        elseif isInArray(v.vocations, getPlayerVocation(player)) == FALSE then
            players.vocation = true
        elseif config.redo.status and getPlayerStorageValue(cid, config.redo.storageValue) ~= TRUE then
            players.done = true
        else
            v.itemPos.stackpos = 1
            local item = getThingfromPos(v.itemPos)


            if item.itemid ~= v.itemId then
                players.item = true
            else
                table.insert(players, player)
            end
        end
    end


    if players.level then
        doPlayerSendCancel(cid, "All players need to be level " .. config.level .. " or above.")
    elseif players.vocation then
        doPlayerSendCancel(cid, "All players must stand on the correct tiles.")
    elseif players.item then
        doPlayerSendCancel(cid, "All items must be on the correct positions.")
    else
        for k, player in ipairs(players) do
            doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF)
            doTeleportThing(player, config[k].newPos)
            doSendMagicEffect(getCreaturePosition(player), CONST_ME_TELEPORT)
        end
    end


    return TRUE
end
PastaOT/data/actions/actions.xml
 
<action uniqueid="34794" script="luciferus.lua"/>

 

Ajudei? REP+

 

 

 
 
Spriter: |||||||||| 10%

 

Postado

Qual o problema? Dá algum erro?

 

 

O tópico foi movido para a área correta, preste mais atenção da próxima vez!
Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

Este tópico foi movido:
De: "OTServScriptingCreatureScripts, GlobalEvents e MoveMents"
Para: "OTServSuporte OTServ"

 

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

Postado

Confere se as posições que estão no script está certa no seu mapa ! ^^

Está é a posição para onde o player vai,confere se está certo com a do seu mapa :

newPos = {x=60, y=236, z=7},
  • 3 weeks later...

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo