Ir para conteúdo
  • Cadastre-se

Erro na distro de Npc De Reset/Reborn


Posts Recomendados

Olá pessoal, estou com um problema, tenho aqui um npc de reset, (reborn) mais conhecido por quem já jogou tibia dragon ball kkk.

Ele funciona normalmente, porém ao resetar, ocorre um erro na distro, nada interfere, porém me incomoda um pouco.

Se for possível alguém me ajudar eu ficaria muito grato!

 

Erro: 

post-44064-0-83047200-1419190795_thumb.p

 

Npc.xml:

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Reborn" script="reborn.lua" walkinterval="0">
<health now="100" max="100"/>
<look type="446"/>
<parameters>
<parameter key="message_greet" value="Olá, |PLAYERNAME|! Eu posso te {Rebornar}." />
</parameters>
</npc>

 

Script.lua

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('???')
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)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Olá! Se voce está pronto, diga "reborn".')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Hey!.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then
selfSay('Desculpe, mas voce já é rebornado.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30023) ~= 4) or (getPlayerLevel(cid) > 600 and getPlayerStorageValue(cid,30023) ~= 4) then
selfSay('Apenas level 200 até 600 podem rebornar.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') then
selfSay('Realmente quer isto?')
talk_state = 2
--_GOKU_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 8 then
doReborn(cid,1,10,9)
talk_state = 0
 
--_VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 23 then
doReborn(cid,1,25,24)
talk_state = 0
 
--_PICCOLO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 36 then
doReborn(cid,1,42,37)
talk_state = 0
 
--_C17_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 49 then
doReborn(cid,1,50,50)
talk_state = 0
 
--_GOHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 63 then
doReborn(cid,1,62,64)
talk_state = 0
 
--_TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 75 then
doReborn(cid,1,74,76)
talk_state = 0
 
--_CELL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 87 then
doReborn(cid,1,81,88)
talk_state = 0
 
--_FREEZA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 101 then
doReborn(cid,1,88,102)
talk_state = 0
 
--_MAJIN BOO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 117 then
doReborn(cid,1,98,118)
talk_state = 0
 
--_BROLY_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 131 then
doReborn(cid,1,113,132)
talk_state = 0
 
--_C18_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 144 then
doReborn(cid,1,50,145)
talk_state = 0
 
--_UUB_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 156 then
doReborn(cid,1,128,157)
talk_state = 0
 
--_GOTEN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 170 then
doReborn(cid,1,142,171)
talk_state = 0
 
--_CHIBI TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 184 then
doReborn(cid,1,151,185)
talk_state = 0
 
--_COOLER_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 197 then
doReborn(cid,1,153,198)
talk_state = 0
 
--_DENDE_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 210 then
doReborn(cid,1,169,211)
talk_state = 0
 
--_TSUFUL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 222 then
doReborn(cid,1,180,223)
talk_state = 0
 
--_BARDOCK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 235 then
doReborn(cid,1,194,236)
talk_state = 0
 
--_KURIRIN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 248 then
doReborn(cid,1,205,249)
talk_state = 0
 
--_PAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 260 then
doReborn(cid,1,212,261)
talk_state = 0
 
--_KAIO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 272 then
doReborn(cid,1,221,273)
talk_state = 0
 
--_VIDEL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 284 then
doReborn(cid,1,227,285)
talk_state = 0
 
--_JANEMBA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 296 then
doReborn(cid,1,234,297)
talk_state = 0
 
--_TENSHINHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 308 then
doReborn(cid,1,246,309)
talk_state = 0
 
--_JENK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 320 then
doReborn(cid,1,257,321)
talk_state = 0
 
--_RADITZ_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 332 then
doReborn(cid,1,265,333)
talk_state = 0
 
--_C16_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 344 then
doReborn(cid,1,277,345)
talk_state = 0
 
--_TURLES_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 356 then
doReborn(cid,1,285,357)
talk_state = 0
 
--_BULMA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 368 then
doReborn(cid,1,296,369)
talk_state = 0
 
--_SHENRON_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 380 then
doReborn(cid,1,302,381)
talk_state = 0
 
--_VEGETTO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 392 then
doReborn(cid,1,308,393)
talk_state = 0
 
--_TAPION_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 404 then
doReborn(cid,1,321,405)
talk_state = 0
 
--_KAME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 417 then
doReborn(cid,1,335,418)
talk_state = 0
 
--_KING VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 429 then
doReborn(cid,1,347,430)
talk_state = 0
 
--_KAGOME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 441 then
doReborn(cid,1,357,442)
talk_state = 0
 
--_ZAIKO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 453 then
doReborn(cid,1,368,454)
talk_state = 0
 
--_LORD CHILLED_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 465 then
doReborn(cid,1,375,466)
talk_state = 0
 
elseif msgcontains(msg, 'yes') and talk_state == 2 then
selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce deve estar na ultima transformação.')
 
 
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Adeus!')
focus = 0
talk_start = 0
end
end
end
 
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Próximo por favor...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Adeus!')
focus = 0
end
end
end

Link para o post
Compartilhar em outros sites

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: "OTServScriptingMonsters e NPCs"

Para: "OTServSuporte OTServSuporte de Scripts"


spacer.png

 

 

Link para o post
Compartilhar em outros sites
  • 2 weeks later...

O erro estava ocorrendo pois o npc Reborn estava próximo a outros npcs, então eu o coloquei em um lugar isolado e o erro não aconteceu mais!

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 BonasxD
      Bom galera primeiramente não sei se estou na area correta ou se nao estou, se nao por favor mover para area certa, grato!
      Estou com esse erro ao tenta instalar o gesior usando a tfs 0.4 não passa dessa parte ja tentei de tudo e nao sei oque fazer ;(
       
      Testei o mesmo procedimento no meu Windows e Funcionou corretamente agora no meu VM(Ubuntu22) não passa desse erro. 
       
      Ja pesquisei por tudo e não sei oque fazer

    • Por ambrozii0
      Gostaria de fazer um pedido de um NPC de Task progressiva,

      Ele iniciaria dando missões para level 8 para caçar Troll, Rotworm e Ghoul.
       
      No level 30 liberaria: Cyclops, Dragon e Wyrm... e assim em diante se puder deixar comentado eu faço as criaturas na sequencia dos leveis seguintes.
       
      O jogador pode fazer as tasks dos leveis anteriores mesmo que já tenha ultrapassado o level do próximo nível de task.
       
      E o jogador ao terminar a missão poderia escolher a recompensa em gold ou experiência. As tasks podem se repetir sem problema, mas apenas pode pegar uma de cada vez.
       
      Ao finalizar todas as tasks o jogador ganha uma montaria.
       
      Minha versão de cliente é 12.91
      Versão da Canary 2.6.1
      Não sei qual o TFS do meu servidor.
    • Por Kill of sumoners
      Boa noite, estou com um erro ao atacar um player em meu sv eu nao pego pk, nem sai magia, aparece a mensagem "voce so pode usar isso em criaturas"
      obs: magia em area acerta e pega pk, apenas as targets ou hits de arma nao vao 
    • Por Aizuuu
      Sprites Do Galand Dos 10 Mandamentos ( Nanatsu No Taizai )

      Mais Sprites No: https://discord.gg/tcSPHKWxsf

      Download:

       


      Prints:

       
       
       
       
    • Por Aizuuu
      Sprites Do Shanks O Ruivo De One Piece

      Mais Sprites No: https://discord.gg/tcSPHKWxsf

      Download:

       


      Prints:

       
       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo