Zeldaboy111

Skript #100!

Feb 6th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. function newFile(floc: text) :: text:
  2. if file "%{_floc}%" doesn't exist:
  3. create file "%{_floc}%"
  4.  
  5. function varFile(path: text, file: text) :: texts:
  6. if file "%{_file}%" exists:
  7. set {_var::*} to yaml list "%{_path}%" of file "%{_file}%"
  8. return {_var::*}
  9.  
  10. function capitalizeFirst(text: texts) :: texts:
  11.  
  12. loop {_text::*}:
  13. set {_first-char} to first character of loop-value
  14. set {_remaining} to last (length of loop-value - 1) characters of loop-value
  15.  
  16. set {_output::%loop-index%} to "%{_first-char} in upper case%%{_remaining}%"
  17.  
  18. return {_output::*}
  19.  
  20. #{crate::rinfo::Basic::*}
  21. #{crate::rinfo::Epic::*}
  22. #{crate::rinfo::Legendary::*}
  23.  
  24. function openCrate(p: player, t: string, n: string):
  25. loop {crate::rinfo::%{_t}%::*}:
  26. add {crate::%{_t}%::%loop-index%} to {_roll::*}
  27.  
  28. open chest with 3 rows named {_n} to {_p}
  29. wait a tick
  30. set {_speedFinal} to 1
  31. set {_Selector1} to 4
  32. set {_Selector2} to 22
  33. loop 9 times:
  34. set slot loop-number - 1 of {_p}'s current inventory to orange stained glass pane named " "
  35. set slot loop-number + 17 of {_p}'s current inventory to orange stained glass pane named " "
  36. set slot {_Selector1} of {_p}'s current inventory to shiny light green stained glass named " "
  37. set slot {_Selector2} of {_p}'s current inventory to shiny light green stained glass named " "
  38.  
  39. loop random integer between 10 and 30 times:
  40. if inventory name of {_p}'s current inventory is {_n}:
  41. set {_run} to true
  42. else:
  43. set {_run} to false
  44.  
  45. if {_run} is true:
  46. set {_sel} to 9
  47. loop 8 times:
  48. set {_sel2} to {_sel} -1
  49. set {_item::%{_sel}%} to {_item::%{_sel2}%}
  50. subtract 1 from {_sel}
  51.  
  52. set {_item::1} to a random element out of {_roll::*}
  53.  
  54. loop 9 times:
  55. set slot 8 + loop-number-2 of {_p}'s current inventory to {_item::%loop-number-2%}
  56.  
  57. add 1 to {_speed}
  58.  
  59. if {_speed} is 5:
  60. set {_speed} to 0
  61. add 1 to {_speedFinal}
  62.  
  63. loop {_speedFinal} times:
  64. wait 1 tick
Advertisement
Add Comment
Please, Sign In to add comment