• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Skill speed

whiteblXK

Active Member
Joined
Apr 20, 2011
Messages
315
Solutions
9
Reaction score
32
Location
Poland
Hi, how to make in c++ skill player speed, higher this skill = faster player, I mean about the speed of movement.
 
Code:
function adjustSpeed(cid) --put it in the lib, or not, your choose ;p
  local skillID = x --change this
  local speedPerLvl = xxx --change this
 
  if not isPlayer(cid) then return end
  doChangeSpeed(cid, -getCreatureSpeed(cid))
  doChangeSpeed(cid, getPlayerSkillLevel(cid, skillID)*speedPerLvl)
end

function onLogin(cid)
  adjustSpeed(cid) 
return true
end

function onAdvance(cid, skill, oldLevel, newLevel)
  adjustSpeed(cid)
return true
end

something like this?
 
Almost a what I wanted. That skill is like a bonus to the player's speed and I want this script also concerned the gm, god, etc.
 
Back
Top