haiguri 17 Postado Julho 16, 2008 Share Postado Julho 16, 2008 (editado) Vamos começar o tutorial.... 1.Abra a pasta data>npcs e copie e cole qualquer arquivo nesta pasta.Renomeie para The Oracle.Em seguida, abra-o e substitua por isto: <?xml version="1.0"?> <npc name="The Oracle" script="data/npc/scripts/oracle.lua" access="1" monster="1" speed="50" lookdir="2" pushable="0" level="100"> <health now="150" max="150"/> <look type="2010" head="57" body="59" legs="40" feet="76"/> </npc> 2.Á seguir abra a pasta scripts que está dentro da pasta de npcs.Copie e cole qualquer arquivo e em seguida, renomeie para oracle.Abra este arquivo e substitua por isto: focus = 0 talk_start = 0 target = 0 following = false attacking = false talk_state = 0 cname = '' vocation = 0 mainlevel = 8 function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Tchau.') 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) cname = creatureGetName(cid) msg = string.lower(msg) if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Ola ' .. cname .. '! Voce esta preparado para encarar o seu destino?') talk_state = 0 focus = cid talk_start = os.clock() elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. cname .. '! I talk to you in a minute.') elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then selfSay('Tchau, ' .. cname .. '!') talk_state = 0 focus = 0 talk_start = 0 elseif focus == cid then talk_start = os.clock() if talk_state == 0 then if msgcontains(msg, 'sim') then -- confirmando decisao level = getPlayerLevel(cname) if level >= mainlevel then selfSay('Otimo! O que voce quer ser? Um knight, um paladin, um sorcerer ou um druid?') talk_state = 1 else selfSay('Lamento, voce precisa de level ' .. mainlevel .. ' para ir para mainland.') talk_state = 0 end else selfSay('Entao volte quando estiver preparado.') talk_state = 0 end elseif talk_state == 1 then -- telling vocation talk_state = 2 if msgcontains(msg, 'sorcerer') then selfSay('Um mistico sorcerer! Tem certeza?') vocation = 1 elseif msgcontains(msg, 'druid') then selfSay('Um misterioso druid! Tem certeza?') vocation = 2 elseif msgcontains(msg, 'paladin') then selfSay('Um certeiro paladin! Tem certeza?') vocation = 3 elseif msgcontains(msg, 'knight') then selfSay('Um incrivel knight! Tem certeza?') vocation = 4 else selfSay('Sorry, there is no such vocation.') vocation = 0 talk_state = 1 end elseif talk_state == 2 then -- confirmando voc if msgcontains(msg, 'sim') then selfSay('Otimo! Posso te mandar pra City. Para onde voce quer ir?') talk_state = 3 else selfSay('Que vocacao voce quer entao?') talk_state = 1 end elseif talk_state == 3 then -- telling city name if msgcontains(msg, 'city') then selfSay('Boa sorte, jovem aventureiro!') setPlayerVocation(cid,vocation) setPlayerMasterPos(cid,160,54,7) selfSay('/send ' .. cname .. ', 160 54 7') talk_state = 0 focus = 0 talk_start = 0 else selfSay('Desculpe, nao existe essa cidade.') talk_state = 3 end end end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end Espero que gostem =DD Legenda: Lugar em Vermelho- Cordenada do lugar que o player será teletransportado Meu Code nome é Sniper.Comentem POR FAVOR :hi: Editado Julho 20, 2008 por haiguri Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/ Compartilhar em outros sites More sharing options...
mekyz 0 Postado Julho 16, 2008 Share Postado Julho 16, 2008 Belo Tutorial!.. Simples e Explicativo!.. Bom trabalho!.. :smile_positivo: Atenciosamente Mekyz!.. Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-580468 Compartilhar em outros sites More sharing options...
hellnoob 0 Postado Julho 16, 2008 Share Postado Julho 16, 2008 perfeito este tópico Sensacional Aprovado por Mim =D Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-580776 Compartilhar em outros sites More sharing options...
haiguri 17 Postado Julho 18, 2008 Autor Share Postado Julho 18, 2008 Obrigado pelo apoio de vocês espero que mais pessoas elogiem =D Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-582459 Compartilhar em outros sites More sharing options...
luiz310892 0 Postado Julho 22, 2008 Share Postado Julho 22, 2008 (editado) Tipo eu coloquei ele mais ele fala volte aki qndo tiver lvl 8 ?!? como assim ?!? ajuda please to precisando urgente PS: Ja testei com varios lvls.. Editado Julho 22, 2008 por luiz310892 Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-585203 Compartilhar em outros sites More sharing options...
luan12 83 Postado Julho 23, 2008 Share Postado Julho 23, 2008 Otimo Vlww Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-585823 Compartilhar em outros sites More sharing options...
luiz310892 0 Postado Julho 23, 2008 Share Postado Julho 23, 2008 nossa todo mundo conseguio menos eu "? alguem ajuda ai to querendo mt esse npc Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-585946 Compartilhar em outros sites More sharing options...
haiguri 17 Postado Julho 23, 2008 Autor Share Postado Julho 23, 2008 Você precisa ter um char acima do lvl 8¬¬LoL Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-586354 Compartilhar em outros sites More sharing options...
Ivonz 0 Postado Agosto 12, 2008 Share Postado Agosto 12, 2008 Você precisa ter um char acima do lvl 8¬¬LoL 18:58 Test [9]: hi 18:58 The Oracle: Ola ! Voce esta preparado para encarar o seu destino? 18:58 Test [9]: yes 18:58 The Oracle: Entao volte quando estiver preparado. 18:58 Test [9]: sim 18:58 The Oracle: Lamento, voce precisa de level 8 para ir para mainland. -.- nao adiantou , gostaria de saber o motivo Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-601756 Compartilhar em outros sites More sharing options...
leitoctba 0 Postado Agosto 13, 2008 Share Postado Agosto 13, 2008 Ivonz, Você tem que ver se copiou tudo certo e qual é a versão do seu OT? Já fica a minha pergunta: Funciona em TFS 8.22? Sem mais. Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-601855 Compartilhar em outros sites More sharing options...
lockypally 0 Postado Janeiro 6, 2009 Share Postado Janeiro 6, 2009 AQUI ACONTECEU A MSM COISA AMIGOS !!! ele fala volte qnd tiver lvl 8 !!! eu ja estou cansado nenhum tuto de oracle funciona !!! ve se arruma por favor ! Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-669885 Compartilhar em outros sites More sharing options...
BillyBola 1 Postado Janeiro 6, 2009 Share Postado Janeiro 6, 2009 Esse npc tambem se mudar algumas coisas tipo: Otimo! O que voce quer ser? Um knight, um paladin, um sorcerer ou um druid?' para Você quer ir para a Quest Suprema, acho que da tambem ne? Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-669909 Compartilhar em outros sites More sharing options...
777777 9 Postado Dezembro 25, 2010 Share Postado Dezembro 25, 2010 como faço para deixar ele escolher entre 3 ou mais cidades ? estou criando um servidor de pokemon, e terá 7 cidades, mais neste oracle pelo que entendi só da para escolher uma. "/ Link para o comentário https://xtibia.com/forum/topic/91048-npc-the-oracle/#findComment-980898 Compartilhar em outros sites More sharing options...
Posts Recomendados