Ir para conteúdo

Posts Recomendados

Aew galera estou trazendo um the oracle que fiz!!!igual o do global!!

 

--dados do the oracle

*versao 8.10 (mais acho que funciona de 8.00 a 8.11)

*aries testado 0.4.5 e 0.4.0 (xml)

*com tradução e sem tradução

*testado em thyrania (mais creio que funcione em quase todos os mapas que tenha mais de uma cidade)

 

eu consegui fazer um the oracle igual o do global com algumas ajudas eu fiz. mais eu só postei pq nao consegui emcontrar um the oracle para ot 8.10 para xml só em comtrava de versao antiga!

bom eu coloquei no meu ot de thyrania pq eu odeio aquele the oracle de la!! para quen quer colocar em seu mapa de thyrania é só deletar as talkactions oralcle e se for em outro mapa é só colokar!!

 

bom então mão na massa!!

abra data/npc copie um arkivo qualquer de la e cóle e renomeie como the oracle abra-o deléte tudo e colé:

<?xml version="1.0"?>

<npc name="The Oracle" script="data/npc/scripts/oracle.lua" access="3">

<look typeex="1448" corpse="2115"/>

 

</npc>

e depois abra data/npc/script copie um arkivo qualquer e cóle e renomeie como oracle abra-o deléte tudo e cóle:

--by nandinmlk--

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end

 

function onCreatureAppear(creature)

end

 

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('CHILD! COME BACK WHEN YOU HAVE GROWN UP!')

focus = 0

talk_start = 0

end

end

 

function onCreatureTurn(creature)

end

 

function msgcontains(txt, str)

return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))

end

 

function onCreatureSay(cid, type, msg)

msg = string.lower(msg)

-- greeting phrase

if string.find(msg, '(%a*)hi(%a*)') and focus == 0 and string.len(msg) == 2 and getDistanceToCreature(cid) < 4 then

if getPlayerLevel(cid) >= 8 then

selfSay('' .. creatureGetName(cid) .. '! ARE YOU PREPARED TO FACE YOUR DESTINY?')

focus = cid

talk_start = os.clock()

 

else

selfSay('CHILD! COME BACK WHEN YOU HAVE GROWN UP!')

focus = 0

talk_start = 0

end

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then

selfSay('WAIT UNTIL IT IS YOUR TURN!')

elseif focus == cid then

talk_start = os.clock()

 

 

if msgcontains(msg, 'yes') and talk_state ~= 458 then

 

selfSay('GREAT! DO YOU WHANT TO BE A KNIGHT, A PALADIN, A SORCERER OR A DRUID?')

talk_state = 459

 

elseif msgcontains(msg, 'no') then

selfSay('COME BACK WHEN YOU ARE READY THEN.')

focus = 0

talk_start = 0

elseif msgcontains(msg, 'bye') then

selfSay('COME BACK WHEN YOU ARE READY THEN.')

focus = 0

talk_start = 0

elseif talk_state == 459 then

vocationid = 0

talk_state = 458

if msgcontains(msg, 'sorcerer') then

selfSay('A SORCERER! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!')

vocationid = 1

elseif msgcontains(msg, 'druid') then

selfSay('A DRUID! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!')

vocationid = 2

elseif msgcontains(msg, 'paladin') then

selfSay('A PALADIN! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!')

vocationid = 3

elseif msgcontains(msg, 'knight') then

selfSay('A KNIGHT! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!')

vocationid = 4

elseif msgcontains(msg, 'no') then

selfSay('COME BACK WHEN YOU ARE READY THEN.')

focus = 0

talk_start = 0

elseif msgcontains(msg, 'bye') then

selfSay('COME BACK WHEN YOU ARE READY THEN.')

focus = 0

talk_start = 0

else

selfSay('GREAT! DO YOU WHANT TO BE A KNIGHT, A PALADIN, A SORCERER OR A DRUID?')

talk_state = 459

end

 

 

elseif talk_state == 458 then

if msgcontains(msg, 'yes') then

selfSay('GREAT! WHERE DO YOU WANT TO LIVE? THYRANIA, ICYA, MURNIA, VENGA OR SAAHA?')

talk_state = 452

else

selfSay('GREAT! DO YOU WHANT TO BE A KNIGHT, A PALADIN, A SORCERER OR A DRUID?')

talk_state = 459

end

elseif talk_state == 452 then

if msgcontains(msg, 'icya') then

if pay(cid,0) then

doPlayerSetTown(cid,5)

travel(cid, 795, 712, 7)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

 

elseif msgcontains(msg, 'saaha') then

if pay(cid,0) then

doPlayerSetTown(cid,2)

travel(cid, 101, 395, 8)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

elseif msgcontains(msg, 'thyrania') then

