1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tempoarary Ender Pearl

Discussion in 'Skript' started by ChocoAura, Jul 28, 2019.

  1. C

    ChocoAura Active Member

    Joined:
    Jul 3, 2019
    Messages:
    30
    Likes Received:
    0
    So I would like to make an ender pearl like the one in one of the Hypixel Game modes where it teleports you, then teleports you back 3 seconds later. I would like to make it 5 seconds, this is my code right now:

    Code (Text):
    1. on projectile hit:
    2.     shooter is a player:
    3.         projectile is ender pearl with name "&aRewind Pearl":
    4.             wait 5 seconds
    5.             send "&aTeleporting you back to the previous location..."
    6.             execute console command "/tp %shooter% %{rptp.%shooter%}%"
    7.        
    8. on right click with ender pearl:
    9.     name of held item contains "aRewind Pearl":
    10.         set {rptp.%player%} to player coordinates
    11.         send "&aYou will teleport back to this location 5 seconds after the ender pearl lands."
    The error is:

    Code (Text):
    1. Can't understand this expression: 'player coordinates'
    --- Double Post Merged, Jul 28, 2019, Original Post Date: Jul 28, 2019 ---
    bump
     
  2. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    255
    Likes Received:
    17
    Code (Text):
    1. to player's current position # also location works too
    also
    Code (Text):
    1. name of held item is "&aRewind Pearl":
    edit:
    Code (Text):
    1. to player's coordinates # this should also work, remember don't forget the '
     
  3. Runakai1

    Runakai1 Well-Known Member

    Joined:
    Apr 27, 2018
    Messages:
    386
    Likes Received:
    20
    Code (Skript):
    1.  
    2. on projectile hit:
    3.     projectile = ender pearl:
    4.         set {_locs} to shooter's location
    5.         teleport shooter to event-location
    6.         wait 5 seconds
    7.         teleport shooter to {_locs}
     
  4. C

    ChocoAura Active Member

    Joined:
    Jul 3, 2019
    Messages:
    30
    Likes Received:
    0
    I tried it, It doesn't work.
    --- Double Post Merged, Jul 29, 2019, Original Post Date: Jul 29, 2019 ---
    I tried, this one doesn't work
    --- Double Post Merged, Jul 30, 2019 ---
    bump
     
  5. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    402
    Likes Received:
    13
    Try:
    Code (Skript):
    1.  
    2. on projectile hit:
    3.     shooter is a player
    4.     projectile is ender pearl with name "&aRewind Pearl":
    5.         set {_enderpearl} to shooter's location
    6.  
    7.         wait 5 seconds
    8.  
    9.         send "&aTeleporting you back to the previous location..."
    10.         teleport shooter to {_enderpearl}
     
Loading...