GrimoN

Untitled

Apr 21st, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. command /swiniarnia [<text>] [<text>] [<number>]:
  2. permission: swiniarnia
  3. permission message: &cNie masz do tego dostepu!
  4. trigger:
  5. if arg 1 is "spawn":
  6. if arg 2 is "ustaw":
  7. if {swiniarnia::%block under target block%} is not set:
  8. set {swiniarnia::%block under target block%} to location of block under target block
  9. if arg 3 is set:
  10. set {swiniarnia::%block under target block%::ilosc} to arg 3
  11. send "&6Ustawiono swiniarnie"
  12. stop
  13. else:
  14. send "&cSwiniarnia jest ustawiona w tym miejscu."
  15. stop
  16. if arg 2 is "usun":
  17. if {swiniarnia::%block under target block%} is set:
  18. clear {swiniarnia::%block under target block%}
  19. clear {swiniarnia::%block under target block%::ilosc}
  20. send "&6Usunieto swiniarnie"
  21. stop
  22. else:
  23. send "&cSwiniarnia nie jest ustawiona w tym miejscu."
  24. stop
  25. if arg 1 is "przycisk":
  26. if arg 2 is "ustaw":
  27. if target block is stone button:
  28. if {przycisk::%target block%} is not set:
  29. set {przycisk::%target block%} to true
  30. send "&6Ustawiono przycisk"
  31. stop
  32. else:
  33. send "&cTen przycisk jest juz ustawiony."
  34. stop
  35. else:
  36. send "&cTo nie jest kamienny przycisk."
  37. stop
  38. if arg 2 is "usun":
  39. if target block is stone button:
  40. if {przycisk::%target block%} is set:
  41. clear {przycisk::%target block%}
  42. send "&6Usunieto przycisk"
  43. stop
  44. else:
  45. send "&cTen przycisk nie jest ustawiony."
  46. stop
  47. else:
  48. send "&cTo nie jest kamienny przycisk."
  49. stop
  50.  
  51. on rightclick:
  52. if event-block is stone button:
  53. if {przycisk::%event-block%} is set:
  54. loop {swiniarnia::*}:
  55. set {_x} to location of loop-value
  56. if {swiniarnia::%block at loop-value%::ilosc} is not set:
  57. spawn 1 pig at {_x}
  58. ignite last spawned entity for 10 seconds
  59. broadcast "%loop-value%"
  60. else:
  61. loop {swiniarnia::%block at loop-value%::ilosc} times:
  62. spawn 1 pig at {_x}
  63. ignite last spawned entity for 100 seconds
Advertisement
Add Comment
Please, Sign In to add comment