D
Deleted member 21021
Skript Version (do not put latest): Skript 2.6.1
Skript Author: Bensku
Minecraft Version: 1.17.1
--
Hello everyone! I need some help with this Skript as I'm stuck and cannot figure out what to do.
Description:
When someone right-clicks a glow ink sac named "Glow Dust", the game asks you to type in the username of your target to make them glow for 300 seconds (5 minutes). As of now, this Skript ONLY works when you type in the FULL username in chat, but I also want my Skript to detect the username properly when someone decides to type it in partially.
I have not been able to find a solution to my Skript problem on the forums, as well as in the documentation and other resources. I do not have any errors in console as the Skript already works fine, but I want to add this feature onto it.
Help would be much appreciated!
An example of how I want my Skript to work:
A player has gotten this glow ink sac named "Glow Dust" and they want to make TimmieTRM glow for 5 minutes. They decide to type "Timmie" into the chat. The Skript then looks for anyone with "Timmie" in their username and decide to make them glow, but if there are multiple players with "Timmie" in their username, the game asks them to be more specific in which "Timmie" they want to choose.
Full Code:
(For Context: "Glow Dust" is a rare artifact you are able to get out of a Treasure Chest, which has a 1% of dropping when digging specific blocks. This code runs the functionality of this artifact.)
Here is how to give the item to yourself incase you're testing this yourself:
(The artifact drops at your location in-game.)
Skript Author: Bensku
Minecraft Version: 1.17.1
--
Hello everyone! I need some help with this Skript as I'm stuck and cannot figure out what to do.
Description:
When someone right-clicks a glow ink sac named "Glow Dust", the game asks you to type in the username of your target to make them glow for 300 seconds (5 minutes). As of now, this Skript ONLY works when you type in the FULL username in chat, but I also want my Skript to detect the username properly when someone decides to type it in partially.
I have not been able to find a solution to my Skript problem on the forums, as well as in the documentation and other resources. I do not have any errors in console as the Skript already works fine, but I want to add this feature onto it.
Help would be much appreciated!
An example of how I want my Skript to work:
A player has gotten this glow ink sac named "Glow Dust" and they want to make TimmieTRM glow for 5 minutes. They decide to type "Timmie" into the chat. The Skript then looks for anyone with "Timmie" in their username and decide to make them glow, but if there are multiple players with "Timmie" in their username, the game asks them to be more specific in which "Timmie" they want to choose.
Full Code:
(For Context: "Glow Dust" is a rare artifact you are able to get out of a Treasure Chest, which has a 1% of dropping when digging specific blocks. This code runs the functionality of this artifact.)
Code:
on right click with glow ink sac:
if name of player's tool contains "&cGlow Dust":
set {treasurechest.%player%.choosing} to true
message "&cType in chat the username of your target to make them glow.."
on chat:
if {treasurechest.%player%.choosing} = true:
loop all players:
if message contains "%loop-player%":
cancel event
apply potion of glowing potion of tier 1 to loop-player for 300 seconds
message "&cYou successfully made %loop-player% glow.."
set {treasurechest.%player%.choosing} to false
remove 1 of player's tool from player's tool
Here is how to give the item to yourself incase you're testing this yourself:
(The artifact drops at your location in-game.)
Code:
command /test:
trigger:
drop glow ink sac named "&cGlow Dust" with lore "&7Reveal someones location", "&7to everyone in the world" and "&6&lArtifact"
Last edited by a moderator: