So, recently I made a skript where you can craft and upgrade wands, but for some reason, when I use the skript, I can not join my world! In the logs, it says i joined and never left, and there are no errors, but when I try to connect, I always disconnect. Help?
Code:
on load:
register new shapeless recipe for cobblestone named "&l&2Compressed Cobblestone" with lore "" and "&2&oUpgrade wands, weapons, and armor " and "&2&owith this!" using cobblestone, cobblestone, cobblestone, cobblestone, cobblestone, cobblestone, cobblestone, cobblestone, cobblestone
register new shapeless recipe for coal named "&l&2Compressed Coal" with lore "" and "&2&oUpgrade wands, weapons, and armor " and "&2&owith this!" using coal, coal, coal, coal, coal, coal, coal, coal, coal
register new shapeless recipe for stick named "&2&lBasic Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve with 2 cobblestone," and "&c2 coal, and 1 dirt!" using stick, dirt, cobblestone, air, air, air, air, air, air
register new shapeless recipe for stick named "&c&oImproved &2Basic Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve with 3 cobblestone," and "&c4 coal, and 1 dirt!" using stick named "&2&lBasic Wand&r", dirt, cobblestone, cobblestone, coal, coal, air, air, air
register new shapeless recipe for stick named "&9Better Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve into a sniper wand with " and "&c7 coal and 1 dirt," and "&cand improve into a machine wand with" and "&c8 compressed cobble!" using stick named "&c&oImproved &2Basic Wand&r", dirt, cobblestone, cobblestone, coal, coal, cobblestone, coal, coal
set {named} to false
register new shapeless recipe for 9 cobblestone using cobblestone named "&l&2Compressed Cobblestone", air, air, air, air, air, air, air, air
register new shapeless recipe for stick named "&9Sniper Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve into with " and "&c3 compressed coal, 5 compressed cobblestone," and "&c and 1 dirt" using stick named "&9Better Wand&r", dirt, coal, coal, coal, coal, coal, coal, coal
register new shapeless recipe for stick named "&l&3Machine Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve with " and "&c8 double compressed cobblestone" using stick named "&9Better Wand&r", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone"
register new shapeless recipe for stick named "&l&2&oDouble Compressed Cobblestone" with lore "" and "&2&oUpgrade wands, weapons, and armor " and "&2&owith this!" cobblestone named "&l&2Compressed", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone"
on shoot:
shooter is a player
if name of shooter's held item is "&2&lBasic Wand&r":
set metadata value "Damage" of event-projectile to "0.25"
set metadata value "Wand" of event-projectile to "Basic Wand"
set {named} to true
if name of shooter's held item is "&c&oImproved &2Basic Wand&r":
set metadata value "Damage" of event-projectile to "0.5"
set metadata value "Wand" of event-projectile to "Improved Basic Wand"
set {named} to true
if name of shooter's held item is "&9Better Wand&r":
set metadata value "Damage" of event-projectile to "0.75"
set metadata value "Wand" of event-projectile to "Better Wand"
set {named} to true
if name of shooter's held item is "&l&3Machine Wand&r":
set metadata value "Damage" of event-projectile to "0.5"
set metadata value "Wand" of event-projectile to "Machine Wand"
set {named} to true
if name of shooter's held item is "&9Sniper Wand&r":
set metadata value "Damage" of event-projectile to "3"
set metadata value "Wand" of event-projectile to "Machine Wand"
set {named} to true
on damage:
"%damage cause%" is "projectile"
set {_damage} to metadata value "Damage" of event-projectile
set damage to {_damage} parsed as number
set {_type} to metadata value "Wand" of event-projectile
#broadcast "%attacker% damaged %victim% by %damage% with %{_type}%."
if {named} is false:
set {_damage} to 0
else:
set {named} to false
on sneak toggle:
if name of player's held item is "&9Sniper Wand&r":
if player isn't sneaking:
apply slowness 10 to player for 10000 seconds
if player is sneaking:
execute player command "/effect clear %player% slowness"
on rightclick holding stick:
if name of player's held item is set:
if name of player's held item is "&2&lBasic Wand&r":
set {_speed} to 1 seconds
if name of player's held item is "&c&oImproved &2Basic Wand&r":
set {_speed} to 0.7 seconds
if name of player's held item is "&9Better Wand&r":
set {_speed} to 0.4 seconds
set {wanduser} to player
set {_cd} to difference between {shoot-arrow.%uuid of player%} and now
if name of player's held item is "&9Sniper Wand&r":
set {_speed} to 2 seconds
if {_cd} is greater than {_speed}:
play sound "entity.firework_rocket.twinkle" with volume 5 and pitch 1 at player
if name of player's held item is "&l&3Machine Wand&r":
set {_speed} to 0.1 seconds
if {_cd} is greater than {_speed}:
play sound "entity.firework_rocket.blast" with volume 5 and pitch 1 at player
if {_cd} is less than {_speed}:
stop
set {shoot-arrow.%uuid of player%} to now
shoot arrow from player at speed 10
else:
cancel event
on projectile hit:
set {_locationtarget} to the location 1 in front of the projectile
drawLine particle redstone, RGB 0, 0, 0, center {wanduser}, target {_locationtarget}, id "%shooter%", rainbowMode false, solid false, density 1, length 20, zigZag count 0, height 0, visibleRange 32, displacementXYZ 0, 1.2, 0, pulseDelay 0
delete projectile
Plugins:
Skdragon, skript, skquery, skvault
[doublepost=1575750380,1574910658][/doublepost]Fixed the problem.
Code:
on load:
register new shapeless recipe for cobblestone named "&l&2Compressed Cobblestone" with lore "" and "&2&oUpgrade wands, weapons, and armor " and "&2&owith this!" using cobblestone, cobblestone, cobblestone, cobblestone, cobblestone, cobblestone, cobblestone, cobblestone, cobblestone
register new shapeless recipe for coal named "&l&2Compressed Coal" with lore "" and "&2&oUpgrade wands, weapons, and armor " and "&2&owith this!" using coal, coal, coal, coal, coal, coal, coal, coal, coal
register new shapeless recipe for stick named "&2&lBasic Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve with 2 cobblestone," and "&c2 coal, and 1 dirt!" using stick, dirt, cobblestone, air, air, air, air, air, air
register new shapeless recipe for stick named "&c&oImproved &2Basic Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve with 3 cobblestone," and "&c4 coal, and 1 dirt!" using stick named "&2&lBasic Wand&r", dirt, cobblestone, cobblestone, coal, coal, air, air, air
register new shapeless recipe for stick named "&9Better Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve into a sniper wand with " and "&c7 coal and 1 dirt," and "&cand improve into a machine wand with" and "&c8 compressed cobble!" using stick named "&c&oImproved &2Basic Wand&r", dirt, cobblestone, cobblestone, coal, coal, cobblestone, coal, coal
set {named} to false
register new shapeless recipe for 9 cobblestone using cobblestone named "&l&2Compressed Cobblestone", air, air, air, air, air, air, air, air
register new shapeless recipe for stick named "&9Sniper Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve into with " and "&c3 compressed coal, 5 compressed cobblestone," and "&c and 1 dirt" using stick named "&9Better Wand&r", dirt, coal, coal, coal, coal, coal, coal, coal
register new shapeless recipe for stick named "&l&3Machine Wand&r" with lore "&2&n&lRight Click to use!" and " " and "&c Improve with " and "&c8 double compressed cobblestone" using stick named "&9Better Wand&r", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone"
register new shapeless recipe for stick named "&l&2&oDouble Compressed Cobblestone" with lore "" and "&2&oUpgrade wands, weapons, and armor " and "&2&owith this!" cobblestone named "&l&2Compressed", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone", cobblestone named "&l&2Compressed Cobblestone"
on shoot:
shooter is a player
if name of shooter's held item is "&2&lBasic Wand&r":
set metadata value "Damage" of event-projectile to "0.25"
set metadata value "Wand" of event-projectile to "Basic Wand"
set {named} to true
if name of shooter's held item is "&c&oImproved &2Basic Wand&r":
set metadata value "Damage" of event-projectile to "0.5"
set metadata value "Wand" of event-projectile to "Improved Basic Wand"
set {named} to true
if name of shooter's held item is "&9Better Wand&r":
set metadata value "Damage" of event-projectile to "0.75"
set metadata value "Wand" of event-projectile to "Better Wand"
set {named} to true
if name of shooter's held item is "&l&3Machine Wand&r":
set metadata value "Damage" of event-projectile to "0.5"
set metadata value "Wand" of event-projectile to "Machine Wand"
set {named} to true
if name of shooter's held item is "&9Sniper Wand&r":
set metadata value "Damage" of event-projectile to "3"
set metadata value "Wand" of event-projectile to "Machine Wand"
set {named} to true
on damage:
"%damage cause%" is "projectile"
set {_damage} to metadata value "Damage" of event-projectile
set damage to {_damage} parsed as number
set {_type} to metadata value "Wand" of event-projectile
#broadcast "%attacker% damaged %victim% by %damage% with %{_type}%."
if {named} is false:
set {_damage} to 0
else:
set {named} to false
on sneak toggle:
if name of player's held item is "&9Sniper Wand&r":
if player isn't sneaking:
apply slowness 10 to player for 10000 seconds
if player is sneaking:
execute player command "/effect clear %player% slowness"
on rightclick holding stick:
if name of player's held item is set:
if name of player's held item is "&2&lBasic Wand&r":
set {_speed} to 1 seconds
if name of player's held item is "&c&oImproved &2Basic Wand&r":
set {_speed} to 0.7 seconds
if name of player's held item is "&9Better Wand&r":
set {_speed} to 0.4 seconds
set {wanduser} to player
set {_cd} to difference between {shoot-arrow.%uuid of player%} and now
if name of player's held item is "&9Sniper Wand&r":
set {_speed} to 2 seconds
if {_cd} is greater than {_speed}:
play sound "entity.firework_rocket.twinkle" with volume 5 and pitch 1 at player
if name of player's held item is "&l&3Machine Wand&r":
set {_speed} to 0.1 seconds
if {_cd} is greater than {_speed}:
play sound "entity.firework_rocket.blast" with volume 5 and pitch 1 at player
if {_cd} is less than {_speed}:
stop
set {shoot-arrow.%uuid of player%} to now
shoot arrow from player at speed 10
else:
cancel event
on projectile hit:
set {_locationtarget} to the location 1 in front of the projectile
drawLine particle redstone, RGB 0, 0, 0, center {wanduser}, target {_locationtarget}, id "%shooter%", rainbowMode false, solid false, density 1, length 20, zigZag count 0, height 0, visibleRange 32, displacementXYZ 0, 1.2, 0, pulseDelay 0
delete projectile
Plugins:
Skdragon, skript, skquery, skvault
[doublepost=1575750380,1574910658][/doublepost]Fixed the problem.