marcos16
Falkhonn
- Joined
- May 4, 2012
- Messages
- 224
- Reaction score
- 1
I am using a script to change speed. But when a player moves from level with the effect of any speed magic happens the following: Ex: Level 300 with speed 380 uses run magic is about 450 but the speed of advance level [with yet activated hur] back to speed 400 [which is level of speed 301+] When the effect ends hur back to speed 330. One could modify to do this?
Below the script:
Below the script:
Code:
local info = {
[{10, 49}] = {speed = 250},
[{50, 100}] = {speed = 290},
[{101, 149}] = {speed = 340},
[{150, 249}] = {speed = 360},
[{250, 300}] = {speed = 380},
[{301, 4000}] = {speed = 400}
}
function onAdvance(cid, skill, oldLevel, newLevel)
for level, x in pairs(info) do
if skill == 8 and newLevel >= level[1] and newLevel <= level[2] then
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, x.speed)
end
end
return 1
end