Postado Junho 1, 2019 6 anos Eu uso TFS 0.4 Estou com problema nessa spell se alguém poder me ajuda Essa Magia sai após 2 segundos, porem eu quero que ela saiu no target (monstro) ela esta indo no ultimo lugar onde o player esteve. taag Citar <instant name="" words="hailstorm" lvl="60" range="7" icon="5" mana="165" exhaustion="2000" groups="4,1000" prem="0" needlearn="0" event="script" value="curandeiro/magiadois.lua"> <vocation id="6"/> </instant> código spell -- Areas/Combat for 2000ms local combat20_Brush = createCombatObject() setCombatParam(combat20_Brush, COMBAT_PARAM_EFFECT, 185) setCombatParam(combat20_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatArea(combat20_Brush,createCombatArea({ {1, 1, 1}, {1, 3, 1}, {1, 1, 1}})) function onGetFormulaValues(cid, level, maglevel) local levelTotal = level / 7 local min = levelTotal + (maglevel * 6.0) local max = levelTotal + (maglevel * 6.5) return -min, -max end -- =============== CORE FUNCTIONS =============== local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part local target = getCreatureTarget(cid) if target < 1 then doPlayerSendCancel(cid, "You need a target to cast this spell.") return true end if (isCreature(cid)) then doCombat(cid, c, var) if (dirList ~= nil) then -- Emit distance effects local i = 2; while (i < #dirList) do doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) i = i + 2 return true end end end end setCombatCallback(combat20_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) local startPos = getCreatureTarget(cid) addEvent(RunPart,2000,combat20_Brush,cid,var) return true end Editado Junho 3, 2019 6 anos por robi123 (veja o histórico de edições)
Postado Junho 10, 2019 6 anos Autor Em 04/06/2019 em 13:15, ernaix69 disse: tenta por needtarget="1" essa função ja esta no script local target = getCreatureTarget(cid) if target < 1 then doPlayerSendCancel(cid, "You need a target to cast this spell.")
Postado Junho 11, 2019 6 anos 22 horas atrás, robi123 disse: essa função ja esta no script local target = getCreatureTarget(cid) if target < 1 then doPlayerSendCancel(cid, "You need a target to cast this spell.") mas vc tem q por no xml da spell
Postado Junho 13, 2019 6 anos Autor Galera coloquei isso resolveu meu problema obrigado a todos... casterTargetOrDirection="1"
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.