1. 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 comminuty!

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

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

If clicked block is a cauldron with water?

Discussion in 'Skript' started by ShanaRedEye, Dec 9, 2018.

Thread Status:
Not open for further replies.
  1. S

    ShanaRedEye Member

    Joined:
    Dec 9, 2018
    Messages:
    2
    Likes Received:
    0
    How can I check if player clicked a cauldron with water? and how can I change player's tool material but still keep it lore/name. thx guys
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,680
    Likes Received:
    115
    I believe the water level in the cauldron is a data value
    so just check the data value of the clicked block

    For the tool part, just save the name and lore to variables and apply them to the new item
     
  3. S

    ShanaRedEye Member

    Joined:
    Dec 9, 2018
    Messages:
    2
    Likes Received:
    0
    on right click:
    if clicked block is a cauldron:
    message "1"
    if value data of clicked block is 3:
    message "2"
    non of them work =.= no message has been sent . if clicked block work with other block (anvil) but not cauldron . please help
    --- Double Post Merged, Dec 10, 2018, Original Post Date: Dec 9, 2018 ---
    and one more problem how can I apply lore to the new item with new skript? if I use

    set {_lore} to lore of player's tool
    set {_name} to name of player's tool
    set player's tool to a wooden sword named "%{_name}%" with lore "%{_lore}%"
    it only line 1 of old tool is set to the new one
     
  4. Noblesuntzu

    Noblesuntzu Well-Known Member

    Joined:
    Feb 18, 2017
    Messages:
    60
    Likes Received:
    1
    First of all please format code using the format button (look above the text field, there is a + symbol, click it and choose Code). Second of all, make a seperate post about your lore issue, it's much easier to solve one problem at a time. And my solution to your code would be remove the 'a' before cauldron, but I'm not entirely sure and I cannot test it currently.
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,680
    Likes Received:
    115
    You wrote the syntax wrong.
    I suggest going to the link I sent you, and checking the correct syntax.
    Skript is pattern specific.

    I tested it with the correct syntax and it works.

    Also I tested the lore thing and it works, you just wrote it incorrectly.

    when you do
    Code (Skript):
    1. set player's tool to a wooden sword named "%{_name}%" with lore "%{_lore}%"
    You are putting the lore into one line since you are putting the expression in quotes.
    remove the quotes and the %%
     
    • Agree Agree x 1
  6. Mr_Simba

    Mr_Simba King of the Pridelands
    Moderator Supporter

    Joined:
    Dec 9, 2016
    Messages:
    257
    Likes Received:
    54
    Medals:
    If you're using the Skript 2.3 betas on 1.13 with the new aliases system you should just be able to do "filled cauldron".
     
    • Agree Agree x 1
Thread Status:
Not open for further replies.
Loading...