if pay(cid,0) then

doPlayerSetTown(cid,1)

travel(cid, 71, 33, 8)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

elseif msgcontains(msg, 'murnia') then

if pay(cid,0) then

doPlayerSetTown(cid,3)

travel(cid, 844, 561, 7)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

elseif msgcontains(msg, 'venga') then

if pay(cid,0) then

doPlayerSetTown(cid,4)

travel(cid, 402, 434, 7)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

 

elseif msgcontains(msg, 'no') then

selfSay('COME BACK WHEN YOU ARE READY THEN.')

focus = 0

talk_start = 0

elseif msgcontains(msg, 'bye') then

selfSay('COME BACK WHEN YOU ARE READY THEN.')

focus = 0

talk_start = 0

 

end

 

 

talk_state = 0

talk_start = 0

 

 

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then

selfSay('Good bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

end

end

 

function onCreatureChangeOutfit(creature)

end

 

function onThink()

if (os.clock() - talk_start) > 30 then

if focus > 0 then

selfSay('CHILD! COME BACK WHEN YOU HAVE GROWN UP!')

end

focus = 0

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 5 then

selfSay('CHILD! COME BACK WHEN YOU HAVE GROWN UP!')

focus = 0

end

end

end

vermelho o nome da cidade que ele sera teleportado

 

laranja o numero da cidade encontrado no mapa editor

 

azul cordenada X que ele sera teleportado (colokar cordenadas do templo)

 

rosa cordenada Y que ele sera teleportada (colokar cordenadas do templo)

 

verde cordenada Z que ele sera teleportado (colokar cordenadas do templo)

 

e para adicionar mais cidades é só adicionar isto:

 

elseif msgcontains(msg, 'nome da cite') then

if pay(cid,0) then

doPlayerSetTown(cid,4)

travel(cid, 402, 434, 7)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

 

depois da ultima cidade! e arrumar as cordenadas e o numero da cidade, e colocar o nome da cidade a onde ele pergunta onde o player quer morar!!

 

se forem colokar em thyrania é só por ja esta arrumado com as cordenadas de la!!

 

aki esta ele traduzido tmb para quem quiser!! é só seguir os msm passos!!

aki vai:

--by nandinmlk--

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end

 

function onCreatureAppear(creature)

end

 

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('VOCE NAO ESTA PRONTO!, VOLTE QUANDO ESTIVER PREPARADO!')

focus = 0

talk_start = 0

end

end

 

function onCreatureTurn(creature)

end

 

function msgcontains(txt, str)

return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))

end

 

function onCreatureSay(cid, type, msg)

msg = string.lower(msg)

-- greeting phrase

if string.find(msg, '(%a*)hi(%a*)') and focus == 0 and string.len(msg) == 2 and getDistanceToCreature(cid) < 4 then

if getPlayerLevel(cid) >= 8 then

selfSay('' .. creatureGetName(cid) .. '! VOCE ESTA PRONTO PARA EMFRENTAR O SEU DESTINO?')

focus = cid

talk_start = os.clock()

 

else

selfSay('VOCE NAO ESTA PRONTO!, VOLTE QUANDO ESTER PREPARADO!')

focus = 0

talk_start = 0

end

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then

selfSay('ESPERE A SUA VEZ!')

elseif focus == cid then

talk_start = os.clock()

 

 

if msgcontains(msg, 'yes') and talk_state ~= 458 then

 

selfSay('OTIMO! OQUE VOCE QUER SER? UM KNIGHT, UM PALADIN, UM SORCERER OU UM DRUID?')

talk_state = 459

 

elseif msgcontains(msg, 'no') then

selfSay('ESTA BEM! VOLTE QUANDO QUISER.')

focus = 0

talk_start = 0

elseif msgcontains(msg, 'bye') then

selfSay('ESTA BEM! VOLTE QUANDO QUISER.')

focus = 0

talk_start = 0

elseif talk_state == 459 then

vocationid = 0

talk_state = 458

if msgcontains(msg, 'sorcerer') then

selfSay('UM SORCERER! VOCE TEM SERTEZA? ESTA DESIZAO E IRREVERSIVEL!')

vocationid = 1

elseif msgcontains(msg, 'druid') then

selfSay('UM DRUID! VOCE TEM SERTEZA? ESTA DESIZAO E IRREVERSIVEL!')

vocationid = 2

elseif msgcontains(msg, 'paladin') then

selfSay('UM PALADIN! VOCE TEM SERTEZA? ESTA DESIZAO E IRREVERSIVEL!')

vocationid = 3

elseif msgcontains(msg, 'knight') then

selfSay('UM KNIGHT! VOCE TEM SERTEZA? ESTA DESIZAO E IRREVERSIVEL!')

