Advertisement
Guest User

Untitled

a guest
Aug 31st, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. function get_RE_item_load (load1,max_load)
  2. if load1==0 then load1=65535 end
  3. local temp = 65536-load1
  4. temp= temp/65535*max_load
  5. return math.floor(temp + 0.5)
  6. end
  7.  
  8. function set_RE_item_load (load1,max_load)
  9. if load1 == 0 then return 65535 end
  10. local temp=load1/max_load*65535
  11. temp=65536-temp
  12. return math.floor(temp)
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement