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

Solved Just why did you that ? (Blocks)

Discussion in 'Skript' started by Skoll, Sep 24, 2020.

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

    Skoll Active Member

    Joined:
    Sep 2, 2020
    Messages:
    60
    Likes Received:
    5
    For creator of Skript:
    Why did you change all names of minecraft blocks in %block% ?

    I'm creating a way to be mobs with Skript, now I'm creating enderman abilities to players use.
    The ability of take blocks of world and place it again shouldn't be hard, but the names of blocks in Skript doesn't matches with vanilla names, as all plugins usually keep equal.

    Example:
    Vanilla:
    stone
    dirt
    sand
    diorite
    andesite
    granite
    Skript:
    stone block
    dirt block
    sand block
    raw diorite
    raw andesite
    raw granite


    This sucks, because I need to change the block in mainhand of enderman disguise using lib's disguises, wich use vanilla original names, and Skript doesn't. I don't know what blocks have original name, so, I have to test all blocks to do my code correctly. If someone knows how to use vanilla block name in Skript, tell me please.
    Example of my code:
    Code (Text):
    1.  
    2. on left click:
    3.     if {mode.control.%player%} is "true":
    4.         if {mode.control.ismob.%player%} is "CM:Enderman":
    5.             if player's tool is air:
    6.                 if player's current hotbar slot is 0:
    7.                     if player is sneaking:
    8.                         cancel event
    9.                         set {mode.control.targetedblock.%player%} to player's targeted block
    10.                        
    11.                         set slot 0 of player to {mode.control.targetedblock.%player%}
    12.                         set {mode.control.targetedblock.%player%} to "%{mode.control.targetedblock.%player%}%"
    13.  
    14.                         if {mode.control.targetedblock.%player%} isn't "sand block" or "dirt block" or "stone block":
    15.                             replace all " " with "_" in {mode.control.targetedblock.%player%}
    16.                         if {mode.control.targetedblock.%player%} is "raw_granite" or "raw_diorite" or "raw_andesite":
    17.                             replace all "raw_" with "" in {mode.control.targetedblock.%player%}
    18.  
    19.                         broadcast {mode.control.targetedblock.%player%}
    20.                         make console execute command "disguisemodifyplayer %player% setItemInMainHand %{mode.control.targetedblock.%player%}%"
    21.                         set targeted block of player to air
    22.                         delete {mode.control.targetedblock.%player%}
    23.  
     
  2. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,500
    Likes Received:
    107
    Medals:
  3. Skoll

    Skoll Active Member

    Joined:
    Sep 2, 2020
    Messages:
    60
    Likes Received:
    5
    Oh, I'm always reading the forums, skript hub, skriptlang, skunity, and I never saw this expression before, thanks.
     
    • Like Like x 1
  4. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    Dirt isn't just dirt. Dirt can be an item, an emotion, a block, a feeling you encounter when playing in it. Dirt is course and it gets everywhere. It is dark, it can be wet and would be called mud. As a kid, I used to play in dirt but we don't do that anymore. We grow and forget the simple things in life. Playing in dirt again would be nice. Being a kid once again and enjoying things like dirt would be beautiful. Making dirt cakes and being sad when no one wants to eat it, throwing dirt at other people you don't like, just digging your hands into dirt and searching for living things. Dirt isn't just a block. Dirt is more. It is everything.
     
    • Funny Funny x 3
  5. Skoll

    Skoll Active Member

    Joined:
    Sep 2, 2020
    Messages:
    60
    Likes Received:
    5
    LOL, we have a poet here.
    --- Double Post Merged, Sep 25, 2020, Original Post Date: Sep 25, 2020 ---
    Taking advantage of this post, why I can't set lava bucket to a slot of player ?
    Code (Text):
    1.     if {mode.control.%player%} is "true":
    2.  
    3.         #---------------------ENDERMAN BLOCK PICKUP------------------------------------------------------------------------------------------------#
    4.         if {mode.control.ismob.%player%} is "CM:Enderman":
    5.             if player's tool is air:
    6.                 if player's current hotbar slot is 0:
    7.                     if player is sneaking:
    8.                         cancel event
    9.                         set slot 0 of player to lava bucket
    SOLVED
    I have changed "set slot 0 of player to lava bucket" to "add 1 lava bucket to slot 0 of player"
     
    #5 Skoll, Sep 25, 2020
    Last edited: Sep 25, 2020
Thread Status:
Not open for further replies.

Share This Page

Loading...