Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_RE_item_load (load1,max_load)
- if load1==0 then load1=65535 end
- local temp = 65536-load1
- temp= temp/65535*max_load
- return math.floor(temp + 0.5)
- end
- function set_RE_item_load (load1,max_load)
- if load1 == 0 then return 65535 end
- local temp=load1/max_load*65535
- temp=65536-temp
- return math.floor(temp)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement