Advertisement
Guest User

FindTheButton

a guest
Feb 27th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.03 KB | None | 0 0
  1. options:
  2. # Nazwa serwera wykorzystywana w wiadomosciach oraz przedmiotach
  3. tag: &a&lServer &7»&f
  4. logo: &a&lServer
  5. # Ilosc dostawanego doswiadczenia za przejscie areny
  6. easy: 5
  7. medium: 10
  8. hard: 20
  9. easyvip: 10
  10. mediumvip: 15
  11. hardvip: 25
  12. # Liczba potrzebnych przyciskow do ponownego klikniecia w ten sam guzik
  13. newbutton: 20
  14. on join:
  15. if {FTB::%player%::Exp} is not set:
  16. set {FTB::%player%::Exp} to 0
  17. if {FTB::%player%::Money} is not set:
  18. set {FTB::%player%::Money} to 0
  19. if {FTB::%player%::Level} is not set:
  20. set {FTB::%player%::Level} to 1
  21. if {FTB::%player%::Next} is not set:
  22. set {FTB::%player%::Next} to 100
  23. if {FTB::%player%::Buttons::*} is not set:
  24. set {FTB::%player%::Buttons::*} to "brak"
  25. command /refreshScore [<player>]:
  26. executable by: console
  27. trigger:
  28. wipe player-arg's sidebar
  29. set name of sidebar of player-arg to "&7» &aFindTheButton &7«"
  30. set score "&r" in sidebar of player-arg to 9
  31. set score "Twoja nazwa:" in sidebar of player-arg to 8
  32. set score "&7» &a%player-arg%" in sidebar of player-arg to 7
  33. set score "Poziom:" in sidebar of player-arg to 6
  34. set score "&7» &a%{FTB::%player-arg%::Level}%" in sidebar of player-arg to 5
  35. set score "Doswiadczenie:" in sidebar of player-arg to 4
  36. set score "&7» &a%{FTB::%player-arg%::Exp}% / %{FTB::%player-arg%::Next}%" in sidebar of player-arg to 3
  37. set score "Monety:" in sidebar of player-arg to 2
  38. set score "&7» &a%{FTB::%player-arg%::Money}%" in sidebar of player-arg to 1
  39. on region enter:
  40. wait 2 tick
  41. if "%region at player%" contains "Easy_" or "Medium_" or "Hard_" or "Easyvip_" or "Mediumvip_" or "Hardvip_":
  42. set {_n} to "%region at player%"
  43. replace all "in world world" with "" in {_n}
  44. replace all "in" with "" in {_n}
  45. replace all "world" with "" in {_n}
  46. replace all " " with "" in {_n}
  47. send player title "{@logo}" with subtitle "&a%{_n}%" for 1 second
  48. command /ftb [<text>] [<text>] [<text>]:
  49. permission: *
  50. trigger:
  51. if arg 1 is "create":
  52. # /ftb create easy easy_1
  53. send "{@tag} Stworzono arene &a%arg 3%&f dla aren &a%arg 2%" to player
  54. set {areny::%arg 2%::%arg 3%} to location of player
  55. if arg 1 is "clear":
  56. # /ftb clear easy
  57. clear {areny::%arg 2%::*}
  58. loop {areny::%arg 2%::*}:
  59. send "%loop-value% %loop-index%"
  60. if arg 1 is "list":
  61. # /ftb list easy
  62. loop {areny::%arg 2%::*}:
  63. add 1 to {_n}
  64. send "&f%{_n}%. &a%loop-index%"
  65. command /getArena [<player>] [<text>] [<text>] [<item>]:
  66. executable by: console
  67. trigger:
  68. open chest with 6 rows named "&rMenu" to player-arg
  69. wait 2 tick
  70. set {_slot} to 0
  71. loop {areny::%arg 2%::*}:
  72. format slot {_slot} of player-arg with 1 of arg 4 named "&a%loop-index%" with lore "&fNagroda: &a%arg 3% doswiadczenia" to close then run "tpTo %player-arg% %arg 2% %loop-index%"
  73. add 1 to {_slot}
  74. command /tpTo [<player>] [<text>] [<text>]:
  75. executable by: console
  76. trigger:
  77. teleport player-arg to {areny::%arg 2%::%arg 3%}
  78. function menuOpen(gracz: player):
  79. open chest with 5 rows named "&rMenu" to {_gracz}
  80. wait 2 tick
  81. format slot 11 of {_gracz} with 1 of light green wool block named "&7» &aEasy" with lore "&7»&f Kliknij aby wybrac areny easy" to run "getArena %{_gracz}% easy {@easy} light green wool block"
  82. format slot 13 of {_gracz} with 1 of orange wool block named "&7» &6Medium" with lore "&7»&f Kliknij aby wybrac areny medium" to run "getArena %{_gracz}% medium {@medium} orange wool block"
  83. format slot 15 of {_gracz} with 1 of red wool block named "&7» &cHard" with lore "&7»&f Kliknij aby wybrac areny hard" to run "getArena %{_gracz}% hard {@hard} red wool block"
  84. if {_gracz} has permission "arenyvip":
  85. format slot 29 of {_gracz} with 1 of light green clay named "&7» &aEasy VIP" with lore "&7»&f Kliknij aby wybrac areny easy" to run "getArena %{_gracz}% easyvip {@easyvip} light green clay"
  86. format slot 31 of {_gracz} with 1 of orange clay named "&7» &6Medium VIP" with lore "&7»&f Kliknij aby wybrac areny medium" to run "getArena %{_gracz}% mediumvip {@mediumvip} orange clay"
  87. format slot 33 of {_gracz} with 1 of red clay named "&7» &cHard VIP" with lore "&7»&f Kliknij aby wybrac areny hard" to run "getArena %{_gracz}% hardvip {@hardvip} red clay"
  88. else:
  89. format slot 29 of {_gracz} with 1 of light green clay named "&7» &aEasy VIP" to close
  90. format slot 31 of {_gracz} with 1 of orange clay named "&7» &6Medium VIP" to close
  91. format slot 33 of {_gracz} with 1 of red clay named "&7» &cHard VIP" to close
  92. function lvlUp(gracz: player):
  93. if {FTB::%{_gracz}%::Next} is smaller or equal to {FTB::%{_gracz}%::Exp}:
  94. add 1 to {FTB::%{_gracz}%::Level}
  95. set {FTB::%{_gracz}%::Next} to {FTB::%{_gracz}%::Next}*3
  96. send {_gracz} title "&a&lNOWY POZIOM - %{FTB::%{_gracz}%::Level}%" with subtitle "&f%{FTB::%{_gracz}%::Exp}% / %{FTB::%{_gracz}%::Next}%"
  97. execute console command "refreshScore %{_gracz}%"
  98. function useButton(gracz: player, arena: text, exp: number, location: text):
  99. set {_n} to "%region at {_gracz}%"
  100. replace all "in world world" with "" in {_n}
  101. replace all "in" with "" in {_n}
  102. replace all "world" with "" in {_n}
  103. replace all " " with "" in {_n}
  104. if "%{FTB::%{_gracz}%::Buttons::*}%" contains "%{_location}%":
  105. teleport {_gracz} to {areny::%{_arena}%::%{_n}%}
  106. stop
  107. else:
  108. set action bar of {_gracz} to "&7»&f &a+%{_exp}%&f doswiadczenia"
  109. teleport {_gracz} to {areny::%{_arena}%::%{_n}%}
  110. add {_exp} to {FTB::%{_gracz}%::Exp}
  111. lvlUp({_gracz})
  112. chance of 20%:
  113. set {_money} to random integer between 1 and 3
  114. add {_money} to {FTB::%{_gracz}%::Money}
  115. execute console command "refreshScore %{_gracz}%"
  116. add "%{_location}%" to {FTB::%{_gracz}%::Buttons::*}
  117. loop {FTB::%{_gracz}%::Buttons::*}:
  118. add 1 to {_nr}
  119. if {_nr} is bigger or equal to {@newbutton}:
  120. clear {FTB::%{_gracz}%::Buttons::*}
  121. on right click:
  122. if event-item is book named "{@logo}":
  123. menuOpen(player)
  124. if event-block is button:
  125. if "%region at player%" contains "Easy_" or "Medium_" or "Hard_" or "Easyvip_" or "Mediumvip_" or "Hardvip_":
  126. if "%region at event-block%" contains "Easy_":
  127. useButton(player, "easy", {@easy}, "%location at event-block%")
  128. if "%region at event-block%" contains "Medium_":
  129. useButton(player, "medium", {@medium}, "%location at event-block%")
  130. if "%region at event-block%" contains "Hard_":
  131. useButton(player, "hard", {@hard}, "%location at event-block%")
  132. if "%region at event-block%" contains "Easyvip_":
  133. useButton(player, "easyvip", {@easyvip}, "%location at event-block%")
  134. if "%region at event-block%" contains "Mediumvip":
  135. useButton(player, "mediumvip", {@mediumvip}, "%location at event-block%")
  136. if "%region at event-block%" contains "Hardvip":
  137. useButton(player, "hardvip", {@hardvip}, "%location at event-block%")
  138. else:
  139. send "{@tag} Musisz byc na terenie areny aby moc kliknac ten przycisk"
  140. cancel event
  141. stop
  142. on drop:
  143. if event-item is book named "{@logo}":
  144. cancel event
  145. on join:
  146. clear player's inventory
  147. give 1 book named "{@logo}" to player
  148. execute console command "refreshScore %player%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement