Ir para conteúdo
  • 0

Script Spell


112233

Pergunta

olá pessoal eu gostaria de um script de spell eu queria criar um exori q tivese 4 tipos de hit, no primeiro ele ira dar ice no 2 earth 3 fire 4 engerfy tem como alguems fazer uma script pra mim

 

 

exenplo (

(1, 1, 1),

(1, 3, 1), <= ice

(1, 1, 1)

)

(1, 1, 1),

(1, 3, 1), <= earth

(1, 1, 1)

)

(1, 1, 1),

(1, 3, 1), <= fire

(1, 1, 1)

)

(1, 1, 1),

(1, 3, 1), <= energy

(1, 1, 1)

)

Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 41)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.7, -84, -2.4, -108)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 45)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -2.3, -160, -3, -2220)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 36)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -2.3, -170, -3, -230)
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 37)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -2.3, -180, -3, -240)



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





local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)

setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)


local function onCastSpell1(parameters)
   doCombat(parameters.cid, combat1, parameters.var)
end
local function onCastSpell2(parameters)
   doCombat(parameters.cid, combat2, parameters.var)
end
local function onCastSpell3(parameters)
   doCombat(parameters.cid, combat3, parameters.var)
end
local function onCastSpell4(parameters)
   doCombat(parameters.cid, combat4, parameters.var)
end

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

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

  • 0

Fiz o script :)

Vá em data/spells/scripts/attack copie qualquer arquivo que estiver lá dentro, renomei-o para Mega Exori, apague tudo que estiver escrito dentro do arquivo e cole:

 

local combat1 = createCombatObject() 
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) <- ICE
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 0, -90, 0.7, -50)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) <- EARTH
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 0, -90, 0.7, -50)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) <- FIRE
setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat3, COMBAT_FORMULA_SKILL, 0, -90, 0.7, -50)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) <- ENERGY
setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat4, COMBAT_FORMULA_SKILL, 0, -90, 0.7, -50)

local area1 = {
{1, 1, 1},
{1, 3, 1},
{1, 1, 1},
}

local area2 = {
{1, 1, 1},
{1, 3, 1},
{1, 1, 1},
}

local area3 = {
{1, 1, 1},
{1, 3, 1},
{1, 1, 1},
}

local area4 = {
{1, 1, 1},
{1, 3, 1},
{1, 1, 1},
}

setCombatArea(combat1, createCombatArea(area1))
setCombatArea(combat2, createCombatArea(area2))
setCombatArea(combat3, createCombatArea(area3))
setCombatArea(combat4, createCombatArea(area4))

function onCastSpell(cid, var)
addEvent(doCombat, 100, cid, combat1, var) -- Tempo das magias
addEvent(doCombat, 400, cid, combat2, var)
addEvent(doCombat, 700, cid, combat3, var)
addEvent(doCombat, 1000, cid, combat4, var)
end

 

Vá em data/spells/spells.xml e cole:

<instant name="Mega Berserk" words="mega exori" lvl="50" mana="250" prem="1" needweapon="1" exhaustion="2000" needlearn="0" script="attack/mega exori.lua">
	<vocation name="Knight" />
	<vocation name="Elite Knight" />
</instant>

 

Explicando:

<instant name="Nome da magia" words="palavras magicas" lvl="level para utilizar a magia" mana="mana necessaria" prem="1" needweapon="é nessecario estar segurando alguma sword/club/axe" exhaustion="tempo de exhaust" needlearn="0" script="localização script(lua)">

<vocation name="Vocação" />

<vocation name="Vocação" />

</instant>

 

@UP começei a faze o script enqnt vc n tinha postado, dai postei o meu tbm :whistle:

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

×
×
  • Criar Novo...