I would like to know how to put an effect to hit the enemy
------SLEEP POWNDER example sleeping with the effect zzZ similar to PDA
local sleepcondition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(sleepcondition, CONDITION_PARAM_TICKS,10000) --5 Seconds
setConditionFormula(sleepcondition,-0.9,0,-0.9,0)
local pokeis = {'Oddish',}
[56] = {x = {
pok = oddish,
spell = "Sleep Powder",
minLv = 12,
ex = 4300004,
base1 = 34,
base2 = 44,
dista = 5,
target = "no",
bonus = 2.4,
type = "grass",
cd = 14
}
},
elseif pokemon.x.spell =="Sleep Powder"then
doCreatureSay(getCreatureSummons(cid)[1],""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
doCreatureSay(cid,""..getCreatureName(getCreatureSummons(cid)[1])..", use "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
doAreaCombatCondition(getCreatureSummons(cid)[1], getThingPos(getCreatureSummons(cid)[1]), confusion, sleepcondition,255)
doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), confusion,-((num1)+(getPlayerLevel(cid)*(num3))),-((num2)+(getPlayerLevel(cid)*(num3))),27)
return 0
------SLEEP POWNDER example sleeping with the effect zzZ similar to PDA
local sleepcondition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(sleepcondition, CONDITION_PARAM_TICKS,10000) --5 Seconds
setConditionFormula(sleepcondition,-0.9,0,-0.9,0)
local pokeis = {'Oddish',}
[56] = {x = {
pok = oddish,
spell = "Sleep Powder",
minLv = 12,
ex = 4300004,
base1 = 34,
base2 = 44,
dista = 5,
target = "no",
bonus = 2.4,
type = "grass",
cd = 14
}
},
elseif pokemon.x.spell =="Sleep Powder"then
doCreatureSay(getCreatureSummons(cid)[1],""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
doCreatureSay(cid,""..getCreatureName(getCreatureSummons(cid)[1])..", use "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
doAreaCombatCondition(getCreatureSummons(cid)[1], getThingPos(getCreatureSummons(cid)[1]), confusion, sleepcondition,255)
doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), confusion,-((num1)+(getPlayerLevel(cid)*(num3))),-((num2)+(getPlayerLevel(cid)*(num3))),27)
return 0
Last edited: