knugi

Skript - punkty ze stone z lvl do 30

Jan 2nd, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.47 KB | None | 0 0
  1. options:
  2. enable: true #Czy skrypt ma byc aktywny
  3. minLvlToChat: 3 #Minimalny poziom do pisania na chacie
  4. prefix: &8[&aPkt&8] #Prefix przed wiadomosciami
  5. chanceToPkt: 30 #Szansa na punkt (100% - cały czas)
  6. maxLootPkt: 5 #Maxymalna ilość punktów ze stone
  7. sendAddPkt: true #Czy ma pokazywac ile zdobyl punktow ze stone
  8. command /pkt [<text>] [<text>]:
  9. trigger:
  10. if {@enable} is true:
  11. if arg 1 is not set:
  12. send "&6Komendy punktow:"
  13. send "&a/pkt pokaz &8- &7pokazuje lvl i ilosc punktow"
  14. send "&a/pkt pokaz nick &8- &7pokazuje lvl i punkty gracza"
  15. send "&a/pkt top &8- &7pokazuje top 5 graczy"
  16. send "&a/pkt reset &8- &7resetuje twoje punkty"
  17. send "&a/pkt info &8- &7info dotyczace nabijania lvl"
  18. stop
  19. if arg 1 is "pokaz":
  20. if arg 2 is not set:
  21. send "{@prefix} &aMasz &c%{spkt.%player%}% &alvl i punktow: &6%{spkt::%player%}%"
  22. stop
  23. if {spkt::%arg 2%} is set:
  24. send "{@prefix} &6%arg 2% &aposiada &c%{spkt.%arg 2%}% &alvl i punktow: &6%{spkt::%arg 2%}%"
  25. stop
  26. send "{@prefix} &cNie ma takiego gracza."
  27. stop
  28. if arg 1 is "top":
  29. set {_s} to size of {spkt::*}
  30. loop {_s} times:
  31. loop {spkt::*}:
  32. if {_v.%loop-number%} is not set:
  33. set {_v.%loop-number%} to loop-value
  34. set {_n.%loop-number%} to loop-index
  35. if loop-value is larger than {_v.%loop-number%}:
  36. set {_v.%loop-number%} to loop-value
  37. set {_n.%loop-number%} to loop-index
  38. remove {_v.%loop-number%} from {spkt::*}
  39. loop {_s} times:
  40. if loop-number is smaller than or equal to 5:
  41. send "&4%loop-number%. &c%{_n.%loop-number%}% &8- &e%{_v.%loop-number%}% &8[&2%{spkt.%{_n.%loop-number%}%}%lv&8]"
  42. set {spkt::%{_n.%loop-number%}%} to {_v.%loop-number%}
  43. stop
  44. if arg 1 is "reset":
  45. if arg 2 is "yes" or "tak":
  46. set {spkt::%player%} to 1
  47. set {spkt.%player%} to 1
  48. send "{@prefix} &aZrestartowales sobie punkty"
  49. stop
  50. send "{@prefix} &aAby zrestartowac punkty i lvl wpisz: &6/pkt reset tak"
  51. stop
  52. if arg 1 is "info":
  53. send "{@prefix} &aPunkty nabija sie za kopanie stone"
  54. send "&7Lvl rosnie co 100 pkt i mozesz miec maxymalnie 30 lvl"
  55. send "&7Skrypt wykonany przez &6Knugi"
  56. stop
  57. execute player command "pkt"
  58. stop
  59. send "{@prefix} &cSkrypt jest wylaczony. &8(&2Knugi&8)"
  60. stop
  61. on join:
  62. if {@enable} is true:
  63. if {spkt::%player%} is not set:
  64. set {spkt::%player%} to 1
  65. set {spkt.%player%} to 1
  66. on chat:
  67. if {@enable} is true:
  68. if player has permission "lvl.admin":
  69. stop
  70. if {spkt.%player%} is smaller than {@minLvlToChat}:
  71. cancel event
  72. send "{@prefix} &7Na chacie mozna pisac od {@minLvlToChat} lvl &8(&7Masz %{spkt.%player%}%&8)"
  73. stop
  74. on break of stone:
  75. if {@enable} is true:
  76. chance of {@chanceToPkt}%:
  77. set {_r} to {@maxLootPkt}
  78. loop 15 times:
  79. if {_rr} is set:
  80. exit loop
  81. loop {_r} times:
  82. chance of 100 / {_r}%:
  83. set {_rr} to loop-number-2
  84. exit loop
  85. add {_rr} to {spkt::%player%}
  86. if {@sendAddPkt} is true:
  87. send "{@prefix} &aDodano &c%{_rr}% &ado twoich punktow."
  88.  
  89. if {spkt::%player%} is larger than {spkt.%player%} * 100:
  90. if {spkt.%player%} is 30:
  91. stop
  92. if {spkt.%player%} is larger than 30:
  93. set {spkt.%player%} to 30
  94. stop
  95. add 1 to {spkt.%player%}
  96. send "{@prefix} &aAwansowales na poziom &c%{spkt.%player%}%"
  97. stop
Advertisement
Add Comment
Please, Sign In to add comment