Error with brewing stand check

  • 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.

artemati

New Member
Feb 24, 2019
8
0
0
Skript version 2.3.5

Please help, my skript is not working.
If you delete delete the check for the name and id, it will work.
Code:
# Kallians


on place:
    if player's tool is a brewing stand:
        if name of player's tool contains "&c&l☩ &a&lKallian &c&l☩":
            remove player's tool from player
            set {brewing.stand.%location of event-block%} to 1
            message "&7[&6&l!&7]&f You placed Kallian"
            stop

on right click on brewing stand:
    if event-block is a brewing stand named "&c&l☩ &a&lKallian &c&l☩":
        if {brewing.stand.%location of event-block%} is 1:
            cancel event   
            loop players in radius 20 around player:
                show 200 "cloud" particles at location of player for loop-player offset by 2, 2, 2
            remove Jump from player
            remove slowness from player
            remove regeneration from player
            remove night Vision from player
            wait 1 tick
            apply slowness 2 to the player for 10 seconds
            apply jump 1 to the player for 5 seconds
            apply Regeneration 2 to the player for 5 seconds
            apply Night Vision to the player for 20 seconds
            
on break:
    if event-block is a brewing stand named "&c&l☩ &a&lKallian &c&l☩":
        if {brewing.stand.%location of event-block%} is 1:
            cancel event
            set event-block to air
            delete {brewing.stand.%location of event-block%}
            message "&7[&6&l!&7]&f You removed Kallian"
            stop
 
A block can not have a name. Instead, check if the location of the event block is”1” since you have set that already. There is no need for line 13
 
Code:
on right click on brewing stand:
is not working
Wow. Seriously? "Is not working" OH I REMEMBER IT'S BECAUSE IT IS RAINING. No, please. Give more details: Do errors occur? Is it just the event? Describe what "is not working"
 
code_language.skript:
on place:
    if player's tool is a brewing stand:
        if name of player's tool contains "&c&l☩ &a&lKallian &c&l☩":
            remove player's tool from player
            set {brewingstand::%event-location%} to true
            message "&7[&6&l!&7]&f You placed Kallian"

on right click on brewing stand:
    {brewingstand::%event-location%} is set:
        cancel event
        loop players in radius 20 around player:
            show 200 "cloud" particles at location of player for loop-player offset by 2, 2, 2
        remove Jump from player
        remove slowness from player
        remove regeneration from player
        remove night Vision from player
        wait 1 tick
        apply slowness 2 to the player for 10 seconds
        apply jump 1 to the player for 5 seconds
        apply Regeneration 2 to the player for 5 seconds
        apply Night Vision to the player for 20 seconds
        
on break of brewing stand:
    if {brewingstand::%event-location%} is set:
        cancel event
        set event-block to air
        message "&7[&6&l!&7]&f You removed Kallian"
        delete {brewingstand::%event-location%}

If that's the case it's because of the condition. I already told you it's not possible to check the name of a placed block
 
code_language.skript:
on place:
    if player's tool is a brewing stand:
        if name of player's tool contains "&c&l☩ &a&lKallian &c&l☩":
            remove player's tool from player
            set {brewingstand::%event-location%} to true
            message "&7[&6&l!&7]&f You placed Kallian"

on right click on brewing stand:
    {brewingstand::%event-location%} is set:
        cancel event
        loop players in radius 20 around player:
            show 200 "cloud" particles at location of player for loop-player offset by 2, 2, 2
        remove Jump from player
        remove slowness from player
        remove regeneration from player
        remove night Vision from player
        wait 1 tick
        apply slowness 2 to the player for 10 seconds
        apply jump 1 to the player for 5 seconds
        apply Regeneration 2 to the player for 5 seconds
        apply Night Vision to the player for 20 seconds
       
on break of brewing stand:
    if {brewingstand::%event-location%} is set:
        cancel event
        set event-block to air
        message "&7[&6&l!&7]&f You removed Kallian"
        delete {brewingstand::%event-location%}

