Ir para conteúdo
  • Cadastre-se

Normal Alguem pode me ajudar com o oracle?


Posts Recomendados

eu tenho um ot de rookgaard aqui e eu queria um oracle que desse hi yes rookgaard druid e pa fosse pro templo de rookgaard com a vocação, sem ir pra island of destiny alguem pode me ajudar?

(Não sei se expliquei bem)

Link para o post
Compartilhar em outros sites

Mostre o script do npc e me responda:
O servidor será apenas em rook?

Se sim, você quer que o player continue em rook?

Se não, você quer que ele vá direto para main?

Programador PHP, Lua, Java, database administrator.

 

"Nada é verdade, tudo é permitido."

Requiescat in pace.

Link para o post
Compartilhar em outros sites
12 horas atrás, Nazo disse:

Mostre o script do npc e me responda:
O servidor será apenas em rook?

Se sim, você quer que o player continue em rook?

Se não, você quer que ele vá direto para main?

esse aqui e o scripts que ja vem com o ot

 

<?xml version="1.0" encoding="UTF-8"?>
<npc name="The Oracle" floorchange="0" walkinterval="0">
    <health now="150" max="150"/>
    <look typeex="1448"/>

  <interaction range="3" idletime="30">

    <interact keywords="hi" focus="1">
      <!--These are the keywords will trigger this interaction-->
      <keywords>hello</keywords>
      <keywords>greet</keywords>

      <response>
        <action name="script">
          <!--
          if(getPlayerVocation(cid) ~= 0) then
            selfSay("SORRY, YOU HAVE ALREADY MADE YOUR CHOICE IN LIFE!")
            _state.isidle = true
            return
          end
          -->

          if(getPlayerLevel(cid)) >= 8 then
            selfSay(getCreatureName(cid) .. ", ARE YOU PREPARED O FACE YOUR DESTINY?")
            _state.b1 = (isPremium(cid) == TRUE)
            _state.topic = 1
          else
            selfSay("CHILD! COME BACK WHEN YOU HAVE GROWN UP!")
            _state.isidle = true
          end
        </action>
      </response>

      </interact>

    <interact keywords="yes" topic="1">
      <!--Premium account, b1 is set in above-->
      <response b1="1" text="IN WHICH TOWN DO YOU WANT TO LIVE: CARLIN, EDRON, THAIS, OR VENORE?">
        <action name="topic" value="2"/>
      </response>

      <!--Normal account-->
      <response text="IN WHICH TOWN DO YOU WANT TO LIVE: CARLIN, THAIS, OR VENORE?">
        <action name="topic" value="2"/>
      </response>
    </interact>

    <interact keywords="carlin" topic="2">
      <response text="IN CARLIN! AND WHAT PROFESSION HAVE YOU CHOSEN: KNIGHT, PALADIN, SORCERER, OR DRUID?">
        <!--n1: 1 = carlin, 2 = edron, 3 = thais, 4 = venore-->
        <action name="script">
          _state.n1 = 1
          _state.topic = 3
        </action>
      </response>
    </interact>

    <interact keywords="thais" topic="2">
      <response text="IN THAIS! AND WHAT PROFESSION HAVE YOU CHOSEN: KNIGHT, PALADIN, SORCERER, OR DRUID?">
        <!--n1: 1 = carlin, 2 = edron, 3 = thais, 4 = venore-->
        <action name="script">
          _state.n1 = 2
          _state.topic = 3
        </action>
      </response>
    </interact>

    <interact keywords="venore" topic="2">
      <response text="IN VENORE! AND WHAT PROFESSION HAVE YOU CHOSEN: KNIGHT, PALADIN, SORCERER, OR DRUID?">
        <!--n1: 1 = carlin, 2 = edron, 3 = thais, 4 = venore-->
        <action name="script">
          _state.n1 = 3
          _state.topic = 3
        </action>
      </response>
    </interact>

    <interact keywords="edron" topic="2">
      <response text="YOU NEED A PREMIUM ACCOUNT IN ORDER TO GO THERE!">
        <!--Set the topic back to 2, ie. choose a new town.-->
        <action name="topic" value="2"/>
      </response>
      <!--b1: premium account, see <interact keywords="hi" focus="1"> where _state.b1 is is set.-->
      <response b1="1" text="IN EDRON! AND WHAT PROFESSION HAVE YOU CHOSEN: KNIGHT, PALADIN, SORCERER, OR DRUID?">
        <!--n1: 1 = carlin, 2 = edron, 3 = thais, 4 = venore-->
        <action name="script">
          _state.n1 = 3
          _state.topic = 3
        </action>
      </response>
    </interact>

    <!--If the player does not say any city, repeat our question-->
    <interact keywords="|*|" topic="2">
      <response b1="1" text="CARLIN, EDRON, THAIS, OR VENORE?"/>
      <response text="CARLIN, EDRON, THAIS, OR VENORE?"/>
    </interact>

    <interact keywords="sorcerer" topic="3">
      <response text="A SORCERER! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
        <!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
        <action name="script">
          _state.n2 = 1
          _state.topic = 4
        </action>
      </response>
    </interact>

    <interact keywords="druid" topic="3">
      <response text="A DRUID! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
        <!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
        <action name="script">
          _state.n2 = 2
          _state.topic = 4
        </action>
      </response>
    </interact>

    <interact keywords="paladin" topic="3">
      <response text="A PALADIN! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
        <!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
        <action name="script">
          _state.n2 = 3
          _state.topic = 4
        </action>
      </response>
    </interact>

    <interact keywords="knight" topic="3">
      <response text="A KNIGHT! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
        <!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
      <action name="script">
          _state.n2 = 4
          _state.topic = 4
        </action>
      </response>
    </interact>

    <!--If the player does not say any profession, repeat our question-->
    <interact keywords="|*|" topic="3">
      <response text="KNIGHT, PALADIN, SORCERER, OR DRUID?"/>
    </interact>

    <interact keywords="yes" topic="4">
      <response>
        <!--n1: 1 = carlin, 2 = edron, 3 = thais, 4 = venore-->
        <!--n2: 1 = knight, 2 = paladin, 3 = sorcerer, 4 = druid-->
        <action name="script">
          local pos = 0
          if(_state.n1 == 1) then
            pos = {x=180, y=233, z=7}
          elseif(_state.n1 == 2) then
            pos = {x=180, y=233, z=7}
          elseif(_state.n1 == 3) then
            pos = {x=180, y=233, z=7}
          elseif(_state.n1 == 4) then
            pos = {x=180, y=233, z=7}
          else
            selfSay("I DO NOT KNOW WHAT PROFESSION THAT IS, ASK THE GODS FOR GUIDANCE!")
            return
          end

          selfSay("SO BE IT!")
          doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)

          if(doTeleportThing(cid, pos) == 0) then
            doPlayerSetVocation(cid, _state.n2)
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
          end

        </action>
        <action name="idle" value="1"/>
      </response>
    </interact>

    <interact keywords="bye" focus="0">
      <keywords>farewell</keywords>
      <response text="Good bye. Recommend us, if you were satisfied with our service."/>
    </interact>

    <!--
    If the event onBusy exists, the npc will make a queue like Tibia, if the event is removed
    the npc will be able to talk to all customers at the same time without problems.
    -->

    <interact event="onBusy">
      <response text="WAIT UNTIL IT IS YOUR TURN!">
        <action name="addqueue" value="|PLAYER|"/>
      </response>
    </interact>

    <!--This event triggers if the player goes to far away from the npc/logout/idle timeout-->
    <interact event="onPlayerLeave" focus="0">
      <response text="COME BACK WHEN YOU ARE PREPARED TO FACE YOUR DESTINY!"/>
    </interact>

  </interaction>

