Some of you TFS 1.0 may miss the feature of directly adding spell damage as an item attribute, however there is a easy way to do this, however it will require some additional steps.
First step would be to register a creature event that register a number of storage values, as example:
In creature scripts:
In classlogin.lua
Then some of the main work will to edit the spells that you want to work, for example the spell flame strike.
Remove:
Add:
Last step be to use my other script located here:
http://otland.net/threads/tfs-1-0-advanced-item-set-item-management.209707/
Then all you would have to do is to add the values here, 1 point equals 1%, add the associated storage value example at [14] for example, to add % magic damage - itemStorageAddNumber = {40101, 5}
Just add one item between [1] and [10] , a special storage value at [11] and a description if you see fit. Also the starting tag [X] has to be unique in the same script.
First step would be to register a creature event that register a number of storage values, as example:
In creature scripts:
Code:
<event type="login" name="Classlogon" script="classlogin.lua"/>
In classlogin.lua
Code:
function onLogin(cid)
if getPlayerStorageValue(cid, 40000) < 0 then
setPlayerStorageValue(cid, 40000, 1)
setPlayerStorageValue(cid, 40101, 0) --- All spells
setPlayerStorageValue(cid, 40102, 0) --- Fire
setPlayerStorageValue(cid, 40103, 0) --- Frost
setPlayerStorageValue(cid, 40104, 0) --- Earth
setPlayerStorageValue(cid, 40105, 0) --- Lightning
setPlayerStorageValue(cid, 40106, 0) --- Death
setPlayerStorageValue(cid, 40107, 0) --- Holy
end
end
Then some of the main work will to edit the spells that you want to work, for example the spell flame strike.
Remove:
Code:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.4, 0, -0.5, 0)
Add:
Code:
local magic = 40101
local fire = 40102 -- Change this to the effecting elemental.
function onGetFormulaValues(cid, level, maglevel)
local min = (100*( (maglevel * 0.4) + (level * 0) + 0)) / (100 - getPlayerStorageValue(cid, fire) - getPlayerStorageValue(cid, magic))
local max =(100*( (maglevel * 0.5) + (level * 0) + 0)) / (100 - getPlayerStorageValue(cid, fire) - getPlayerStorageValue(cid, magic))
return -min, -max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
Last step be to use my other script located here:
http://otland.net/threads/tfs-1-0-advanced-item-set-item-management.209707/
Then all you would have to do is to add the values here, 1 point equals 1%, add the associated storage value example at [14] for example, to add % magic damage - itemStorageAddNumber = {40101, 5}
Just add one item between [1] and [10] , a special storage value at [11] and a description if you see fit. Also the starting tag [X] has to be unique in the same script.
Code:
[X] = {
[1] = {}, --- Helmet
[2] = {}, --- Amulet
[3] = {}, --- Backpack
[4] = {}, --- Armor
[5] = {}, --- Right
[6] = {}, --- Left
[7] = {}, --- Legs
[8] = {}, --- Feet
[9] = {}, --- Ring
[10] = {}, --- Ammo
[11] = {16750}, --- Put a unique storage value here
[12] = {
[1] = {}, --- Equip Text 1
[2] = {}, --- Equip Text 2
[3] = {} --- Equip Text 3
},
[13] = {
[1] = {enable = true}, --- Enable All items bonus
[2] = {enable = false}, --- Enable All-1 setitems bonus
[3] = {enable = false}}, --- Enable All-2 setitems bonus
[14] = {
[1] = {itemStorageAddNumber = {40101, 5}},
[2] = {},
[3] = {}
},
},
Last edited: