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.

crate system

Discussion in 'Skript' started by Gehts, May 6, 2020.

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

    Gehts New Member

    Joined:
    Apr 7, 2020
    Messages:
    8
    Likes Received:
    0
    I need help one time, I just can't fix these errors: http://prntscr.com/sbcz2f
    I have already tried everything and when I install the latest version of script I get this error message: http://prntscr.com/sbb651


    Thank you for the answers


    Code (Text):
    1. options:
    2.     skull-owner: MHF_Question
    3.     skull-owner-2: MHF_Exclamation
    4.  
    5. function animation(loct: location, p: player):
    6.     set {_b} to block above block at {_loct}
    7.     set {_f} to facing of block above block at {_loct}
    8.     if {_f} is north:
    9.         set {_angle} to 3.1
    10.         set {_d} to "z"
    11.     else if {_f} is east:
    12.         set {_angle} to 4.75
    13.         set {_d} to "x"
    14.     else if {_f} is south:
    15.         set {_d} to "z"
    16.         set {_angle} to 0
    17.     else if {_f} is west:
    18.         set {_d} to "x"
    19.         set {_angle} to 1.55
    20.     evaluate "openChest({_b}, 7.5 seconds)"
    21.     set {_loct2} to {_loct}
    22.     add 0.5 to y coord of {_loct2}
    23.     loop 6 times:
    24.         spawn armor stand at location of block at {_loct}
    25.         set {_as} to last spawned armor stand
    26.         add {_as} to {_as::*}
    27.         set visible of {_as} to false
    28.         set small of {_as} to true
    29.         set gravity of {_as} to false
    30.         set helmet of {_as} to skull of "{@skull-owner}" parsed as a offline player
    31.         set {_asloc} to location of {_as}
    32.         set y coord of {_asloc} to y coord of {_as} + 5
    33.         teleport {_as} to {_asloc}
    34.         loop 5 times:
    35.             add 1/6 to y coord of {_asloc}
    36.             teleport {_as} to {_asloc}
    37.             wait 1 tick
    38.         set y coord of {_asloc} to y coord of {_loct} + 1.5
    39.         teleport {_as} to {_asloc}
    40.         circleAS({_as}, {_asloc}, {_b}, {_loct2}, {_angle}, {_d})
    41.     wait 2 seconds
    42.     set {_l} to size of {_as::*}
    43.     delete {_as::%{_l}%}
    44.     set {_l::*} to {_as::*}
    45.     loop {_l::*}:
    46.         set {_o} to random element out of {_as::*}
    47.         remove {_o} from {_as::*}
    48.         kill {_o}
    49.         wait 4 ticks
    50.     set metadata "stop" of {_as} to true
    51.     while metadata "stopped" of {_as} is not set:
    52.         wait 1 tick
    53.     set {_asloc} to location of {_as}
    54.     loop 3 times:
    55.         remove 0.1 from y coord of {_asloc}
    56.         teleport {_as} to {_asloc}
    57.         wait 3 ticks
    58.     wait 2 ticks
    59.     set custom name visible of {_as} to true
    60.     set custom name of {_as} to "&kabcdefghijklmnop"
    61.     wait 1.5 seconds
    62.     show mob spawner flames at location of block above {_as} to all players
    63.     set helmet of {_as} to skull of "{@skull-owner-2}" parsed as a offline player
    64.     set custom name of {_as} to "&cYour price!"
    65.     # price code
    66.     give {_p} 1 diamond
    67.     send "&aYou got &ba diamond &afrom a crate!" to {_p}
    68.     # price code
    69.     wait 2 seconds
    70.     kill {_as}
    71.  
    72. function openChest(b: block, t: timespan):
    73.     set {_now} to now
    74.     while {_now} was less than {_t} ago:
    75.         skellett make {_b} look open for all players
    76.         wait 1 tick
    77.    
    78. function circleAS(as: entity, asloc: location, b: block, loct: location, angle: number, d: text):
    79.     set {_l::*} to circle at location of {_b} with radius 1 and density 5
    80.     loop {_l::*}:
    81.         set {_loc2} to loop-value
    82.         if {_d} is "z":
    83.             set z coord of {_loc2} to z coord of {_loct}
    84.             set y coord of {_loc2} to y coord of {_loct} - (z coord of {_loct} - z coord of loop-value)
    85.             set z coord of {_loc2} to z coord of {_loct}
    86.         else:
    87.             set x coord of {_loc2} to x coord of {_loct}
    88.             set y coord of {_loc2} to y coord of {_loct} - (x coord of {_loct} - x coord of loop-value)
    89.             set x coord of {_loc2} to x coord of {_loct}
    90.         set {_l::%loop-index%} to {_loc2}
    91.     loop {_l::*}:
    92.         set {_i} to loop-index parsed as a number + 24
    93.         if {_i} > size of {_l::*}:
    94.             remove size of {_l::*} from {_i}
    95.         set {_l2::%{_i}%} to loop-value
    96.     while true:
    97.         loop {_l2::*}:
    98.             teleport {_as} to loop-value
    99.             set head y angle of {_as} to {_angle}
    100.             wait 1 tick
    101.         teleport {_as} to {_asloc}
    102.         if metadata "stop" of {_as} is true:
    103.             wait 10 ticks
    104.             set metadata "stopped" of {_as} to true
    105.             stop
    106.  
    107. on right click on ender chest:
    108.     cancel event
    109.     set {_loc} to location of clicked block
    110.     remove 1.5 from y coord of {_loc}
    111.     animation({_loc}, player)
     
  2. Abdera7mane

    Abdera7mane Active Member

    Joined:
    Aug 18, 2019
    Messages:
    56
    Likes Received:
    7
    server version and skript version ?
     
  3. Gehts

    Gehts New Member

    Joined:
    Apr 7, 2020
    Messages:
    8
    Likes Received:
    0
Thread Status:
Not open for further replies.

Share This Page

Loading...