Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Preciso de ajuda com uma Função a doReborn não esta funcionando qeria saber outra qe seria fuincional em 8.54



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('Hello. If you ready I can "Reborn" you.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! Hey!.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then
selfSay('Sorry, but you are after reborn.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30023) ~= 4 then
selfSay('Hehe, I say If you READY. You do not have 250 lvl.')
elseif msgcontains(msg, 'reborn') then
selfSay('Are you sure?')
talk_state = 2
--_GOKU_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 1 then
doReborn(cid,1,152,109)
talk_state = 0
--_VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 7 then
doReborn(cid,1,129,118)
talk_state = 0
--_GOHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 13 then
doReborn(cid,1,147,127)
talk_state = 0
--_TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 19 then
doReborn(cid,1,131,136)
talk_state = 0
--_CELL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 25 then
doReborn(cid,1,127,145)
talk_state = 0
--_FREEZA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 31 then
doReborn(cid,1,9,154)
talk_state = 0
--_UUB_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 37 then
doReborn(cid,1,233,163)
talk_state = 0
--_C17_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 43 then
doReborn(cid,1,100,172)
talk_state = 0
--_C18_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 49 then
doReborn(cid,1,292,181)
talk_state = 0
--_PICOLLO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 55 then
doReborn(cid,1,262,190)
talk_state = 0
--_DENDE_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 61 then
doReborn(cid,1,225,199)
talk_state = 0
--_TSUFUL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 67 then
doReborn(cid,1,81,208)
talk_state = 0
--_BARDOCK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 73 then
doReborn(cid,1,319,217)
talk_state = 0
--_BROLLY_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 79 then
doReborn(cid,1,263,226)
talk_state = 0
--_C16_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 85 then
doReborn(cid,1,301,235)
talk_state = 0
--_COOLER_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 91 then
doReborn(cid,1,242,244)
talk_state = 0
--_JANEMBA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 97 then
doReborn(cid,1,551,253)
talk_state = 0
--_TAPION_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 103 then
doReborn(cid,1,577,262)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert.')


elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye.')
focus = 0
talk_start = 0
end
end
end

function onThink()
doNpcSetCreatureFocus(focus)
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

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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo