Postado Setembro 21, 2014 10 anos Solução Atualizei, com level agora: Mostrar conteúdo oculto ----------- Configurações Iniciais --------------- local exhaust_time = 10 -- em segundos local effect = 11 -- ID do Efeito local mana = 20 -- Quantidade de Mana local level = 20 -- Level minimo local dano = {100, 500} local delay = 5 -- em milésimos (meio segundo), tempo de um efeito para outro local premmy = 'true' -- Precisa ser premium SIM (true) ou Não (false) local strg_exh = 32321 -- Storage que salva Exhaust (Não precisa editar) ----------- FIM das Configurações ----------------- local eff1 = { {0, 0, 0}, {1, 2, 0}, {0, 0, 0} } local eff2 = { {0, 0, 0}, {0, 3, 0}, {0, 0, 0} } local eff3 = { {0, 0, 0}, {0, 2, 1}, {0, 0, 0} } local eff4 = { {0, 0, 0}, {0, 2, 0}, {0, 0, 1} } local eff5 = { {0, 0, 0}, {0, 2, 0}, {0, 0, 0}, {0, 0, 1} } local eff6 = { {0, 0, 0}, {0, 2, 0}, {0, 0, 0}, {0, 1, 0} } local eff7 = { {0, 0, 0}, {0, 2, 0}, {0, 0, 0}, {1, 0, 0} } local eff8 = { {0, 0, 0}, {0, 2, 0}, {1, 0, 0}, {0, 0, 0} } local tw1 = createCombatArea(eff1) local tw2 = createCombatArea(eff2) local tw3 = createCombatArea(eff3) local tw4 = createCombatArea(eff4) local tw5 = createCombatArea(eff5) local tw6 = createCombatArea(eff6) local tw7 = createCombatArea(eff7) local tw8 = createCombatArea(eff8) function onSay(cid, words, param, channel) local hitmin = (getPlayerLevel(cid) + dano[1]) local hitmax = (getPlayerLevel(cid) + dano[2]) if premmy == 'true' and isPremium(cid) then if exhaustion.get(cid, strg_exh) == false then if getPlayerLevel(cid) >= level then if getCreatureMana(cid) >= mana then addEvent(doAreaCombatHealth, delay * 100, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw1, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 200, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw2, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 300, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw3, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 400, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw4, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 500, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw5, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 600, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw6, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 700, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw7, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 800, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw8, -hitmin, -hitmax, effect) exhaustion.set(cid, strg_exh, exhaust_time) doCreatureAddMana(cid, -mana) else doPlayerSendCancel(cid, "Você precisa de "..mana.." para usar esta magia.") end else doPlayerSendCancel(cid, "Você precisa ser no mínimo "..level.." para usar esta magia.") end else doPlayerSendCancel(cid, "Precisa esperar "..exhaustion.get(cid, strg_exh).." segundos para usar novamente.") end else doPlayerSendCancel(cid, "Esta magia é somente para players Premium Account.") end return true end Se não depende de Premium Account: Mostrar conteúdo oculto ----------- Configurações Iniciais --------------- local exhaust_time = 10 -- em segundos local effect = 11 -- ID do Efeito local mana = 20 -- Quantidade de Mana local level = 20 -- Level minimo local dano = {100, 500} local delay = 5 -- em milésimos (meio segundo), tempo de um efeito para outro local strg_exh = 32321 -- Storage que salva Exhaust (Não precisa editar) ----------- FIM das Configurações ----------------- local eff1 = { {0, 0, 0}, {1, 2, 0}, {0, 0, 0} } local eff2 = { {0, 0, 0}, {0, 3, 0}, {0, 0, 0} } local eff3 = { {0, 0, 0}, {0, 2, 1}, {0, 0, 0} } local eff4 = { {0, 0, 0}, {0, 2, 0}, {0, 0, 1} } local eff5 = { {0, 0, 0}, {0, 2, 0}, {0, 0, 0}, {0, 0, 1} } local eff6 = { {0, 0, 0}, {0, 2, 0}, {0, 0, 0}, {0, 1, 0} } local eff7 = { {0, 0, 0}, {0, 2, 0}, {0, 0, 0}, {1, 0, 0} } local eff8 = { {0, 0, 0}, {0, 2, 0}, {1, 0, 0}, {0, 0, 0} } local tw1 = createCombatArea(eff1) local tw2 = createCombatArea(eff2) local tw3 = createCombatArea(eff3) local tw4 = createCombatArea(eff4) local tw5 = createCombatArea(eff5) local tw6 = createCombatArea(eff6) local tw7 = createCombatArea(eff7) local tw8 = createCombatArea(eff8) function onSay(cid, words, param, channel) local hitmin = (getPlayerLevel(cid) + dano[1]) local hitmax = (getPlayerLevel(cid) + dano[2]) if exhaustion.get(cid, strg_exh) == false then if getPlayerLevel(cid) >= level then if getCreatureMana(cid) >= mana then addEvent(doAreaCombatHealth, delay * 100, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw1, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 200, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw2, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 300, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw3, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 400, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw4, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 500, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw5, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 600, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw6, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 700, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw7, -hitmin, -hitmax, effect) addEvent(doAreaCombatHealth, delay * 800, cid, COMBAT_PHYSICALDAMAGE, getPlayerLookPos(cid), tw8, -hitmin, -hitmax, effect) exhaustion.set(cid, strg_exh, exhaust_time) doCreatureAddMana(cid, -mana) else doPlayerSendCancel(cid, "Você precisa de "..mana.." para usar esta magia.") end else doPlayerSendCancel(cid, "Você precisa ser no mínimo "..level.." para usar esta magia.") end else doPlayerSendCancel(cid, "Precisa esperar "..exhaustion.get(cid, strg_exh).." segundos para usar novamente.") end return true end Boa sorte. Editado Setembro 21, 2014 10 anos por Adriano SwaTT (veja o histórico de edições) Gosta do meu trabalho? Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs. Atenciosamente,Adriano Swatt' Para ver meus tutoriais acesse meu perfil.
Postado Outubro 3, 2014 10 anos O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → Tutoriais de Scripting" Para: "OTServ → Suporte OTServ → Suporte de Scripts" Ajudei = REP+ Não dou suporte por PM qualquer dúvida procure no fórum,caso não encontre oque procura crie um tópico. [email protected]" /> | TFS 0.4 DEV | %5Bcreaturescript%5D Icones no minimap com descrição%5Btalkaction%5D Adicionar ou remover VIP do player.%5Bcreaturescripts%5D Senha para porta%5Btalkaction%5D Mandar mensagem para pasta do servidorMapa Evento War Castle%5Baction%5D Canoa em MovimentoTeleport Scroll System%5Bcreaturescripts%5D Recompensa por level para X vocations%5Btalkaction%5D Adicionar X item para o player%5Btalkactions%5D Adicionar item para todos players online%5Baction%5D Item que teleporta o player para house[action+movement] Passaporte para entrar no barco
Postado Outubro 4, 2014 10 anos Em 21/09/2014 em 15:15, StormsHard disse: Vlew, Adriano sempre ajudando, heiin <3 Rep + pro cê mano !! Quando as pessoas ajudarem, além de clicar em "Gostei" lembre-se de clicar também em "Melhor Resposta" pra que o tópico fique como resolvido. Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
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.