Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Boa tarde, alguém ajuda fazer com que minha runa só pudesse ser usada quando o player não estivesse com pz. (não é battle)

ai tá ela:

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
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)

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

Top Posters In This Topic

Most Popular Posts

  • 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% maximu

Postado
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

 

Contato:

 

Postado
  • Autor
Em 07/09/2017 em 09:55, Dwarfer disse:

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

 

Como eu coloco pra quando o player pegar  yellow não use tambem?

Postado
Spoiler

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) or getCreatureSkullType(cid) == SKULL_YELLOW 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

 

 

Contato:

 

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