Togu
Advanced OT User
How can I change player speed permanently? I'm using a skill system by points, the "Endurance" (that raises the capacity) is working, but I don't know how to make the "Dexterity" (that changes player speed) works. I think I'm not using the correct function or don't know how to use it.
Code:
[4] = {'Dexterity', -- + Speed
function(player)
return player:getSkillLevel(SKILL_SWORD) end,
function(player)
local gain = gainVoc[player:getBaseVocId()].speed player:sendChangeSpeed(self, player:getStepSpeed() + gain)
return gain end,
1},
[5] = {'Endurance', -- + Capacity
function(player)
return player:getSkillLevel(SKILL_AXE) end,
function(player)
local gain = gainVoc[player:getBaseVocId()].cap player:setCapacity(player:getCapacity() + (gain * 100))
return gain end,
1}