Ir para conteúdo

[Spell] Psyusion


DemonOwnz

Posts Recomendados

Bom galera, vim postar uma spell do pokemon.

 

Primeiro abram o bloco de notas, copiem o código a seguir e salvem como Psyusion.lua na pasta scripts das spells.

 

local acombat1 = createCombatObject()
local acombat2 = createCombatObject()
local acombat3 = createCombatObject()
local acombat4 = createCombatObject()
local acombat5 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 136)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.5, 0, -5.8, 0)

local condition1 = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition1, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat1, condition1)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 133)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -4.5, 0, -5.8, 0)

local condition2 = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition2, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat2, condition2)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 136)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -4.5, 0, -5.8, 0)

local condition3 = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition3, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat3, condition3)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 137)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -4.5, 0, -5.8, 0)

local condition4 = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition4, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat4, condition4)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 133)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -4.5, 0, -5.8, 0)

local condition5 = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition5, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat5, condition5)

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

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

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0, 1, 0, 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}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
setCombatArea(acombat1, area1)
setCombatArea(acombat2, area2)
setCombatArea(acombat3, area3)
setCombatArea(acombat4, area4)
setCombatArea(acombat5, area5)

function onTargetTile(cid, pos)
   doCombat(cid,combat1,positionToVariant(pos))
end

function onTargetTile2(cid, pos)
   doCombat(cid,combat2,positionToVariant(pos))
end

function onTargetTile3(cid, pos)
   doCombat(cid,combat3,positionToVariant(pos))
end

function onTargetTile4(cid, pos)
   doCombat(cid,combat4,positionToVariant(pos))
end

function onTargetTile5(cid, pos)
   doCombat(cid,combat5,positionToVariant(pos))
end

setCombatCallback(acombat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

setCombatCallback(acombat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

setCombatCallback(acombat3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")

setCombatCallback(acombat4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")

setCombatCallback(acombat5, CALLBACK_PARAM_TARGETTILE, "onTargetTile5")

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

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

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

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

local function onCastSpell5(parameters)
   doCombat(parameters.cid, acombat5, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 400, parameters)
addEvent(onCastSpell3, 700, parameters)
addEvent(onCastSpell4, 1000, parameters)
addEvent(onCastSpell5, 1300, parameters)

end

 

Depois só adcionar esse código ao spells.xml.

 

<instant name="Psyusion" words="psyusion" lvl="10000" mana="100" prem="1" exhaustion="2000" selftarget="1" needlearn="0" event="script" value="Psyusion.lua">
</instant>

 

Créditos a min. :winksmiley02:

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
×
×
  • Criar Novo...