Ir para conteúdo
  • Cadastre-se

(Resolvido)advance


Ir para solução Resolvido por Navegante,

Posts Recomendados

base: 1.2

Bom dia pessoal! Eu estou com um script que permiti sair um efeito e um texto dizendo "level up!" em cima do player quando ele sobe de nível, em questão o script é perfeito! O meu problema é que eu gostaria que o texto saísse na cor amarelo e também se possível eu gostaria de colocar o mesmo com as skills e o magic level, saindo o efeito e o texto com a cor escolhida dizendo "sword up!", "magic up!" etc... 


alguém poderia fazer essa modificação no script pra mim?

local config = {
	heal = true,
	save = true,
	effect = true
}

function onAdvance(player, skill, oldLevel, newLevel)
	if skill ~= SKILL_LEVEL or newLevel <= oldLevel then
		return true
	end

	if config.effect then
		player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
		player:say('LEVEL UP!', TALKTYPE_MONSTER_SAY)
	end

	if config.heal then
		player:addHealth(player:getMaxHealth())
	end

	if config.save then
		player:save()
	end
	return true
end

Desde já agradeço! :)

Link para o post
Compartilhar em outros sites

Opa rapaz beleza? Acabei de montar aqui pra você mas eu não sei qual o nome do parâmetro de mensagem amarela :(  Então resolvi fazer só com as skills ok?

local config = {

    msg_levelup_level = true,
    msg_levelup_magic = true,
    msg_levelup_first = true,
    msg_levelup_club = true,
    msg_levelup_sword = true,
    msg_levelup_axe = true,

    heal = true,
    save = true,
    effect = true

}

function onAdvance(player, skill, oldLevel, newLevel)

    if skill ~= SKILL_LEVEL and newLevel <= oldLevel and config.msg_levelup_level then
        if config.effect then
            player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
            player:say('LEVEL UP!', TALKTYPE_MONSTER_SAY)
        end
    
        if config.heal then
            player:addHealth(player:getMaxHealth())
        end
    
        if config.save then
            player:save()
        end
    elseif skill ~= SKILL_MAGLEVEL and newLevel <= oldLevel and config.msg_levelup_magic then
        if config.effect then
            player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
            player:say('+1 Magic!', TALKTYPE_MONSTER_SAY)
        end
    
        if config.heal then
            player:addHealth(player:getMaxHealth())
        end
    
        if config.save then
            player:save()
        end
    elseif skill ~= SKILL_FIST and newLevel <= oldLevel and config.msg_levelup_first then
        if config.effect then
            player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
            player:say('+1 Fist!', TALKTYPE_MONSTER_SAY)
        end
    
        if config.heal then
            player:addHealth(player:getMaxHealth())
        end
    
        if config.save then
            player:save()
        end
    elseif skill ~= SKILL_CLUB and newLevel <= oldLevel and config.msg_levelup_club then
        if config.effect then
            player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
            player:say('+1 Club!', TALKTYPE_MONSTER_SAY)
        end
    
        if config.heal then
            player:addHealth(player:getMaxHealth())
        end
    
        if config.save then
            player:save()
        end
    elseif skill ~= SKILL_SWORD and newLevel <= oldLevel and config.msg_levelup_sword then
        if config.effect then
            player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
            player:say('+1 Sword!', TALKTYPE_MONSTER_SAY)
        end
    
        if config.heal then
            player:addHealth(player:getMaxHealth())
        end
    
        if config.save then
            player:save()
        end
    elseif skill ~= SKILL_AXE and newLevel <= oldLevel and config.msg_levelup_axe then
        if config.effect then
            player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
            player:say('+1 Axe!', TALKTYPE_MONSTER_SAY)
        end
    
        if config.heal then
            player:addHealth(player:getMaxHealth())
        end
    
        if config.save then
            player:save()
        end
    end
    return true
end


Bom a configuração ali eu adicionei 6, são as 5 skills e mais o levelup normal.
Acho que deu pra entender kk

OBs: Não testei, por favor faça o teste !

Editado por tataboy67 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
18 minutos atrás, tataboy67 disse:

Opa rapaz beleza? Acabei de montar aqui pra você mas eu não sei qual o nome do parâmetro de mensagem amarela :(  Então resolvi fazer só com as skills ok?


local config = {

	msg_levelup_level = true,
	msg_levelup_magic = true,
	msg_levelup_first = true,
	msg_levelup_club = true,
	msg_levelup_sword = true,
	msg_levelup_axe = true,

	heal = true,
	save = true,
	effect = true

}

function onAdvance(player, skill, oldLevel, newLevel)

	if skill ~= SKILL_LEVEL or newLevel <= oldLevel and config.msg_levelup_level then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('LEVEL UP!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.heal then
			player:addHealth(player:getMaxHealth())
		end
	
		if config.save then
			player:save()
		end
	elseif skill ~= SKILL_MAGLEVEL or newLevel <= oldLevel and config.msg_levelup_magic then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Magic!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.heal then
			player:addHealth(player:getMaxHealth())
		end
	
		if config.save then
			player:save()
		end
	elseif skill ~= SKILL_FIST or newLevel <= oldLevel and config.msg_levelup_first then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Fist!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.heal then
			player:addHealth(player:getMaxHealth())
		end
	
		if config.save then
			player:save()
		end
	elseif skill ~= SKILL_CLUB or newLevel <= oldLevel and config.msg_levelup_club then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Club!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.heal then
			player:addHealth(player:getMaxHealth())
		end
	
		if config.save then
			player:save()
		end
	elseif skill ~= SKILL_SWORD or newLevel <= oldLevel and config.msg_levelup_sword then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Sword!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.heal then
			player:addHealth(player:getMaxHealth())
		end
	
		if config.save then
			player:save()
		end
	elseif skill ~= SKILL_AXE or newLevel <= oldLevel and config.msg_levelup_axe then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Axe!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.heal then
			player:addHealth(player:getMaxHealth())
		end
	
		if config.save then
			player:save()
		end
	end
	return true
end


Bom a configuração ali eu adicionei 6, são as 5 skills e mais o levelup normal.
Acho que deu pra entender kk

OBs: Não testei, por favor faça o teste !

fala aê mano tudo tranquilo? Eu fiz o teste e aproveitei para completar as outras skills seguindo o formato que você fez.


 

Spoiler

local config = {

	msg_levelup_level  = true,
	msg_levelup_magic  = true,
	msg_levelup_first  = true,
	msg_levelup_club   = true,
	msg_levelup_sword  = true,
	msg_levelup_axe    = true,
	msg_levelup_dist   = true,
	msg_levelup_shield = true,
	msg_levelup_fish   = true,

	heal =   true,
	save =   true,
	effect = true

}

function onAdvance(player, skill, oldLevel, newLevel)

	if skill ~= SKILL_LEVEL or newLevel <= oldLevel and config.msg_levelup_level then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('LEVEL UP!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.heal then
			player:addHealth(player:getMaxHealth())
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_MAGLEVEL or newLevel <= oldLevel and config.msg_levelup_magic then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Magic!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_FIST or newLevel <= oldLevel and config.msg_levelup_first then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Fist!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_CLUB or newLevel <= oldLevel and config.msg_levelup_club then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Club!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_SWORD or newLevel <= oldLevel and config.msg_levelup_sword then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Sword!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_AXE or newLevel <= oldLevel and config.msg_levelup_axe then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Axe!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end
	
	if skill ~= SKILL_DISTANCE or newLevel <= oldLevel and config.msg_levelup_dist then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Dist!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end
	
	if skill ~= SKILL_SHIELDING or newLevel <= oldLevel and config.msg_levelup_shield then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Shield!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end
	
	if skill ~= SKILL_FISHING or newLevel <= oldLevel and config.msg_levelup_fish then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Fish!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end
	
	
	return true
end

 



O único problema é que qualquer skills que eu upar aparece a mensagem de todas 

exemplo:

upei mais 1 de magic level  ai vai fazer o efeito e na hora de aparecer o texto vai aparecer todos os texto "+1 sword", "+1 axe", "+1 magic", etc...

um outro probleminha é essa parte>>>  player:say('xxxxxxxx', TALKTYPE_MONSTER_SAY) <<<<<< graças a essa função o texto fica saindo igual aquela cor laranja quando você usa um spells.
Eu queria colocar pro texto sair com essa cor aqui >>>> TEXTCOLOR_LIGHTBLUE <<<<<< e somente o do "level up" sair essa cor >>>>> TEXTCOLOR_YELLOW <<<<<<

Link para o post
Compartilhar em outros sites
7 minutos atrás, Navegante disse:

fala aê mano tudo tranquilo? Eu fiz o teste e aproveitei para completar as outras skills seguindo o formato que você fez.


 

  Mostrar conteúdo oculto


local config = {

	msg_levelup_level  = true,
	msg_levelup_magic  = true,
	msg_levelup_first  = true,
	msg_levelup_club   = true,
	msg_levelup_sword  = true,
	msg_levelup_axe    = true,
	msg_levelup_dist   = true,
	msg_levelup_shield = true,
	msg_levelup_fish   = true,

	heal =   true,
	save =   true,
	effect = true

}

function onAdvance(player, skill, oldLevel, newLevel)

	if skill ~= SKILL_LEVEL or newLevel <= oldLevel and config.msg_levelup_level then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('LEVEL UP!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.heal then
			player:addHealth(player:getMaxHealth())
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_MAGLEVEL or newLevel <= oldLevel and config.msg_levelup_magic then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Magic!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_FIST or newLevel <= oldLevel and config.msg_levelup_first then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Fist!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_CLUB or newLevel <= oldLevel and config.msg_levelup_club then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Club!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_SWORD or newLevel <= oldLevel and config.msg_levelup_sword then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Sword!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end

	if skill ~= SKILL_AXE or newLevel <= oldLevel and config.msg_levelup_axe then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Axe!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end
	
	if skill ~= SKILL_DISTANCE or newLevel <= oldLevel and config.msg_levelup_dist then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Dist!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end
	
	if skill ~= SKILL_SHIELDING or newLevel <= oldLevel and config.msg_levelup_shield then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Shield!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end
	
	if skill ~= SKILL_FISHING or newLevel <= oldLevel and config.msg_levelup_fish then
		if config.effect then
			player:getPosition():sendMagicEffect(math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
			player:say('+1 Fish!', TALKTYPE_MONSTER_SAY)
		end
	
		if config.save then
			player:save()
		end
	end
	
	
	return true
end

 



O único problema é que qualquer skills que eu upar aparece a mensagem de todas 

exemplo:

upei mais 1 de magic level  ai vai fazer o efeito e na hora de aparecer o texto vai aparecer todos os texto "+1 sword", "+1 axe", "+1 magic", etc...

um outro probleminha é essa parte>>>  player:say('xxxxxxxx', TALKTYPE_MONSTER_SAY) <<<<<< graças a essa função o texto fica saindo igual aquela cor laranja quando você usa um spells.
 Eu queria colocar pro texto sair com essa cor aqui >>>> TEXTCOLOR_LIGHTBLUE <<<<<< e somente o do "level up" sair essa cor >>>>> TEXTCOLOR_YELLOW <<<<<<

Essa parte do player:say não é problema, só não sei qual é o parâmetro de texto que deixa na coloração amarela !
Atualizado o script la em cima, testa.

Link para o post
Compartilhar em outros sites
10 minutos atrás, tataboy67 disse:

Essa parte do player:say não é problema, só não sei qual é o parâmetro de texto que deixa na coloração amarela !
Atualizado o script la em cima, testa.

funcionou! So ficou faltando mesmo esse lance dos texto, mas isso eu resolvo mais pra frente.

muito obrigado pela atenção! Irei da o rep+  e marcar como melhor resposta.

Link para o post
Compartilhar em outros sites

@Navegante 

local skills = {
    
    [0] = {"FIST UP", TEXTCOLOR_LIGHTBLUE, 21},
    [1] = {"CLUB UP", TEXTCOLOR_LIGHTBLUE, 21}, -- [SKILL_ID] = {"ANIMATED TEXT", TYPE do animated, effect no player}
    [2] = {"SWORD UP", TEXTCOLOR_LIGHTBLUE, 21},
    [3] = {"AXE UP", TEXTCOLOR_LIGHTBLUE, 21},
    [4] = {"DISTANCE UP", TEXTCOLOR_LIGHTBLUE, 21},
    [5] = {"SHIELD UP", TEXTCOLOR_LIGHTBLUE, 21},
    [6] = {"FISHING UP", TEXTCOLOR_LIGHTBLUE, 21},
    [7] = {"ML UP", TEXTCOLOR_LIGHTBLUE, 21},
    [8] = {"LEVEL UP", TEXTCOLOR_LIGHTBLUE, 21},
    
}

local config = {
    heal = true,
    save = true,
    effect = true
}

function onAdvance(player, skill, oldLevel, newLevel)
    
    if newLevel <= oldLevel then
        return true
    end
    
    if config.effect then
        local up = skills[skill]
        if up then 	
            player:getPosition():sendMagicEffect(up[3])
            game:sendAnimatedText(player:getPosition(), up[1], up[2])
        end
    end
    
    if config.heal then
        player:addHealth(player:getMaxHealth())
    end
    
    if config.save then
        player:save()
    end
    return true
end

 

Link para o post
Compartilhar em outros sites
14 minutos atrás, Sttorm disse:

@Navegante 


local skills = {
    
    [0] = {"FIST UP", TEXTCOLOR_LIGHTBLUE, 21},
    [1] = {"CLUB UP", TEXTCOLOR_LIGHTBLUE, 21}, -- [SKILL_ID] = {"ANIMATED TEXT", TYPE do animated, effect no player}
    [2] = {"SWORD UP", TEXTCOLOR_LIGHTBLUE, 21},
    [3] = {"AXE UP", TEXTCOLOR_LIGHTBLUE, 21},
    [4] = {"DISTANCE UP", TEXTCOLOR_LIGHTBLUE, 21},
    [5] = {"SHIELD UP", TEXTCOLOR_LIGHTBLUE, 21},
    [6] = {"FISHING UP", TEXTCOLOR_LIGHTBLUE, 21},
    [7] = {"ML UP", TEXTCOLOR_LIGHTBLUE, 21},
    [8] = {"LEVEL UP", TEXTCOLOR_LIGHTBLUE, 21},
    
}

local config = {
    heal = true,
    save = true,
    effect = true
}

function onAdvance(player, skill, oldLevel, newLevel)
    
    if newLevel <= oldLevel then
        return true
    end
    
    if config.effect then
        local up = skills[skill]
        if up then 	
            player:getPosition():sendMagicEffect(up[3])
            game:sendAnimatedText(player:getPosition(), up[1], up[2])
        end
    end
    
    if config.heal then
        player:addHealth(player:getMaxHealth())
    end
    
    if config.save then
        player:save()
    end
    return true
end

 

Olá Sttorm! Eu testei o script e deu o seguinte erro

alias se possível teria como você fazer um pequeno ajuste? É que eu gostaria que a função >>>> player:addHealth(player:getMaxHealth()) <<<<< funcionasse somente quando o player subisse de  level. 

erro na distro.PNG

Link para o post
Compartilhar em outros sites

@Navegante 

local skills = {
    
    [0] = {"FIST UP", TEXTCOLOR_LIGHTBLUE, 21},
    [1] = {"CLUB UP", TEXTCOLOR_LIGHTBLUE, 21}, -- [SKILL_ID] = {"ANIMATED TEXT", TYPE do animated, effect no player}
    [2] = {"SWORD UP", TEXTCOLOR_LIGHTBLUE, 21},
    [3] = {"AXE UP", TEXTCOLOR_LIGHTBLUE, 21},
    [4] = {"DISTANCE UP", TEXTCOLOR_LIGHTBLUE, 21},
    [5] = {"SHIELD UP", TEXTCOLOR_LIGHTBLUE, 21},
    [6] = {"FISHING UP", TEXTCOLOR_LIGHTBLUE, 21},
    [7] = {"ML UP", TEXTCOLOR_LIGHTBLUE, 21},
    [8] = {"LEVEL UP", TEXTCOLOR_LIGHTBLUE, 21},
    
}

local config = {
    heal = true,
    save = true,
    effect = true
}

function onAdvance(player, skill, oldLevel, newLevel)
    
    if newLevel <= oldLevel then
        return true
    end
    
    if config.effect then
        local up = skills[skill]
        if up then 	
            player:getPosition():sendMagicEffect(up[3])
            doSendAnimatedText(player:getPosition(), up[1], up[2])
        end
    end
    
    if config.heal and skill == 8 then
        player:addHealth(player:getMaxHealth())
    end
    
    if config.save then
        player:save()
    end
    return true
end

 

Link para o post
Compartilhar em outros sites
  • Solução

Script atualizado:

local skills = {

    [0] = {"Fist up!", 29},
    [1] = {"Club up!", 29}, -- [SKILL_ID] = {"ANIMATED TEXT", effect no player}
    [2] = {"Sword up!", 29},
    [3] = {"Axe up!", 29},
    [4] = {"Dist up!", 29},
    [5] = {"Shield up!", 29},
    [6] = {"Fish up!", 29},
    [7] = {"Magic up!", 31},
    [8] = {"Level up!", 30},

}

local config = {
    heal = true,
    save = true,
    effect = true
}

function onAdvance(player, skill, oldLevel, newLevel)

    if newLevel <= oldLevel then
        return true
    end

    if config.effect then
        local up = skills[skill]
        if up then
            player:say(up[1], TALKTYPE_MONSTER_SAY)
            player:getPosition():sendMagicEffect(up[2])
        end
    end

    if config.heal and skill == 8 then
        player:addHealth(player:getMaxHealth())
    end

    if config.save then
        player:save()
    end
    return true
end

Crédito: Sttorm
Participação: tataboy 67


muito obrigado pela ajuda de ambos!!!

Editado por Navegante (veja o histórico de edições)
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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo