Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function randomchance(a: strings) :: integer:
- loop 2 times:
- chance of 10+{_a}%:
- set {_return} to 10
- exit loop
- chance of 30+{_a}%:
- set {_return} to 9
- exit loop
- chance of 50+{_a}%:
- set {_return} to 8
- exit loop
- chance of 70+{_a}%:
- set {_return} to 7
- exit loop
- chance of 80+{_a}%:
- set {_return} to 6
- exit loop
- chance of 100%:
- set {_return} to 5
- return {_return}
- on inventory click:
- if lore of clicked item contains "[Thành Phẩm]":
- set {_return} to randomchance({_a})
- loop all items in player's inventory:
- if loop-item's lore contains "[Thành Phẩm]":
- enchant loop-item with Protection {_return}
Advertisement
Add Comment
Please, Sign In to add comment