Postado Setembro 8, 2017 7 anos 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 Setembro 8, 2017 7 anos por Messe (veja o histórico de edições)
Postado Outubro 1, 2017 7 anos 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.