Using; tfs 1.5 together with the alkarius 1.3 and the attribute crafting system that is in the files are currently not up to date and need some code-fixing to work.
I've tried to google and the best help I've found was through puncker to add a few lines in compat (which hasn't helped me in the long run, sadly;
The two errors I've found so far related to this crafting system can be seen below;
This one below says "data/script/others/stats.lua and I do not even have the path "data/scripts/others/stats.lua" because the second stats.lua file is in the path "data/creaturescripts/others/stats.lua" so I added one then copy/pasted the lua file and that just ended with another nil value error
Pastebin below to my /data/stats.lua;
data/stats.lua - Pastebin.com (https://pastebin.com/r9epJtVy)
Code to my /data/creaturescripts/others/stats.lua;
This is how the creaturescript.xml looks;
I hope I've made any sense, another long night with way too little sleep and way too much tryhard mode haha.
/Thanks in advance, Erna.
I've tried to google and the best help I've found was through puncker to add a few lines in compat (which hasn't helped me in the long run, sadly;
Lua:
function doTargetCombatHealth(...) return doTargetCombat(...) end
function doAreaCombatHealth(...) return doAreaCombat(...) end
function doTargetCombatMana(cid, target, min, max, effect) return doTargetCombat(cid, target, COMBAT_MANADRAIN, min, max, effect) end
function doAreaCombatMana(cid, pos, area, min, max, effect) return doAreaCombat(cid, COMBAT_MANADRAIN, pos, area, min, max, effect) end
The two errors I've found so far related to this crafting system can be seen below;
Code:
lua script error: [CreatureScript Interface]
data/scripts/others/stats.lua:onHealthChange
data/stats.lua:1583: attempt to index a nil value
stack traceback:
[C]: in function '__index'
data/stats.lua:1583: in function <data/stats.lua:1516
Code:
lua script error: [CreatureScript Interface]
data/scripts/others/stats.lua:onHealthChange
data/stats.lua:1583: attempt to call method 'getMana' a nil value
stack traceback:
[C]: in function 'getMana'
data/stats.lua:1583: in function <data/stats.lua:1516
This one below says "data/script/others/stats.lua and I do not even have the path "data/scripts/others/stats.lua" because the second stats.lua file is in the path "data/creaturescripts/others/stats.lua" so I added one then copy/pasted the lua file and that just ended with another nil value error
Pastebin below to my /data/stats.lua;
data/stats.lua - Pastebin.com (https://pastebin.com/r9epJtVy)
Code to my /data/creaturescripts/others/stats.lua;
Code:
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
return stat_onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
end
function onManaChange(creature, attacker, manaChange, origin)
return stat_onManaChange(creature, attacker, manaChange, origin)
end
function onPrepareDeath(creature, lastHitKiller, mostDamageKiller)
return stat_onPrepareDeath(creature, lastHitKiller, mostDamageKiller)
end
function onKill(player, target, lastHit)
return stat_onKill(player, target, lastHit)
end
function onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
return stat_onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
end
function onLogin(player)
return stat_onLogin(player)
end
This is how the creaturescript.xml looks;
Code:
<event type="login" name="statLogin" script="others/stats.lua"/>
<event type="healthchange" name="statHP" script="others/stats.lua"/>
<event type="manachange" name="statMP" script="others/stats.lua"/>
<event type="preparedeath" name="statPVE" script="others/stats.lua"/>
<event type="kill" name="statLoot" script="others/stats.lua"/>
<event type="death" name="statDeath" script="others/stats.lua"/>
I hope I've made any sense, another long night with way too little sleep and way too much tryhard mode haha.
/Thanks in advance, Erna.