• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua [TFS 1.2] Capacity Affects Player Speed

boxxer321

Well-Known Member
Joined
Nov 5, 2011
Messages
122
Reaction score
68
Hi, anybody can help me with this script? i don't know how to install

  1. local p = {}

  2. function onThink(interval, lastExecution, thinkInterval)
  3. for _, name in ipairs(Game.getPlayers()) do
  4. local player = Player(name)
  5. local guid = player:getGuid()
  6. local maxCap, freeCap = player:getCapacity(), player:getFreeCapacity()
  7. if not p[guid] or p[guid] ~= freeCap then
  8. local delta = freeCap / (maxCap * 0.01) * (player:getBaseSpeed() * 0.01)
  9. player:changeSpeed(-player:getSpeed() + ((delta <= 220) and 220 or delta))
  10. p[guid] = freeCap
  11. end
  12. end
  13. return true
  14. end
original topic: GlobalEvent - [TFS 1.x] Capacity Affects Player Speed
 
sorry... anybody fix the script?
I am trying to help you, if you're going to be an asshole then you can wait for someone else to come along.
However I am telling you nobody is going to assist you if you don't make it easy for them and that means including enough information.
If you want to know how to submit a better request, read up on the rules in the sticky.
 
Back
Top