Postado Fevereiro 14, 2015 10 anos Dae pessoal, gostaria de pedir ajuda para os scripters, quem puder ajudar, estou querendo adicionar ao server 2 spells Destiny Bond: Quando esse ataque é usado, Dusknoir marca sua morte para 3 segundos. Após 3 segundos ele irá morrer, porém se o Pokémon adversário mata-lo antes dos 3 segundos, um dano imenso será causado em área. Esse ataque é muito difícil de ser usado e requer habilidade, você tem que usar quando esta quase morrendo para conseguir o efeito desejado. e Sturdy: É uma passive muito interessante, Aggron resiste até o ultimo momento por seu treinador, quando ele ficar com 1 de vida, sua coloração muda, e ele resiste por 8 segundos antes de ser derrotado. Essa habilidade pode ser muito util, onde Aggron resiste a combos muito poderosos, ou até mesmo para carregar algum cd e finalizar o inimigo se alguem puder ajudar, ao menos sobre como fazer para que quando o Poke chegar a 1 de hp, ele recupere toda a hp. lembrando que ele só vai fazer isso 1x, na 2°x ele vai morrer. se alguem puder ajudar, desde ja agradeço.
Postado Fevereiro 14, 2015 10 anos Qual a base que você está utilizando? PDA? não respondo pms solicitando suporte em programação/scripting
Postado Fevereiro 14, 2015 10 anos Em data/lib, pokemons moves.lua: abaixo de: local table = getTableMove(cid, spell) --alterado v1.6 adicione: if spell == "DB" then table = getTableMove(cid, "Destiny Bound") end Código do Destiny Bound: elseif spell == "Destiny Bound" then local death = 3 --Tempo para morrer, em segundos. setPlayerStorageValue(cid, 8401, 1) addEvent(function() if isCreature(cid) and getPlayerStorageValue(cid, 8401) > -1 then setPlayerStorageValue(cid, 8401, -1) doCreatureAddHealth(cid, -getCreatureHealth(cid)) end end, death * 1000) Código da spell que o Destiny Bound irá executar (caso o pokémon seja morto): elseif spell == "DB" then spell = "Destiny Bound" local config = { effect = 136, --Effect. area = selfArea1, --Área do golpe (criada em data/lib/areas.lua). element = ghostDmg, --Elemento do ataque. } setPlayerStorageValue(cid, 8401, -1) doMoveInArea2(cid, config.effect, config.area, config.element, min, max, spell) data/actions/scripts, goback.lua: acima de: doReturnPokemon(cid, z, item, effect) adicione: if getPlayerStorageValue(z, 8401) > -1 then return setPlayerStorageValue(z, 8401, -1) and doCreatureAddHealth(z, -getCreatureHealth(z)) elseif getPlayerStorageValue(z, 8402) > -1 then return setPlayerStorageValue(z, 8402, -1) and doCreatureAddHealth(z, -getCreatureHealth(z)) end abaixo de: local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end adicione: if getPlayerStorageValue(pk, 8401) > -1 then return setPlayerStorageValue(pk, 8401, -1) and doCreatureAddHealth(pk, -getCreatureHealth(pk)) elseif getPlayerStorageValue(pk, 8402) > -1 then return setPlayerStorageValue(pk, 8402, -1) and doCreatureAddHealth(pk, -getCreatureHealth(pk)) end data/creaturescripts/scripts, exp2.0.lua: troque: if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) end end por: local config = { sturdy = { --Pokémons que possuem a habilidade Sturdy. Configuração: ["nome_do_pokemon"] = lookType, ["Aggron"] = lookType, }, cd = 30, --Cooldown da habilidade. duration = 8, --Duração, em segundos, do Sturdy. storages = { db = 8401, s = 8402, s_cd = 8403, }, } if getPlayerStorageValue(cid, config.storages.s) > -1 then return false end local hp = getCreatureHealth(cid) - valor if not isPlayer(cid) then if hp <= 1 then if config.sturdy[getCreatureName(cid)] then local b = true if isSummon(cid) then local ball = getPlayerSlotItem(getCreatureMaster(cid), 8) if ball and getCD(ball.uid, "sturdy") > 0 then b = false end end if b then if hp < 1 then doCreatureAddHealth(cid, hp < 0 and (hp * -1) + 1 or 1) end setPlayerStorageValue(cid, config.storages.s, 1) if isSummon(cid) then local ball = getPlayerSlotItem(getCreatureMaster(cid), 8) if ball then setCD(ball.uid, "sturdy", config.duration + config.cd) end end doSetCreatureOutfit(cid, {lookType = config.sturdy[getCreatureName(cid)]}, config.duration * 1000) addEvent(function() if isCreature(cid) and getPlayerStorageValue(cid, config.storages.s) > -1 then setPlayerStorageValue(cid, config.storages.s, -1) doCreatureAddHealth(cid, -getCreatureHealth(cid)) end end, config.duration * 1000) end end end end if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) if not isPlayer(cid) and getPlayerStorageValue(cid, config.storages.db) > -1 then docastspell(cid, "DB") end end end data/lib, newStatusSyst.lua: Troque: doCreatureAddHealth(cid, -damage, 15, COLOR_BURN) por: if getPlayerStorageValue(cid, 8402) == -1 then doCreatureAddHealth(cid, -damage, 15, COLOR_BURN) end Troque: doCreatureAddHealth(cid, -dano, 8, COLOR_GRASS) por: if getPlayerStorageValue(cid, 8402) == -1 then doCreatureAddHealth(cid, -dano, 8, COLOR_GRASS) end Troque: doCreatureAddHealth(cid, -damage) doSendAnimatedText(getThingPos(cid), "-"..damage.."", 144) doSendMagicEffect(getThingPos(cid), 45) ------ local newlife = life - getCreatureHealth(cid) if newlife >= 1 and attacker ~= 0 then doSendMagicEffect(getThingPos(attacker), 14) doCreatureAddHealth(attacker, newlife) doSendAnimatedText(getThingPos(attacker), "+"..newlife.."", 32) end por: if getPlayerStorageValue(cid, 8402) == -1 then doCreatureAddHealth(cid, -damage) doSendAnimatedText(getThingPos(cid), "-"..damage.."", 144) doSendMagicEffect(getThingPos(cid), 45) ------ local newlife = life - getCreatureHealth(cid) if newlife >= 1 and attacker ~= 0 then doSendMagicEffect(getThingPos(attacker), 14) doCreatureAddHealth(attacker, newlife) doSendAnimatedText(getThingPos(attacker), "+"..newlife.."", 32) end end Editado Fevereiro 19, 2015 10 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
Postado Fevereiro 15, 2015 10 anos Autor Bom sobre o Destiny Bound: ele está funcionando como um self, só que com um delay de 3seg. e a ideia é diferente. Se o pokemon usar essa spell, e for morto (desntro desse tempo determinado 3seg.) ele causa um grande dano em area. Se ele não for morto ele simplesmente morre sem causar dano algum. Sobre o Sturdy, o problema é maior. a passiva esta ativando no primeiro atk, e não quando ele fica com 1 de hp. e outro problema é que ele não esta morrendo, ele esta desaparecendo pois a barra de moves continua ali, e o look da ball fica assim: 11:44 You see a saffari ball being used. It contains an Aggron. Desde já agradeço a ajuda.
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.