knugi

Untitled

Dec 11th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. #Kod na dodawanie i zapamietywanie w 'bazie' slow :)
  2. on script load:
  3. delete {slowa::*}
  4. if {slowa::*} is not set:
  5. add "mleko" to {slowa::*}
  6. add "kupa" to {slowa::*}
  7. add "knugi" to {slowa::*}
  8.  
  9. command /gennnnnnnnnn:
  10. trigger:
  11. if {slowa::*} is not set:
  12. send "&cSlowniczek nie jest zapelniony!"
  13. stop
  14. #Zabezpieczenie aby skrypt nie wywalal bledow
  15. loop {slowa::*}:
  16. if length of loop-value is smaller than 2:
  17. loop all players:
  18. if loop-player has permission "slowo.admin":
  19. loop 3 times:
  20. send "&cSlowo nr &e%loop-index% &7- &6%loop-value% &cposiada mniej znakow niz 2!" to loop-player
  21. stop
  22. loop 3 times:
  23. send "Slowo nr %loop-index% - %loop-value% posiada mniej znakow niz 2!" to console
  24. stop
  25. set {_o.l.s} to size of {slowa::*}
  26. loop 10 times:
  27. if {_o.loop} is set:
  28. exit loop
  29. loop {_o.l.s} times:
  30. chance of 100 / {_o.l.s}%:
  31. set {_o.loop} to loop-number-2
  32. exit loop
  33. loop {slowa::*}:
  34. if "%loop-index%" is "%{_o.loop}%":
  35. set {slowo.cale.cale} to loop-value
  36. set {_slowo.length} to length of loop-value
  37. loop {_slowo.length} times:
  38. set {_slowo.%loop-number%} to subtext of loop-value from loop-number to loop-number
  39. add "%{_slowo.%loop-number%}%" to {_slowo::*}
  40. set {slowo.cale} to ""
  41. loop 5 times:
  42. if {_slowo::*} is not set:
  43. exit loop
  44. loop {_slowo::*}:
  45. set {_slowo.r} to random element of {_slowo::*}
  46. set {slowo.cale} to "%{slowo.cale}%%{_slowo.r}%"
  47. remove {_slowo.r} from {_slowo::*}
  48. broadcast "&cSlowo do odgadniecia to: &a%{slowo.cale}%"
  49. exit loop
  50. on chat:
  51. if "%message%" is "%{slowo.cale.cale}%":
  52. cancel event
  53. broadcast "&cGracz &6%player% &codgadl slowo: &a%{slowo.cale.cale}%"
  54. give 2 diamond to the player
  55. clear {slowo.cale}
  56. clear {slowo.cale.cale}
  57.  
  58. every 1 second:
  59. if {slowo.time} is not set:
  60. set {slowo.time} to 60 * 15
  61. if {slowo.time} is larger than 0:
  62. remove 1 from {slowo.time}
  63. if {slowo.time} is 0:
  64. execute console command "gennnnnnnnnn"
  65. set {slowo.time} to 60 * 15
Advertisement
Add Comment
Please, Sign In to add comment