Ir para conteúdo

Adicionando Condition(Wand/rod) Rep+


lucasquevedobr

Posts Recomendados

Ola, por favor alguem me ajuda a colocar conditions nesses 3 scripts

VALENDO REP+

 

Neste gostaria da condition Curse(maldição/hit de death)

Tipo a Viper Star que tem uma chance de envenenar... a chance e o tempo eu arrumo depois so queria que nao desse erro...

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.5, -0, -0.5, -0)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

E nessas 2 seria a condição de drunk/bebado..

a chance e o tempo eu arrumo depois..

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 31)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.35, -0, -0.35, -0)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -0, -1, -0)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

 

 

Obrigado para quem ajudar..

Link para o comentário
Compartilhar em outros sites

a primeira

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.5, -0, -0.5, -0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -0.5, -0, -0.5, -0)

 

local condition = createConditionObject(CONDITION_CURSED)

setConditionParam(condition, CONDITION_PARAM_DELAYED, TRUE)

setConditionParam(condition, CONDITION_PARAM_MINVALUE, 20)

setConditionParam(condition, CONDITION_PARAM_MAXVALUE, 30)

setConditionParam(condition, CONDITION_PARAM_STARTVALUE, 10)

setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 30)

setConditionParam(condition, CONDITION_PARAM_FORCEUPDATE, TRUE)

setCombatCondition(combat2, condition)

 

function onUseWeapon(cid, var)

x = math.random(0, 100)

chance = 50

if x <= chance then

return doCombat(cid, combat2, var)

else

return doCombat(cid, combat, var)

end

end

 

a segunda

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 31)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.35, -0, -0.35, -0)

 

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 31)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -0.35, -0, -0.35, -0)

 

 

local condition = createConditionObject(CONDITION_DRUNK)

setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)

setCombatCondition(combat2, condition)

 

function onUseWeapon(cid, var)

x = math.random(0, 100)

chance = 50

if x <= chance then

return doCombat(cid, combat2, var)

else

return doCombat(cid, combat, var)

end

end

 

a terceira

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)

setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -0, -1, -0)

 

 

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 49)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, -0, -1, -0)

 

 

 

local condition = createConditionObject(CONDITION_DRUNK)

setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)

setCombatCondition(combat2, condition)

 

function onUseWeapon(cid, var)

x = math.random(0, 100)

chance = 70

if x <= chance then

return doCombat(cid, combat2, var)

else

return doCombat(cid, combat, var)

end

end

 

vese é isso que se que a chance é so edita no "chance"

Editado por lordbug99
Link para o comentário
Compartilhar em outros sites

REP+ funfu certiho...

 

 

poderia me explicar a função dessas linhas?

 

 

local condition = createConditionObject(CONDITION_CURSED)

setConditionParam(condition, CONDITION_PARAM_DELAYED, TRUE)

setConditionParam(condition, CONDITION_PARAM_MINVALUE, 20)

setConditionParam(condition, CONDITION_PARAM_MAXVALUE, 30)

setConditionParam(condition, CONDITION_PARAM_STARTVALUE, 10)

setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 30)

setConditionParam(condition, CONDITION_PARAM_FORCEUPDATE, TRUE)

Editado por LucasQuevedo
Link para o comentário
Compartilhar em outros sites

ok

local condition = createConditionObject(CONDITION_CURSED) - nome da condition

setConditionParam(condition, CONDITION_PARAM_DELAYED, TRUE) - permanemte(ate morrer ou usa um potion ou spell que retire a codition

setConditionParam(condition, CONDITION_PARAM_MINVALUE, 20) --valor minimo de dano

setConditionParam(condition, CONDITION_PARAM_MAXVALUE, 30) --valor maximo de dano

setConditionParam(condition, CONDITION_PARAM_STARTVALUE, 10) -- acho que é o valor do primeiro hit

setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 30) --intervalo entre os danos

setConditionParam(condition, CONDITION_PARAM_FORCEUPDATE, TRUE) --- n sei o que fas

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...