Ir para conteúdo
  • 0

Bau Que Da Spell


jhonatanp

Pergunta

7 respostass a esta questão

Posts Recomendados

  • 0

Primeiramente, vá na pasta data/spells, abra o seu arquivo spells.xml! Agora procure pela tag da sua magia, aonde estiver "instant name", o Nome que estiver ao lado você põe aonde está escrito "AQUI NOME DA SPELL" no script:

Coloque o script a seguir na pasta data/actions com o nome magianova.lua

 

function onUse(cid, item)
local spell = "AQUI NOME DA SPELL"
if getPlayerLearnedInstantSpell(cid, spell) then
return doPlayerSendCancel(cid, "Você já fez essa quest de magia!") end
return doPlayerLearnInstantSpell(cid, spell)
end

 

Abra o arquivo actions.xml e adicione esta tag:

 

<action actionid="6612" script="magianova.lua"/>

 

Ai agora em ActionID no baú, você coloca 6612

BENÇA E BOA SORTE :))

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

  • 0

Substitua o magianova.lua na pasta data/actions por isso:

 

function onUse(cid, item, frompos, item2, topos)
if item.uid == 6612 then
queststatus = getPlayerStorageValue(cid,6612)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Você completou a quest, parabéns!")
setPlayerStorageValue(cid,6612,1)
else
doPlayerSendTextMessage(cid,22,"Você já pegou o item")
end
end
end

 

A tag no actions.xml substitua por isso:

 

<action uniqueid="6612" script="magianova.lua"/>

 

Abra o arquivo da magia, exemplo Berserker.lua (na pasta data/spells) e lá no final aonde estiver esse trecho>

 

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

 

Apague e substitua por:

local storage = 6612
onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2 }
if getPlayerStorageValue(cid, storage) >= 1 then
return doCombat(cid, combat1, var)
else
return doCombat(cid, combat2, var)
end
return TRUE
end	  

 

Tomare que dê certo agora!

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

  • 0

eu quero colocar esta magia :

 

o que eu subistituo ?

 

 

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat6, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat7, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat8, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat9, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat9, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

 

local combat10 = createCombatObject()

setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat10, COMBAT_PARAM_EFFECT, 27)

setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, 55)

setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -2.0, 0, -1.0, 0)

 

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

 

local function onCastSpell6(parameters)

doCombat(parameters.cid, parameters.combat6, parameters.var)

end

 

local function onCastSpell7(parameters)

doCombat(parameters.cid, parameters.combat7, parameters.var)

end

 

local function onCastSpell8(parameters)

doCombat(parameters.cid, parameters.combat8, parameters.var)

end

 

local function onCastSpell9(parameters)

doCombat(parameters.cid, parameters.combat9, parameters.var)

end

 

local function onCastSpell10(parameters)

doCombat(parameters.cid, parameters.combat10, parameters.var)

end

 

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6, combat7 = combat7, combat8 = combat8, combat9 = combat9, combat10 = combat10 }

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 300, parameters)

addEvent(onCastSpell3, 600, parameters)

addEvent(onCastSpell4, 900, parameters)

addEvent(onCastSpell5, 1200, parameters)

addEvent(onCastSpell6, 1500, parameters)

addEvent(onCastSpell7, 1800, parameters)

addEvent(onCastSpell8, 2100, parameters)

addEvent(onCastSpell9, 2400, parameters)

addEvent(onCastSpell10, 2700, parameters)

 

end

 

 

 

 

 

 

 

Link para o comentário
Compartilhar em outros sites

  • 0

O último trecho antes do end, o que tem umas 15 linhas. Este:

 

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6, combat7 = combat7, combat8 = combat8, combat9 = combat9, combat10 = combat10 }
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell3, 600, parameters)
addEvent(onCastSpell4, 900, parameters)
addEvent(onCastSpell5, 1200, parameters)
addEvent(onCastSpell6, 1500, parameters)
addEvent(onCastSpell7, 1800, parameters)
addEvent(onCastSpell8, 2100, parameters)
addEvent(onCastSpell9, 2400, parameters)
addEvent(onCastSpell10, 2700, parameters)[/font]
[font=tahoma,geneva,sans-serif]end

 

Apague-o e cole este:

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6, combat7 = combat7, combat8 = combat8, combat9 = combat9, combat10 = combat10 }
if getPlayerStorageValue(cid, storage) >= 1 then
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell3, 600, parameters)
addEvent(onCastSpell4, 900, parameters)
addEvent(onCastSpell5, 1200, parameters)
addEvent(onCastSpell6, 1500, parameters)
addEvent(onCastSpell7, 1800, parameters)
addEvent(onCastSpell8, 2100, parameters)
addEvent(onCastSpell9, 2400, parameters)
addEvent(onCastSpell10, 2700, parameters)
return doCombat(cid, combat1, var)
else
return doCombat(cid, combat2, var)
end
return TRUE
end

 

BENÇA :))

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

×
×
  • Criar Novo...