Advertisement
nfell2009

RocketTravel Script - by nfell2009

Apr 6th, 2014
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.94 KB | None | 0 0
  1. #RocketTravel
  2. #By nfell2009
  3.  
  4. options:
  5.     P: &8[&cRT&8]&c #The text default
  6.     Y: 60 #Height for blocks to fall from
  7.  
  8. command /rockettravel [<text>] [<text>] [<text>]:
  9.     aliases: /rt, /rockett, /rocket,
  10.     permission: rocket.travel
  11.     trigger:
  12.         if arg 1 is not set:
  13.             message "{@P} Invalid sub-command! Do /rt help for help!"
  14.         else if arg 1 is "create":
  15.             if arg 2 is not set:
  16.                 message "{@P} You must provide a name!"
  17.             else if {rt.rocketlist::*} contains arg 2:
  18.                 message "{@P} This rocket already exists!"
  19.             else:
  20.                 set {_loc.pp} to location of player
  21.                 set {_loc.x} to x coordinate of player
  22.                 set {_loc.y} to y coordinate of player
  23.                 set {_loc.z} to z coordinate of player
  24.                 #First Fence
  25.                 add 3 to {_loc.z}
  26.                 set {_loc.p} to the location at {_loc.x}, {_loc.y}, {_loc.z}
  27.                 teleport player to {_loc.p}
  28.                 loop blocks above player:
  29.                     set loop-block to air
  30.                 execute op command "/summon FallingSand ~0 ~{@Y} ~0 {TileID:113,Time:1}"
  31.                 wait 1 tick
  32.                 #Second Fence
  33.                 subtract 1 from {_loc.z}
  34.                 subtract 1 from {_loc.x}
  35.                 set {_loc.p} to the location at {_loc.x}, {_loc.y}, {_loc.z}
  36.                 teleport player to {_loc.p}
  37.                 loop blocks above player:
  38.                     set loop-block to air
  39.                 execute op command "/summon FallingSand ~0 ~{@Y} ~0 {TileID:113,Time:1}"
  40.                 wait 1 tick
  41.                 #Third Fence
  42.                 add 2 to {_loc.x}
  43.                 set {_loc.p} to the location at {_loc.x}, {_loc.y}, {_loc.z}
  44.                 teleport player to {_loc.p}
  45.                 loop blocks above player:
  46.                     set loop-block to air
  47.                 execute op command "/summon FallingSand ~0 ~{@Y} ~0 {TileID:113,Time:1}"
  48.                 wait 1 tick
  49.                 #Red Wool
  50.                 subtract 1 from {_loc.x}
  51.                 set {_loc.p} to the location at {_loc.x}, {_loc.y}, {_loc.z}
  52.                 teleport player to {_loc.p}
  53.                 loop blocks above player:
  54.                     set loop-block to air
  55.                 execute op command "/summon FallingSand ~0 ~{@Y} ~0 {TileID:152,Time:1}"
  56.                 wait 1 tick
  57.                 execute op command "/summon FallingSand ~0 ~{@Y} ~0 {TileID:123,Time:1}"
  58.                 wait 1 tick
  59.                 execute op command "/summon FallingSand ~0 ~{@Y} ~0 {TileID:35,Data:14,Time:1}"
  60.                 wait 1 tick
  61.                 execute op command "/summon FallingSand ~0 ~{@Y} ~0 {TileID:113,Time:1}"
  62.                 wait 1 tick
  63.                 #Final Fence
  64.                 subtract 1 from {_loc.z}
  65.                 set {_loc.p} to the location at {_loc.x}, {_loc.y}, {_loc.z}
  66.                 teleport player to {_loc.p}
  67.                 loop blocks above player:
  68.                     set loop-block to air
  69.                 execute op command "/summon FallingSand ~0 ~{@Y} ~0 {TileID:113,Time:1}"
  70.                 wait 1 second
  71.                 #Sign
  72.                 loop blocks above player:
  73.                     set loop-block to air
  74.                 execute op command "/summon FallingSand ~0 ~{@Y} ~0 {TileID:68,Data:2,Time:10}"
  75.                 wait 5 seconds
  76.                 add 1 to {_loc.y}
  77.                 set {_sign} to location at {_loc.x}, {_loc.y}, {_loc.z}
  78.                 subtract 1 from {_loc.y}
  79.                 set {_loc.p} to the location at {_loc.x}, {_loc.y}, {_loc.z}
  80.                 teleport the player to {_loc.p}
  81.                 loop blocks above player:
  82.                     loop-block is wall sign:2:
  83.                         set line 1 of loop-block to "[RTravel]"
  84.                         set line 2 of loop-block to "%arg 2%"
  85.                         if arg 3 is not set:
  86.                             set line 3 of loop-block to "Landing Bay"
  87.                             set {rt.%arg 2%.goto} to {_loc.pp}
  88.                         else:
  89.                             set line 3 of loop-block to "Take Off!"
  90.                         teleport player to {_loc.pp}
  91.                         message "{@P} Finished Making Rocket!"
  92.                        
  93. on rightclick on a sign:
  94.     line 1 of block is "[RTravel]":
  95.         if line 2 of block is not set:
  96.             message "{@P} Couldn't take you anywhere, there is no location set!"
  97.         else if line 3 of block is "Landing Bay":
  98.             message "{@P} You can't be taken to a Spawn point!"
  99.         else if line 3 of block is "Take Off!":
  100.             set {_rt.goto} to line 2 of block
  101.             if {rt.%{_rt.goto}%.goto} is set:
  102.                 message "{@P} Blasting off in..."
  103.                 message "{@P} 3..."
  104.                 wait 1 second
  105.                 message "{@P} 2..."
  106.                 wait 1 second
  107.                 message "{@P} 1..."
  108.                 wait 1 second
  109.                 message "{@P} Blast off!"
  110.                 teleport player to {rt.%{_rt.goto}%.goto}
  111.         else:
  112.             message "{@P} Unknown RocketTravel Sign!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement