Ir para conteúdo

Celestial Energy And No Name


Skymagnum

Posts Recomendados

Tipo: Spell.

Testado: Sim, TFS(0.3.6) 8.6.

 

@Celestial Energy

Dei esse nome a ele porquê deu vontade.

 

Vá em data/spells/scripts/attack crie um arquivo da extensão .lua e adicione esse conteúdo nele:

 

 

local scom1 = createCombatObject()
local scom2 = createCombatObject()
local scom3 = createCombatObject()
local scom4 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 39)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -500, -0, -700, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 11)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -500, -0, -700, 0)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 47)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -500, -0, -700, 0)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 49)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -500, -0, -700, 0)

arr1 = {
{0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 2,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 1, 2, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0},
}

arr4 = {
{0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0},
}


local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr2)
local area4 = createCombatArea(arr2)
setCombatArea(scom1, area1)
setCombatArea(scom2, area2)
setCombatArea(scom3, area3)
setCombatArea(scom4, area4)

function onTargetTile(cid, pos)
local p = getThingPos(cid)
local basep = {x = p.x + 5, y = p.y - 5, z = p.z}
doSendDistanceShoot(basep, pos, 30)
doCombat(cid,combat1,positionToVariant(pos))
end

function onTargetTile2(cid, pos)
local p1 = getThingPos(cid)
local basep1 = {x = p1.x - 5, y = p1.y + 5, z = p1.z}
doSendDistanceShoot(basep1, pos, 35)
doCombat(cid,combat2,positionToVariant(pos))
end

function onTargetTile3(cid, pos)
local p2 = getThingPos(cid)
local basep2 = {x = p2.x - 5, y = p2.y + 5, z = p2.z}
local baseep2 = {x = p2.x + 5, y = p2.y - 5, z = p2.z}
doSendDistanceShoot(basep2, pos, 35)
doSendDistanceShoot(baseep2, pos, 35)
doCombat(cid,combat3,positionToVariant(pos))
end

function onTargetTile4(cid, pos)
local p3 = getThingPos(cid)
local basep3 = {x = p3.x - 5, y = p3.y - 5, z = p3.z}
local baseep3 = {x = p3.x + 5, y = p3.y + 5, z = p3.z}
doSendDistanceShoot(basep3, pos, 30)
doSendDistanceShoot(baseep3, pos, 30)
doCombat(cid,combat4,positionToVariant(pos))
end

setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
setCombatCallback(scom3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")
setCombatCallback(scom4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")

local function onCastSpell1(parameters)
doCombat(parameters.cid, scom1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, scom2, parameters.var)
end

local function onCastSpell3(parameters)
doCombat(parameters.cid, scom3, parameters.var)
end

local function onCastSpell4(parameters)
doCombat(parameters.cid, scom4, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell3, 1200, parameters)
addEvent(onCastSpell4, 1200, parameters)

return TRUE
end

 

 

tag:

</instant>
<instant name="Energy of Sky" words="Celestial Energy" lvl="935000" mana="1200000" prem="1" exhaustion="2000" selftarget="1" needlearn="0" event="script" value="attack/Celestial Energy.lua">
<vocation id="5"/>
<vocation id="6"/>

 

image: PREGUIÇA OWNSS!.

 

@No Name

 

Tava sem ideia pra nome.

 

Vá em data/spells/scripts/attack crie um arquivo da extensão .lua e adicione esse conteúdo nele:

 

 

local scom1 = createCombatObject()
local scom2 = createCombatObject()
local scom3 = createCombatObject()
local scom4 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 34)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -600, -0, -750, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 39)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -600, -0, -750, 0)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 32)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -600, -0, -750, 0)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 30)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -600, -0, -750, 0)

arr1 = {
{0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0,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{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0},
}

arr4 = {
{0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0},
}


local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr2)
local area4 = createCombatArea(arr2)
setCombatArea(scom1, area1)
setCombatArea(scom2, area2)
setCombatArea(scom3, area3)
setCombatArea(scom4, area4)

function onTargetTile(cid, pos)
local p = getThingPos(cid)
local basep = {x = p.x , y = p.y + 5, z = p.z}
doSendDistanceShoot(basep, pos, 38)
doCombat(cid,combat1,positionToVariant(pos))
end

function onTargetTile2(cid, pos)
local p1 = getThingPos(cid)
local basep1 = {x = p1.x - 5, y = p1.y + 5, z = p1.z}
doSendDistanceShoot(basep1, pos, 35)
doCombat(cid,combat2,positionToVariant(pos))
end

function onTargetTile3(cid, pos)
local p2 = getThingPos(cid)
local basep2 = {x = p2.x - 5, y = p2.y + 5, z = p2.z}
local baseep2 = {x = p2.x + 5, y = p2.y - 5, z = p2.z}
doSendDistanceShoot(basep2, pos, 35)
doSendDistanceShoot(baseep2, pos, 35)
doCombat(cid,combat3,positionToVariant(pos))
end

function onTargetTile4(cid, pos)
local p3 = getThingPos(cid)
local basep3 = {x = p3.x - 5, y = p3.y - 5, z = p3.z}
local baseep3 = {x = p3.x + 5, y = p3.y + 5, z = p3.z}
doSendDistanceShoot(basep3, pos, 30)
doSendDistanceShoot(baseep3, pos, 30)
doCombat(cid,combat4,positionToVariant(pos))
end

setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
setCombatCallback(scom3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")
setCombatCallback(scom4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")

local function onCastSpell1(parameters)
doCombat(parameters.cid, scom1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, scom2, parameters.var)
end

local function onCastSpell3(parameters)
doCombat(parameters.cid, scom3, parameters.var)
end

local function onCastSpell4(parameters)
doCombat(parameters.cid, scom4, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 200, parameters)
addEvent(onCastSpell2, 200, parameters)
addEvent(onCastSpell3, 1300, parameters)
addEvent(onCastSpell4, 1300, parameters)

return TRUE
end

 

 

tag:

</instant>
<instant name="No Name" words="No Name" lvl="1135000" mana="9200000" prem="1" exhaustion="2000" selftarget="1" needlearn="0" event="script" value="attack/No Name.lua">
<vocation id="5"/>
<vocation id="6"/>

 

image: PREGUIÇA OWNS!;

 

PS: OS ARQUIVOS NA SPELL DEVER TEM O MESMO NOME DELA.

Editado por Skymagnum
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...