</npc>

 

 

Eu quero que ele seja so em rookgaard sem main entao queria que o player pegasse nivel 8 fosse la falasse com o npc pegasse a vocaçao e fosse pro templo definindo a cidade de rook como principal

Link para o post
Compartilhar em outros sites

@escorpiao92, NPC todo em xml é muito estranho ahusauhs mas testa aí:

<?xml version="1.0" encoding="UTF-8"?>
<npc name="The Oracle" floorchange="0" walkinterval="0">
    <health now="150" max="150"/>
    <look typeex="1448"/>

  <interaction range="3" idletime="30">

    <interact keywords="hi" focus="1">
      <!--These are the keywords will trigger this interaction-->
      <keywords>hello</keywords>
      <keywords>greet</keywords>

      <response>
        <action name="script">
          <!--
          if(getPlayerVocation(cid) ~= 0) then
            selfSay("SORRY, YOU HAVE ALREADY MADE YOUR CHOICE IN LIFE!")
            _state.isidle = true
            return
          end
          -->

          if(getPlayerLevel(cid)) >= 8 then
            selfSay(getCreatureName(cid) .. ", ARE YOU PREPARED O FACE YOUR DESTINY?")
            _state.b1 = (isPremium(cid) == TRUE)
            _state.topic = 1
          else
            selfSay("CHILD! COME BACK WHEN YOU HAVE GROWN UP!")
            _state.isidle = true
          end
        </action>
      </response>

      </interact>

    <interact keywords="yes" topic="1">
      <response text="KNIGHT, PALADIN, SORCERER, OR DRUID?">
        <action name="topic" value="2"/>
      </response>
    </interact>

    <!--If the player does not say any city, repeat our question-->
    <interact keywords="|*|" topic="2">
      <response b1="1" text="KNIGHT, PALADIN, SORCERER, OR DRUID?"/>
      <response text="KNIGHT, PALADIN, SORCERER, OR DRUID?"/>
    </interact>

    <interact keywords="sorcerer" topic="2">
      <response text="A SORCERER! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
        <!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
        <action name="script">
          _state.n2 = 1
          _state.topic = 3
        </action>
      </response>
    </interact>

    <interact keywords="druid" topic="2">
      <response text="A DRUID! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
        <!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
        <action name="script">
          _state.n2 = 2
          _state.topic = 3
        </action>
      </response>
    </interact>

    <interact keywords="paladin" topic="2">
      <response text="A PALADIN! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
        <!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
        <action name="script">
          _state.n2 = 3
          _state.topic = 3
        </action>
      </response>
    </interact>

    <interact keywords="knight" topic="2">
      <response text="A KNIGHT! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
        <!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
      <action name="script">
          _state.n2 = 4
          _state.topic = 3
        </action>
      </response>
    </interact>

    <!--If the player does not say any profession, repeat our question-->
    <interact keywords="|*|" topic="2">
      <response text="KNIGHT, PALADIN, SORCERER, OR DRUID?"/>
    </interact>

    <interact keywords="yes" topic="3">
      <response>
        <!--n1: 1 = carlin, 2 = edron, 3 = thais, 4 = venore-->
        <!--n2: 1 = knight, 2 = paladin, 3 = sorcerer, 4 = druid-->
        <action name="script">
            doPlayerSetVocation(cid, _state.n2)
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
        </action>
        <action name="idle" value="1"/>
      </response>
    </interact>

    <interact keywords="bye" focus="0">
      <keywords>farewell</keywords>
      <response text="Good bye. Recommend us, if you were satisfied with our service."/>
    </interact>

    <!--
    If the event onBusy exists, the npc will make a queue like Tibia, if the event is removed
    the npc will be able to talk to all customers at the same time without problems.
    -->

    <interact event="onBusy">
      <response text="WAIT UNTIL IT IS YOUR TURN!">
        <action name="addqueue" value="|PLAYER|"/>
      </response>
    </interact>

    <!--This event triggers if the player goes to far away from the npc/logout/idle timeout-->
    <interact event="onPlayerLeave" focus="0">
      <response text="COME BACK WHEN YOU ARE PREPARED TO FACE YOUR DESTINY!"/>
    </interact>

  </interaction>

