Ir para conteúdo

Featured Replies

  • Respostas 14
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • entendi, o reborn ele desloga o char... usa assim o npc:   local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature

  • Funcionou Obrigado, seus topicos já me ajudaram muito.

Postado
Agora, AloppTK disse:

Eu ja tinha 2 chars rebornados antes de implementar o sistema, vou testar upando outro.

só vai contar a partir dos novos reborns...

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
  • Autor
5 minutos atrás, Vodkart disse:

só vai contar a partir dos novos reborns...

Criei 1 novo char, dei reborn e ainda continua sem aparecer, mas dessa vez deu 2 erros na distrito assim que dou reborn

Spoiler

[10:26:25.623] [Error - NpcScript Interface]
[10:26:25.634] data/npc/scripts/reborn.lua:onCreatureSay
[10:26:25.635] Description:
[10:26:25.636] (internalGetPlayerInfo) Player not found when requesting player info #3

 

[10:26:25.639] [Error - NpcScript Interface]
[10:26:25.642] data/npc/scripts/reborn.lua:onCreatureSay
[10:26:25.644] Description:
[10:26:25.645] (luaDoCreatureSetStorage) Creature not found

 

Postado
  • Solução
21 minutos atrás, AloppTK disse:

Criei 1 novo char, dei reborn e ainda continua sem aparecer, mas dessa vez deu 2 erros na distrito assim que dou reborn

  Mostrar conteúdo oculto

 

entendi, o reborn ele desloga o char... usa assim o 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)
	local rstorage = 149501
	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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            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
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,375,466)
			talk_state = 0
			
			--_C8_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 482 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,517,483)
			talk_state = 0
			
			--_Goku Black_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 534 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,592,535)
			talk_state = 0
			
			--_Golden Freeza_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 544 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,88,545)
			talk_state = 0
			
			--_Bills_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 554 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,502,555)
			talk_state = 0
			
			--_Zamasu_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 564 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,607,565)
			talk_state = 0
			
			--_Whiss_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 574 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,617,575)
			talk_state = 0
			
			--_Vados_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 584 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,624,585)
			talk_state = 0
			
			--_Vegetto Black_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 594 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,630,595)
			talk_state = 0
			
			--_Blue Gogeta_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 604 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,640,605)
			talk_state = 0
			
			--_Vegetto Blue_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 614 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,308,615)
			talk_state = 0
			
			--_Zeno_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 624 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,641,625)
			talk_state = 0
			
			--_Goku Black Evo_--
		elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 600 and getPlayerVocation(cid) == 634 then
			setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid))
            doReborn(cid,1,651,635)
			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

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo