- Skript Version: Skript 2.4
Skript Author: Bensku
Minecraft Version: 1.15
---
Full Code:
Code:on right click: if player is holding 1 red carpet named ".": set the item's name to "0" set {reload.%player%} to 0 else if player is holding 1 red carpet named "0": if player has 1 pumpkin seeds: if {reload.%player%} is 0: set {reload.%player%} to 1 set the item's name to "reloading....." wait 10 ticks set the item's name to "reloading...." wait 10 ticks set the item's name to "reloading..." wait 10 ticks set the item's name to "reloading.." wait 10 ticks set the item's name to "reloading." wait 4 ticks set the item's name to "30" remove 1 pumpkin seeds from the player's inventory set metadata value "Ammo" of item to "30" wait 1 tick set {reload.%player%} to 0 else if {reload.%player%} is 1: play sound "block.anvil.place" with volume 5 at player else if player does not have pumpkin seeds: play sound "block.lever.click" with volume 3 at player else if player is holding 1 red carpet: if {reload.%player%} is 0: if metadata value "Ammo" of event-item is not "0": play sound "entity.firework_rocket.blast" with volume 5 and pitch 0.3 at player make the player shoot a snowball at speed 10 forward set {_ammo} to metadata value "Ammo" of item remove 1 from {_ammo} set metadata value "Ammo" of item to "%{_ammo}%" set the item's name to "%{_ammo}%" on shoot: if shooter is a player: if shooter is holding 1 red carpet: set metadata value "Damage" of projectile to "5" on damage: attacker is a player: set {_damage} to metadata value "Damage" of projectile set damage to {_damage} parsed as an integer
Errors on Reload: none
Console Errors: none
Other Useful Info: - what i'm trying to do is set the item's name to the metadata value "Ammo"
Addons using:
Skellett 1.9.8, SkQuery 4.1.2
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I have done just about everything under the sun my low IQ brain can think of.