Advertisement
TEKITOU-123

xp

May 4th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. function XP(p: player):
  2. set {_uuid} to uuid of {_p}
  3. loop 120 times:
  4. if {%{_uuid}%::XP} >= {%{_uuid}%::maxXP}:
  5. add 1 to {%{_uuid}%::lv}
  6. subtract {%{_uuid}%::maxXP} from {%{_uuid}%::XP}
  7. set {%{_uuid}%::maxXP} to floor(needXP({_p}))
  8. else if {%{_uuid}%::XP} < {%{_uuid}%::maxXP}:
  9. stop loop
  10. function needXP(p: player) :: number:
  11. set {_uuid} to uuid of {_p}
  12. return {%{_uuid}%::maxXP}+50*({%{_uuid}%::maxXP}/1000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement