Zaaxel

AutoCrafting

Feb 29th, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. on script load:
  2. register new shaped recipe for emerald ore named "&aStoniarka" using stone, stone, stone, stone, emerald, stone, stone, stone, stone
  3.  
  4. command /craft:
  5. trigger:
  6. execute console command "zcraft %player% 1"
  7.  
  8. command /acraft [<player>] [<text>]:
  9. executable by: console
  10. trigger:
  11. if arg 2 is "stone":
  12. if player-arg has 8 stone and 1 emerald:
  13. wait 2 tick
  14. send "&6AutoCrafting: &aZaakceptowano!"
  15. remove 8 stone and 1 emerald from player-arg's inventory
  16. if player-arg can hold 1 emerald ore named "&aStoniarka":
  17. wait 2 tick
  18. give 1 emerald ore named "&aStoniarka" to the player-arg
  19. send "&6AutoCrafting: &aOtrzymales Stoniarke!"
  20. stop
  21. else:
  22. send "&6AutoCrafting: &aNie masz miejsca w ekwipunku!"
  23. else:
  24. send "&6AutoCrafting: &cOdrzucono"
  25. send "&6AutoCrafting: &cNie posiadasz odpowiednich itemow!"
  26.  
  27. command /zcraft [<player>] [<text>]:
  28. executable by: console
  29. trigger:
  30. if arg 2 is "1":
  31. wait 2 tick
  32. open chest with 1 rows named "&cCraftingi" to player-arg
  33. wait 2 tick
  34. format slot 0 of player-arg with 1 of emerald ore named "&aStoniarka" to run "zcraft %player-arg% 2"
  35. if arg 2 is "2":
  36. wait 2 tick
  37. open chest with 3 rows named "&aStoniarka" to player-arg
  38. wait 2 tick
  39. format slot 0 of player-arg with 1 of stone to be unstealable
  40. format slot 1 of player-arg with 1 of stone to be unstealable
  41. format slot 2 of player-arg with 1 of stone to be unstealable
  42. format slot 9 of player-arg with 1 of stone to be unstealable
  43. format slot 10 of player-arg with 1 of emerald to be unstealable
  44. format slot 11 of player-arg with 1 of stone to be unstealable
  45. format slot 12 of player-arg with 1 of emerald ore named "&aStoniarka" to be unstealable
  46. format slot 18 of player-arg with 1 of stone to be unstealable
  47. format slot 19 of player-arg with 1 of stone to be unstealable
  48. format slot 20 of player-arg with 1 of stone to be unstealable
  49. format slot 15 of player-arg with 1 of crafting table named "&6AutoCrafting" to run "acraft %player-arg% stone"
Advertisement
Add Comment
Please, Sign In to add comment