Advertisement
Guest User

Untitled

a guest
Dec 16th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. command /afc [<text>] [<player>] [<int>]:
  2. permission: afc.check
  3. permission message: &cYou do not have access to that command.
  4. trigger:
  5. if arg-1 is set:
  6. if player has permission "afc.admin":
  7. if arg-1 is "add", "subtract", "set":
  8. if arg-2 is set:
  9. if arg-1 is "add":
  10. if arg-3 is set:
  11. add arg-3 to {afcbal.%arg-2%} parsed as integer
  12. send "&7Added %arg-3% to %arg-2%'s balance"
  13. stop
  14. else:
  15. send "&7You must mention an amount!"
  16. stop
  17. if arg-1 is "subtract":
  18. subtract arg-3 from {afcbal.%arg-2%} parsed as integer
  19. send "&7Subtracted %arg-3% from %arg-2%'s balance"
  20. stop
  21. else:
  22. send "&7You must mention an amount!"
  23. stop
  24. if arg-1 is "set":
  25. set {afcbal.%arg-2%} to arg-3 parsed as integer
  26. send "&7Set %arg-2%'s balance to %arg-3%"
  27. stop
  28. else:
  29. send "&7You must mention an amount!"
  30. stop
  31. else:
  32. send "&7You have to mention a player!"
  33. else:
  34. send "&7/afc add&8|&7subtract&8|&7set&8|&7remove <player>"
  35. stop
  36. else:
  37. send "&7Your balance: &c%{afcbal.%player%}%"
  38. stop
  39. else:
  40. if player has permission "afc.admin":
  41. send "&cUsage:"
  42. send "&7/afc add&8|&7subtract&8|&7set&8|&7remove <player>"
  43. stop
  44. else:
  45. send "&7Your balance: &c%{afcbal.%player%}%"
  46. stop
  47.  
  48. on join:
  49. if {afcbal.%player%} is not set:
  50. set {afcbal.%player%} to 0 parsed as integer
  51. if {afcbal.%player%} is "<none>":
  52. set {afcbal.%player%} to 0 parsed as integer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement