Postado Maio 23, 2015 11 anos Olá, gostaria de pedir que vocês adicionasse uma condição a minhas magias, vamos lá... explicando: Eu uso alguns magias de suporte que não podem ser usadas em área pz, como o exura sio, pois assim os players não ficam apelando do dp e healando seus amigos, porém elas tem um problemas, quando os players as soltam, é dada uma mensagem de que eles não podem soltá-la, porém eles ainda soltam ela, elas não funcionam mas ele executam o nome dela e isso o deixa "muted", teria como adicionar uma função de dá-los umas espécie de spoff ao tentarem executá-las no pz, tipo aquela fumaçinha? 1: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onGetFormulaValues(cid, level, maglevel) min = ((level*0.1) + (maglevel*8)) max = ((level*0.2) + (maglevel*9)) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) if getTileInfo(getThingPos(cid)).protection == false then return doCombat(cid, combat, var) else return doPlayerSendCancel(cid, "You can't cast this spell in protection zone.") end end 2: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 4, 2, 3) function onCastSpell(cid, var) if getTileInfo(getThingPos(cid)).protection == false then return doCombat(cid, combat, var) else return doPlayerSendCancel(cid, "You can't cast this spell in protection zone.") end end 3: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETPLAYERSORSUMMONS, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) local area = createCombatArea(AREA_CIRCLE3X3) setCombatArea(combat, area) function onGetFormulaValues(cid, level, maglevel) min = ((level*0.2) + (maglevel*5.7) + 26) max = ((level*0.2) + (maglevel*6.3) + 62) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) if getTileInfo(getThingPos(cid)).protection == false then return doCombat(cid, combat, var) else return doPlayerSendCancel(cid, "You can't cast this spell in protection zone.") end end 4: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 7, 8, 10, 9) function onCastSpell(cid, var) if getTileInfo(getThingPos(cid)).protection == false then return doCombat(cid, combat, var) else return doPlayerSendCancel(cid, "You can't cast this spell in protection zone.") end end Obrigado, REP+
Postado Maio 23, 2015 11 anos Solução Acho que é só mudar, essa linha em todos: return doPlayerSendCancel(cid, "You can't cast this spell in protection zone.") Para: return doPlayerSendCancel(cid, "You can't cast this spell in protection zone.") and doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) and false Se você por emote spells (através do config.lua), as magias, vão ficar laranja, ou seja, não vão dar muted sofrerem spam...
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.