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.

Boat Race Mini Game

Discussion in 'Skript' started by Shadowcrafter88, Feb 6, 2021.

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

    Joined:
    Feb 6, 2021
    Messages:
    1
    Likes Received:
    0
    Hello,
    I am currently working on a boat racing mini game. But I ran into the problem that I don't know how to do the checkpoints and the start.
    The checkpoints and the start should be able to be set by command and it should also be possible to check whether a player has passed through the chackpoint.


    This is my current Code: (Not completed and tested yet!)
    Code (Text):
    1. #========================================================================
    2. #                    Create Track
    3. #========================================================================
    4. Command /newTrack <string>:
    5.     description: Create a new Track
    6.     permission: op
    7.     trigger:
    8.         if {track::%arg-1%} is not set:
    9.             set {track::%arg-1%} to location of player
    10.             set {playercount::%arg-1%} to 0
    11.             set {maxplayers::%arg-1%} to 0
    12.             message "The Track <light cyan>%arg-1%<reset> has been created!"
    13.         else:
    14.             message "The track <light cyan>%arg-1%<reset> is already existing!"
    15.  
    16. #========================================================================
    17. #                    Start Positiones
    18. #========================================================================
    19.  
    20. Command /setStartPos <string> <number>:
    21.     description: Set one start position
    22.     permission: op
    23.     trigger:
    24.         if {StartPos::%arg-1%::%arg-2%} is not set:
    25.             if {track::%arg-1%} is set:
    26.                 set {StartPos::%arg-2%::%arg-1%} to location of player
    27.                 add {maxplayers::%arg-1%} 1
    28.                 message "Set the Start position <light cyan>%arg-2%<reset> to the track <light cyan>%arg-1%!"
    29.             else:
    30.                 message "The track <light cyan>%arg-1%<reset> is not existing!"
    31.         else:
    32.             message "The Start position <light cyan>%arg-2%<reset> is already set for the track <light cyan>%arg-1%<reset>!"
    33.  
    34. #========================================================================
    35. #                     Delete Start Positiones
    36. #========================================================================
    37.  
    38. Command /delStartPos <string> <number>:
    39.     description: Delete a start position.
    40.     permission: op
    41.     trigger:
    42.         if {StartPos::%arg-2%::%arg-1%} is set:
    43.             if {track:: %arg-2%} is set:
    44.                 delete {StartPos::%arg-2%::%arg-1%}
    45.                 remove {maxplayers::%arg-1%} 1
    46.                 message "Removed the Start position <light cyan>%arg-2%<reset> ofthe track <light cyan>%arg-1%<reset>!"
    47.             else:
    48.                 message "The track <light cyan>%arg-2%<reset> is not existing!"
    49.         else:
    50.             message "The Start position %arg-1% is not set for the track <light cyan>%arg-2%<reset>!"
    51.  
    52. #========================================================================
    53. #                     Show Start Positiones
    54. #========================================================================
    55.  
    56.  
    57. Command /startPositiones <string>:
    58.     description: Showes you
    59.     permission: op
    60.     trigger:
    61.         if {track::%arg-1%} is set:
    62.             message "These are the set starting positions of the track <light cyan>%arg-1%"
    63.             if {StartPos::%arg-1%::1} is set:
    64.                 message "Start Position 1 is set to <grey>{StartPos::%arg-1%::1}<reset>!"
    65.             else:
    66.                 message "Start <light cyan> Position 1<reset> is not set!"
    67.             if {StartPos::%arg-1%::2} is set:
    68.                 message "Start Position 2 is set to <grey>{StartPos:: %arg-1%::2}<reset>!"
    69.             else:
    70.                 message "Start <light cyan> Position 2<reset> is not set!"
    71.             if {StartPos::%arg-1%::3} is set:
    72.                 message "Start Position 3 is set to <grey>{StartPos::3::%arg-1%}<reset>!"
    73.             else:
    74.                 message "Start <light cyan> Position 3<reset> is not set!"
    75.             if {StartPos::%arg-1%::4} is set:
    76.                 message "Start Position 4 is set to <grey>{StartPos::4::%arg-1%}<reset>!"
    77.             else:
    78.                 message "Start <light cyan> Position 4<reset> is not set!"
    79.             if {StartPos::%arg-1%::5} is set:
    80.                 message "Start Position 5 is set to <grey>{StartPos::5::%arg-1%}<reset>!”
    81.             else:
    82.                 message "Start <light cyan> Position 5<reset> is not set!"
    83.             if {StartPos::%arg-1%::6} is set:
    84.                 message "Start Position 6 is set to <grey>{StartPos::6::%arg-1%}<reset>!"
    85.             else:
    86.                 message "Start <light cyan> Position 6<reset> is not set!"
    87.             if {StartPos::%arg-1%::7} is set:
    88.                 message "Start Position 7 is set to <grey>{StartPos::7::%arg-1%}<reset>!"
    89.             else:
    90.                 message "Start <light cyan> Position 7<reset> is not set!"
    91.             if {StartPos::%arg-1%::8} is set:
    92.                 message "Start Position 8 is set to <grey>{StartPos::8::%arg-1%}<reset>!"
    93.             else:
    94.                 message "Start <light cyan> Position 8<reset> is not set!”
    95.             if {StartPos::%arg-1%::9} is set:
    96.                 message "Start Position 9 is set to <grey>{StartPos::9::%arg-1%}<reset>!"
    97.             else:
    98.                 message "Start <light cyan> Position 9<reset> is not set!"
    99.             if {StartPos::%arg-1%::10} is set:
    100.                 message "Start Position 10 is set to <grey>{StartPos::10::%arg-1%}<reset>!"
    101.             else:
    102.                 message "Start <light cyan> Position 10<reset> is not set!"
    103.             if {StartPos::%arg-1%::11} is set:
    104.                 message "Start Position 11 is set to <grey>{StartPos::11::%arg-1%}<reset>!"
    105.             else:
    106.                 message "Start <light cyan> Position 11<reset> is not set!"
    107.             if {StartPos::%arg-1%::12} is set:
    108.                 message "Start Position 12 is set to <grey>{StartPos::12::%arg-1%}<reset>!"
    109.             else:
    110.                 message "Start <light cyan> Position 12<reset> is not set!"
    111.             if {StartPos::%arg-1%::13} is set:
    112.                 message "Start Position 13 is set to <grey>{StartPos::13::%arg-1%}<reset>!"
    113.             else:
    114.                 message "Start <light cyan> Position 13<reset> is not set!"
    115.             if {StartPos::%arg-1%::14} is set:
    116.                 message "Start Position 14 is set to <grey>{StartPos::14::%arg-1%}<reset>!"
    117.             else:
    118.                 message "Start <light cyan> Position 14<reset> is not set!"
    119.             if {StartPos::%arg-1%::15} is set:
    120.                 message "Start Position 15 is set to <grey>{StartPos::15::%arg-1%}<reset>!"
    121.             else:
    122.                 message "Start <light cyan> Position 15<reset> is not set!"
    123.             if {StartPos::%arg-1%::16} is set:
    124.                 message "Start Position 16 is set to <grey>{StartPos::16::%arg-1%}<reset>!"
    125.             else:
    126.                 message "Start <light cyan> Position 16<reset> is not set!"
    127.  
    128. #========================================================================
    129. #                     Create Start/Finish
    130. #========================================================================
    131.  
    132. Command /setStart <string>:
    133.     description: Starts the game
    134.     permission: op
    135.     trigger:
    136.         add %arg-1% to {StartFinish::list::*}
    137.        
    138.  
    139. on region enter:
    140. player is in the region {StartFinish::list::*}
    141.     message "You are in Start finish!"
    142.  
    143. #========================================================================
    144. #                    Start
    145. #========================================================================
    146.  
    147. Command /start:
    148.     description: Starts the game
    149.     permission: op
    150.     trigger:
    151.        
    152.  
    153.  
    154. #========================================================================
    155. #                    Join
    156. #========================================================================
    157.  
    158. Command /join <string>:
    159.     description: Join the game
    160.     trigger:
    161.         add {playercount::%arg-1%} 1
    162.         if {playercount::%arg-1%} <= {maxplayers::%arg-1%}
    163.             if {BoatType::%uuid of player%::1}
    164.                 send title "Entered the Game!" with subtitle "You selected: Standard Boat!" to player for 5 seconds
    165.                 spawn 1 boat
    166.                 make the player ride a boat
    167.  
    168.  
    Thx
     
Thread Status:
Not open for further replies.

Share This Page

Loading...