</npc>

 

Programador PHP, Lua, Java, database administrator.

 

"Nada é verdade, tudo é permitido."

Requiescat in pace.

Link para o post
Compartilhar em outros sites

ta funcionando certinho para dar a vocaçâo mas o npc ta dando mais de uma vez a vocação tipo pego knight depois vou la e falo denovo e pego druid

 

 

o npc tem esse script aqui também nao sei se e por aqui

 

 

 

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)             npcHandler:onCreatureDisappear(cid)            end
function onCreatureSay(cid, type, msg)             npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()                     npcHandler:onThink()                    end

function oracle(cid, message, keywords, parameters, node)
    if(not npcHandler:isFocused(cid)) then
        return false
    end

    local cityNode = node:getParent():getParent()
    local vocNode = node:getParent()

    local destination = cityNode:getParameters().destination
    local town = cityNode:getParameters().town
    local vocation = vocNode:getParameters().vocation

    if(destination ~= nil and vocation ~= nil and town ~= nil) then
        if(getPlayerLevel(cid) < parameters.level) then
            npcHandler:say('You must first reach level ' .. parameters.level .. '!', cid)
            npcHandler:resetNpc()
        else
            if(getPlayerVocation(cid) > 0) then
                npcHandler:say('Sorry, You already have a vocation!')
                npcHandler:resetNpc()
            else
                doPlayerSetVocation(cid, vocation)
                doPlayerSetTown(cid, town)
                npcHandler:resetNpc()

                local tmp = getCreaturePosition(cid)
                doTeleportThing(cid, destination)
                doSendMagicEffect(tmp, CONST_ME_POFF)
                doSendMagicEffect(destination, CONST_ME_TELEPORT)
            end
        end
    end

    return true
end

function greetCallback(cid)
    if(getPlayerLevel(cid) < 8) then
        npcHandler:say('COME BACK WHEN YOU GROW UP, CHILD!')
        return false
    else
        return true
    end
end
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setMessage(MESSAGE_GREET, 'Hello |PLAYERNAME|. Are you prepared to face your destiny?')

local yesNode = KeywordNode:new({'yes'}, oracle, {level = 8})
local noNode = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then what vocation do you want to become?'})

local node1 = keywordHandler:addKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'What city do you wish to live in? {Rhyves}, {Varak} or {Jorvik}?'})
    local node2 = node1:addChildKeyword({'varak'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, town = 1, destination = {x=242, y=429, z=12}, text = 'Varak, eh? So what vocation do you wish to become? {Sorcerer}, {druid}, {paladin} or {knight}?'})
        local node3 = node2:addChildKeyword({'sorcerer'}, StdModule.say, {npcHandler = npcHandler, vocation = 1, onlyFocus = true, text = 'So, you wish to be a powerful magician? Are you sure about that? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
        node3 = node2:addChildKeyword({'druid'}, StdModule.say, {npcHandler = npcHandler, vocation = 2, onlyFocus = true, text = 'Are you sure that a druid is what you wish to become? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
        node3 = node2:addChildKeyword({'paladin'}, StdModule.say, {npcHandler = npcHandler, vocation = 3, onlyFocus = true, text = 'A ranged marksman. Are you sure? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
        node3 = node2:addChildKeyword({'knight'}, StdModule.say, {npcHandler = npcHandler, vocation = 4, onlyFocus = true, text = 'A mighty warrior. Is that your final decision? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
    node2 = node1:addChildKeyword({'rhyves'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, town = 1, destination = {x=159, y=387, z=6}, text = 'Rhyves, eh? So what vocation do you wish to become? {Sorcerer}, {druid}, {paladin} or {knight}?'})
        node3 = node2:addChildKeyword({'sorcerer'}, StdModule.say, {npcHandler = npcHandler, vocation = 1, onlyFocus = true, text = 'So, you wish to be a powerful magician? Are you sure about that? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
        node3 = node2:addChildKeyword({'druid'}, StdModule.say, {npcHandler = npcHandler, vocation = 2, onlyFocus = true, text = 'Are you sure that a druid is what you wish to become? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
        node3 = node2:addChildKeyword({'paladin'}, StdModule.say, {npcHandler = npcHandler, vocation = 3, onlyFocus = true, text = 'A ranged marksman. Are you sure? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
        node3 = node2:addChildKeyword({'knight'}, StdModule.say, {npcHandler = npcHandler, vocation = 4, onlyFocus = true, text = 'A mighty warrior. Is that your final decision? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
    node2 = node1:addChildKeyword({'jorvik'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, town = 1, destination = {x=469, y=172, z=7}, text = 'Jorvik, eh? So what vocation do you wish to become? {Sorcerer}, {druid}, {paladin} or {knight}?'})
        node3 = node2:addChildKeyword({'sorcerer'}, StdModule.say, {npcHandler = npcHandler, vocation = 1, onlyFocus = true, text = 'So, you wish to be a powerful magician? Are you sure about that? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
        node3 = node2:addChildKeyword({'druid'}, StdModule.say, {npcHandler = npcHandler, vocation = 2, onlyFocus = true, text = 'Are you sure that a druid is what you wish to become? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
        node3 = node2:addChildKeyword({'paladin'}, StdModule.say, {npcHandler = npcHandler, vocation = 3, onlyFocus = true, text = 'A ranged marksman. Are you sure? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
        node3 = node2:addChildKeyword({'knight'}, StdModule.say, {npcHandler = npcHandler, vocation = 4, onlyFocus = true, text = 'A mighty warrior. Is that your final decision? This decision is irreversible!'})
            node3:addChildKeywordNode(yesNode)
            node3:addChildKeywordNode(noNode)
keywordHandler:addKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Then come back when you are ready.'})

npcHandler:addModule(FocusModule:new())
 

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo