frapsik

Parkour [fragment kodu na topke]

Jan 9th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. variables:
  2. {pk.timer.%player%.mili} = 0
  3. {pk.start.%player%} = false
  4. {pk.dolacz.%player%} = false
  5.  
  6. every 0.1 second:
  7. loop all players:
  8. if {pk.dolacz.%loop-player%} is true:
  9. set {_arena} to {%loop-player%::arena}
  10. set {_top} to {top1::%{_arena}%::time}*0.1
  11. display board named "&6===Top &5&l[&6%{_arena}%&5&l]===" to loop-player
  12. make score "=&4&l%{_top}%&6[S]" in board of loop-player to 1
  13. make score "&71.&4&l%{top1::%{_arena}%::player}%" in board of loop-player to 2
  14. move display of loop-player to sidebar
  15. if {pk.start.%loop-player%} is true:
  16. add 1 to {pk.timer.%loop-player%.top}
  17.  
  18. command /parkour [<text>] [<offlineplayer>]:
  19. aliases: pk, park, p
  20. trigger:
  21. if arg 1 is "dolacz" or "join":
  22. if arg-offlineplayer is set:
  23. if player has permission "pk":
  24. if {pk.nazwa.%arg-offlineplayer%} is set:
  25. set {pk.start.%player%} to false
  26. set level of the player to 0
  27. set level progress of the player to 0.0
  28. teleport player to {pk.spawn.%arg-offlineplayer%}
  29. set {pk.dolacz.%player%} to true
  30. wait 5 tick
  31. set {pk.%player%} to location of player
  32. set {%player%::arena} to arg-2
  33. set {_arena} to arg-2
  34. set {pk::timer::%player%::top} to 0
  35. set {_top} to {top1::%{_arena}%::time}*0.1
  36. send "&6&lRekord mapy ustanowil &4&l%{top1::%{_arena}%::player}% &5&l%{_top}% &4&lsek."
  37. send "{@tag} &fDolaczyles do parkoura &a&l%arg-offlineplayer%&7."
  38. stop
  39. else:
  40. send "{@tag} &5&7Ten parkour nie zostal jeszcze zbudowany!"
  41. stop
  42. else:
  43. send "{@tag} &7Poprawne uzycie: &6/pk join <nazwa>"
  44. stop
  45. if arg 1 is "opusc" or "leave" or "wyjdz":
  46. if {pk.dolacz.%player%} is true:
  47. set {pk.dolacz.%player%} to false
  48. set {pk.start.%player%} to false
  49. set level of the player to 0
  50. set level progress of the player to 0.0
  51. set {pk::timer::%player%::top} to 0
  52. clear {pk.%player%}
  53. teleport player to {spawn.spawn}
  54. stop
  55. else:
  56. send "{@tag} &7Nie jestes na zadnym parkourze!"
  57. stop
  58. if arg 1 is "toptime":
  59. if {parkour::arena::%arg-2%} is set:
  60. set {_arena} to arg-2
  61. set {_top} to {top1::%{_arena}%::time}*0.1
  62. send "&6&lTop 1 mapy &3&l%arg 2%&6&l!"
  63. send "&7&l1.&4&l%{top1::%{_arena}%::player}% &5&l%{_top}% &4&lsek."
  64. stop
  65.  
  66. on walk on green stained clay:
  67. if {pk.dolacz.%player%} is true:
  68. execute console command "playsound random.pop %player%"
  69. set {pk::timer::%player%::top} to 0
  70. set level of the player to 0
  71. set level progress of the player to 0.0
  72. set {pk.start.%player%} to true
  73. stop
  74.  
  75. on walk on red stained clay:
  76. if {pk.dolacz.%player%} is true:
  77. if {pk.start.%player%} is true:
  78. teleport player to {pk.%player%}
  79. execute console command "playsound random.pop %player%"
  80. set {pk.start.%player%} to false
  81. display "&5&lTwój czas na mapie to: &6&l%{pk.timer.%player%.sec}%,%{pk.timer.%player%.mili}%&4&ls &4&l[&5&l%{_o}%&4&l] &5&lexp" on bossbar with 50 percent by 5 seconds for player
  82. if {top1::%{_arena}%::time} is not set:
  83. set {top1::%{_arena}%::player} to player
  84. set {top1::%{_arena}%::time} to {pk::timer::%player%::top}
  85. send "&8>&2&lUstanowiles nowy rekord na arenie %{_arena}%!"
  86. broadcast "&8>&2&lGracz ustanowil nowy rekord na arenie %{_arena}%!"
  87. stop
  88. if {top1::%{_arena}%::time} is set:
  89. if {top1::%{_arena}%::time} is more than {pk::timer::%player%::top}:
  90. set {top1::%{_arena}%::player} to player
  91. set {top1::%{_arena}%::time} to {pk::timer::%player%::top}
  92. send "&8>&2&lPobile rekord na arenie %{_arena}%!"
  93. broadcast "&8>&2&lGracz pobil rekord na arenie %{_arena}%!"
  94. stop
  95. set {pk::timer::%player%::top} to 0
  96. clear {%player%::arena}
  97. stop
Advertisement
Add Comment
Please, Sign In to add comment