Ir para conteúdo
  • Cadastre-se

(Resolvido)[REBORN] Npc cobrando item


Ir para solução Resolvido por Vodkart,

Posts Recomendados

Galera o Reborn geralmente consiste em você ter um certo level para poder voltar para o lvl 1 com uma nova vocação...

 

Gostaria de além de precisar de lvl que ele cobrasse uma certa quantidade de item, exemplo:

 

Você fala com o npc ele falar que você precisa de lvl X e de X items para rebornar...

 

 

Meu npc:

 

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


---------------------------------------------------------




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,30024) == 4 then
selfSay('Desculpe, mas voce já é rebornado.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30024) ~= 4) or (getPlayerLevel(cid) > 2000 and getPlayerStorageValue(cid,30024) ~= 4) then
selfSay('Apenas level 200 até 2000 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) <= 2000 and getPlayerVocation(cid) == 15 then
doReborn(cid,1,10, 501)
talk_state = 0

--_VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 30 then
doReborn(cid,1,25,510)
talk_state = 0

--_PICCOLO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 43 then
doReborn(cid,1,38,519)
talk_state = 0

--_C17_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 56 then
doReborn(cid,1,50,528)
talk_state = 0

--_GOHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 70 then
doReborn(cid,1,561,537)
talk_state = 0

--_TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 82 then
doReborn(cid,1,74,546)
talk_state = 0

--_CELL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 94 then
doReborn(cid,1,81,555)
talk_state = 0

--_FREEZA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 110 then
doReborn(cid,1,88,564)
talk_state = 0

--_MAJIN BOO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 126 then
doReborn(cid,1,98,573)
talk_state = 0

--_BROLY_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 138 then
doReborn(cid,1,113,582)
talk_state = 0

--_C18_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 151 then
doReborn(cid,1,50,591)
talk_state = 0

--_UUB_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 163 then
doReborn(cid,1,128,600)
talk_state = 0

--_GOTEN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 177 then
doReborn(cid,1,142,609)
talk_state = 0

--_CHIBI TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 191 then
doReborn(cid,1,151,611)
talk_state = 0

--_COOLER_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 205 then
doReborn(cid,1,153,620)
talk_state = 0

--_DENDE_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 217 then
doReborn(cid,1,169,630)
talk_state = 0

--_TSUFUL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 229 then
doReborn(cid,1,180,639)
talk_state = 0

--_BARDOCK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 242 then
doReborn(cid,1,194,648)
talk_state = 0

--_KURIRIN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 255 then
doReborn(cid,1,205,657)
talk_state = 0

--_PAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 267 then
doReborn(cid,1,212,666)
talk_state = 0

--_KAIO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 279 then
doReborn(cid,1,221,675)
talk_state = 0

--_VIDEL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 291 then
doReborn(cid,1,227,684)
talk_state = 0

--_JANEMBA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 303 then
doReborn(cid,1,234,693)
talk_state = 0

--_TENSHINHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 315 then
doReborn(cid,1,246,702)
talk_state = 0

--_JENK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 327 then
doReborn(cid,1,257,711)
talk_state = 0

--_RADITZ_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 339 then
doReborn(cid,1,265,720)
talk_state = 0

--_C16_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 351 then
doReborn(cid,1,277,729)
talk_state = 0

--_TURLES_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 363 then
doReborn(cid,1,285,738)
talk_state = 0

--_BULMA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 375 then
doReborn(cid,1,296,747)
talk_state = 0

--_SHENRON_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 387 then
doReborn(cid,1,302,756)
talk_state = 0

--_VEGETTO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 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) <= 50000 and getPlayerVocation(cid) == 411 then
doReborn(cid,1,321,765)
talk_state = 0

--_KAME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 424 then
doReborn(cid,1,335,774)
talk_state = 0

--_KING VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 436 then
doReborn(cid,1,347,792)
talk_state = 0

--_KAGOME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 448 then
doReborn(cid,1,357,783)
talk_state = 0

--_ZAIKO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 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) <= 50000 and getPlayerVocation(cid) == 472 then
doReborn(cid,1,375,801)
talk_state = 0

--_C8_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 489 then
doReborn(cid,1,517,810)
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

 

 

Verssão 8.60 TFS 0.4

 

Agradeçe.

