Ir para conteúdo
  • 0

Ajuda Com Script Magia Que Aplica 1 Condition Em Mim E Outra No Target


razurator

Pergunta

Eu sei que deve estar tudo errado mas vamos la.(vou deixar assim mesmo para quem me ajudar já saber qual os parâmetros das condition que eu espero atribuir ao script)

Eu quera que a magia aplicasse uma curse no enemy e uma regeneration em mim como se eu estivesse sugando a vida dele com uma maldição mas quando tento executar a magia ele aplica a curse e o regeneration no inimigo.

 

function onCastSpell(cid, var)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
local condition = createConditionObject(CONDITION_CURSED)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 3000, -25)
setCombatCondition(combat, condition)
local target = getCreatureTarget(cid)
if target == isMonster or isCreature then
doAddCondition(cid, target)
doCombat(cid, combat, var)
end
function onCastSpell(cid, var)
local player = getCreaturePosition(cid)
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 30 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 25)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)
setCombatCondition(combat, condition)

doAddCondition(cid, player)
doSendMagicEffect(player, 12)
doCombat(cid, combat, var)
return 1
else
doPlayerSendCancel(cid, "You need a taget.")
end

end
end

Link para o comentário
Compartilhar em outros sites

8 respostass a esta questão

Posts Recomendados

  • 0
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
local condition = createConditionObject(CONDITION_CURSED)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 3000, -25)
setCombatCondition(combat, condition)

local condition2 = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 30 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 25)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)



function onCastSpell(cid, var)
local player = getCreaturePosition(cid)
doAddCondition(cid, condition2)
doSendMagicEffect(player, 12)
doCombat(cid, combat, var)
return 1
end

Link para o comentário
Compartilhar em outros sites

  • 0

Ele esta fazendo a mesma coisa, aplicando a curse mas a condition de regeneration continua não pegando

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
local condition = createConditionObject(CONDITION_CURSED)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 3000, -25)
setCombatCondition(combat, condition)

local condition2 = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 30 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 25)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)



function onCastSpell(cid, var)
local player = getCreaturePosition(cid)
doAddCondition(cid, condition2)
doSendMagicEffect(player, 12)
doCombat(cid, combat, var)
return 1
end

 

 

eu adicionei player na function e agora ele só não consegue localizar o player

 

function onCastSpell(cid, var)
local player = getCreaturePosition(cid)
doAddCondition(cid, condition2, player)
doSendMagicEffect(player, 12)
doCombat(cid, combat, var)
return 1
end

Link para o comentário
Compartilhar em outros sites

  • 0

deu algum erro?

 

se n funciona agora é bug no seu serve

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
local condition = createConditionObject(CONDITION_CURSED)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 3000, -25)
setCombatCondition(combat, condition)

local condition2 = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 30 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 25)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)



function onCastSpell(cid, var)
doTargetCombatCondition(cid, cid, condition2, 12)
doCombat(cid, combat, var)
return 1
end

Link para o comentário
Compartilhar em outros sites

  • 0

agora que eu vi o um outro erro quye tinha

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
local condition = createConditionObject(CONDITION_CURSED)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 3000, -25)
setCombatCondition(combat, condition)

local condition2 = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition2, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition2, CONDITION_PARAM_BUFF, true)
setConditionParam(condition2, CONDITION_PARAM_TICKS, 1 * 30 * 1000)
setConditionParam(condition2, CONDITION_PARAM_HEALTHGAIN, 25)
setConditionParam(condition2, CONDITION_PARAM_HEALTHTICKS, 3000)



function onCastSpell(cid, var)
doTargetCombatCondition(cid, cid, condition2, 12)
doCombat(cid, combat, var)
return 1
end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...