Advertisement
twogz

Untitled

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