If that's the case it's because of the condition. I already told you it's not possible to check the name of a placed block
ZOFSHavbJCs.jpg

[doublepost=1551012271,1551012214][/doublepost]
code_language.skript:
on place:
    if player's tool is a brewing stand:
        if name of player's tool contains "&c&l☩ &a&lKallian &c&l☩":
            remove player's tool from player
            set {brewingstand::%event-location%} to true
            message "&7[&6&l!&7]&f You placed Kallian"

on right click on brewing stand:
    {brewingstand::%event-location%} is set:
        cancel event
        loop players in radius 20 around player:
            show 200 "cloud" particles at location of player for loop-player offset by 2, 2, 2
        remove Jump from player
        remove slowness from player
        remove regeneration from player
        remove night Vision from player
        wait 1 tick
        apply slowness 2 to the player for 10 seconds
        apply jump 1 to the player for 5 seconds
        apply Regeneration 2 to the player for 5 seconds
        apply Night Vision to the player for 20 seconds
       
on break of brewing stand:
    if {brewingstand::%event-location%} is set:
        cancel event
        set event-block to air
        message "&7[&6&l!&7]&f You removed Kallian"
        delete {brewingstand::%event-location%}

If that's the case it's because of the condition. I already told you it's not possible to check the name of a placed block
Your code is not working
[doublepost=1551014046][/doublepost]
code_language.skript:
on place:
    if player's tool is a brewing stand:
        if name of player's tool contains "&c&l☩ &a&lKallian &c&l☩":
            remove player's tool from player
            set {brewingstand::%event-location%} to true
            message "&7[&6&l!&7]&f You placed Kallian"

on right click on brewing stand:
    {brewingstand::%event-location%} is set:
        cancel event
        loop players in radius 20 around player:
            show 200 "cloud" particles at location of player for loop-player offset by 2, 2, 2
        remove Jump from player
        remove slowness from player
        remove regeneration from player
        remove night Vision from player
        wait 1 tick
        apply slowness 2 to the player for 10 seconds
        apply jump 1 to the player for 5 seconds
        apply Regeneration 2 to the player for 5 seconds
        apply Night Vision to the player for 20 seconds
       
on break of brewing stand:
    if {brewingstand::%event-location%} is set:
        cancel event
        set event-block to air
        message "&7[&6&l!&7]&f You removed Kallian"
        delete {brewingstand::%event-location%}

If that's the case it's because of the condition. I already told you it's not possible to check the name of a placed block
Code:
on right click on brewing stand:
Is not woking, no errors
 
try broadcasting something directly after the event. See if it broadcasts something or not
Code:
on rightclick on brewing stand block:
    broadcast "1"
    {brewingstand::%event-location%} is set:
        broadcast "2"
        cancel event
        loop players in radius 20 around player:
            show 200 "cloud" particles at location of player for loop-player offset by 2, 2, 2
        remove Jump from player
        remove slowness from player
        remove regeneration from player
        remove night Vision from player
        wait 1 tick
        apply slowness 2 to the player for 10 seconds
        apply jump 1 to the player for 5 seconds
        apply Regeneration 2 to the player for 5 seconds
        apply Night Vision to the player for 20 seconds
Nothing happens
 
Then face the brewing stand and do that:

code_language.skript:
command facing:
    trigger:
        broadcast "%player' targeted block%"
 
Then face the brewing stand and do that:

code_language.skript:
command facing:
    trigger:
        broadcast "%player' targeted block%"
kGveL_zLhbs.jpg

[doublepost=1551016754,1551016478][/doublepost]
Then face the brewing stand and do that:

code_language.skript:
command facing:
    trigger:
        broadcast "%player' targeted block%"
BREWING_STAND
[doublepost=1551030525][/doublepost]
Then face the brewing stand and do that:

code_language.skript:
command facing:
    trigger:
        broadcast "%player' targeted block%"
Well?
 
Status
Not open for further replies.