Advertisement
namekuzi

Untitled

Dec 8th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.43 KB | None | 0 0
  1. aliases:
  2. superalias = 1, 2, 3, 4, 5, 7, 8, 9, 12, 13, 17, 19, 20, 22, 23, 24, 25, 29, 33, 35, 41, 42, 43, 44, 45, 46, 47, 48, 49, 52, 54, 57, 58, 60, 61, 79, 80, 82, 84, 86, 87, 88, 89, 91, 92, 95, 97, 98, 99, 100, 103, 110, 112, 116, 120, 121, 123, 126, 129, 130, 133, 137, 138, 139, 145, 146, 152, 153, 155, 158, 159, 162, 163, 164, 165, 166, 168, 169, 170, 172, 173, 174, 179, 181, 182, 201, 202, 203, 204, 205, 206, 208, 213, 214, 215, 216, 218
  3. on load:
  4. if file "plugins/Portals/config.yml" does not exist:
  5. create file "plugins/Portals/config.yml"
  6. set yml value "Time to type /pset <name> before the auto destruction of portal" of file "plugins/Portals/config.yml" to 20
  7. set yml value "No Permission" of file "plugins/Portals/config.yml" to "&4You don't have permission &cportal.create"
  8. set yml value "Time before the command expired" of file "plugins/Portals/config.yml" to "&4You didn't type &c/pset <name> &4at a sufficient speed! portal deleted"
  9. set yml value "This portal does not lead anywhere" of file "plugins/Portals/config.yml" to "&4The portal &c[Portal] &4does not lead anywhere"
  10. set yml value "Error" of file "plugins/Portals/config.yml" to "&4You're not facing the portal or you're not putin that block at the right place"
  11. set yml value "Please, run /pset <name> now" of file "plugins/Portals/config.yml" to "&6Put yourself where peoples should appear when they come from another portal, then do &b/portal spawn <name>"
  12. set yml value "Portal spawn set, set destination now" of file "plugins/Portals/config.yml" to "&6Portal spawn set. You should now do &b/portal dest [Portal] <destination>&6. Destination can be ""here""/""ici"" or a portal name"
  13. set yml value "You're done" of file "plugins/Portals/config.yml" to "&6You set the portal destination the destination or warping point at any moment!"
  14. set yml value "Portal to portal" of file "plugins/Portals/config.yml" to "&6Teleporting from &b[Portal1] &6to &b[Portal2]!"
  15. set yml value "Destination portal does not exist" of file "plugins/Portals/config.yml" to "&4The portal &c[Portal] &4does not exist!"
  16.  
  17. on place of end portal frame:
  18. player doesn't have permission "portal.create":
  19. message coloured "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
  20. stop
  21. cancel event
  22. wait 1 tick
  23. set {_loc} to location of event-block
  24. player's horizontal facing is west or east:
  25. set {_dir1} to west
  26. set {_dir2} to east
  27. set {_dir3} to north
  28. set {_dir4} to south
  29. player's horizontal facing is north or south:
  30. set {_dir1} to north
  31. set {_dir2} to south
  32. set {_dir3} to west
  33. set {_dir4} to east
  34. player's horizontal facing is {_dir1} or {_dir2}:
  35. add location of event-block to {_blocks::*}
  36. set {_num} to 0
  37. while {_num} is not 20:
  38. set {_still} to 0
  39. loop {_blocks::*}:
  40. block {_dir3} loop-value is air:
  41. {_blocks::*} does not contain location of block {_dir3} loop-value
  42. set {_still} to 1
  43. add location of block {_dir3} loop-value to {_blocks::*}
  44. block {_dir4} loop-value is air:
  45. {_blocks::*} does not contain location of block {_dir4} loop-value
  46. set {_still} to 1
  47. add location of block {_dir4} loop-value to {_blocks::*}
  48. block above loop-value is air:
  49. {_blocks::*} does not contain location of block above loop-value
  50. set {_still} to 1
  51. add location of block above loop-value to {_blocks::*}
  52. add 1 to {_num}
  53. {_num} is 19:
  54. {_still} is 1
  55. message coloured "%yml value ""Error"" of file ""plugins/Portals/config.yml""%"
  56. stop
  57. loop {_blocks::*}:
  58. @noupdate::set block at loop-value to water
  59. message coloured "%yml value ""Please, run /pset <name> now"" of file ""plugins/Portals/config.yml""%"
  60. set {blocks::*} to {_blocks::*}
  61. wait "%yml value ""Time to type /pset <name> before the auto destruction of portal"" of file ""plugins/Portals/config.yml""% seconds" parsed as timespan
  62. {blocks::*} is set
  63. message coloured "%yml value ""Time before the command expired"" of file ""plugins/Portals/config.yml""%"
  64. clear {blocks::*}
  65. loop {_blocks::*}:
  66. set block at loop-value to air
  67. command /portal1 <text> [<text>] [<text>]:
  68. aliases: /p
  69. trigger:
  70. player doesn't have permission "portal.create":
  71. message coloured "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
  72. stop
  73. arg 1 is "setdest" or "dest" or "destination":
  74. arg 2 is set:
  75. arg 3 is set:
  76. arg 3 is not "ici" or "here":
  77. set yml value "portals.%arg 2%" of file "plugins/Portals/db.yml" to arg 3
  78. else:
  79. set yml value "portals.%arg 2%" of file "plugins/Portals/db.yml" to location of player
  80. message coloured "%yml value ""You're done"" of file ""plugins/Portals/config.yml""%"
  81. arg 1 is "setspawn" or "spawnpoint" or "spawn":
  82. arg 2 is set:
  83. {blocks::*} is set
  84. set yml value "arrivee.%arg 2%" of file "plugins/Portals/db.yml" to location of player
  85. loop {blocks::*}:
  86. add loop-value to yml list "blocks.%arg 2%" of file "plugins/Portals/db.yml"
  87. clear {blocks::*}
  88. set {_message} to "%yml value ""Portal spawn set, set destination now"" of file ""plugins/Portals/config.yml""%"
  89. replace all "[Portal]" with "%arg 2%" in {_message}
  90. message coloured {_message}
  91. arg 1 is "list":
  92. player does not have permission "portal.list":
  93. set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
  94. replace all "portal.create" with "portal.list" in {_message}
  95. message coloured {_message}
  96. stop
  97. message "&6&lList of portals"
  98. set {_portals::*} to yml nodes "arrivee" of file "plugins/Portals/db.yml"
  99. loop {_portals::*}:
  100. yml "portals.%loop-value%" in file "plugins/Portals/db.yml" exists:
  101. set {_destination} to yml value "portals.%loop-value%" of file "plugins/Portals/db.yml"
  102. {_destination} is not set:
  103. set {_destination} to "not set"
  104. set {_arrivee} to yml value "arrivee.%loop-value%" of file "plugins/Portals/db.yml"
  105. set {_arrivee} to "%{_arrivee}%"
  106. set {_destination} to "%{_destination}%"
  107. replace all "x: " or "y: " or "z: " with "" in {_arrivee}
  108. replace all "x: " or "y: " or "z: " with "" in {_destination}
  109. message "&6&l%loop-value%&6:"
  110. message "&6Spawn: &b%{_arrivee}% &6Destination: &b%{_destination}%"
  111. arg 1 is "delete" or "remove":
  112. player does not have permission "portal.delete":
  113. set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
  114. replace all "portal.create" with "portal.delete" in {_message}
  115. message coloured {_message}
  116. stop
  117. arg 2 is set:
  118. set {_blocks::*} to yml list "blocks.%arg 2%" of file "plugins/Portals/db.yml"
  119. loop {_blocks::*}:
  120. set block at loop-value to air
  121. delete yml value "portals.%arg 2%" of file "plugins/Portals/db.yml"
  122. delete yml list "blocks.%arg 2%" of file "plugins/Portals/db.yml"
  123. delete yml value "arrivee.%arg 2%" of file "plugins/Portals/db.yml"
  124. message "&6The portal &b%arg 2% &6was deleted"
  125. arg 1 is "help":
  126. player does not have permission "portal.help":
  127. set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
  128. replace all "portal.create" with "portal.help" in {_message}
  129. message coloured {_message}
  130. stop
  131. message " "
  132. message "&6&lHelp for portal plugin &b(by Black_Eyes)"
  133. message "&6/portal setspawn/spawnpoint/point &b<portal name> &6: Set the spawnpoint of a portal"
  134. message "&6/portal setdest/dest/destination &b<portal name> <portal name/here> &6: Set the destination of a portal. &b""here"" &6will set it where you're standing"
  135. message "&6/portal delete/remove &b<portal name> &6: Completely removes a portal from database"
  136. message "&6/portal list &6: Shows you a list of all portals"
  137. message "&6/portal help &6: Guess it..."
  138. message " "
  139. arg 1 is not set:
  140. player does not have permission "portal.help":
  141. set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
  142. replace all "portal.create" with "portal.help" in {_message}
  143. message coloured {_message}
  144. stop
  145. message " "
  146. message "&6&lHelp for portal plugin &b(by Black_Eyes)"
  147. message "&6/portal setspawn/spawnpoint/point &b<portal name> &6: Set the spawnpoint of a portal"
  148. message "&6/portal setdest/dest/destination &b<portal name> <portal name/here> &6: Set the destination of a portal. &b""here"" &6will set it where you're standing"
  149. message "&6/portal delete/remove &b<portal name> &6: Completely removes a portal from database"
  150. message "&6/portal list &6: Shows you a list of all portals"
  151. message "&6/portal help &6: Guess it..."
  152. message " "
  153. on walk on all ore or all stair or all shulker box or superalias:
  154. wait 1 tick
  155. block at player is water
  156. set {_nodes::*} to yml nodes "blocks" of file "plugins/Portals/db.yml"
  157. loop {_nodes::*}:
  158. set {_blocks::*} to yml list "blocks.%loop-value-1%" of file "plugins/Portals/db.yml"
  159. loop {_blocks::*}:
  160. distance between player and loop-value-2 is below 1:
  161. yml "portals.%loop-value-1%" in file "plugins/Portals/db.yml" exists:
  162. set {_value} to yml value "portals.%loop-value-1%" of file "plugins/Portals/db.yml"
  163. set {_nodes::*} to yml nodes "arrivee" of file "plugins/Portals/db.yml"
  164. {_value} is not a location:
  165. loop {_nodes::*}:
  166. "%loop-value-3%" is "%{_value}%":
  167. set {_pname} to {_value}
  168. set {_value} to yml value "arrivee.%{_value}%" of file "plugins/Portals/db.yml"
  169. {_value} is not a location:
  170. set {_message} to "%yml value ""Destination portal does not exist"" of file ""plugins/Portals/config.yml""%"
  171. replace all "[Portal]" with "%{_value}%" in {_message}
  172. message coloured {_message}
  173. stop
  174. player does not have permission "portal.use.%loop-value-1%":
  175. set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
  176. replace all "portal.create" with "portal.use.%loop-value-1%" in {_message}
  177. message coloured {_message}
  178. stop
  179. teleport player to {_value}
  180. set {_message} to "%yml value ""Portal to portal"" of file ""plugins/Portals/config.yml""%"
  181. replace all "[Portal1]" with "%loop-value-1%" in {_message}
  182. replace all "[Portal2]" with "%{_pname}%" in {_message}
  183. stop
  184. else:
  185. set {_message} to "%yml value ""This portal does not lead anywhere"" of file ""plugins/Portals/config.yml""%"
  186. replace all "[Portal]" with "%loop-value-1%" in {_message}
  187. message coloured {_message}
  188. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement