Postado Julho 23, 2018 6 anos 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!
Postado Julho 23, 2018 6 anos 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 Julho 23, 2018 6 anos por tataboy67 (veja o histórico de edições) Meus trabalhos: [Movements] TFS 1.1+ Area Hardcore [Movements] TFS 1.1+ Tile Party [Action] TFS 1.1+ Bau diário [Action] TFS 1.1+ Guild Dungeon Lever [Talkactions] TFS 0.3.6 / 0.4 Quest Hunt por Tempo Contato: Discord: Tataboy67#4934
Postado Julho 23, 2018 6 anos Autor 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 <<<<<<
Postado Julho 23, 2018 6 anos 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. Meus trabalhos: [Movements] TFS 1.1+ Area Hardcore [Movements] TFS 1.1+ Tile Party [Action] TFS 1.1+ Bau diário [Action] TFS 1.1+ Guild Dungeon Lever [Talkactions] TFS 0.3.6 / 0.4 Quest Hunt por Tempo Contato: Discord: Tataboy67#4934
Postado Julho 23, 2018 6 anos Autor 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.
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.