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.

Solved Help me

Discussion in 'Skript' started by novastosha, May 11, 2019.

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

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    How to set blocks to diffirent blocks?
    Read code to know:
    Code (Text):
    1. command prisoncore [<text>] [<text>] [<text>] [<number>] [<player>]:
    2.     trigger:
    3.         if arg 1 is "mine":
    4.             if arg 2 is "set" or "wand":
    5.                 give player blaze rod named "§aPrisonCore (Mine)"
    6.                 PC_SendMessage(player, "correct", "Mine wand given to you")
    7.                 set {_pos1.%player%} to true
    8.             if arg 2 is "reset":
    9.                 loop blocks within {Pc.mine::pos::1} to {Pc.mine::pos::2}:
    10.                     set loop-block to emerald block and tnt
    --- Double Post Merged, May 11, 2019, Original Post Date: May 11, 2019 ---
    Help ;(

     
  2. Best Answer:
    Post #19 by Drioz, May 15, 2019
  3. U

    UpdateVersion Member

    Joined:
    Feb 16, 2018
    Messages:
    5
    Likes Received:
    0
    What's the error, please be specific.
     
  4. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    Error in line 10, I want to set the loop-block to some blocks, But his are only accepting one only
     
  5. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    115
    Likes Received:
    11
    Hey, this might not be of any relevance to your issue but, the best way to make a "mine reset" would prob be to use Skematic addon or even FaweSK. They both use FAWE as a base, the syntax is easy, and its very fast (non laggy). Here is an example done with Skematic:

    Code (Text):
    1. set {_region} to a new cuboidregion from {Pc.mine::pos::1} to {Pc.mine::pos::2}
    2. set all blocks in {_region} to %itemtypes%
    As for setting it to multiple block types, I am not completely sure but you can try this:
    Code (Text):
    1. set all blocks in {_region} to emerald block and tnt
     
  6. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    I need WorldGuard?
     
  7. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    115
    Likes Received:
    11
    I am not sure. I've tested these on version 1.12.2 and 1.13.2 and it worked with FAWE. If it does not work without WorldGuard, try it out. I do not think it does though.
     
  8. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    I tryed using FaweSk for 1.12.2 but not working Send me FAWE and FaweSK
     
  9. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    115
    Likes Received:
    11
  10. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    Still broken and broking other skripts xD
     
  11. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    115
    Likes Received:
    11
    Add me on discord: AsuDev#0714
     
  12. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    Skmatic 2.2b broken in 1.12.2
     
  13. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    395
    Likes Received:
    13
    Although I have not tried it, did you try with ?:
    Code (Skript):
    1.  
    2. command prisoncore [<text>] [<text>] [<text>] [<number>] [<player>]:
    3.     trigger:
    4.         if arg 1 is "mine":
    5.             if arg 2 is "set" or "wand":
    6.                 give player blaze rod named "§aPrisonCore (Mine)"
    7.                 PC_SendMessage(player, "correct", "Mine wand given to you")
    8.                 set {_pos1.%player%} to true
    9.             if arg 2 is "reset":
    10.                 loop blocks between {Pc.mine::pos::1} and {Pc.mine::pos::2}:
    11.                     set loop-block to emerald block and tnt
     
  14. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    Not working (between setting distance between not by m2)
     
  15. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    115
    Likes Received:
    11
    Use Skematic 2.2 not 2.2b
     
  16. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    395
    Likes Received:
    13
    Oh right.
     
  17. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    Thanks for All answers :emoji_slight_smile: You're da best guys :emoji_wink: Big thanks to: Revelationage
    --- Double Post Merged, May 11, 2019, Original Post Date: May 11, 2019 ---
    Btw, @couger44 have a novia xD
     
  18. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    395
    Likes Received:
    13
    I'm going to hit you:emoji_angry:
     
  19. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    xD just kidding calm Down bro
    --- Double Post Merged, May 11, 2019, Original Post Date: May 11, 2019 ---
    Not working :emoji_frowning:
    --- Double Post Merged, May 12, 2019 ---
    --- Double Post Merged, May 12, 2019 ---
    Not Sure
    --- Double Post Merged, May 15, 2019 ---
    If somone has a souliton please help
     
  20. Drioz

    Drioz Member

    Joined:
    Jun 10, 2018
    Messages:
    20
    Likes Received:
    2
    Code (Text):
    1.  
    2. function getBlocks(1: location, 2: location) :: blocks:
    3.     set {_x} to 1
    4.     set {_y} to 1
    5.     set {_z} to 1
    6.     if x coord of {_1} > x coord of {_2}:
    7.         set {_x} to -1
    8.     if y coord of {_1} > y coord of {_2}:
    9.         set {_y} to -1
    10.     if z coord of {_1} > z coord of {_2}:
    11.         set {_z} to -1
    12.     set {_base1} to {_1}
    13.     loop abs(x coord of {_1} - x coord of {_2}) + 1 times:
    14.         loop abs(z coord of {_1} - z coord of {_2}) + 1 times:
    15.             loop abs(y coord of {_1} - y coord of {_2}) + 1 times:
    16.                 add 1 to {_current}
    17.                 set {_b::%{_current}%} to block at {_1}
    18.                 add {_y} to y coord of {_1}
    19.             add {_z} to z coord of {_1}
    20.             set y coord of {_1} to y coord of {_base1}
    21.         add {_x} to x coord of {_1}
    22.         set z coord of {_1} to z coord of {_base1}
    23.     return {_b::*}
    24. command /resetmine <text>: #this is the mine i had, eg. A, B, etc..
    25.     trigger:
    26.         add 1 to y coord of {loc1::%arg-1%} #{loc1} and {loc2... are the locations of the region i set
    27.         set {_x::*} to getBlocks({loc1::%arg-1%}, {loc2::%arg-1%})
    28.         loop {_x::*}:
    29.             set {_block} to a random element out of {blocks::%arg-1%::*}
    30.             set block at location of loop-value to {_block}
    31. command /addblock <text> <text>:
    32.     trigger:
    33.         set {_block} to arg-2 parsed as item
    34.         add {_block} to {blocks::%arg-1%::*} #arg-1 is the mine, A, B, etc, I had something to select the region with sticks but I'm sure you could figure it out
    35.         message "&6&l(!) &6Added &e%arg-2% &6to &e%arg-1% &6mine!"
    This is something I threw together a while back, with the help of some on here.
    Take what you need from it.
    /addblock <mine> <block> is just something to add the blocks you want the mine to consist of, you can add better code.
     
  21. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    105
    Likes Received:
    5
    Nice but how can i set the blocks t o multipile ones
     
Thread Status:
Not open for further replies.
Loading...