• 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!

[TFS 1.X] Flexible spells lib + Spell Level System (configurable with growing areas, damage etc)

I wanted to use the system, without having anything to do with the areas, I am only interested in the increase in damage per spell

I was trying to add to the strikes

exori flam
exori vis
exori gran con
exori gran ico

and others with area
exori
exori gran
exori san

how can i add it to exori vis?

i try but dont works:

Lua:
local spellname, effect, area, damagetype = "Energy Strike", CONST_ME_ENERGYAREA, "CONST_ANI_ENERGY", COMBAT_ENERGYDAMAGE
   
function onCastSpell(creature, variant)
    local level, maglevel = creature:getLevel(), creature:getMagicLevel()
    local min = (level / 5) + (maglevel * 1.403) + 8
    local max = (level / 5) + (maglevel * 2.203) + 13
    return creature:doLevelCombat(variant, spellname, effect, area, damagetype, min, max)
end
Sorry i forgot i received the notification but forgot to reply onto it.
I will update the script soon, i remember there was some forum feature was messing with my script.


You should add this in the SPELLS_LEVEL_LIST table:
["Energy Strike"] = {lvlstorage = 1001, dmgmultiplier = 1.5, increaseSize = false, maxlvl = 100},
 
Lua Script Error: [Test Interface]
data/globalevents/scripts/startup.lua
LuaScriptInterface::luaCreateCombatArea(). Invalid area table.
stack traceback:
[C]: in function 'createCombatArea'
data/globalevents/scripts/startup.lua:14: in main chunk

Lua Script Error: [Test Interface]
data/globalevents/scripts/startup.lua
LuaScriptInterface::luaCreateCombatArea(). Invalid area table.
stack traceback:
[C]: in function 'createCombatArea'
data/globalevents/scripts/startup.lua:14: in main chunk

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/startup.lua
LuaScriptInterface::luaCreateCombatArea(). Invalid area table.
stack traceback:
[C]: in function 'createCombatArea'
data/globalevents/scripts/startup.lua:14: in main chunk

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/startup.lua
LuaScriptInterface::luaCreateCombatArea(). Invalid area table.
stack traceback:
[C]: in function 'createCombatArea'
data/globalevents/scripts/startup.lua:14: in main chunk
TFS 1.5 BY NEKIRO DOWNGRADE 8.6
creaturescripts/firstlogin.lua EDIT:
Lua:
local voc = self:getVocation:getId()
CHANGE:
Lua:
local voc = self:getVocation():getId()

data/globalevents/scripts/startup.lua:14
error in line:
Lua:
table.insert(arrs, createCombatArea(_G[SPELLS_LEVEL_AREAS[y]]))
 
TFS 1.5 BY NEKIRO DOWNGRADE 8.6
creaturescripts/firstlogin.lua EDIT:
Lua:
local voc = self:getVocation:getId()
CHANGE:
Lua:
local voc = self:getVocation():getId()

error in line:
Lua:
table.insert(arrs, createCombatArea(_G[SPELLS_LEVEL_AREAS[y]]))
That's a error from my side, the "()" part is needed for every TFS version.
 
It seems that in the lib in spells I don't have such a Squares table and that's why the script crashes an error, I have to go to work after work, I'll check and let you know.
 
The script works, although not quite, because the last two spells do not display and do damage without errors in the console, but the ability to cast spells is promoted.

How do I reduce spell skill growth so it doesn't pick up after one spell use?
 
Back
Top