Solved How to detect if a item is glowing

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Carter

Member
Aug 18, 2017
10
0
0
code_language.skript:
on mine of sugar cane:
    player's tool is 1 of glowing diamond hoe with lore "&7Harvester I" named "&8&l* &b&lHARVESTER HOE &8&l*"
    give 1 sugar cane to player

I do not get any error but i have a skript set up to give the item which gives the exact item im testing for on the sugar cane break event. I am just wondering how i test to see if the item is glowing as that does not work for me.

code_language.skript:
command /harvester <player>:
    description: Gives the target a harvester hoe
    usage: &c/harvester <player>
    permission: harvesterhoe.use
    permission message: &cYou do not have permission to use this command!
    executable by: console and players
    trigger:
        give 1 of glowing diamond hoe named "&8&l* &b&lHARVESTER HOE &8&l*" with lore "&7Harvester I" to arg 1
 
I'm not sure exactly what bit isnt working for you, can you be more specific?
This code here works just fine for me in testing it
code_language.skript:
command /test:
    trigger:
        give 1 of glowing diamond hoe with lore "&7Harvester I" named "&8&l* &b&lHARVESTER HOE &8&l*" to player
       
command /test2:
    trigger:
        if player's tool is 1 of glowing diamond hoe with lore "&7Harvester I" named "&8&l* &b&lHARVESTER HOE &8&l*":
            send "success"
           
on break of sugar cane: #both break and mine work
    if player's tool is 1 of glowing diamond hoe with lore "&7Harvester I" named "&8&l* &b&lHARVESTER HOE &8&l*":
        give 1 sugar cane to player
 
I'm not sure exactly what bit isnt working for you, can you be more specific?
This code here works just fine for me in testing it
code_language.skript:
command /test:
    trigger:
        give 1 of glowing diamond hoe with lore "&7Harvester I" named "&8&l* &b&lHARVESTER HOE &8&l*" to player
      
command /test2:
    trigger:
        if player's tool is 1 of glowing diamond hoe with lore "&7Harvester I" named "&8&l* &b&lHARVESTER HOE &8&l*":
            send "success"
          
on break of sugar cane: #both break and mine work
    if player's tool is 1 of glowing diamond hoe with lore "&7Harvester I" named "&8&l* &b&lHARVESTER HOE &8&l*":
        give 1 sugar cane to player
the test2 command that you made is the part not working for me
 
your skript and MC version?
** edit: and Skquery version, the lore expression comes from that
 
That version is outdated. Try using Bensku's dev 29 or 30 if you're MC is up to date. and update Skquery
as im on 1.8 i updated to the highest version i could and its still not working is there an alternative method?
 
as im on 1.8 i updated to the highest version i could and its still not working is there an alternative method?
The newer skript versions don't work well on 1.8. You can try an older version like dev 25. or use a different effect. skrayfall has a "shiny" effect that is the same as glowing, but I can't tell you for certain it will all work on 1.8.
 
The newer skript versions don't work well on 1.8. You can try an older version like dev 25. or use a different effect. skrayfall has a "shiny" effect that is the same as glowing, but I can't tell you for certain it will all work on 1.8.
is there a way i can just see if the name is matching and the lore/glowing effect dosent effect it?
 
is there a way i can just see if the name is matching and the lore/glowing effect dosent effect it?
Yes, you can. Try this. It works on my end:
code_language.skript:
if the name of the tool of the player is "&8&l* &b&lHARVESTER HOE &8&l*"
 
glowing enchant is lure so you can do this
code_language.skript:
if tool of player is enchanted with lure:
if tool of player is enchanted with lure:
 
code_language.skript:
on mine of sugar cane:
    player's tool is 1 of glowing diamond hoe with lore "&7Harvester I" named "&8&l* &b&lHARVESTER HOE &8&l*"
    give 1 sugar cane to player

I do not get any error but i have a skript set up to give the item which gives the exact item im testing for on the sugar cane break event. I am just wondering how i test to see if the item is glowing as that does not work for me.

code_language.skript:
command /harvester <player>:
    description: Gives the target a harvester hoe
    usage: &c/harvester <player>
    permission: harvesterhoe.use
    permission message: &cYou do not have permission to use this command!
    executable by: console and players
    trigger:
        give 1 of glowing diamond hoe named "&8&l* &b&lHARVESTER HOE &8&l*" with lore "&7Harvester I" to arg 1
I believe this should work
code_language.skript:
on break of sugar cane:
    if the name of the tool of the player is "&8&l* &b&lHARVESTER HOE &8&l*":
        if lore of tool of player does not contain "&7Harvester I":
            cancel event
        else:
            give 1 sugar cane to player
 
Status
Not open for further replies.