Advertisement
DarkEagle_DE

Untitled

Oct 20th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. command /sethome <text> [<text>]:
  2. usage: /sethome <name>
  3. description: Set your myhome
  4. permission: myhome.sethome
  5. trigger:
  6. if arg 2 is set:
  7. message "{@tag}You have entered more than 1 word for your home!"
  8. message "{@tag}This is not allowed!"
  9. stop
  10. if {sethomes} is 3:
  11. player does not have permission "myhome.6houses":
  12. player does not have permission "myhome.vip":
  13. message "{@tag}You cannot set more than 3 homes!"
  14. stop
  15. if {sethomes} is 6:
  16. player does not have permission "myhome.vip":
  17. message "{@tag}You cannot set more than 6 homes!"
  18. stop
  19. if {sethomes} is not set:
  20. set {sethomes} to 0
  21. set {%player%.x} to x coord of player
  22. set {%player%.y} to y coord of player
  23. set {%player%.z} to z coord of player
  24. set yaml value "homes.%player%.%arg 1%.x" from file "Test/sethomes.yml" to "%{%player%.x}%"
  25. set yaml value "homes.%player%.%arg 1%.y" from file "Test/sethomes.yml" to "%{%player%.y}%"
  26. set yaml value "homes.%player%.%arg 1%.z" from file "Test/sethomes.yml" to "%{%player%.z}%"
  27. message "{@tag}You have set your home %arg 1% to location %location%"
  28. set yaml value "homes.%player%.%arg 1%.active" from file "Test/sethomes.yml" to "true"
  29. set {home.%player%::%arg 1%} to location of player
  30. set {homename.%player%::%arg 1%} to arg 1
  31. set {sethome.%player%} to true
  32.  
  33.  
  34.  
  35. command /delhome <text> [<text>]:
  36. usage: /delhome <name>
  37. description: Delete your myhome
  38. permission: myhome.delhome
  39. trigger:
  40. if arg 2 is set:
  41. message "{@tag}You have entered more than 1 word for your home!"
  42. message "{@tag}This is not allowed!"
  43. stop
  44. if {home.%player%::%arg 1%} is set:
  45. set yaml value "homes.%player%.%arg 1%.active" from file "Test/sethomes.yml" to "false"
  46. delete {home.%player%::%arg 1%}
  47. delete {homename.%player%::%arg 1%}
  48. message "{@tag}You have deleted home %arg 1%"
  49. remove 1 from {sethomes}
  50. stop
  51. message "{@tag}You have not set that home!"
  52.  
  53. command /home <text=abcdefghijklmnopqrstuvwxyz> [<text>]:
  54. usage: /home <name>
  55. description: Go to your home
  56. permission: myhome.home
  57. trigger:
  58. if arg 2 is set:
  59. message "{@tag}You have entered more than 1 word for your home!"
  60. message "{@tag}This is not allowed!"
  61. stop
  62. if arg 1 is "abcdefghijklmnopqrstuvwxyz":
  63. message "{@tag}Here are your homes!"
  64. message "{@tag}%{homename.%player%::*}%"
  65. stop
  66. if {home.%player%::%arg 1%} is set:
  67. teleport player to {home.%player%::%arg 1%}
  68. message "{@tag}You have been teleported to your home!"
  69.  
  70.  
  71.  
  72.  
  73. on command:
  74. if {test.loaded} is not set:
  75. set {test.loaded} to true
  76. set yaml value "homes" from file "Test/sethomes.yml" to ""
  77.  
  78.  
  79.  
  80. command /adminhome:
  81. permission: myhome.adminhome
  82. trigger:
  83. message "{@tag}Enter the person's name in chat to see their homes and then enter their home name to teleport to it!"
  84. set {myhome.adminchat.%player%} to true
  85.  
  86. on chat:
  87. if {myhome.adminchat.%player%} is true:
  88. cancel the event
  89. message "{@tag}You entered %message%. Checking if message is a player's name"
  90. if {sethome.%message%} is true:
  91. message "{@tag}You entered a player's name!"
  92. message "{@tag}Their homes are: "
  93. message "{@tag}%{homename.%message%::*}%"
  94. set {myhome.%player%.name} to "%message%"
  95. set {myhome.admintp.%player%} to true
  96. message "{@tag}Now enter a home name to teleport to that player's home!"
  97. set {myhome.adminchat.%player%} to false
  98. stop
  99. message "{@tag}That name is invalid or they haven't set a home yet please try again"
  100. if {myhome.admintp.%player%} is true:
  101. cancel the event
  102. message "{@tag}You have entered %message%. Checking if it a home name!"
  103. if {home.%{myhome.%player%.name}%::%message%} is set:
  104. message "{@tag}The home name entered was correct!"
  105. message "{@tag}Teleporting..."
  106. teleport player to {home.%{myhome.%player%.name}%::%message%}
  107. set {myhome.admintp.%player%} to false
  108. stop
  109. message "{@tag}You have entered an invalid home! Try again!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement