Ir para conteúdo

Featured Replies

Postado

Salve galerinha, novamente venho pedir ajuda de vocês com uma spell que está me dando dor de cabeça, eu quero essa spell com o efeito centralizado, em cima do player, e não em cima dele... Se alguém puder ajudar, dou REP ++!    (OBS: Servidor 8.6)

SCRIPT:

Spoiler

function onCastSpell(cid, var)

local waittime = 30 -- Tempo de exhaustion
local storage = 1000700

if exhaustion.check(cid, storage) then
    if isPlayer(cid) then
        doPlayerSendCancel(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
    end
return false
end

local parameters = { cid = cid, var = var}

local tempo = 5
local target = getCreatureTarget(cid)

    repeatEffect(target, 226, {x=1,y=1,z=0}, tempo)
    doCreatureSetNoMove(target, true)
    
    
    
    addEvent(doCreatureSetNoMove,5000,target,false)
    
exhaustion.set(cid, storage, waittime)
return true
end 

 

Editado por Kevin Araujo
Esqueci a versão do servidor. (veja o histórico de edições)

Postado
16 horas atrás, Kevin Araujo disse:

Salve galerinha, novamente venho pedir ajuda de vocês com uma spell que está me dando dor de cabeça, eu quero essa spell com o efeito centralizado, em cima do player, e não em cima dele... Se alguém puder ajudar, dou REP ++!    (OBS: Servidor 8.6)

SCRIPT:

  Mostrar conteúdo oculto

function onCastSpell(cid, var)

local waittime = 30 -- Tempo de exhaustion
local storage = 1000700

if exhaustion.check(cid, storage) then
    if isPlayer(cid) then
        doPlayerSendCancel(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
    end
return false
end

local parameters = { cid = cid, var = var}

local tempo = 5
local target = getCreatureTarget(cid)

    repeatEffect(target, 226, {x=1,y=1,z=0}, tempo)
    doCreatureSetNoMove(target, true)
    
    
    
    addEvent(doCreatureSetNoMove,5000,target,false)
    
exhaustion.set(cid, storage, waittime)
return true
end 

 

local tempo = 5 -- tempo do paralyze em segundos
local effect = 226 -- efeito que vai sair ao redor do player
local exausted = 8 -- exhausted em segundos
local storage = 1000700 -- storage do exausted

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -5000)

function onCastSpell(cid, var)
local target = getCreatureTarget(cid)

local function Efect()
if not isCreature(target) then return true end
local positions = {
[1] = {x=getCreaturePosition(target).x+1, y=getCreaturePosition(target).y+0, z=getCreaturePosition(target).z},
}
for i=1, #positions do
if isWalkable(positions[i]) then
doSendMagicEffect(positions[i], effect)
end
end
end

local function No_Move_Target()
if isCreature(target) then
doCreatureSetNoMove(target, 0)
end
return TRUE
end

if isPlayer(cid) and exhaustion.check(cid, storage) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar novamente.")
return false
end

exhaustion.set(cid, storage, exausted)
doCreatureSetNoMove(target, 1)
doAddCondition(target, condition)
addEvent(No_Move_Target, tempo*1000)
local t = 0
while t <= tempo*1000 do
addEvent(Efect, t)
t = t+300
end
return true
end

Testa ae

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.8k

Informação Importante

Confirmação de Termo