Ir para conteúdo

Featured Replies

Postado

@MarkCharlotte Tenta assim:

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

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, 30)
	doCreatureSetNoMove(target, 1)
	doAddCondition(target, condition)
	doSendMagicEffect(efepos, 24)
	addEvent(No_Move_Target, time*1000, cid)
	return TRUE
end

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

 

  • Respostas 15
  • Visualizações 639
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @MarkCharlotte Removi a condition, não faz nenhum sentido ter ela ali    

Posted Images

Postado

@MarkCharlotte Tenta assim: 

 

Spoiler

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

local function No_Move_Target(cid)
	local target = getCreatureTarget(cid)
	if isCreature(target) then
		doCreatureSetNoMove(target, 0)
	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, 30)
	doCreatureSetNoMove(target, 1)
	doAddCondition(target, condition)
	doSendMagicEffect(efepos, 24)
	addEvent(No_Move_Target, time*1000, cid)
	return TRUE
end

 

 

Postado

@MarkCharlotte Tenta assim:

 

Spoiler

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

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, 30)
	doCreatureSetNoMove(target, TRUE)
	doAddCondition(target, condition)
	doSendMagicEffect(efepos, 24)
	addEvent(No_Move_Target, time*1000, cid)
	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