SK
pedido

Player não se mover

Por SkyDarkyes, 27 de ago. de 2013 em Scripts

resolvido
8
1.3k
27 de agosto de 2013 às 22:00

Gostaria de uma spell,que deixe o player sem se mover,por x tempo,mas sem se mover mesmo '-'

Session StartS
27 de agosto de 2013 às 23:11


local function notMove(target, postarget)

if isPlayer(target) then

mayNotMove(target, false)

doSendMagicEffect(postarget, 50)

doPlayerSendTextMessage(target, 27, "Voce saiu do 'paralizamento'")

return true

end

end

 

function onCastSpell(cid, var)

if getPlayerStorageValue(cid, 33333344) < os.time() then

local pos = getPlayerPosition(cid)

local target = getCreatureTarget(cid)

local postarget = getPlayerPosition(target)

if target > 0 then

local tempo = 10 --seg

local exaust = 15 --seg

setPlayerStorageValue(cid, 33333344, os.time () + exaust)

mayNotMove(target, true)

doSendMagicEffect(pos, 50)

doSendMagicEffect(postarget, 50)

addEvent(notMove, tempo*1000,target, postarget)

else

doPlayerSendTextMessage(cid, 27, "cade o target")

return FALSE

end

else

doPlayerSendCancel(cid, " aguarde"..getPlayerStorageValue(cid, 33333344) - os.time ().." segundos ")

return FALSE

end

return true

end

 

Editado Agosto 27 por Cleberadm

SlicerS
27 de agosto de 2013 às 23:20

melhor por um 'if nor isCreature(target) then return true end' nessa tua funçao ae heim..

Session StartS
27 de agosto de 2013 às 23:33

coloquei isplayer, n muda nada( eu acho ), mas vlw por lembrar '-'

28 de agosto de 2013 às 08:17

Funcionou perfeitamente

 

Porem da esse erro:

 

Thing not found

Session StartS
28 de agosto de 2013 às 08:28

 

local function notMove(target, postarget)
if isPlayer(target) then
mayNotMove(target, false)
doSendMagicEffect(postarget, 50)
doPlayerSendTextMessage(target, 27, "Voce saiu do 'paralizamento'")
return true
end
end
 
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 33333344) < os.time() then
local pos = getPlayerPosition(cid)
local target = getCreatureTarget(cid)
if target > 0  then
local postarget = getPlayerPosition(target)
local tempo = 10 --seg
local exaust = 15 --seg
setPlayerStorageValue(cid, 33333344, os.time () + exaust)
mayNotMove(target, true)
doSendMagicEffect(pos, 50)
doSendMagicEffect(postarget, 50)
addEvent(notMove, tempo*1000,target, postarget)
else
doPlayerSendTextMessage(cid, 27, "cade o target")
return FALSE
end
 else
doPlayerSendCancel(cid, " aguarde"..getPlayerStorageValue(cid, 33333344) - os.time ().." segundos ")
return FALSE
end
return true
end
28 de agosto de 2013 às 08:34

Deu vlw

BeekiB
28 de agosto de 2013 às 11:38

Tópico movido para a seção de dúvidas e pedidos resolvidos.