Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Alguem poderia me ajudar a colocar MaxReborn(level maximo para rebornar)

local focus = 0
local talk_start = 0
local target = 0
local maxreborn = 300
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

                       elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 20 then
                  doReborn(cid,201,137)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 516 or getPlayerVocation(cid) == 516 or getPlayerVocation(cid) == 516) then
doReborn(cid,214,152)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

	elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) >= 538 and getPlayerVocation(cid) <= 538 then
doReborn(cid,286,60)			
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 58 then
doReborn(cid,247,34)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 71 then
doReborn(cid,258,15)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 75 then
doReborn(cid,263,15)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 274 then
doReborn(cid,275,118)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 76 or getPlayerVocation(cid) == 77) then
doReborn(cid,227,144)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) >= 80 and getPlayerVocation(cid) <= 86 then
selfSay('You cannot reborn in fusion.')

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 582 or getPlayerVocation(cid) == 582) then
doReborn(cid,583,370)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 78 or getPlayerVocation(cid) == 79) then
doReborn(cid,232,150)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 453 or getPlayerVocation(cid) == 453) then
doReborn(cid,454,359)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 604 or getPlayerVocation(cid) == 604) then
doReborn(cid,605,382)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
doPlayermaxreborn(cid,300)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 593 or getPlayerVocation(cid) == 593) then
doReborn(cid,594,59)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 420 or getPlayerVocation(cid) == 420) then
doReborn(cid,421,326)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 431 or getPlayerVocation(cid) == 431) then
doReborn(cid,432,340)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 442 or getPlayerVocation(cid) == 442) then
doReborn(cid,443,348)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 280 then
doReborn(cid,281,190)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 112 then
doReborn(cid,298,221)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 50 then
doReborn(cid,253,101)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state ==2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 407 or getPlayerVocation(cid) <= 407 and getPlayerVocation(cid) >= 407) then
doReborn(cid,408,198)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 29 or getPlayerVocation(cid) == 30) then
doReborn(cid,208,148)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 44 then
doReborn(cid,237,173)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 29 or getPlayerVocation(cid) == 30) then
doReborn(cid,208,148)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 292 then
doReborn(cid,293,281)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 34 or getPlayerVocation(cid) == 35 or getPlayerVocation(cid) == 36) then
doReborn(cid,221,162)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 96 then
doReborn(cid,242,178)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and (getPlayerVocation(cid) == 520 or getPlayerVocation(cid) <= 520 and getPlayerVocation(cid) >= 520) then
doReborn(cid,268,184)
doPlayerAddHealthMax(cid,20000)
doPlayerAddManaMax(cid,20000)
setPlayerStorageValue(cid,30023,4)
talk_state = 0

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


		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

I helped you ? REP +.

 

Att: Abreu

Link para o post
Compartilhar em outros sites
  • 1 month later...

Explique melhor por gentileza, quando estiver em casa posso fazer.

YDmXTU2.png

 

Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui

Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui

 

Muitos querem aquilo que você tem, 
mas vão desistir quando souberem o preço que você pagou.

 

skype-favicon.png lu.lukinha

message-16.png [email protected]

Link para o post
Compartilhar em outros sites

Seguinte, este é um npc que faz REBORN [ RESETA ] O seu char. E para isso o npc pede lvl 250 ele quer que tenha um lvl max. Por Exemplo : No servidor vc pode upa lvl 1300 e dar reborn, mais ele quer um lvl maximo ou seja colocar no script até lvl 600 ai no caso se ele quiser rebornar n pode passar do lvl 600 se n o npc não aceita

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