Ir para conteúdo

Featured Replies

Postado

Boa tarde!

Queria fazer com que essa runa não usasse quando o player estivesse com yellow skull ...

function onCastSpell(cid, item, fromPosition, itemEx, toPosition)
 
local hpmax = getCreatureMaxHealth(cid)
local min = 15.0 -- this means 15% minimum healing
local max = 15.0 -- this means 15% maximum healing
local hp_add = math.random((hpmax * (min/100)), (hpmax * (max/100))) 
 
if(hasCondition(cid, CONDITION_EXHAUST)) then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) 
doPlayerSendCancel(cid, "You are exhausted")
return true
end
if isPlayerPzLocked(cid) then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Murderes can not use this.")
return true
end
doCreatureAddHealth(cid, hp_add)
doSendMagicEffect(getThingPos(cid), 12)
doSendAnimatedText(getPlayerPosition(cid),"+"..hp_add.."", TEXTCOLOR_GREEN) 
return true
end

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

  • 4 weeks later...
Postado
Spoiler

function onCastSpell(cid, item, fromPosition, itemEx, toPosition)
	if getCreatureSkullType(cid) == SKULL_YELLOW then
		return false
	end
 
 
 
local hpmax = getCreatureMaxHealth(cid)
local min = 15.0 -- this means 15% minimum healing
local max = 15.0 -- this means 15% maximum healing
local hp_add = math.random((hpmax * (min/100)), (hpmax * (max/100))) 
 
if(hasCondition(cid, CONDITION_EXHAUST)) then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) 
doPlayerSendCancel(cid, "You are exhausted")
return true
end
if isPlayerPzLocked(cid) then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Murderes can not use this.")
return true
end
doCreatureAddHealth(cid, hp_add)
doSendMagicEffect(getThingPos(cid), 12)
doSendAnimatedText(getPlayerPosition(cid),"+"..hp_add.."", TEXTCOLOR_GREEN) 
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.7k

Informação Importante

Confirmação de Termo