Magic Wand Skript

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

sandor_1234

Active Member
Jan 26, 2017
165
5
0
21
Category: Fun

Suggested name: SkyWand

What I want:
I would like a skript that allows you to have an blaze rod that acts like an magic wand.
It should be named "&0Sky&5Wand" with the lore off its current spell.
When you left click with the wand in your hand it will cast its current spell.
When you right click with the wand in your wand it will select the next spell.
Example spells:

Comet:
This launches a fireball with some awesome partical effects arround it.
When this hits the ground it will create fire in a radius of 2/3.

Explosive:
This launches a fireball with some awesome partical effects arround it.
When this hits the ground it will create an explosion.

Launch:
This will launch all the mobs/players/animalls in a radius of 3 around the block the player is pointing his SkyWand at in the air like 20 blocks high.

If any one has some more cool ideas for this project/request please leave them below.


Ideas for commands:
/Skywand get (Gives you a SkyWand)
Alias:
/sw
Ideas for permissions:
SkyWand.use (Allows you to use the skywand)
SkyWand.Get (Allows you to use /skywand get)

When I'd like it by: The basics should be done in a week with like 1 or 2 spells.

Basics:
code_language.skript:
on left click holding blaze rod named "&0Sky&5Wand":
    If player has permission "SkyWand.Use":
        if player is holding blaze rod with lore "Comet":
            make player shoot a fireball at speed 1
            etc...
        if player is holding blaze rod with lore "Explosive":
            make player shoot a fireball at speed 1
            etc...
        if player is holding blaze rod with lore "Launch":
            etc...
on right click holding blaze rod named "&0Sky&5Wand":
    If player has permission "SkyWand.Use":
        if player is holding blaze rod with lore "Comet":
            set line 1 of lore of player's tool to "Explosive"
        if player is holding blaze rod with lore "Explosive":
            set line 1 of lore of player's tool to "Launch"
        if player is holding blaze rod with lore "Launch":
            set line 1 of lore of player's tool to "Comet"
command /skywand:
    permission: skywand.get
    trigger:
        give player a blaze rod named "&0Sky&5Wand" with lore "Comet"

So if anybody could add some cool spells to this project it would be amazing. <3

[doublepost=1486290875,1486048873][/doublepost]Bump
[doublepost=1486449371][/doublepost]Bump
[doublepost=1486659455][/doublepost]Bump
[doublepost=1486811916][/doublepost]Bump
[doublepost=1486885241][/doublepost]Bump
 
code_language.skript:
command /skywand [<text="">]:
    permission: skywand.get
    trigger:
        give player a blaze rod named "&0Sky&5Wand" with lore "&eCurrent Spell: &7Comet"
        set {skywand::currentspell::%player%} to "Comet"

on drop:
    name of player's tool is "&0Sky&5Wand":
        player has permission "skywand.use"
        player isn't sneaking:
            cancel event
            {skywand::currentspell::%player%} is "Comet":
                set {skywand::currentspell::%player%} to "Explosive"
            else if {skywand::currentspell::%player%} is "Explosive":
                set {skywand::currentspell::%player%} to "Launch"
            else if {skywand::currentspell::%player%} is "Launch":
                set {skywand::currentspell::%player%} to "Blink"
            else if {skywand::currentspell::%player%} is "Blink":
                set {skywand::currentspell::%player%} to "Comet"
            set player's tool to a blaze rod named "&0Sky&5Wand" with lore "&eCurrent Spell: &7%{skywand::currentspell::%player%}%"
            message "&eSpell changed to &6%{skywand::currentspell::%player%}%"

every second:
    add "Comet" and "Explosive" and "Launch" and "Blink" to {_spells::*}
    loop all players:
        loop {_spells::*}:
            {skywand::cooldowns::%loop-player%::%loop-value-2%} is more than 0:
                remove 1 from {skywand::cooldowns::%loop-player%::%loop-value-2%}

on explosion:
    if metadata "CometSpell" of entity is true:
        cancel event
        loop blocks in radius 3.5 of entity:
            block above loop-block is air:
                loop-block isn't air or fire:
                    set loop-block to fire

on rightclick:
    name of player's tool is "&0Sky&5Wand":
        player has permission "skywand.use"
        {skywand::currentspell::%player%} is set:
            {skywand::cooldowns::%player%::%{skywand::currentspell::%player%}%} is less than or equal to 0:
                {skywand::currentspell::%player%} is "Comet":
                    set {skywand::cooldowns::%player%::Comet} to 30
                    make player shoot fireball at speed 1
                    set metadata "CometSpell" of shot fireball to true
                    set {_fb} to shot fireball
                    while {_fb} exists:
                        {_fb} is on ground:
                            stop
                        spawn 25 of particle flame:0 offset by 0.2, 0.2, 0.2 at {_fb}
                        wait 1 tick

                {skywand::currentspell::%player%} is "Launch":
                    set {skywand::cooldowns::%player%::Launch} to 30
                    set {_l} to location of targeted block
                    distance between player and {_l} is less than 30:
                        loop all entities:
                            distance between loop-entity and {_l} is less than 4:
                                push loop-entity upwards at speed 4
                                spawn 25 of particle cloud:0.2 offset by 0.5, 0.1, 0.5 at loop-entity

                {skywand::currentspell::%player%} is "Explosive":
                    set {skywand::cooldowns::%player%::Explosive} to 30
                    make player shoot fireball at speed 1
                    set {_fb} to shot fireball
                    while {_fb} exists:
                        {_fb} is on ground:
                            stop
                        spawn 25 of particle flame:0 offset by 0.2, 0.2, 0.2 at {_fb}
                        wait 1 tick

                {skywand::currentspell::%player%} is "Blink":
                    set {skywand::cooldowns::%player%::Blink} to 30
                    set {_l} to location of targeted block
                    distance between player and {_l} is less than 30:
                        block above {_l} is air:
                            block above block above {_l} is air:
                                spawn 25 of particle portal:0 offset by 0.3, 1, 0.3 at player
                                teleport player to block above {_l}
                                spawn 25 of particle portal:0 offset by 0.3, 1, 0.3 at block above {_l}
Eh. I was bored. All from memory, hasn't been tested. Enjoy.
 
code_language.skript:
command /skywand [<text="">]:
    permission: skywand.get
    trigger:
        give player a blaze rod named "&0Sky&5Wand" with lore "&eCurrent Spell: &7Comet"
        set {skywand::currentspell::%player%} to "Comet"

on drop:
    name of player's tool is "&0Sky&5Wand":
        player has permission "skywand.use"
        player isn't sneaking:
            cancel event
            {skywand::currentspell::%player%} is "Comet":
                set {skywand::currentspell::%player%} to "Explosive"
            else if {skywand::currentspell::%player%} is "Explosive":
                set {skywand::currentspell::%player%} to "Launch"
            else if {skywand::currentspell::%player%} is "Launch":
                set {skywand::currentspell::%player%} to "Blink"
            else if {skywand::currentspell::%player%} is "Blink":
                set {skywand::currentspell::%player%} to "Comet"
            set player's tool to a blaze rod named "&0Sky&5Wand" with lore "&eCurrent Spell: &7%{skywand::currentspell::%player%}%"
            message "&eSpell changed to &6%{skywand::currentspell::%player%}%"

every second:
    add "Comet" and "Explosive" and "Launch" and "Blink" to {_spells::*}
    loop all players:
        loop {_spells::*}:
            {skywand::cooldowns::%loop-player%::%loop-value-2%} is more than 0:
                remove 1 from {skywand::cooldowns::%loop-player%::%loop-value-2%}

on explosion:
    if metadata "CometSpell" of entity is true:
        cancel event
        loop blocks in radius 3.5 of entity:
            block above loop-block is air:
                loop-block isn't air or fire:
                    set loop-block to fire

on rightclick:
    name of player's tool is "&0Sky&5Wand":
        player has permission "skywand.use"
        {skywand::currentspell::%player%} is set:
            {skywand::cooldowns::%player%::%{skywand::currentspell::%player%}%} is less than or equal to 0:
                {skywand::currentspell::%player%} is "Comet":
                    set {skywand::cooldowns::%player%::Comet} to 30
                    make player shoot fireball at speed 1
                    set metadata "CometSpell" of shot fireball to true
                    set {_fb} to shot fireball
                    while {_fb} exists:
                        {_fb} is on ground:
                            stop
                        spawn 25 of particle flame:0 offset by 0.2, 0.2, 0.2 at {_fb}
                        wait 1 tick

                {skywand::currentspell::%player%} is "Launch":
                    set {skywand::cooldowns::%player%::Launch} to 30
                    set {_l} to location of targeted block
                    distance between player and {_l} is less than 30:
                        loop all entities:
                            distance between loop-entity and {_l} is less than 4:
                                push loop-entity upwards at speed 4
                                spawn 25 of particle cloud:0.2 offset by 0.5, 0.1, 0.5 at loop-entity

                {skywand::currentspell::%player%} is "Explosive":
                    set {skywand::cooldowns::%player%::Explosive} to 30
                    make player shoot fireball at speed 1
                    set {_fb} to shot fireball
                    while {_fb} exists:
                        {_fb} is on ground:
                            stop
                        spawn 25 of particle flame:0 offset by 0.2, 0.2, 0.2 at {_fb}
                        wait 1 tick

                {skywand::currentspell::%player%} is "Blink":
                    set {skywand::cooldowns::%player%::Blink} to 30
                    set {_l} to location of targeted block
                    distance between player and {_l} is less than 30:
                        block above {_l} is air:
                            block above block above {_l} is air:
                                spawn 25 of particle portal:0 offset by 0.3, 1, 0.3 at player
                                teleport player to block above {_l}
                                spawn 25 of particle portal:0 offset by 0.3, 1, 0.3 at block above {_l}
Eh. I was bored. All from memory, hasn't been tested. Enjoy.
Love yuh <3