Ir para conteúdo

Featured Replies

Postado

.Qual servidor ou website você utiliza como base? 

OTX 8.6

Qual o motivo deste tópico? 

Ajuda

Está surgindo algum erro? Se sim coloque-o aqui. 

Citar

Boa noite galera, bom, uso essa spell no meu sv, ela trava o target no local por ' 5 ' segundos como diz ali, porém o alvo anda ficando travado pra sempre, só sai se deslogar, alguem poderia me dar um help ? obrigado.

 

Você tem o código disponível? Se tiver publique-o aqui: 

local function No_Move_Target(cid)
    local target = getCreatureTarget(cid)
    if isCreature(target) then
        doCreatureSetNoMove(target, FALSE)
    end
    return TRUE
end

function onCastSpell(cid, var)    
    local target = getCreatureTarget(cid)
    local targetpos = getCreaturePosition(target)
    local efepos = {x=targetpos.x, y=targetpos.y, z=targetpos.z}
    local time = 5 -- tempo paralyzado
    
    if isPlayer(cid) and exhaustion.check(cid, 11560) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 11560) .. " segundos para usar novamente.")
        return FALSE
    end
    
    exhaustion.set(cid, 11560, 20)
    doCreatureSetNoMove(target, TRUE)
    doSendMagicEffect(efepos, 24)
    addEvent(No_Move_Target, time*1000, cid)
    return TRUE
end

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

 

Editado por Lenilson
informações (veja o histórico de edições)

  • Respostas 5
  • Visualizações 539
  • Created
  • Última resposta

Top Posters In This Topic

Postado
2 horas atrás, Lenilson disse:

.Qual servidor ou website você utiliza como base? 

OTX 8.6

Qual o motivo deste tópico? 

Ajuda

Está surgindo algum erro? Se sim coloque-o aqui. 

 

Você tem o código disponível? Se tiver publique-o aqui: 

local function No_Move_Target(cid)
    local target = getCreatureTarget(cid)
    if isCreature(target) then
        doCreatureSetNoMove(target, FALSE)
    end
    return TRUE
end

function onCastSpell(cid, var)    
    local target = getCreatureTarget(cid)
    local targetpos = getCreaturePosition(target)
    local efepos = {x=targetpos.x, y=targetpos.y, z=targetpos.z}
    local time = 5 -- tempo paralyzado
    
    if isPlayer(cid) and exhaustion.check(cid, 11560) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 11560) .. " segundos para usar novamente.")
        return FALSE
    end
    
    exhaustion.set(cid, 11560, 20)
    doCreatureSetNoMove(target, TRUE)
    doSendMagicEffect(efepos, 24)
    addEvent(No_Move_Target, time*1000, cid)
    return TRUE
end

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

 

local function No_Move_Target_2(cid)
    local target = getCreatureTarget(cid)
    if isCreature(target) then
        doCreatureSetNoMove(target, true)
    end
    return TRUE
end
 addEvent(No_Move_Target_2, time*1500, cid)

Se não funcionar, use este outro:

mayNotMove(target, true)
mayNotMove(target, false)

 

Editado por Fabi Marzan (veja o histórico de edições)

Postado
  • Autor
8 horas atrás, Fabi Marzan disse:

local function No_Move_Target_2(cid)
    local target = getCreatureTarget(cid)
    if isCreature(target) then
        doCreatureSetNoMove(target, true)
    end
    return TRUE
end

 addEvent(No_Move_Target_2, time*1500, cid)

 

 

nao entendi mto bem amigo, é pra substituir isso por algo do script original que mandei ? se sim, tem como vc ja mandar o script todo ? obrigado e desculpa a burrice 

Postado
4 horas atrás, Lenilson disse:

nao entendi mto bem amigo, é pra substituir isso por algo do script original que mandei ? se sim, tem como vc ja mandar o script todo ? obrigado e desculpa a burrice 

local function No_Move_Target(cid)
    local target = getCreatureTarget(cid)
    if isCreature(target) then
        doCreatureSetNoMove(target, false)
        mayNotMove(target, false)
    end
    return TRUE
end

