Postado Setembro 6, 2017 7 anos 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 Setembro 6, 2017 7 anos por Messe (veja o histórico de edições)
Postado Setembro 7, 2017 7 anos 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: Email: [email protected] Discord: Dwarfer#2715
Postado Setembro 8, 2017 7 anos 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 Setembro 9, 2017 7 anos 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: Email: [email protected] Discord: Dwarfer#2715
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.