Hyperion from hypixel skyblock

  • 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!

Shire104

Member
Jun 21, 2021
1
0
1
24
Suggested name: Hyperion

Spigot/Skript Version: 1.16.5

What I want:
A hyperion from hypixel skyblock aka an iron sword named "&6Hyperion" that on right click, you will teleport yourself 8 blocks in your direction and safe explode after teleporting

When I'd like it by: asap
 
This may be what you are looking for...
Spawn it in with /hyperion
Code:
command /hyperion:
    description: Give the player Hyperion!
    trigger:
        set {_lore::*} to " " and "&6&LLEGENDARY DUNGEON SWORD"
        give player 1 iron sword named "&6Hyperion" with lore {_lore::*}
        send "&7You have acquired &6Hyperion&7!"

on join:
  set {%player%.hyperion} to 0

on right click:
    if player's held item is iron sword named "&6Hyperion":
        if {%player%.hyperion} is 0:
            push player forward at speed 1.6
            push player up at speed 0.2
            set {%player%.hyperion} to 1
            wait 3 seconds
            set {%player%.hyperion} to 0
        else:
            send "&7This is on cooldown!"
 
This may be what you are looking for...
Spawn it in with /hyperion
Code:
command /hyperion:
    description: Give the player Hyperion!
    trigger:
        set {_lore::*} to " " and "&6&LLEGENDARY DUNGEON SWORD"
        give player 1 iron sword named "&6Hyperion" with lore {_lore::*}
        send "&7You have acquired &6Hyperion&7!"

on join:
  set {%player%.hyperion} to 0

on right click:
    if player's held item is iron sword named "&6Hyperion":
        if {%player%.hyperion} is 0:
            push player forward at speed 1.6
            push player up at speed 0.2
            set {%player%.hyperion} to 1
            wait 3 seconds
            set {%player%.hyperion} to 0
        else:
            send "&7This is on cooldown!"
This code is very inefficient and not exactly what he wanted, I tried it myself but failed at the teleport thing.
I beg you to:
- stop making such cooldown
- starting a variable with %player%
- not using list variables

And why are you using a variable to set the lore?
 
Yeah sorry, I've been away from Skript for over a year now and just decided to get back into it but remembering the syntaxes is hard. Anyways my memory has refreshed a bit so here is a better version (With the explosion too!)

**EDIT: Some of Skripts syntaxes didn't seem to want to work, hence the extended code for determining a players direction. If anyone has a WORKING way of getting the direction a player is facing, please lmk.

Code:
command /hyperion:
    description: Give the player Hyperion!
    trigger:
        give player 1 iron sword named "&6Hyperion" with lore " " and "&6&LLEGENDARY DUNGEON SWORD"
        send "&7You have acquired &6Hyperion&7!"
        set {hyperion.%player%} to 0

on right click with iron sword:
    if player's held item is iron sword named "&6Hyperion":
        if {hyperion.%player%} is 0:
            if player's yaw is between 45 and 135: #west
                set {_loc} to the location 8 meters west of the player
            if player's yaw is between 136 and 225: #north
                set {_loc} to the location 8 meters north of the player
            if player's yaw is between 226 and 315: #east
                set {_loc} to the location 8 meters east of the player
            if player's yaw is greater than 315:
                set {_loc} to the location 8 meters south of the player
            if player's yaw is less than 45:
                set {_loc} to the location 8 meters south of the player
            teleport player to {_loc}
            create a fake explosion 1 meter above the player
            push player up at speed .5
            set {hyperion.%player%} to 1
            wait 1 seconds
            set {hyperion.%player%} to 0
        else:
            send "&7This is on cooldown!"
[doublepost=1625301044,1625300582][/doublepost]
This code is very inefficient and not exactly what he wanted, I tried it myself but failed at the teleport thing.
I beg you to:
- stop making such cooldown
- starting a variable with %player%
- not using list variables

And why are you using a variable to set the lore?

"- stop making such cooldown"
- The cooldown was because the sword could easily be spammed, optimized it in the newer skript. Again I'm starting kinda fresh so this was for of a refreshing exercise

"- starting a variable with %player%"
- YOU ARE SO RIGHT. NEVER START A VARIABLE WITH %PLAYER%!!!!!!! HOW COULD I FORGET

"- not using list variables"
- Why would I use a list variable? Would you mean something like this: {hyperion::%player%}
(If this is the case is this more efficient to store them this way? If so can you explain it, or link to somewhere that does?)
 
"- stop making such cooldown"
Don't create cooldowns using e.g. "wait 1 second", when the server crashes or stops unexpected the cooldown is ruined and has to be restored via another event. The better solution would be:
Code:
event xyz:
    if difference between now and {cooldownvar::%player%} is more than 12 seconds:
        send "ok"
        set {cooldownvar::%player%} to now

"- starting a variable with %player%"
This seems a bit ironic to me... but I don't know where you learned that, in every skript tutorial I found in 5min there is no tutorial that advises you to start a variable with %player%.

"- not using list variables"
In this case, it may be okay because the cooldown is not that huge. If the cooldown was more than maybe an hour, It's important to. E.g. you want to reset the cooldown of all players because of a vote event or something: so you can just reset it using delete {cooldownvar::*}, this event is a bad example, but list variables are much cleaner and efficient when using.