Postado Março 6, 2022 3 anos ajuda nessa spell, queria que ela so garasse em monstros, e nao nos player. Alguem porfavorzinho >< TFS 0.4 Citar local water = {490, 491, 492, 493} local combat = createCombatObject() local meteor = createCombatObject() setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(meteor, COMBAT_PARAM_EFFECT, 31) setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, 0, -5000, 0, -8000) local stun = createConditionObject(CONDITION_PARALYZE) setConditionParam(stun, CONDITION_PARAM_TICKS, 5000) setConditionFormula(stun, -0.1, 0, -0.1, 0) setCombatCondition(meteor, stun) local meteor_water = createCombatObject() setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, 0, -5000, 0, -8000) combat_arr = { {0, 0, 0,}, {0, 1, 0,}, {0, 0, 0,}, } local combat_area = createCombatArea(combat_arr) setCombatArea(combat, combat_area) local function meteorCast(p) doCombat(p.cid, p.combat, positionToVariant(p.pos)) end local function stunEffect(cid) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) end function onTargetTile(cid, pos) if (math.random(0, 0) == 0) then local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}) if (isInArray(water, ground.itemid) == TRUE) then local newpos = {x = pos.x - 0, y = pos.y - 0, z = pos.z} doSendDistanceShoot(newpos, pos, 26) addEvent(meteorCast, 200, {cid = cid, pos = pos, combat = meteor_water}) else local newpos = {x = pos.x - 0, y = pos.y - 0, z = pos.z} doSendDistanceShoot(newpos, pos, 26) addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor}) end end end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
Postado Março 7, 2022 3 anos local water = {490, 491, 492, 493} local combat = createCombatObject() local meteor = createCombatObject() setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(meteor, COMBAT_PARAM_EFFECT, 31) setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, 0, -5000, 0, -8000) local stun = createConditionObject(CONDITION_PARALYZE) setConditionParam(stun, CONDITION_PARAM_TICKS, 5000) setConditionFormula(stun, -0.1, 0, -0.1, 0) setCombatCondition(meteor, stun) local meteor_water = createCombatObject() setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, 0, -5000, 0, -8000) combat_arr = { {0, 0, 0,}, {0, 1, 0,}, {0, 0, 0,}, } local combat_area = createCombatArea(combat_arr) setCombatArea(combat, combat_area) local function meteorCast(p) doCombat(p.cid, p.combat, positionToVariant(p.pos)) end local function stunEffect(cid) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) end function onTargetTile(cid, pos) if (math.random(0, 0) == 0) then local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}) if (isInArray(water, ground.itemid) == TRUE) then local newpos = {x = pos.x - 0, y = pos.y - 0, z = pos.z} doSendDistanceShoot(newpos, pos, 26) addEvent(meteorCast, 200, {cid = cid, pos = pos, combat = meteor_water}) else local newpos = {x = pos.x - 0, y = pos.y - 0, z = pos.z} doSendDistanceShoot(newpos, pos, 26) addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor}) end end end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) if (isMonster(target)) then return doCombat(cid, combat, var) else doPlayerSendTextMessage(cid,20,'Uso restrito em players.') 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.