No caso adicionaria a Storage 90221 no Target, deixaria ele imovel e fazendo o efeito de sleep.e a spell para o pokemon selvagem ficaria assim
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 3) >= 1 then
doSendAnimatedText(getThingPos(cid), "MISS", 215)
setPlayerStorageValue(cid, 3, -1)
return true
end
local mudalvo = getCreatureTarget(cid)
local function ver(params)
if isCreature(params.mudalvo) then
if getPlayerStorageValue(params.mudalvo, 90221) >= 1 then
setPlayerStorageValue(params.mudalvo, 90221, -1)
doChangeSpeed(params.mudalvo, 310)
end
end
end
local function muds(params)
if isCreature(params.alvo) then
if getPlayerStorageValue(params.alvo, 90221) >= 1 then
doSendMagicEffect(getThingPos(params.alvo), 32)
end
end
end
addEvent(muds, 500, {alvo = mudalvo})
addEvent(muds, 1000, {alvo = mudalvo})
addEvent(muds, 1500, {alvo = mudalvo})
addEvent(muds, 2000, {alvo = mudalvo})
addEvent(muds, 2500, {alvo = mudalvo})
addEvent(muds, 3000, {alvo = mudalvo})
addEvent(muds, 3500, {alvo = mudalvo})
addEvent(muds, 4000, {alvo = mudalvo})
addEvent(ver, 4100, {mudalvo = mudalvo})
if getPlayerStorageValue(cid, 90221) <= 0 then
setPlayerStorageValue(getCreatureTarget(cid), 90221, 1)
doChangeSpeed(getCreatureTarget(cid), -310)
doSendDistanceShoot(getThingPos(cid), getThingPos(getCreatureTarget(cid)), 33)
doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPos(getCreatureTarget(cid)), 0, -(0), -(0), 32)
doCreatureSay(cid, "HYPNOSIS!", TALKTYPE_MONSTER)
end
return 0
end