MostFunGuy

Untitled

Nov 19th, 2013
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. #
  2. # MFG's Skript to make breakable sign homes
  3. #
  4. #
  5.  
  6. on sign edit:
  7. first line is "[HOME]"
  8. second line is "":
  9. set line 1 to "CANCELLED"
  10. set line 2 to "MAKE SURE TO"
  11. set line 3 to "ADD A HOME-NAME"
  12. set line 4 to "ON LINE 2"
  13. stop
  14. if {homes.%player%::*} is more than 0:
  15. message "<yellow>You alrady have a home, you are only authorized <gold>ONE <yellow>home!" to player
  16. set line 1 to "CANCELLED"
  17. set line 2 to "YOU CAN ONLY"
  18. set line 3 to "HAVE ONE"
  19. set line 4 to "HOME!!!!"
  20. stop
  21. if player has permission "homes.count.3":
  22. if {homes.%player%::*} is more than 2:
  23. message "<yellow>You alrady have <gold>three <yellow>homes, you are only authorized <gold>THREE <yellow>homes!" to player
  24. set line 1 to "CANCELLED"
  25. set line 2 to "YOU CAN ONLY"
  26. set line 3 to "HAVE THREE"
  27. set line 4 to "HOMES!!!!"
  28. stop
  29. if {homes.%player%::%line 2%} is set:
  30. message "HEY! Remember each home of your's has to have a unique name!" to player
  31. set line 1 to "CANCELLED"
  32. set line 2 to "YOU HOME NAMES"
  33. set line 3 to "HAVE TO BE"
  34. set line 4 to "UNIQUE"
  35. stop
  36. # Rest of the code, the checks are done!
  37. set {homes.%player%::%line 2%} to true
  38. set {homes.location.%player%::%line 2%} to the block's location
  39. set {homes.name.%player%::%line 2%} to line 2
  40.  
  41.  
  42. command /homes:
  43. trigger:
  44. size of {homes.%player%::*} is 0:
  45. message "<yellow>You have no homes set! Set them with a sign... First line ""<gold>[HOME]<yellow>"" and second line must be the name of a home" to player
  46. stop
  47. message "<yellow>Homes you currently have saved:"
  48. loop {homes.%player%::*}:
  49. message "<yellow>Home <gold>%loop-num%<yellow>: %loop-value%"
  50.  
  51.  
  52. command /home <text>:
  53. trigger:
  54. if arg 1 is "list":
  55. size of {homes.%player%::*} is 0:
  56. message "<yellow>You have no homes set! Set them with a sign... First line ""<gold>[HOME]<yellow>"" and second line must be the name of a home" to player
  57. stop
  58. make player execute command "/homes"
  59. stop
  60. if arg 1 is "delete" or "remove" or "del":
  61. size of {homes.%player%::*} is 0:
  62. message "<yellow>You have no homes set! Set them with a sign... First line ""<gold>[HOME]<yellow>"" and second line must be the name of a home" to player
  63. stop
  64. if {homes.%player%::%arg 1%} is set:
  65. message "<gold>[HOMES]<yellow> The home ""<gold>%{homes.name.%player%::%arg 1%}%<yellow>"" was removed" to player
  66. clear {homes.%player%::%arg 1%}
  67. clear {homes.name.%player%::%arg 1%}
  68. clear {homes.location.%player%::%arg 1%}
Advertisement
Add Comment
Please, Sign In to add comment