Postado Dezembro 17, 2016 8 anos Boa noite Gostaria de Pedir Por Gentilesa Uma Spell De Area quando O Monstro ou player toma dano ele muda de outfit por alguns segundos Mesmo na target SPELL AREA function callback_formula_hanabi(cid, level, skill, attack, factor) local skill_total = skill + attack / 2.0 local level_total = level / 2.5 return -(skill_total * 0.68 + level_total), -(skill_total * 1.06 + level_total) end local Hanabi = ClassSpell:new() :setType() :setArea({{1, 1, 1}, {1, 3, 1}, {1, 1, 1}}) :setCallbackSkill('callback_formula_hanabi') local EFFECTS = { [1] = 80, [CONST_OUTFIT_LUFFY_2] = 80, [CONST_OUTFIT_LUFFY_ROSA] = 101, [CONST_OUTFIT_LUFFY_2_ROSA] = 101, } function onCastSpell(cid, var) if not isAbleToCastSpell(cid, 204) then return false end doSendMagicEffect(addPos(getCreaturePosition(cid), 1, 1), EFFECTS[getCreatureOutfit(cid).lookType] or EFFECTS[1]) addParalyze(cid, 150) Hanabi:cast(cid, var) return true end Spell Target function callback_formula(cid, level, skill, attack, factor) local skill_total = skill + attack / 2.0 local level_total = level / 2.5 return -(skill_total * 0.38 + level_total), -(skill_total * 0.71 + level_total) end local Axe = ClassSpell:new() :setType() :setArea() :setCallbackSkill('callback_formula') local EFEITO = { [1] = 87, [CONST_OUTFIT_LUFFY_ROSA] = 192, } EFEITO[CONST_OUTFIT_LUFFY_2] = EFEITO[1] EFEITO[CONST_OUTFIT_LUFFY_2_ROSA] = EFEITO[CONST_OUTFIT_LUFFY_ROSA] function onCastSpell(cid, var) if not isAbleToCastSpell(cid, 202) then return false end local efeito = EFEITO[getCreatureOutfit(cid).lookType] or EFEITO[1] doSendMagicEffect(addPos(getCreaturePosition(var.number), 1), efeito) return Axe:cast(cid, var) end SPELL CANUDO Empurrado local AREA_GATLING_GUN = { {1, 1, 1}, {1, 1, 1}, {1, 3, 1}, {0, 0, 0}, {0, 0, 0}, } local AREA_GATLING_GUN_PUSH = { { {1, 3, 1}, }, { {1, 1, 1}, {0, 2, 0}, {0, 0, 0}, }, } function callback_formula(cid, level, skill, attack, factor) local skill_total = skill + attack / 2.0 local level_total = level / 2.5 return -(skill_total * 2.51 + level_total), -(skill_total * 2.9 + level_total) end local GatlingGun = ClassSpell:new() :setType() :setArea(AREA_GATLING_GUN) :setCallbackSkill('callback_formula') local EFEITO = { [01] = { {id = 39, x = 1, y = 2}, {id = 37, x = 3, y = 1}, {id = 40, x = 1, y = 3}, {id = 41, x = 2, y = 1}, }, [CONST_OUTFIT_LUFFY_ROSA] = { {id = 147, x = 1, y = 2}, {id = 146, x = 3, y = 1}, {id = 148, x = 1, y = 3}, {id = 145, x = 2, y = 1}, }, } EFEITO[CONST_OUTFIT_LUFFY_2] = EFEITO[1] EFEITO[CONST_OUTFIT_LUFFY_2_ROSA] = EFEITO[CONST_OUTFIT_LUFFY_ROSA] local function empurrar(cid, dir, fase) local temp = getAllCreaturesInSpellArea(cid, AREA_GATLING_GUN_PUSH[fase], dir) for _, creature in pairs(temp) do doPushCreatureByDir(creature, dir, true) end if fase < #AREA_GATLING_GUN_PUSH then empurrar(cid, dir, fase + 1) end end function onCastSpell(cid, var) if not isAbleToCastSpell(cid, 206) then return false end local efeito = EFEITO[getCreatureOutfit(cid).lookType] or EFEITO[1] local dir = getCreatureLookDirection(cid) + 1 doSendMagicEffect(addPos(getPlayerPosition(cid), efeito[dir].x, efeito[dir].y), efeito[dir].id) empurrar(cid, dir - 1, 1) return GatlingGun:cast(cid, var) end Spell Canudo Sem Empurrar function callback_formula(cid, level, skill, attack, factor) local skill_total = skill + attack / 2.0 local level_total = level / 3.0 return -(skill_total * 0.3 + level_total), -(skill_total * 0.7 + level_total) end local Pistol = ClassSpell:new() :setType() :setArea({{1}, {3}}) :setCallbackSkill('callback_formula') local EFEITO = { [01] = { {id = 82, x = 0, y = 1}, {id = 185, x = 2, y = 0}, {id = 86, x = 0, y = 2}, {id = 81, x = 2, y = 0}, }, [CONST_OUTFIT_LUFFY_ROSA] = { {id = 116, x = 0, y = 1}, {id = 113, x = 2, y = 0}, {id = 115, x = 0, y = 2}, {id = 114, x = 2, y = 0}, }, } EFEITO[CONST_OUTFIT_LUFFY_2_ROSA] = EFEITO[CONST_OUTFIT_LUFFY_ROSA] EFEITO[CONST_OUTFIT_LUFFY_2] = EFEITO[1] function onCastSpell(cid, var) if not isAbleToCastSpell(cid, 201) then return false end local outfit = getCreatureOutfit(cid).lookType local index = EFEITO[outfit] and outfit or 1 local dir = getCreatureLookDirection(cid) + 1 local pos = getCreaturePosition(cid) doSendMagicEffect(addPos(pos, EFEITO[index][dir].x, EFEITO[index][dir].y), EFEITO[index][dir].id) return Pistol:cast(cid, var) end https://www.facebook.com/groups/659018184245665/ https://www.facebook.com/profile.php?id=133706320308745
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.