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"




info
Grupo: Campones
Registrado: 10/01/11
Posts: 11
Reputação: +3
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...
E nessas 2 seria a condição de drunk/bebado..
a chance e o tempo eu arrumo depois..
Obrigado para quem ajudar..