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

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

entwickeln

Member
May 11, 2022
40
0
6
21
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?
 
I have this old casino script, here is the rolling part:

Code:
loop 30 times:
                    set {_random} to a random integer between 0 and 1000
                    #broadcast "%{_random}%"
                    if {_random} is between 0 and 450:
                        add 1 of iron block named "&6&l250$" to {_ARRAY::*}
                    else if {_random} is between 450 and 700:
                        add 1 of gold block named "&6&l400$" to {_ARRAY::*}
                    else if {_random} is between 700 and 895:
                        add diamond block named "&6&l750$" to {_ARRAY::*}       
                    else if {_random} is between 895 and 995:
                        add emerald block named "&6&l1000$" to {_ARRAY::*}           
                    else if {_random} is between 995 and 1000:
                        add glowing dragon egg named "&6&l50000$" to {_ARRAY::*}
                    open chest inventory with 3 row named "&f&lCASINO &8&l- &7&lIRON" to player
                    wait 1 tick
                    format gui slot 4 of player with emerald named "&6&l✿ &fPRÆMIE &6&l✿" to do nothing
                    format gui slot 4+18 of player with emerald named "&6&l✿ &fPRÆMIE &6&l✿" to do nothing
                    loop {_ARRAY::*}:
                        #broadcast "%loop-index%"
                        delete {_quit}
                        if (loop-index-1 parsed as an integer) > 24:
                            set {_quit2} to true
                        if {_quit2} is not true:
                            set {_num} to 1
                            loop 7 times:
                                if player is sneaking:
                                    stop
                                if {_quit} is not true:
                                    
                                    set {_index} to (loop-index-1 parsed as an integer) + {_num}-1
                                    set {_amount} to {_index}-64
                                    format gui slot {_num} +9 of player with {_ARRAY::%{_index}%}
                                    add 1 to {_num}
                                    if {_index} >= 30:
                                        set {_quit} to true
                                play "WOOD_CLICK" to player
                            if {_index} is between 0 and 15:
                                wait 2 ticks
                            else if {_index} is between 15 and 20:
                                wait 3 ticks                               
                            else if {_index} is between 20 and 25:
                                wait 4 ticks                                   
                            else if {_index} is 26,27 or 28:
                                wait 5 ticks           
                            else if {_index} is 29:
                                wait 6 ticks   
                            else:
                                wait 7 ticks
                if {_ARRAY::27} is iron block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a250$"
                    add 250 to player's balance
                else if {_ARRAY::27} is gold block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a400$"
                    add 400 to player's balance
                else if {_ARRAY::27} is diamond block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a750$"
                    add 750 to player's balance
                else if {_ARRAY::27} is emerald block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a1000$"
                    add 1000 to player's balance
                if {_ARRAY::27} is dragon egg:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a50000$"
                    add 50000 to player's balance
                play "BAT_TAKEOFF" to player   
                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).
 
I have this old casino script, here is the rolling part:

Code:
loop 30 times:
                    set {_random} to a random integer between 0 and 1000
                    #broadcast "%{_random}%"
                    if {_random} is between 0 and 450:
                        add 1 of iron block named "&6&l250$" to {_ARRAY::*}
                    else if {_random} is between 450 and 700:
                        add 1 of gold block named "&6&l400$" to {_ARRAY::*}
                    else if {_random} is between 700 and 895:
                        add diamond block named "&6&l750$" to {_ARRAY::*}     
                    else if {_random} is between 895 and 995:
                        add emerald block named "&6&l1000$" to {_ARRAY::*}         
                    else if {_random} is between 995 and 1000:
                        add glowing dragon egg named "&6&l50000$" to {_ARRAY::*}
                    open chest inventory with 3 row named "&f&lCASINO &8&l- &7&lIRON" to player
                    wait 1 tick
                    format gui slot 4 of player with emerald named "&6&l✿ &fPRÆMIE &6&l✿" to do nothing
                    format gui slot 4+18 of player with emerald named "&6&l✿ &fPRÆMIE &6&l✿" to do nothing
                    loop {_ARRAY::*}:
                        #broadcast "%loop-index%"
                        delete {_quit}
                        if (loop-index-1 parsed as an integer) > 24:
                            set {_quit2} to true
                        if {_quit2} is not true:
                            set {_num} to 1
                            loop 7 times:
                                if player is sneaking:
                                    stop
                                if {_quit} is not true:
                                  
                                    set {_index} to (loop-index-1 parsed as an integer) + {_num}-1
                                    set {_amount} to {_index}-64
                                    format gui slot {_num} +9 of player with {_ARRAY::%{_index}%}
                                    add 1 to {_num}
                                    if {_index} >= 30:
                                        set {_quit} to true
                                play "WOOD_CLICK" to player
                            if {_index} is between 0 and 15:
                                wait 2 ticks
                            else if {_index} is between 15 and 20:
                                wait 3 ticks                             
                            else if {_index} is between 20 and 25:
                                wait 4 ticks                                 
                            else if {_index} is 26,27 or 28:
                                wait 5 ticks         
                            else if {_index} is 29:
                                wait 6 ticks 
                            else:
                                wait 7 ticks
                if {_ARRAY::27} is iron block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a250$"
                    add 250 to player's balance
                else if {_ARRAY::27} is gold block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a400$"
                    add 400 to player's balance
                else if {_ARRAY::27} is diamond block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a750$"
                    add 750 to player's balance
                else if {_ARRAY::27} is emerald block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a1000$"
                    add 1000 to player's balance
                if {_ARRAY::27} is dragon egg:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a50000$"
                    add 50000 to player's balance
                play "BAT_TAKEOFF" to player 
                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).
I have this old casino script, here is the rolling part:

Code:
loop 30 times:
                    set {_random} to a random integer between 0 and 1000
                    #broadcast "%{_random}%"
                    if {_random} is between 0 and 450:
                        add 1 of iron block named "&6&l250$" to {_ARRAY::*}
                    else if {_random} is between 450 and 700:
                        add 1 of gold block named "&6&l400$" to {_ARRAY::*}
                    else if {_random} is between 700 and 895:
                        add diamond block named "&6&l750$" to {_ARRAY::*}      
                    else if {_random} is between 895 and 995:
                        add emerald block named "&6&l1000$" to {_ARRAY::*}          
                    else if {_random} is between 995 and 1000:
                        add glowing dragon egg named "&6&l50000$" to {_ARRAY::*}
                    open chest inventory with 3 row named "&f&lCASINO &8&l- &7&lIRON" to player
                    wait 1 tick
                    format gui slot 4 of player with emerald named "&6&l✿ &fPRÆMIE &6&l✿" to do nothing
                    format gui slot 4+18 of player with emerald named "&6&l✿ &fPRÆMIE &6&l✿" to do nothing
                    loop {_ARRAY::*}:
                        #broadcast "%loop-index%"
                        delete {_quit}
                        if (loop-index-1 parsed as an integer) > 24:
                            set {_quit2} to true
                        if {_quit2} is not true:
                            set {_num} to 1
                            loop 7 times:
                                if player is sneaking:
                                    stop
                                if {_quit} is not true:
                                   
                                    set {_index} to (loop-index-1 parsed as an integer) + {_num}-1
                                    set {_amount} to {_index}-64
                                    format gui slot {_num} +9 of player with {_ARRAY::%{_index}%}
                                    add 1 to {_num}
                                    if {_index} >= 30:
                                        set {_quit} to true
                                play "WOOD_CLICK" to player
                            if {_index} is between 0 and 15:
                                wait 2 ticks
                            else if {_index} is between 15 and 20:
                                wait 3 ticks                              
                            else if {_index} is between 20 and 25:
                                wait 4 ticks                                  
                            else if {_index} is 26,27 or 28:
                                wait 5 ticks          
                            else if {_index} is 29:
                                wait 6 ticks  
                            else:
                                wait 7 ticks
                if {_ARRAY::27} is iron block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a250$"
                    add 250 to player's balance
                else if {_ARRAY::27} is gold block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a400$"
                    add 400 to player's balance
                else if {_ARRAY::27} is diamond block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a750$"
                    add 750 to player's balance
                else if {_ARRAY::27} is emerald block:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a1000$"
                    add 1000 to player's balance
                if {_ARRAY::27} is dragon egg:
                    send "&8&L[ &6&lCASINO &8&l] &fDu vandt &a50000$"
                    add 50000 to player's balance
                play "BAT_TAKEOFF" to player  
                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).
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
 
Status
Not open for further replies.