vocationid = 4

elseif msgcontains(msg, 'no') then

selfSay('ESTA BEM! VOLTE QUANDO QUISER.')

focus = 0

talk_start = 0

elseif msgcontains(msg, 'bye') then

selfSay('ESTA BEM! VOLTE QUANDO QUISER.')

focus = 0

talk_start = 0

else

selfSay('OTIMO! OQUE VOCE QUER SER? UM KNIGHT, UM PALADIN, UM SORCERER OU UM DRUID?')

talk_state = 459

end

 

 

elseif talk_state == 458 then

if msgcontains(msg, 'yes') then

selfSay('OTIMO! PAR ONDE VOCE QUER IR? THYRANIA, ICYA, MURNIA, VENGA OU SAAHA?')

talk_state = 452

else

selfSay('OTIMO! OQUE VOCE QUER SER? UM KNIGHT, UM PALADIN, UM SORCERER OU UM DRUID?')

talk_state = 459

end

elseif talk_state == 452 then

if msgcontains(msg, 'icya') then

if pay(cid,0) then

doPlayerSetTown(cid,5)

travel(cid, 795, 712, 7)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

 

elseif msgcontains(msg, 'saaha') then

if pay(cid,0) then

doPlayerSetTown(cid,2)

travel(cid, 101, 395, 8)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

elseif msgcontains(msg, 'thyrania') then

if pay(cid,0) then

doPlayerSetTown(cid,1)

travel(cid, 71, 33, 8)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

elseif msgcontains(msg, 'murnia') then

if pay(cid,0) then

doPlayerSetTown(cid,3)

travel(cid, 844, 561, 7)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

elseif msgcontains(msg, 'venga') then

if pay(cid,0) then

doPlayerSetTown(cid,4)

travel(cid, 402, 434, 7)

selfSay('Let\'s go!')

focus = 0

talk_start = 0

else

selfSay('Sorry, you don\'t have enough money.')

end

 

elseif msgcontains(msg, 'no') then

selfSay('ESTA BEM! VOLTE QUANDO QUISER.')

focus = 0

talk_start = 0

elseif msgcontains(msg, 'bye') then

selfSay('ESTA BEM! VOLTE QUANDO QUISER!.')

focus = 0

talk_start = 0

 

end

 

 

talk_state = 0

talk_start = 0

 

 

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then

selfSay('Good bye, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

end

end

 

function onCreatureChangeOutfit(creature)

end

 

function onThink()

if (os.clock() - talk_start) > 30 then

if focus > 0 then

selfSay('VOCE NAO ESTA PRONTO!, VOLTE QUANDO ESTER PREPARADO!')

end

focus = 0

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 5 then

selfSay('VOCE NAO ESTA PRONTO!, VOLTE QUANDO ESTER PREPARADO!')

focus = 0

end

end

end

e para adicionar no seu mapa caso vc nao o tenha no mapa editor va na pasta do seu map editor creaturas e adicione isto:

 

<creature itemid="1448" name="The Oracle" type="npc"/>

 

se algo nao funcionar avise que te ajudarei mais eu testei e esta tudo funcionando!!

 

espéro ter ajudado!!! COMENTEN PLIXXX!!! :smile_positivo:

 

MAIS UMA VEZ COMENTEN PORFAVOR QUÉRO QUE VCS COMENTEM

 

CRÉDITOS: 100% by my e meu coléga mais ele nao ten comta en nenhun fórum de otserver download

 

se forem postar em algum lugar colóquen créditos!!

Editado por Nandinmlk
Link para o comentário
https://xtibia.com/forum/topic/99009-the-oracle-para-ot-810/
Compartilhar em outros sites

  • 2 months later...

MUITO OBRIGADO !!!!!!!!!!!!!!!!!!!!! FOI O UNICO QUE DEU CERTO !!! EM MAIS DE 15 QUE EU TENTEI !! VC SALVOU MEU OT MUITO OBRIGADO OLHA DA CERTO EM VERSÃO 7.92 TMB PQ O MEU EH ;DDD

 

 

 

VLW !!!!!!

Link para o comentário
https://xtibia.com/forum/topic/99009-the-oracle-para-ot-810/#findComment-669745
Compartilhar em outros sites

Deu certo mais tem um problema!!! ta tudo certo so que ele n te manda pra main !!vc fala tudo crtinho hora que chega na hora da cidade:

npc: e qual vai ser sua cidade ?

eu:mid

eu:mid

eu:mid

ele n fais a açao de me mandar pra nova cidade!!

me ajuda aew =//

vlw..

Link para o comentário
https://xtibia.com/forum/topic/99009-the-oracle-para-ot-810/#findComment-669892
Compartilhar em outros sites

×
×
  • Criar Novo...