GrimoN

Untitled

Apr 21st, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 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. send "&6Usunieto swiniarnie"
  20. stop
  21. else:
  22. send "&cSwiniarnia nie jest ustawiona w tym miejscu."
  23. stop
  24. if arg 1 is "przycisk":
  25. if arg 2 is "ustaw":
  26. if target block is stone button:
  27. if {przycisk::%target block%} is not set:
  28. set {przycisk::%target block%} to true
  29. send "&6Ustawiono przycisk"
  30. stop
  31. else:
  32. send "&cTen przycisk jest juz ustawiony."
  33. stop
  34. else:
  35. send "&cTo nie jest kamienny przycisk."
  36. stop
  37. if arg 2 is "usun":
  38. if target block is stone button:
  39. if {przycisk::%target block%} is set:
  40. clear {przycisk::%target block%}
  41. send "&6Usunieto przycisk"
  42. stop
  43. else:
  44. send "&cTen przycisk nie jest ustawiony."
  45. stop
  46. else:
  47. send "&cTo nie jest kamienny przycisk."
  48. stop
  49.  
  50. on rightclick:
  51. if event-block is stone button:
  52. if {przycisk::%event-block%} is set:
  53. loop {swiniarnia::*}:
  54. set {_x} to location of loop-value
  55. if {swiniarnia::%block at loop-value%::ilosc} is not set:
  56. spawn 1 pig at {_x}
  57. ignite last spawned entity for 10 seconds
  58. broadcast "%loop-value%"
  59. else:
  60. loop {swiniarnia::%block at loop-value%::ilosc} times:
  61. spawn 1 pig at {_x}
  62. ignite last spawned entity for 100 seconds
Advertisement
Add Comment
Please, Sign In to add comment