Editado por Duality (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Não mexo muito com NPC, mas tenta assim: 

 


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


---------------------------------------------------------


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,30024) == 4 then
selfSay('Desculpe, mas voce já é rebornado.')
focus = 0
talk_start = 0
elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30024) ~= 4) or (getPlayerLevel(cid) > 2000 and getPlayerStorageValue(cid,30024) ~= 4) and getPlayerItemCount(cid,2145) >= 50 then
selfSay('Voce precisa de level 200 ou 50 items para 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) <= 2000 and getPlayerVocation(cid) == 15 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,10, 501)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 30 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,25,510)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_PICCOLO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 43 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,38,519)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_C17_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 56 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,50,528)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_GOHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 70 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,561,537)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 82 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,74,546)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_CELL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 94 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,81,555)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_FREEZA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 110 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,88,564)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_MAJIN BOO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 126 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,98,573)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_BROLY_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 138 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,113,582)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_C18_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 151 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,50,591)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_UUB_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 163 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,128,600)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_GOTEN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 177 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,142,609)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_CHIBI TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 191 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,151,611)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_COOLER_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 205 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,153,620)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_DENDE_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 217 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,169,630)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_TSUFUL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 229 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,180,639)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_BARDOCK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 242 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,194,648)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_KURIRIN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 255 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,205,657)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_PAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 267 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,212,666)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_KAIO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 279 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,221,675)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_VIDEL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 291 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,227,684)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_JANEMBA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 303 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,234,693)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_TENSHINHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 315 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,246,702)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_JENK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 327 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,257,711)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_RADITZ_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 339 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,265,720)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_C16_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 351 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,277,729)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_TURLES_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 363 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,285,738)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_BULMA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 375 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,296,747)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_SHENRON_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 387 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,302,756)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_VEGETTO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 392 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,308,393)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_TAPION_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 411 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,321,765)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_KAME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 424 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,335,774)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_KING VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 436 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,347,792)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_KAGOME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 448 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,357,783)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_ZAIKO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 453 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,368,454)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_LORD CHILLED_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 472 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,375,801)
doPlayerRemoveItem(cid,2145,50)
talk_state = 0

--_C8_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 489 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,517,810)
doPlayerRemoveItem(cid,2145,50)
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

 

Em todo lugar que tiver doPlayerRemoveItem(cid,2145,50) e getPlayerItemCount(cid,2145) >= 50 você configura o item e quantidade ^^ 

Link para o post
Compartilhar em outros sites
17 horas atrás, Duality disse:

@Noob II Boa tarde, desculpe a demora, eu testei o script.. ele só consegue dar o reborn se tiver o Item 2145, porém não remove o item '-'

 

Tenta assim:

 


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


---------------------------------------------------------


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,30024) == 4 then
selfSay('Desculpe, mas voce já é rebornado.')
focus = 0
talk_start = 0   
elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30024) ~= 4) or (getPlayerLevel(cid) > 2000 and getPlayerStorageValue(cid,30024) ~= 4) then
if getPlayerItemCount(cid, 2145) >= 50 then
doPlayerRemoveItem(cid, 2145, 50)
 selfSay('Voce precisa de level 200 ou 50 items para 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) <= 2000 and getPlayerVocation(cid) == 15 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,10, 501)
talk_state = 0

--_VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 30 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,25,510)
talk_state = 0

--_PICCOLO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 43 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,38,519)
talk_state = 0

--_C17_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 56 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,50,528)
talk_state = 0

--_GOHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 70 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,561,537)
talk_state = 0

--_TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 82 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,74,546)
talk_state = 0

--_CELL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 94 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,81,555)
talk_state = 0

--_FREEZA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 110 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,88,564)
talk_state = 0

--_MAJIN BOO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 126 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,98,573)
talk_state = 0

--_BROLY_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 138 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,113,582)
talk_state = 0

--_C18_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 151 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,50,591)
talk_state = 0

--_UUB_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 163 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,128,600)
talk_state = 0

--_GOTEN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 177 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,142,609)
talk_state = 0

--_CHIBI TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 191 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,151,611)
talk_state = 0

--_COOLER_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 205 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,153,620)
talk_state = 0

--_DENDE_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 217 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,169,630)
talk_state = 0

--_TSUFUL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 229 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,180,639)
talk_state = 0

--_BARDOCK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 242 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,194,648)
talk_state = 0

--_KURIRIN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 255 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,205,657)
talk_state = 0

--_PAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 267 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,212,666)
talk_state = 0

--_KAIO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 279 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,221,675)
talk_state = 0

--_VIDEL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 291 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,227,684)
talk_state = 0

--_JANEMBA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 303 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,234,693)
talk_state = 0

--_TENSHINHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 315 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,246,702)
talk_state = 0

--_JENK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 327 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,257,711)
talk_state = 0

--_RADITZ_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 339 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,265,720)
talk_state = 0

--_C16_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 351 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,277,729)
talk_state = 0

--_TURLES_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 363 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,285,738)
talk_state = 0

--_BULMA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 375 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,296,747)
talk_state = 0

--_SHENRON_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 387 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,302,756)
talk_state = 0

--_VEGETTO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 392 and getPlayerItemCount(cid,2145) >= 50 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) <= 50000 and getPlayerVocation(cid) == 411 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,321,765)
talk_state = 0

