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.

How can i make an animated Crate?

Discussion in 'Skript' started by entwickeln, May 28, 2022.

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

    entwickeln Member

    Joined:
    May 11, 2022
    Messages:
    40
    Likes Received:
    0
    Hello guys! I wanted to ask how i can make a animated crate? yk
    when you open it, it will go from right to left and the item in the mid wins the user when the animation stoped.
    Can someone pls help me?
     
  2. TFS_Mads

    TFS_Mads Active Member

    Joined:
    Oct 16, 2020
    Messages:
    50
    Likes Received:
    7
    I have this old casino script, here is the rolling part:

    Code (Text):
    1.  
    2. loop 30 times:
    3.                     set {_random} to a random integer between 0 and 1000
    4.                     #broadcast "%{_random}%"
    5.                     if {_random} is between 0 and 450:
    6.                         add 1 of iron block named "&6&l250$" to {_ARRAY::*}
    7.                     else if {_random} is between 450 and 700:
    8.                         add 1 of gold block named "&6&l400$" to {_ARRAY::*}
    9.                     else if {_random} is between 700 and 895:
    10.                         add diamond block named "&6&l750$" to {_ARRAY::*}      
    11.                     else if {_random} is between 895 and 995:
    12.                         add emerald block named "&6&l1000$" to {_ARRAY::*}          
    13.                     else if {_random} is between 995 and 1000:
    14.                         add glowing dragon egg named "&6&l50000$" to {_ARRAY::*}
    15.                     open chest inventory with 3 row named "&f&lCASINO &8&l- &7&lIRON" to player
    16.                     wait 1 tick
    17.                     format gui slot 4 of player with emerald named "&6&l✿ &fPRÆMIE &6&l✿" to do nothing
    18.                     format gui slot 4+18 of player with emerald named "&6&l✿ &fPRÆMIE &6&l✿" to do nothing
    19.                     loop {_ARRAY::*}:
    20.                         #broadcast "%loop-index%"
    21.                         delete {_quit}
    22.                         if (loop-index-1 parsed as an integer) > 24:
    23.                             set {_quit2} to true
    24.                         if {_quit2} is not true:
    25.                             set {_num} to 1
    26.                             loop 7 times:
    27.                                 if player is sneaking:
    28.                                     stop
    29.                                 if {_quit} is not true:
    30.                                    
    31.                                     set {_index} to (loop-index-1 parsed as an integer) + {_num}-1
    32.                                     set {_amount} to {_index}-64
    33.                                     format gui slot {_num} +9 of player with {_ARRAY::%{_index}%}
    34.                                     add 1 to {_num}
    35.                                     if {_index} >= 30:
    36.                                         set {_quit} to true
    37.                                 play "WOOD_CLICK" to player
    38.                             if {_index} is between 0 and 15:
    39.                                 wait 2 ticks
    40.                             else if {_index} is between 15 and 20:
    41.                                 wait 3 ticks                              
    42.                             else if {_index} is between 20 and 25:
    43.                                 wait 4 ticks                                  
    44.                             else if {_index} is 26,27 or 28:
    45.                                 wait 5 ticks          
    46.                             else if {_index} is 29:
    47.                                 wait 6 ticks  
    48.                             else:
    49.                                 wait 7 ticks
    50.                 if {_ARRAY::27} is iron block:
    51.                     send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a250$"
    52.                     add 250 to player's balance
    53.                 else if {_ARRAY::27} is gold block:
    54.                     send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a400$"
    55.                     add 400 to player's balance
    56.                 else if {_ARRAY::27} is diamond block:
    57.                     send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a750$"
    58.                     add 750 to player's balance
    59.                 else if {_ARRAY::27} is emerald block:
    60.                     send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a1000$"
    61.                     add 1000 to player's balance
    62.                 if {_ARRAY::27} is dragon egg:
    63.                     send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a50000$"
    64.                     add 50000 to player's balance
    65.                 play "BAT_TAKEOFF" to player  
    66.                 wait 2 second    
    If you decide to use it i would recommend you edited the script to use set slot instead of TuSKe guis (The script requires TuSKe if you dont switch).
     
  3. entwickeln

    entwickeln Member

    Joined:
    May 11, 2022
    Messages:
    40
    Likes Received:
    0
    Can you edit the script for me because Tuske gives me an huge error and i dont really know how to change it.

    I have these Plugins:
    Skript
    skRayFal
    SKQuery
    SharpSK
    Vault
    skUtilities
     
  4. TFS_Mads

    TFS_Mads Active Member

    Joined:
    Oct 16, 2020
    Messages:
    50
    Likes Received:
    7
Thread Status:
Not open for further replies.

Share This Page

Loading...