Guest User

Untitled

a guest
Jun 24th, 2017
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. function randomchance(a: strings) :: integer:
  2. loop 2 times:
  3. chance of 10+{_a}%:
  4. set {_return} to 10
  5. exit loop
  6. chance of 30+{_a}%:
  7. set {_return} to 9
  8. exit loop
  9. chance of 50+{_a}%:
  10. set {_return} to 8
  11. exit loop
  12. chance of 70+{_a}%:
  13. set {_return} to 7
  14. exit loop
  15. chance of 80+{_a}%:
  16. set {_return} to 6
  17. exit loop
  18. chance of 100%:
  19. set {_return} to 5
  20. return {_return}
  21. on inventory click:
  22. if lore of clicked item contains "[Thành Phẩm]":
  23. set {_return} to randomchance({_a})
  24. loop all items in player's inventory:
  25. if loop-item's lore contains "[Thành Phẩm]":
  26. enchant loop-item with Protection {_return}
Advertisement
Add Comment
Please, Sign In to add comment