Jump to content
  • 0
xugrude456

spell que faz summoon e explode

Question

7 answers to this question

Recommended Posts

  • 1
Em 24/04/2019 em 12:59, jenison06 disse:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat1, COMBAT_PARAM_ELEMENT, 1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat2, COMBAT_PARAM_ELEMENT, 1)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat3, COMBAT_PARAM_ELEMENT, 1)
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat4, COMBAT_PARAM_ELEMENT, 1)
local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 59)
setCombatParam(combat5, COMBAT_PARAM_ELEMENT, 1)

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, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0,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, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 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, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
arr5 = {
{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, 1, 1, 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, 0, 1, 1, 1, 2, 1, 1, 1, 0, 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, 1, 1, 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},
}
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 onCastSpell2(parameters)
    if isCreature(parameters.cid) then
    local health = getCreatureHealth(parameters.cid)
    parameters.var.pos = getCreaturePosition(parameters.cid)
        doCombat(parameters.cid, combat2, parameters.var)
        doCreatureAddHealth(parameters.cid, -health/3)
    end
end
local function onCastSpell3(parameters)
    if isCreature(parameters.cid) then
    local health = getCreatureHealth(parameters.cid)
    parameters.var.pos = getCreaturePosition(parameters.cid)
        doCombat(parameters.cid, combat3, parameters.var)
        doCreatureAddHealth(parameters.cid, -health/2)
    end
end
local function onCastSpell4(parameters)
    if isCreature(parameters.cid) then
    local health = getCreatureHealth(parameters.cid)
    parameters.var.pos = getCreaturePosition(parameters.cid)
        doCombat(parameters.cid, combat4, parameters.var)
        doCreatureAddHealth(parameters.cid, -health/2)
    end
end
local function onCastSpell5(parameters)
    if isCreature(parameters.cid) then
    local health = getCreatureHealth(parameters.cid)
    parameters.var.pos = getCreaturePosition(parameters.cid)
        doCombat(parameters.cid, combat5, parameters.var)
        doCreatureAddHealth(parameters.cid, -health)
    end
end

function onCastSpell(cid, var)
    local parameters = { cid = cid, var = var}
    doSaySpell(cid, "Selfdestruct")
    doCombat(cid, combat1, var)
    doCreatureAddHealth(parameters.cid, -getCreatureHealth(cid)/4)
    addEvent(onCastSpell2, 500, parameters)   
    addEvent(onCastSpell3, 1000, parameters)   
    addEvent(onCastSpell4, 1500, parameters)   
    addEvent(onCastSpell5, 2000, parameters)   
    return true
end

<instant name="Selfdestruct" words="Selfdestruct" enabled="0" event="script" value="Selfdestruct.lua" />

 

opa desculpe reviver o topico mas como funciona a spells

 

Link to post
Share on other sites
  • 0
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat1, COMBAT_PARAM_ELEMENT, 1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat2, COMBAT_PARAM_ELEMENT, 1)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat3, COMBAT_PARAM_ELEMENT, 1)
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat4, COMBAT_PARAM_ELEMENT, 1)
local combat5 = createComb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2 = 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 onCastSpell2(parameters)
    if isCreature(parameters.cid) then
    local health = getCreatureHealth(parameters.cid)
    parameters.var.pos = getCreaturePosition(parameters.cid)
        doCombat(parameters.cid, combat2, parameters.var)
        doCreatureAddHealth(parameters.cid, -health/3)
    end
end
local function onCastSpell3(parameters)
    if isCreature(parameters.cid) then
    local health = getCreatureHealth(parameters.cid)
    parameters.var.pos = getCreaturePosition(parameters.cid)
        doCombat(parameters.cid, combat3, parameters.var)
        doCreatureAddHealth(parameters.cid, -health/2)
    end
end
local function onCastSpell4(parameters)
    if isCreature(parameters.cid) then
    local health = getCreatureHealth(parameters.cid)
    parameters.var.pos = getCreaturePosition(parameters.cid)
        doCombat(parameters.cid, combat4, parameters.var)
        doCreatureAddHealth(parameters.cid, -health/2)
    end
end
local function onCastSpell5(parameters)
    if isCreature(parameters.cid) then
    local health = getCreatureHealth(parameters.cid)
    parameters.var.pos = getCreaturePosition(parameters.cid)
        doCombat(parameters.cid, combat5, parameters.var)
        doCreatureAddHealth(parameters.cid, -health)
    end
end

function onCastSpell(cid, var)
    local parameters = { cid = cid, var = var}
    doSaySpell(cid, "Selfdestruct")
    doCombat(cid, combat1, var)
    doCreatureAddHealth(parameters.cid, -getCreatureHealth(cid)/4)
    addEvent(onCastSpell2, 500, parameters)   
    addEvent(onCastSpell3, 1000, parameters)   
    addEvent(onCastSpell4, 1500, parameters)   
    addEvent(onCastSpell5, 2000, parameters)   
    return true
end

<instant name="Selfdestruct" words="Selfdestruct" enabled="0" event="script" value="Selfdestruct.lua" />

 

Link to post
Share on other sites
  • 0
3 horas atrás, Senju uchira disse:

opa desculpe reviver o topico mas como funciona a spells

 

Cria um arquivo do spell e coloca dentro da pasta spells e coloca o nome do arquivo no arquivo spells.xml

Link to post
Share on other sites
  • 0
6 horas atrás, brazvct disse:

Cria um arquivo do spell e coloca dentro da pasta spells e coloca o nome do arquivo no arquivo spells.xml

[11:14:47.508] [Error - Spell Interface]
[11:14:47.510] data/spells/scripts/attack/death strike.lua:onCastSpell
[11:14:47.511] Description:
[11:14:47.512] data/spells/scripts/attack/death strike.lua:136: attempt to call global 'doSaySpell' (a nil value)
[11:14:47.512] stack traceback:
[11:14:47.513]  data/spells/scripts/attack/death strike.lua:136: in function <data/spells/scripts/attack/death strike.lua:134>

Link to post
Share on other sites
  • 0
9 horas atrás, Senju uchira disse:

[11:14:47.508] [Error - Spell Interface]
[11:14:47.510] data/spells/scripts/attack/death strike.lua:onCastSpell
[11:14:47.511] Description:
[11:14:47.512] data/spells/scripts/attack/death strike.lua:136: attempt to call global 'doSaySpell' (a nil value)
[11:14:47.512] stack traceback:
[11:14:47.513]  data/spells/scripts/attack/death strike.lua:136: in function <data/spells/scripts/attack/death strike.lua:134>

Ta faltando a funçao no seu TFS

Link to post
Share on other sites
  • 0
4 horas atrás, brazvct disse:

Ta faltando a funçao no seu TFS

foda dms mano kkk mas como ela funciona, queria uma que o clone explodi-se e causa-se dano mas ele  so explodia com o comando !katsu

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...