Postado Março 27, 2018 7 anos 3 minutos atrás, Yamborghini disse: sim! a ideia da magia é tipo "sugar a vida do target" e transformar em mana pro player! mas o dano não precisa implicar no heal de mana local config = { cooldown = 10, -- tempo entre uma magia e outra time = 10, -- tempo em segundos que ficará healando percent = 25, --- porcentagem da vida que cura storage = 19330, effect = 12, --- efeito que vai sair mana = 40 -- quanto custa de mana } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -50.0, -1500, -30.0, -1800) function onCastSpell(cid, var) if getCreatureMana(cid) >= config.mana then if os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown then doPlayerSetStorageValue(cid, config.storage, os.time()) local i = 0 doCreatureAddMana(cid, -config.mana, 0) while i < config.time do i = i+1 addEvent(function() if isCreature(cid) then if getCreatureMaxMana(cid) ~= getCreatureMana(cid) then local manadraw = math.ceil(getCreatureMaxMana(cid) * (config.percent)/100) local pos = getPlayerPosition(cid) doCreatureAddMana(cid, manadraw, 1) doSendAnimatedText(pos, "+"..manadraw , TEXTCOLOR_GREEN) doSendMagicEffect(pos, config.effect) return doCombat(cid, combat, var) end end end, 1000*i) end else doPlayerSendCancel(cid, "Your Mass Healing is at cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.") end else doPlayerSendCancel(cid, 36) end return false end
Postado Março 27, 2018 7 anos Autor 11 minutos atrás, Dragon Ball Hiper disse: local config = { cooldown = 10, -- tempo entre uma magia e outra time = 10, -- tempo em segundos que ficará healando percent = 25, --- porcentagem da vida que cura storage = 19330, effect = 12, --- efeito que vai sair mana = 40 -- quanto custa de mana } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -50.0, -1500, -30.0, -1800) function onCastSpell(cid, var) if getCreatureMana(cid) >= config.mana then if os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown then doPlayerSetStorageValue(cid, config.storage, os.time()) local i = 0 doCreatureAddMana(cid, -config.mana, 0) while i < config.time do i = i+1 addEvent(function() if isCreature(cid) then if getCreatureMaxMana(cid) ~= getCreatureMana(cid) then local manadraw = math.ceil(getCreatureMaxMana(cid) * (config.percent)/100) local pos = getPlayerPosition(cid) doCreatureAddMana(cid, manadraw, 1) doSendAnimatedText(pos, "+"..manadraw , TEXTCOLOR_GREEN) doSendMagicEffect(pos, config.effect) return doCombat(cid, combat, var) end end end, 1000*i) end else doPlayerSendCancel(cid, "Your Mass Healing is at cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.") end else doPlayerSendCancel(cid, 36) end return false end perfeito! agora, um ultimo pedido (kkkk) voce poderia fazer esse, que voce postou antes, em área? Spoiler local config = {cooldown = 10, -- tempo entre uma magia e outratime = 10, -- tempo em segundos que ficará healandopercent = 25, --- porcentagem da vida que curastorage = 19330,effect = 12, --- efeito que vai sairmana = 40 -- quanto custa de mana}function onCastSpell(cid, var)if getCreatureMana(cid) >= config.mana thenif os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown thendoPlayerSetStorageValue(cid, config.storage, os.time())local i = 0doCreatureAddMana(cid, -config.mana, 0)while i < config.time doi = i+1addEvent(function() if isCreature(cid) then if getCreatureMaxMana(cid) ~= getCreatureMana(cid) then local manadraw = math.ceil(getCreatureMaxMana(cid) * (config.percent)/100) local pos = getPlayerPosition(cid) doCreatureAddMana(cid, manadraw, 1) doSendAnimatedText(pos, "+"..manadraw , TEXTCOLOR_GREEN) doSendMagicEffect(pos, config.effect)endendend, 1000*i)endelsedoPlayerSendCancel(cid, "Your Mass Healing is at cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.")endelsedoPlayerSendCancel(cid, 36)endreturn falseend @Dragon Ball Hiper
Postado Março 27, 2018 7 anos Não tem como eu testar kk , nao vou garantir .. local config = { cooldown = 10, -- tempo entre uma magia e outra time = 10, -- tempo em segundos que ficará healando percent = 25, --- porcentagem da vida que cura storage = 19330, effect = 12, --- efeito que vai sair mana = 40 -- quanto custa de mana } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, 87) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETPLAYERSORSUMMONS, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr1) setCombatArea(combat, area) function onCastSpell(cid, var) if getCreatureMana(cid) >= config.mana then if os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown then doPlayerSetStorageValue(cid, config.storage, os.time()) local i = 0 doCreatureAddMana(cid, -config.mana, 0) while i < config.time do i = i+1 addEvent(function() if isCreature(cid) then if getCreatureMaxMana(cid) ~= getCreatureMana(cid) then local manadraw = math.ceil(getCreatureMaxMana(cid) * (config.percent)/100) local pos = getPlayerPosition(cid) doCreatureAddMana(cid, manadraw, 1) doSendAnimatedText(pos, "+"..manadraw , TEXTCOLOR_GREEN) doSendMagicEffect(pos, config.effect) return doCombat(cid, combat, var) end end end, 1000*i) end else doPlayerSendCancel(cid, "Your Mass Healing is at cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.") end else doPlayerSendCancel(cid, 36) end return false end
Postado Março 28, 2018 7 anos Autor 37 minutos atrás, Dragon Ball Hiper disse: Não tem como eu testar kk , nao vou garantir .. local config = { cooldown = 10, -- tempo entre uma magia e outra time = 10, -- tempo em segundos que ficará healando percent = 25, --- porcentagem da vida que cura storage = 19330, effect = 12, --- efeito que vai sair mana = 40 -- quanto custa de mana } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, 87) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETPLAYERSORSUMMONS, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr1) setCombatArea(combat, area) function onCastSpell(cid, var) if getCreatureMana(cid) >= config.mana then if os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown then doPlayerSetStorageValue(cid, config.storage, os.time()) local i = 0 doCreatureAddMana(cid, -config.mana, 0) while i < config.time do i = i+1 addEvent(function() if isCreature(cid) then if getCreatureMaxMana(cid) ~= getCreatureMana(cid) then local manadraw = math.ceil(getCreatureMaxMana(cid) * (config.percent)/100) local pos = getPlayerPosition(cid) doCreatureAddMana(cid, manadraw, 1) doSendAnimatedText(pos, "+"..manadraw , TEXTCOLOR_GREEN) doSendMagicEffect(pos, config.effect) return doCombat(cid, combat, var) end end end, 1000*i) end else doPlayerSendCancel(cid, "Your Mass Healing is at cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.") end else doPlayerSendCancel(cid, 36) end return false end não funcionou! eu fiquei pk, minha mana subiu, e a do jogador ao lado, nao!
Postado Março 28, 2018 7 anos 2 minutos atrás, Yamborghini disse: não funcionou! eu fiquei pk, minha mana subiu, e a do jogador ao lado, nao! aaah, alem da sua mana subir quem tiver na area sobe?
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.