• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Reborn spells

Death-Pulse

Owner of Death-Pulse
Joined
May 10, 2014
Messages
100
Reaction score
0
Where would i add reborn level to use this spell and what would i put in there ;)
using tfs 0.3.6
Code:
local earthQuakeWaveArea = {

    createCombatArea({
        {0, 1, 0},
        {1, 2, 1},
        {0, 1, 0}
    }),

    createCombatArea({
        {0, 0, 1, 0, 0},
        {0, 1, 1, 1, 0},
        {1, 1, 2, 1, 1},
        {0, 1, 1, 1, 0},
        {0, 0, 1, 0, 0}
    }),

    createCombatArea({
        {0, 0, 0, 1, 0, 0, 0, 0, 0},
        {0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 1, 0, 1, 0, 1, 0, 0, 0},
        {1, 1, 1, 2, 1, 1, 1, 0, 0},
        {0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 0, 0, 0, 0}
    }),

    createCombatArea({
        {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
        {0, 1, 0, 0, 1, 0, 0, 1, 0, 0},
        {1, 1, 1, 1, 2, 1, 1, 1, 1, 0},
        {0, 1, 0, 0, 1, 0, 0, 1, 0, 0},
        {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 0, 1, 0, 0, 0, 0, 0}
    }),

    createCombatArea({
        {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
        {0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0},
        {1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
        {0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0},
        {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}
    }),

    createCombatArea({
        {1, 1, 1},
        {1, 2, 1},
        {1, 1, 1}
    }),

    createCombatArea({
        {1, 1, 0, 1, 1},
        {1, 1, 0, 1, 1},
        {0, 0, 2, 0, 0},
        {1, 1, 0, 1, 1},
        {1, 1, 0, 1, 1}
    }),

    createCombatArea({
        {1, 1, 0, 0, 0, 1, 1},
        {1, 1, 0, 0, 0, 1, 1},
        {0, 0, 1, 0, 1, 0, 0},
        {0, 0, 0, 2, 0, 0, 0},
        {0, 0, 1, 0, 1, 0, 0},
        {1, 1, 0, 0, 0, 1, 1},
        {1, 1, 0, 0, 0, 1, 1}
    }),

    createCombatArea({
        {1, 1, 0, 0, 0, 0, 0, 1, 1},
        {1, 1, 0, 0, 0, 0, 0, 1, 1},
        {0, 0, 1, 0, 0, 0, 1, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 2, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 1, 0, 0, 0, 1, 0, 0},
        {1, 1, 0, 0, 0, 0, 0, 1, 1},
        {1, 1, 0, 0, 0, 0, 0, 1, 1}
    }),

    createCombatArea({
        {1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1},
        {1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1},
        {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, 0, 0, 2, 0, 0, 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},
        {1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1},
        {1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1}
    })
}

function onGetFormulaValues(cid, level, skill, attack, factor)
    return -(((skill + 4) * 6) + (level * 9)), -(((skill + 4) * 6) + (level * 9))
end

local earthQuakeWave = {}
for k, area in ipairs(earthQuakeWaveArea) do
    earthQuakeWave[k] = createCombatObject()
    setCombatParam(earthQuakeWave[k], COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
    setCombatParam(earthQuakeWave[k], COMBAT_PARAM_EFFECT, 34)

    setCombatArea(earthQuakeWave[k], area)
   
    _G["callback1" .. k] = onGetFormulaValues
    setCombatCallback(earthQuakeWave[k], CALLBACK_PARAM_SKILLVALUE, "callback1" .. k)
end

local function castSpellDelay(p)
    doCombat(unpack(p))
end

function onCastSpell(cid, var)
    for k, area in ipairs(earthQuakeWave) do
        addEvent(castSpellDelay, 400 * k, {cid, earthQuakeWave[k], var})
    end
    return LUA_NO_ERROR
end
 
Is the reborn level based on storage?
You can add something like this under function onCastSpell, then change 19000 to the storage of the reborn.
Code:
if getPlayerStorageValue(cid, 19000) < 5 then
   doPlayerSendCancel(cid, "You need to have atleast 5 rebirths.")
   return false
end
 
Back
Top