Por icezigurate, 28 de out. de 2010 em Globalevents e Spells
info
Grupo: Campones
Registrado: 13/06/09
Posts: 1
Reputação: 0
Char no Tibia: Frozen Swordmaster
Essa magia consiste em jogar assassin stars, causando explosões cada vez maiores.
la vai o script.
local combat1 = createCombatObject()setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 18) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 5) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 18) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 6) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 18) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 5) setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 18) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8) local combat5 = createCombatObject() setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat5, COMBAT_PARAM_EFFECT, 6) setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 18) setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100,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 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr4 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0}, {0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, {0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr5 = { {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1}, {1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1}, {1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1}, {1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1}, {1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1}, {1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1}, {1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) local area5 = createCombatArea(arr5) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) setCombatArea(combat5, area5) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, parameters.combat4, parameters.var) end local function onCastSpell5(parameters) doCombat(parameters.cid, parameters.combat5, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5 } addEvent(onCastSpell1, 200, parameters) addEvent(onCastSpell2, 600, parameters) addEvent(onCastSpell3, 1000, parameters) addEvent(onCastSpell4, 1400, parameters) addEvent(onCastSpell5, 2000, parameters) function getSpellDamage(cid, weaponSkill, weaponAttack) damage_min = (weaponSkill * weaponAttack / 30) * 8.6 damage_max = (weaponSkill * weaponAttack / 30) * 8.99 if(damage_max < damage_min) then local tmp = damage_max damage_max = damage_min damage_min = tmp end return -damage_min, -damage_max end end
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8)
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8)
local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8)
arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
}
arr2 = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
arr3 = {
{0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 3, 1, 1, 1, 0, 0},
arr4 = {
{0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0},
{0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0},
arr5 = {
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1},
{1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1},
{1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1},
{1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)
setCombatArea(combat5, area5)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
local function onCastSpell3(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
local function onCastSpell4(parameters)
doCombat(parameters.cid, parameters.combat4, parameters.var)
local function onCastSpell5(parameters)
doCombat(parameters.cid, parameters.combat5, parameters.var)
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5 }
addEvent(onCastSpell1, 200, parameters)
addEvent(onCastSpell2, 600, parameters)
addEvent(onCastSpell3, 1000, parameters)
addEvent(onCastSpell4, 1400, parameters)
addEvent(onCastSpell5, 2000, parameters)
function getSpellDamage(cid, weaponSkill, weaponAttack)
damage_min = (weaponSkill * weaponAttack / 30) * 8.6 damage_max = (weaponSkill * weaponAttack / 30) * 8.99
if(damage_max < damage_min) then
local tmp = damage_max
damage_max = damage_min
damage_min = tmp
return -damage_min, -damage_max
ajustem o dano ao seu gosto, agora o outro bagulho:
<instant name="NOME" words="NOME" lvl="18" mana="25" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="NOME.lua">
falta colocar a vocation, as vocations do meu e editado e não estão certas.
eae, aprovado ou reprovado?
info
Grupo: Campones
Registrado: 13/06/09
Posts: 1
Reputação: 0
Char no Tibia: Frozen Swordmaster
Essa magia consiste em jogar assassin stars, causando explosões cada vez maiores.
la vai o script.
ajustem o dano ao seu gosto, agora o outro bagulho:
falta colocar a vocation, as vocations do meu e editado e não estão certas.
eae, aprovado ou reprovado?