Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #©
- #- Reselling/Reuploading while claiming that it is yours or made by you is disallowed
- #- Do not edit it and upload it as your own
- #- While using it in a video, please feature everything under "Video"
- #©
- #
- #Video:
- #Skript made by Zeldaboy111
- #More content of the creator: https://forums.skunity.com/search/26443679/
- options:
- logo: &a&lWands &8:&7
- on enable:
- set {wands.distanceLock.IceWand::*} to 40, 12 and 39
- set {wands.distanceLock.MobilityWand::*} to 39, 0 and 26
- set {wands.cooldown.IceWand::*} to 6.9, 2.4 and 0.7
- set {wands.cooldown.MobilityWand::*} to 6.6, 9.3 and 3.8
- function spawnFallingBlock_Ice(loc: Location, p: Player):
- spawn falling ice at {_loc}
- set {_block} to last spawned falling ice
- show 7 snow shovel at {_loc}
- loop entities in radius 2.6 around {_loc}:
- set {_damage} to 5
- if loop-entity is not {_p}:
- set {_dist} to (distance between location of loop-entity and {_loc})
- remove {_dist} from {_damage}
- damage loop-entity by {_damage} hearts
- wait 3 ticks
- play sound "block.glass.break" with volume 4 at {_loc}
- if {_block} is alive:
- kill {_block}
- else:
- if block at {_loc} is ice:
- set block at {_loc} to air
- function checkSpell(p: Player, wand: String, spellAmount: Number, spell: String):
- set {_spells::*} to {_spell} split at ", "
- if {wands.%{_p}%.spellSelected::%{_wand}%} is not set:
- set {wands.%{_p}%.spellSelected::%{_wand}%} to 1
- send "{@logo} Spell &2&l%{_spells::1}% &7Selected!" to {_p}
- if {wands.%{_p}%.spellSelected::%{_wand}%} < {_spellAmount}:
- send "{@logo} Spell &2&l%{_spells::%{wands.%{_p}%.spellSelected::%{_wand}%}%}% &7Selected!" to {_p}
- add 1 to {wands.%{_p}%.spellSelected::%{_wand}%}
- else:
- send "{@logo} Spell &2&l%{_spells::%{wands.%{_p}%.spellSelected::%{_wand}%}%}% &7Selected!" to {_p}
- set {wands.%{_p}%.spellSelected::%{_wand}%} to 1
- function getSpell(p: Player, wand: String) :: number:
- if {wands.%{_p}%.lastSpellUsed} is set:
- if difference between now and {wands.%{_p}%.lastSpellUsed} < {wands.%{_p}%.lastSpellCooldown}:
- send "{@logo} You are too tired to use this spell." to {_p}
- stop
- set {_spell} to 1
- if {wands.%{_p}%.spellSelected::%{_wand}%} is set:
- set {_spell} to {wands.%{_p}%.spellSelected::%{_wand}%}
- set {wands.%{_p}%.lastSpellUsed} to now
- set {wands.%{_p}%.lastSpellCooldown} to "%{wands.cooldown.%{_wand}%::%{_spell}%}% seconds" parsed as a timespan
- return {_spell}
- function getTarget(p: Player, wand: String, spell: number) :: location:
- set {_target} to location of targeted block of {_p}
- if distance between location of targeted entity of {_p} and {_target} >= {wands.distanceLock.%{_wand}%::%{_spell}%}:
- set {_target} to location of block {wands.distanceLock.%{_wand}%::%{_spell}%} meters in front of {_p}
- else if block at {_target} is not set:
- set {_target} to location of block {wands.distanceLock.%{_wand}%::%{_spell}%} meters in front of {_p}
- else if distance between location of {_p} and {_target} >= {wands.distanceLock.%{_wand}%::%{_spell}%}:
- set {_target} to location of block {wands.distanceLock.%{_wand}%::%{_spell}%} meters in front of {_p}
- return {_target}
- command /wands [<text>] [<text>] [<text>] [<text>] [<text>] [<text>]:
- aliases: /wand
- trigger:
- if executor is not a player:
- send "{@logo} This command can only be executed by a player."
- if player has permission "wand.*":
- if arg-1 is "help":
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- send "<ttp:&7Get a guide about this Skript><sgt:/wand guide>&2/wand guide [page]"
- send "<ttp:&7Get a list of all wands><sgt:/wand list>&2/wand list"
- send "<ttp:&7Get a list of all spells><sgt:/wand spells><sgt:/wand spells>&2/wand spells [wand]"
- send "<ttp:&7Get a wand><sgt:/wand get >&2/wand get <wand>"
- send "%nl%&7Try clicking and hovering over them."
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- else if arg-1 is "guide":
- if arg-2 is "1":
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- send "&7The Wands Skript is user friendly, herefore there are added some tweaks for you to use. In this guide there will be explained how it works."
- send "&7Wands can be used by any player when it is given to them. The command execution has a <ttp:&7wand.*>&2permission&r&7, so not every player can get a wand by using this command."
- send "%nl%&7Next Page <ttp:&7Next Page><cmd:/wands guide 2>&a>>"
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- else if arg-2 is "2":
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- send "&a&lGetting a Wand&8:%nl% "
- send "&7Getting a wand can be done in two ways, either by executing the <ttp:&7Click to Autofill><sgt:/wand get <wand>>&2get-command &r&7or by clicking the <ttp:&7Click to Autofill><sgt:/wand list>&2Wands List&7."
- send "%nl%&a&lUsing a Wand&8:"
- send "%nl%&7Every player can use a wand. The controls are as follows&8:%nl%"
- send "&8♦ &aLeft-Click &8|| &7Left-Clicking will cast the spell."
- send "&8♦ &aRight-Click &8|| &7Right-Clicking will let you cycle through all spells."
- send "%nl%<ttp:&7Next Page><cmd:/wands guide 1>&a<<&r &7Previous Page"
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- else:
- execute player command "/wand guide 1"
- else if arg-1 is "list":
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- send "&7These are all current wands:%nl%"
- send "&8♦ <ttp:&7Click to Get><cmd:/wand get ice>&2&lIce Wand &8|| <ttp:&7Click to get the Spell List><cmd:/wand spells ice>&2Spell List%nl%&8♦ <ttp:&7Click to Get><cmd:/wand get mobility>&2&lMobility Wand &8|| <ttp:&7Click to get the Spell List><cmd:/wand spells mobility>&2Spell List"
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- else if arg-1 is "get":
- if arg-2 is "ice":
- give player iron axe named "&bIce Wand" with lore "&5&kl"
- else if arg-2 is "mobility":
- give player a feather named "&7Mobility Wand" with lore "&5&kl"
- else if arg-1 is "spells":
- if arg-2 is "ice":
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- send "&8♦ <ttp:&7Damages your opponent>&2&lIce Spark"
- send "&8♦ <ttp:&7Summon a snake to attack your opponent>&2&lIce Snake"
- send "&8♦ <ttp:&7Freezes your opponent>&2&lFreeze"
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- else if arg-2 is "mobility":
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- send "&8♦ <ttp:&7Teleports you to a location>&2&lTeleport"
- send "&8♦ <ttp:&7Makes you fast and agile>&2&lAssassin"
- send "&8♦ <ttp:&7Teleports your opponent>&2&lControl"
- send "%nl%&8&m &8[ &a&lWands &8]&m %nl% "
- else:
- if arg-2 is set:
- send "{@logo} Invalid Wand! Do <sgt:&7Click to Execute><cmd:/wand list>&2/wand list &r&7for a full list with all wands."
- else:
- send "{@logo} Incorrect Usage! &2/wand spells <wand>&7."
- else:
- send "{@logo} Incorrect Usage! Do <ttp:&7Click to Execute><cmd:/wand help>&2/wand help&r &7for more info."
- on right click:
- if player is holding an iron axe named "&bIce Wand" with lore "&5&kl":
- checkSpell(player, "IceWand", 3, "Ice Spark, Ice Snake, Freeze")
- else if player is holding a feather named "&7Mobility Wand" with lore "&5&kl":
- checkSpell(player, "MobilityWand", 3, "Teleport, Assassin, Control")
- on left click:
- if player is holding an iron axe named "&bIce Wand" with lore "&5&kl":
- cancel event
- set {_spell} to getSpell(player, "IceWand")
- set {_target} to getTarget(player, "IceWand", {_spell})
- if {_spell} is 2:
- show 12 snow shovel at {_target}
- loop entities in radius 2.1 around {_target}:
- set {_damage} to 3
- if loop-entity is not player:
- set {_dist} to (distance between location of loop-entity and {_target})
- remove {_dist} from {_damage}
- damage loop-entity by {_damage} hearts
- else if {_spell} is 3:
- loop blocks from block at location 0.8 meter above player to block at {_target}:
- spawnFallingBlock_Ice(location of loop-block, player)
- wait 1 ticks
- else if {_spell} is 1:
- if targeted entity of player is set:
- if distance between block at targeted entity of player and block at player < {wands.distanceLock.IceWand::%{_spell}%}:
- loop 5 times:
- apply slowness 10 to targeted entity of player for 1 seconds
- loop 2 times:
- show 8 snow shovel at location 1 meters above targeted entity of player
- wait 10 ticks
- else:
- delete {wands.%{_p}%.lastSpellUsed}
- send "{@logo} There's no target found."
- else:
- delete {wands.%{_p}%.lastSpellUsed}
- send "{@logo} There's no target found."
- else if player is holding a feather named "&7Mobility Wand" with lore "&5&kl":
- cancel event
- set {_spell} to getSpell(player, "MobilityWand")
- set {_target} to getTarget(player, "MobilityWand", {_spell})
- if {_spell} is 2:
- show 120 nether portal at the player
- apply slowness 10 to player for 4 seconds
- wait 2 seconds
- play sound "entity.enderman.teleport" with volume 7 at location of targeted entity of player
- teleport player to location 1 meters above {_target}
- play sound "entity.enderman.teleport" with volume 7 at location of player
- show 120 nether portal at the player
- else if {_spell} is 3:
- apply slowness 10 to player for 0.7 seconds
- show 200 small smoke at the player
- wait 0.7 seconds
- apply speed 1 to player for 6 seconds
- apply jump boost 1 to player for 6 seconds
- apply invisibility 1 to player for 6 seconds
- loop 6 times:
- wait 1 second
- show 96 small smoke at the player
- else if {_spell} is 1:
- if targeted entity of player is set:
- if distance between block at targeted entity of player and block at player < {wands.distanceLock.MobilityWand::%{_spell}%}:
- show 120 nether portal at the targeted entity of player
- apply slowness 10 to targeted entity of player for 4 seconds
- wait 2 seconds
- set {_loc} to location of targeted entity of player
- while {_loc} is location of targeted entity of player:
- set {_x} to random integer between -12 and 12
- set {_y} to random integer between -3 and 3
- set {_z} to random integer between -12 and 12
- set {_loc} to location at x-coordinate of targeted entity of player+{_x}, y-coordinate of targeted entity of player+{_y}, z-coordinate of targeted entity of player+{_z} in world of targeted entity of player
- play sound "entity.enderman.teleport" with volume 7 at location of targeted entity of player
- teleport targeted entity of player to location 1 meters above {_loc}
- play sound "entity.enderman.teleport" with volume 7 at location of targeted entity of player
- show 120 nether portal at the targeted entity of player
- else:
- delete {wands.%{_p}%.lastSpellUsed}
- send "{@logo} There's no target found."
- else:
- delete {wands.%{_p}%.lastSpellUsed}
- send "{@logo} There's no target found."
Add Comment
Please, Sign In to add comment