Advertisement
twogz

Untitled

Jul 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. on break:
  2. if player's gamemode is survival:
  3. cancel event
  4.  
  5. if event-block is coal ore:
  6. play "BLOCK_STONE_BREAK" to player at volume 5 and pitch 15
  7. give coal ore to player
  8. chance of 3%:
  9. give gunpowder named "&7&lLesser Arcane Dust" with lore "&8Hint: Used to enchant pickaxes." to player
  10. message "&c&lHey! &7You randomly found &f&nLesser Arcane Dust&7 while mining!"
  11. set event-block to cobble
  12. wait 2 seconds
  13. set event-block to stone
  14. wait 2 seconds
  15. set event-block to coal ore
  16.  
  17. on place:
  18. if player's gamemode is survival:
  19. if player does not have permission "admin":
  20. cancel event
  21.  
  22. command /sell [<text>]:
  23. trigger:
  24. if arg 1 is "coalore":
  25. if player has coal ore:
  26. while amount of coal ore in player's inventory is bigger than 0:
  27. add 1 to {_amount.%player%}
  28. remove 1 coal ore from player's inventory
  29. add 0.03 to {_payout.%player%}
  30. message ""
  31. message " &e&lSold %{_amount.%player%}% Items:"
  32. message ""
  33. message "&7 You sold %{_amount.%player%}% &7items for $%{_payout.%player%} / {_amount.%player%}% &7each"
  34. message "&7 and received &a$%{_payout.%player%}% &7in total."
  35. message ""
  36. add {_payout.%player%} to player's balance
  37. stop
  38. else:
  39. message "&c&lHey! &7You don't have enough of this item to sell it."
  40.  
  41.  
  42. if arg 1 is not set:
  43. execute player command "/sellall"
  44.  
  45. command /sellall:
  46. trigger:
  47. open chest with 4 rows named "Sell your items" to player
  48.  
  49. wait 0.6 ticks
  50.  
  51. format slot 0 of player with paper named "&a&lYour Balance" with lore "&fMoney &a%player's balance%" to be unstealable
  52.  
  53. format slot 10 of player with coal ore named "&eCoal Ore" with lore "&r ||&7Price &a$0.03 each||&r ||&6Click to sell this item." to run [player command "/sell coalore"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement