Files
fighter-inferno-upgrade.sk
Code
1 168
fighter-inferno-upgrade.sk
# Inferno Kit - Flame Colossus
# Skript 2.10.1
options:
p: &8[&4&lINFERNO&8]&7
command /giveinferno [<player>]:
permission: op
trigger:
set {_target} to arg-1
if {_target} is not set:
set {_target} to player
if {_target} is not set:
send "{@p} &cUsage: /giveinferno <player>" to sender
stop
set {_sword} to netherite sword named "&cInferno Sword I"
set custom model data of {_sword} to 1001
enchant {_sword} with sharpness 2
set unbreakable state of {_sword} to true
set {_armor} to netherite chestplate named "&6Flamescale Ward"
set unbreakable state of {_armor} to true
give {_sword} to {_target}
give {_armor} to {_target}
send "{@p} &aInferno kit given." to {_target}
# Flame aura while a player holds any Inferno Sword.
every 10 ticks:
loop all players:
set {_heldItem} to loop-player's tool
if {_heldItem} is not air:
set {_heldName} to uncolored display name of {_heldItem}
if {_heldName} starts with "Inferno Sword":
set {_auraLoc} to location 1 block above loop-player
draw 3 of flame at {_auraLoc}
set {_auraLoc} to location of loop-player
draw 2 of soul fire flame at {_auraLoc}
set {_auraLoc} to location 2 blocks above loop-player
draw 1 of lava at {_auraLoc}
# Tier III ability: drop the sword while holding it to target an eruption.
on drop:
if event-item is air:
stop
set {_itemName} to uncolored display name of event-item
if {_itemName} is not "Inferno Sword III":
stop
cancel event
set {_caster} to player
if {inferno.eruption::%uuid of {_caster}%} is set:
if difference between now and {inferno.eruption::%uuid of {_caster}%} is less than 15 seconds:
send "&cInferno Eruption is still on cooldown." to {_caster}
stop
set {_target} to target block of {_caster}
if {_target} is not set:
send "&cYou need to aim at a block to use Inferno Eruption." to {_caster}
stop
set {inferno.eruption::%uuid of {_caster}%} to now
set {_casterName} to name of {_caster}
set {_loc} to location of {_target}
add 1 to y-coordinate of {_loc}
send "&c&l[!] &4You hurl a burning core to the ground. It erupts in a moment!" to {_caster}
play sound "item.firecharge.use" with volume 1 and pitch 0.7 to {_caster}
draw 12 of flame at {_loc}
draw 8 of soul fire flame at {_loc}
play sound "block.fire.ambient" with volume 1 and pitch 0.8 to {_caster}
wait 30 ticks
loop 3 times:
draw 16 of flame at {_loc}
draw 10 of soul fire flame at {_loc}
wait 2 ticks
draw 45 of flame at {_loc}
draw 30 of soul fire flame at {_loc}
draw 12 of end rod at {_loc}
play sound "entity.generic.explode" with volume 2 and pitch 0.6 to {_caster}
play sound "block.lava.pop" with volume 2 and pitch 0.7 to {_caster}
loop all living entities in radius 4 around {_loc}:
if loop-entity is not {_caster}:
damage loop-entity by 8
ignite loop-entity for 5 seconds
draw 10 of flame at location of loop-entity
if loop-entity is a player:
send "&cYou were caught in %{_casterName}%'s Inferno Eruption!" to loop-entity
loop 4 times:
draw 12 of flame at {_loc}
draw 8 of soul fire flame at {_loc}
loop all living entities in radius 3 around {_loc}:
if loop-entity is not {_caster}:
ignite loop-entity for 2 seconds
wait 10 ticks
command /upgradeinferno:
permission: op
trigger:
set {_player} to player
set {_sword} to {_player}'s tool
if {_sword} is air:
send "&cYou must be holding your Inferno Sword to upgrade." to {_player}
stop
set {_swordName} to uncolored display name of {_sword}
if {_swordName} does not start with "Inferno Sword":
send "&cYou're either holding the wrong item or already at max tier." to {_player}
stop
if {_swordName} is "Inferno Sword I":
if {_player}'s level is less than 10:
send "&cYou need at least 10 XP levels to upgrade to Tier II." to {_player}
stop
remove 10 from {_player}'s level
set {_newSword} to netherite sword named "&6Inferno Sword II"
set custom model data of {_newSword} to 1002
enchant {_newSword} with sharpness 2
enchant {_newSword} with fire aspect 1
set unbreakable state of {_newSword} to true
set {_player}'s tool to {_newSword}
send "&aUpgraded to &6Inferno Sword II&a!" to {_player}
play sound "entity.player.levelup" with volume 1 and pitch 1 to {_player}
set {_effectLoc} to location 1 block above {_player}
draw 30 of flame at {_effectLoc}
draw 20 of lava at location of {_player}
stop
if {_swordName} is "Inferno Sword II":
if {_player}'s level is less than 15:
send "&cYou need at least 15 XP levels to upgrade to Tier III." to {_player}
stop
remove 15 from {_player}'s level
set {_newSword} to netherite sword named "&5Inferno Sword III"
set custom model data of {_newSword} to 1003
enchant {_newSword} with sharpness 2
enchant {_newSword} with fire aspect 2
set unbreakable state of {_newSword} to true
set {_player}'s tool to {_newSword}
send "&aUpgraded to &5Inferno Sword III&a! &eDrop it while aiming at a block to use Inferno Eruption." to {_player}
play sound "entity.player.levelup" with volume 1 and pitch 1 to {_player}
set {_effectLoc} to location 1 block above {_player}
draw 40 of soul fire flame at {_effectLoc}
draw 25 of lava at location of {_player}
stop
send "&cMax tier reached or invalid item." to {_player}