--_KAME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 424 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,335,774)
talk_state = 0

--_KING VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 436 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,347,792)
talk_state = 0

--_KAGOME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 448 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,357,783)
talk_state = 0

--_ZAIKO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 453 and getPlayerItemCount(cid,2145) >= 50 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) <= 50000 and getPlayerVocation(cid) == 472 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,375,801)
talk_state = 0

--_C8_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 489 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,517,810)
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 
end

Link para o post
Compartilhar em outros sites
2 horas atrás, Duality disse:

 @Noob II cara agora eu falo HI ai o npc fala a primeira fala dele, em seguida eu falo REBORN e simplesmente ele não fala nada.., falo bye e ele não responde tbm

 

Tenta assim (se tivesse um servidor para me testar seria mais fácil kk)

 


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


---------------------------------------------------------

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,30024) == 4 then
selfSay('Desculpe, mas voce já é rebornado.')
focus = 0
talk_start = 0   
elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30024) ~= 4) or (getPlayerLevel(cid) > 2000 and getPlayerStorageValue(cid,30024) ~= 4) and getPlayerItemCount(cid,2145) >= 50 then
selfSay('Voce precisa de level 200 ou 50 items para rebornar.')
doPlayerRemoveItem(cid, 2145, 50)
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) <= 2000 and getPlayerVocation(cid) == 15 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,10, 501)
talk_state = 0

--_VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 30 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,25,510)
talk_state = 0

--_PICCOLO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 43 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,38,519)
talk_state = 0

--_C17_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 56 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,50,528)
talk_state = 0

--_GOHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 70 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,561,537)
talk_state = 0

--_TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 82 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,74,546)
talk_state = 0

--_CELL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 94 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,81,555)
talk_state = 0

--_FREEZA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 110 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,88,564)
talk_state = 0

--_MAJIN BOO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 126 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,98,573)
talk_state = 0

--_BROLY_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 138 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,113,582)
talk_state = 0

--_C18_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 151 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,50,591)
talk_state = 0

--_UUB_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 163 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,128,600)
talk_state = 0

--_GOTEN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 177 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,142,609)
talk_state = 0

--_CHIBI TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 191 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,151,611)
talk_state = 0

--_COOLER_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 205 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,153,620)
talk_state = 0

--_DENDE_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 217 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,169,630)
talk_state = 0

--_TSUFUL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 229 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,180,639)
talk_state = 0

--_BARDOCK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 242 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,194,648)
talk_state = 0

--_KURIRIN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 255 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,205,657)
talk_state = 0

--_PAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 267 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,212,666)
talk_state = 0

--_KAIO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 279 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,221,675)
talk_state = 0

--_VIDEL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 291 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,227,684)
talk_state = 0

--_JANEMBA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 303 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,234,693)
talk_state = 0

--_TENSHINHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 315 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,246,702)
talk_state = 0

--_JENK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 327 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,257,711)
talk_state = 0

--_RADITZ_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 339 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,265,720)
talk_state = 0

--_C16_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 351 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,277,729)
talk_state = 0

--_TURLES_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 363 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,285,738)
talk_state = 0

--_BULMA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 375 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,296,747)
talk_state = 0

--_SHENRON_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 387 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,302,756)
talk_state = 0

--_VEGETTO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 392 and getPlayerItemCount(cid,2145) >= 50 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) <= 50000 and getPlayerVocation(cid) == 411 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,321,765)
talk_state = 0

--_KAME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 424 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,335,774)
talk_state = 0

--_KING VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 436 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,347,792)
talk_state = 0

--_KAGOME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 448 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,357,783)
talk_state = 0

--_ZAIKO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 453 and getPlayerItemCount(cid,2145) >= 50 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) <= 50000 and getPlayerVocation(cid) == 472 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,375,801)
talk_state = 0

--_C8_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 489 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,517,810)
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 
end

Link para o post
Compartilhar em outros sites

 @Noob II Entendo que seria mais facil kk, eu isso:

 

Citar

[15:38:36.348] [Error - LuaInterface::loadFile] data/npc/scripts/reborn 2.lua:268: '<eof>' expected near 'end'
[15:38:36.348] [Warning - NpcEvents::NpcEvents] Cannot load script: data/npc/scripts/reborn 2.lua
[15:38:36.348] data/npc/scripts/reborn 2.lua:268: '<eof>' expected near 'end'

 

Link para o post
Compartilhar em outros sites
2 horas atrás, Duality disse:

 @Noob II Entendo que seria mais facil kk, eu isso:

 

 

 

Remove um "end" das últimas linhas. Tem quatro, deixe somente três ^^

