Mroczny337

Spawn Pig

Dec 30th, 2014
621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. # # # # # # # # #
  2. # SpawnPig #
  3. # By _Mroczny #
  4. # # # # # # # # #
  5.  
  6. Options:
  7. Prefix: &8[&cSpawnPig&8] #Tag skryptu
  8. ClickBlock: stone button #Blok ktory trzeba kliknac, aby respily sie swinie
  9. BlockBehind: redstone lamp #Blok za kliknietym blokiem
  10. Wait: 5 #Co ile mozna uzywac przycisku
  11. Name: &cSWINIA #Nazwa swini
  12. Amount: 10 #Ilosc swin
  13. AmountPork: 32 #Ilosc Miesa przy spawnie swin
  14. LifePig: 1 #Zycie swin
  15.  
  16.  
  17. Command /SpawnPig [<text>]:
  18. aliases: sp, pig
  19. trigger:
  20. if player has permission "SpawnPig.*":
  21. if arg 1 is not set:
  22. send "{@Prefix}"
  23. send "&7/SpawnPig set"
  24. send "&7/SpawnPig del"
  25. send "&7/SpawnPig help"
  26. stop
  27. if arg 1 is "help" or "pomoc":
  28. send "{@Prefix}"
  29. send "&7/SpawnPig set"
  30. send "&7/SpawnPig del"
  31. stop
  32. if arg 1 is "set" or "ustaw":
  33. set {SpawnPig} to location of player
  34. send "{@Prefix} &7Stworzono spawn swin."
  35. stop
  36. if arg 1 is "del" or "usun":
  37. clear {SpawnPig}
  38. send "{@Prefix} &7Usunieto spawn swin."
  39. stop
  40. else:
  41. send "&cBrak uprawnien"
  42. stop
  43.  
  44. on rightclick:
  45. if clicked block is {@ClickBlock}:
  46. if block behind clicked block is {@BlockBehind}:
  47. if difference between {PigWait.%player%} and now is less than {@Wait} seconds:
  48. set {_Time} to difference between {PigWait.%player%} and now
  49. stop
  50. set {PigWait.%player%} to now
  51. drop {@AmountPork} cooked pork at {SpawnPig}
  52. loop {@Amount} times:
  53. spawn 1 pig at {SpawnPig}
  54. ignite spawned pig
  55. set display name of spawned pig to "{@Name}"
  56. set max health of spawned pigs to {@LifePig}
  57. # # # #
  58. # End #
  59. # # # #
Advertisement
Add Comment
Please, Sign In to add comment