local function No_Move_Target_2(cid)
    local target = getCreatureTarget(cid)
    if isCreature(target) then
        doCreatureSetNoMove(target, true)
         mayNotMove(target, true)
    end
    return TRUE
end

function onCastSpell(cid, var)    
    local target = getCreatureTarget(cid)
    local targetpos = getCreaturePosition(target)
    local efepos = {x=targetpos.x, y=targetpos.y, z=targetpos.z}
    local time = 5 -- tempo paralyzado
    
    if isPlayer(cid) and exhaustion.check(cid, 11560) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 11560) .. " segundos para usar novamente.")
        return FALSE
    end
    
    exhaustion.set(cid, 11560, 20)
    doSendMagicEffect(efepos, 24)
    addEvent(No_Move_Target, time*1000, cid)
    addEvent(No_Move_Target_2, time*1500, cid)
    return TRUE
end

 

Postado
  • Autor
Em 11/06/2022 em 10:42, Fabi Marzan disse:

local function No_Move_Target(cid)
    local target = getCreatureTarget(cid)
    if isCreature(target) then
        doCreatureSetNoMove(target, false)
        mayNotMove(target, false)
    end
    return TRUE
end

local function No_Move_Target_2(cid)
    local target = getCreatureTarget(cid)
    if isCreature(target) then
        doCreatureSetNoMove(target, true)
         mayNotMove(target, true)
    end
    return TRUE
end

function onCastSpell(cid, var)    
    local target = getCreatureTarget(cid)
    local targetpos = getCreaturePosition(target)
    local efepos = {x=targetpos.x, y=targetpos.y, z=targetpos.z}
    local time = 5 -- tempo paralyzado
    
    if isPlayer(cid) and exhaustion.check(cid, 11560) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 11560) .. " segundos para usar novamente.")
        return FALSE
    end
    
    exhaustion.set(cid, 11560, 20)
    doSendMagicEffect(efepos, 24)
    addEvent(No_Move_Target, time*1000, cid)
    addEvent(No_Move_Target_2, time*1500, cid)
    return TRUE
end

 

opa, muito obrigado amigo, funcionou ! Se não for muito abuso, vc teria uma spell de reflect que pudesse me passar ? para refletir o dano recebido por " x " segundos ? obrigado <3

4 minutos atrás, Lenilson disse:

opa, muito obrigado amigo, funcionou ! Se não for muito abuso, vc teria uma spell de reflect que pudesse me passar ? para refletir o dano recebido por " x " segundos ? obrigado <3

eu estou usando esse script, porém ja coloquei os ids dos items q sao preciso pra usar a spell, mas continua dando a mensagem que preciso ter uma Gunbai equipada pra poder usar, gostaria de que nao precisasse ter uma arma equipada pra poder usar, vou deixar o script abaixo


 

local config = { 
storage = 318210, -- storage que salva o tempo da spell
storagecol = 3482101, -- storage que salva o tempo entre 1 uso e outro
cooldown = 60, -- tempo de um uso e outro
duration = 5, -- tempo que a spell dura
effect1 = 9 --- efeito que sai qnd usa a spell


function onCastSpell(cid, var)
local itemid = 13898, 13941, 13806, 13818, 13975, 13982, 13763, 13607, 13782, 13787
if getPlayerStorageValue(cid, config.storage) - os.time() > 0  then
doPlayerSendCancel(cid, "Você está refletindo todo o dano recebido!")
return false
end

if getPlayerItemCount(cid, itemid) >= 1 then
if os.time() - getPlayerStorageValue(cid, config.storagecol) >= config.cooldown then
    setPlayerStorageValue(cid, config.storagecol, os.time())
    doSendMagicEffect(getCreaturePosition(cid), config.effect1)
    setPlayerStorageValue(cid, config.storage, os.time() + config.duration)
    doPlayerSendTextMessage(cid, 27, "Voce ativou o modo Reflect e nos proximos ".. config.duration.." segundos refletira os danos recebidos.")
else
    doPlayerSendCancel(cid, "Você está cansado, precisa aguardar "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storagecol))).." segundos.")
return false
end
else
doPlayerSendCancel(cid, "Voce precisa de uma Gunbai para executar este Jutsu !")
return false
end  
    return true
end

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo