Advertisement
sOxTw

Warps

Jan 24th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. options:
  2. prefix: &eU-Warp &6»
  3.  
  4.  
  5. # PERMISOS:
  6. permSet: "ultrawarp.command.set"
  7. permDel: "ultrawarp.command.del"
  8. permTp: "ultrawarp.command.tp"
  9. permView: "ultrawarp.command.view"
  10.  
  11. # DIRECTORIOS:
  12. Dir: "plugins/UltraWarp"
  13. FileWarps: "plugins/UltraWarp/Warps.yml"
  14.  
  15. on load:
  16. if skutil dir {@Dir} doesn't exist:
  17. create dir {@Dir}
  18. if skutil file {@FileWarps} doesn't exist:
  19. create file {@FileWarps}
  20.  
  21. command /ultrawarp [<text>] [<text>] [<offline player>]:
  22. trigger:
  23. if arg 1 is "set":
  24. if player has permission {@permSet}:
  25. if skutil file {@FileWarps} exists:
  26. set {_LocX} to x-coordinate of player
  27. set {_LocY} to y-coordinate of player
  28. set {_LocZ} to z-coordinate of player
  29. set {_WorldOfPlayer} to "%world of player%"
  30. set {_PlayerPitch} to player's pitch
  31. set {_PlayerYaw} to player's yaw
  32. set {_ItemIcon} to player's held item
  33. set skutil yml value "Waprs.%arg-2%.X" from file {@FileWarps} to {_LocX}
  34. set skutil yml value "Waprs.%arg-2%.Y" from file {@FileWarps} to {_LocY}
  35. set skutil yml value "Waprs.%arg-2%.Z" from file {@FileWarps} to {_LocZ}
  36. set skutil yml value "Waprs.%arg-2%.Yaw" from file {@FileWarps} to {_PlayerYaw}
  37. set skutil yml value "Waprs.%arg-2%.Pitch" from file {@FileWarps} to {_PlayerPitch}
  38. set skutil yml value "Waprs.%arg-2%.World" from file {@FileWarps} to {_WorldOfPlayer}
  39. set skutil yml value "Waprs.%arg-2%.Item" from file {@FileWarps} to {_ItemIcon}
  40. send "{@prefix} &7Warp: &6%arg-2% &7Mundo: &6%{_WorldOfPlayer}%&7 Guardado!" to sender
  41. else:
  42. if arg 1 is set:
  43. if arg 2 is not set:
  44. if arg 3 is not set:
  45. set {_X} to skutil yaml value "Waprs.%arg-1%.X" from file {@FileWarps}
  46. set {_Y} to skutil yaml value "Waprs.%arg-1%.Y" from file {@FileWarps}
  47. set {_Z} to skutil yaml value "Waprs.%arg-1%.Z" from file {@FileWarps}
  48. set {_Yaw} to skutil yaml value "Waprs.%arg-1%.Yaw" from file {@FileWarps}
  49. set {_Pitch} to skutil yaml value "Waprs.%arg-1%.Pitch" from file {@FileWarps}
  50. set {_World} to skutil yaml value "Waprs.%arg-1%.World" from file {@FileWarps}
  51. set {_tp} to location({_X}, {_Y}, {_Z}, world({_World}), {_Yaw}, {_Pitch})
  52. teleport player to {_tp}
  53. else:
  54. set {_nodes::*} to skutil yaml nodes "Waprs" from file {@FileWarps}
  55. open chest with 6 rows named "&5&lWarps" to player
  56. set {_slot} to 0
  57. loop {_nodes::*}:
  58. set {_loop} to loop-value
  59. set {_Item} to skutil yaml value "Waprs.%{_loop}%.Item" from file {@FileWarps}
  60. set {_World} to skutil yaml value "Waprs.%{_loop}%.World" from file {@FileWarps}
  61. format slot {_slot} of player with {_Item} named "&c&l%{_loop}%" with lore "&7Mundo: &e%{_World}%||&7Warp: &e%{_loop}%" to close then run [execute player command "ultrawarp %{_loop}%"]
  62. add 1 to {_slot}
  63. wait 1 second
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. # on break of spruce wood block:
  74. # if player has permission "oggames.santa":
  75. # chance of 30%:
  76. # drop 1 of skull of ("CruXXx" parsed as offline player) named "&r&7» &c&lPresent &r&7«"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement