Ir para conteúdo

Featured Replies

Postado
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

 

  • Respostas 15
  • Visualizações 311
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • 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 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
}
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)
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

 

@Dragon Ball Hiper

tumblr_o70wteR8521r9n6kzo1_400.gif

Postado

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
  • 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!

tumblr_o70wteR8521r9n6kzo1_400.gif

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo