marcos16
Falkhonn
- Joined
- May 4, 2012
- Messages
- 224
- Reaction score
- 1
Was a problem in a script a few days ago. I ordered a support on and it worked. It is a speed script where I want the speed of the players is low. The script worked, until one player has advanced x level with boh , his speed that was to stay was 420 400. [ 400 + 20 speed speed of boh ] . That is the speed of boh not added. And after the player took a Lyze the character just got -84 speed. [ Every time you take Lyze ]
Could anyone tell what is happening ? Below the script.
Could anyone tell what is happening ? 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)
doCreatureSetStorage(cid, 30029, x.speed)
end
end
return 1
end