Editado por Noob II (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Amigo recomendo pegar a reborn.lua da base do kojack não tem bugs pelo que eu vejo

 

 

Link para o post
Compartilhar em outros sites
23 horas atrás, Duality disse:

 @Noob II Entendo que seria mais facil kk, eu isso:

 

 

 


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


---------------------------------------------------------

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,30024) == 4 then
selfSay('Desculpe, mas voce já é rebornado.')
focus = 0
talk_start = 0   
elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30024) ~= 4) or (getPlayerLevel(cid) > 2000 and getPlayerStorageValue(cid,30024) ~= 4) and getPlayerItemCount(cid,2145) >= 50 then
selfSay('Voce precisa de level 200 para rebornar.')
focus = 0
talk_start = 0  
elseif doPlayerRemoveItem(cid, 2145, 50) == FALSE then
doPlayerSendCancel(cid, 'You need to 100 Crystal Coins to ascend.')
doSendMagicEffect(pos, CONST_ME_POFF)
return FALSE
end 
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) <= 2000 and getPlayerVocation(cid) == 15 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,10, 501)
talk_state = 0

--_VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 30 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,25,510)
talk_state = 0

--_PICCOLO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 43 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,38,519)
talk_state = 0

--_C17_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 56 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,50,528)
talk_state = 0

--_GOHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 70 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,561,537)
talk_state = 0

--_TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 82 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,74,546)
talk_state = 0

--_CELL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 94 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,81,555)
talk_state = 0

--_FREEZA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 110 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,88,564)
talk_state = 0

--_MAJIN BOO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 126 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,98,573)
talk_state = 0

--_BROLY_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 138 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,113,582)
talk_state = 0

--_C18_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 151 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,50,591)
talk_state = 0

--_UUB_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 163 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,128,600)
talk_state = 0

--_GOTEN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 177 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,142,609)
talk_state = 0

--_CHIBI TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 191 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,151,611)
talk_state = 0

--_COOLER_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 205 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,153,620)
talk_state = 0

--_DENDE_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 217 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,169,630)
talk_state = 0

--_TSUFUL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 229 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,180,639)
talk_state = 0

--_BARDOCK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 242 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,194,648)
talk_state = 0

--_KURIRIN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 255 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,205,657)
talk_state = 0

--_PAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 267 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,212,666)
talk_state = 0

--_KAIO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 279 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,221,675)
talk_state = 0

--_VIDEL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 291 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,227,684)
talk_state = 0

--_JANEMBA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 303 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,234,693)
talk_state = 0

--_TENSHINHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 315 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,246,702)
talk_state = 0

--_JENK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 327 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,257,711)
talk_state = 0

--_RADITZ_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 339 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,265,720)
talk_state = 0

--_C16_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 351 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,277,729)
talk_state = 0

--_TURLES_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 363 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,285,738)
talk_state = 0

--_BULMA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 375 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,296,747)
talk_state = 0

--_SHENRON_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 387 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,302,756)
talk_state = 0

--_VEGETTO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 392 and getPlayerItemCount(cid,2145) >= 50 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) <= 50000 and getPlayerVocation(cid) == 411 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,321,765)
talk_state = 0

--_KAME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 424 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,335,774)
talk_state = 0

--_KING VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 436 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,347,792)
talk_state = 0

--_KAGOME_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 448 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,357,783)
talk_state = 0

--_ZAIKO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 453 and getPlayerItemCount(cid,2145) >= 50 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) <= 50000 and getPlayerVocation(cid) == 472 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,375,801)
talk_state = 0

--_C8_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 50000 and getPlayerVocation(cid) == 489 and getPlayerItemCount(cid,2145) >= 50 then
doReborn(cid,1,517,810)
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

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

@Noob II erro:

 

 

Citar

[16:0:08.213] [Error - NpcScript Interface]
[16:0:08.214] data/npc/scripts/reborn 2.lua:onCreatureSay
[16:0:08.214] Description:
[16:0:08.214] attempt to index a nil value
[16:0:08.215] stack traceback:
[16:0:08.215]   [C]: in function 'doSendMagicEffect'
[16:0:08.215]   data/npc/scripts/reborn 2.lua:48: in function <data/npc/scripts/reborn 2.lua:28>

 

Link para o post
Compartilhar em outros sites

@Duality, a regra para "UP" mudou, leia as regras:

http://www.tibiaking.com/forum/forums/topic/1281-regras-gerais/

 

Citar

2.7 - Dar "UP" para subir tópicos:
É totalmente proibido comentar "UP" para subir tópicos, caso você tenha a intenção você pode utilizar nosso recurso de subir tópicos e ele automaticamente irá te colocar um tempo de espera de 24 horas para realizar a função novamente. Caso o membro realize tal ato isso pode ser interpretado como flood.

 

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