Advertisement
twogz

Untitled

Jul 20th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 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:
  22. trigger:
  23. if held item is coal ore:
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement