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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/freeze

Discussion in 'Requests' started by BrettPlayMC, Jan 28, 2017.

  1. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    This would be variables that are crap. And they need a bit of storage and so on... It would be cleaner so.
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Well, my script above works for me. I don't know why you got 44 errors.
    Anyways, here is a pastebin and file:
    http://pastebin.com/z2c7uy10
    https://mega.nz/#!hYlWjAzK!VrWt5Fytk2DEJheJYrcbESrdvgNBzW6F3te5CHP9muk
    I changed {frozen::%player%} to {frozen.%player%}

    @Spirit1998HD , I just tried and Skript ensures the player is online first. I typed /freeze X into the console and X was not online, but I received 'there is no player online whose name starts with X". You can use the loop if you want, I don't really care.
    I used an action bar, not bossbar. They're different. Action bars are what you see when you switch tools.
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    @A248 Yeah sorry i don't look so long at these part of your code. Action bar is better so it's not the worst idea :emoji_grinning: But also there are servers wich uses the bossbar as messenger and the action bar as some noteable information. :emoji_slight_smile:
     
    • Agree Agree x 1
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    I will be posting a video soon of the scripts being tested. :emoji_stuck_out_tongue:
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    To demonstrate things better.
    I will post it when I get home from school today.
     
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    There's is another way to do this:
    Code (Text):
    1.  
    2. command /freeze [<string>]:
    3.     trigger:
    4.         if arg 1 parsed as player is not set:
    5.             send "&7Usage: /freeze [player]."
    6.             stop
    7.         set gamemode of arg 1 parsed as player to survival
    8.         set walk speed of arg 1 parsed as player to 0
    9.         set fly speed of arg 1 parsed as player to 0
    10.         set hunger of arg 1 parsed as player to 3
    11.         # Requires Bensku's Skript
    12.         set saturation of arg 1 parsed as player to 20
    13.         apply jump 200 to arg 1 parsed as player for 1 day
    14.        
    15. command /unfreeze [<string>]:
    16.     trigger:
    17.         if arg 1 parsed as player is not set:
    18.             send "&7This player is offline."
    19.             stop
    20.         if arg 1 parsed as player doesn't have jump:
    21.             send "&7This player is not freezed."
    22.             stop
    23.         set walk speed of arg 1 parsed as player to 0.2
    24.         set fly speed of arg 1 parsed as player to 0.1
    25.         set hunger of arg 1 parsed as player to 10
    26.         # Requires Bensku's Skript
    27.         set saturation of arg 1 parsed as player to 10
    28.         remove jump from player
    29.  
    Can be upgraded to save player's hunger and saturation.
    Doesn't detect anything, so most likely won't cause any lag.
    The player can still move if he has a hacked client.
     
    • Informative Informative x 2
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Code (Text):
    1. set is flying for player to true
    It's doesnt work for me.
    @Gatt Which addon is responsible for it?
     
    #28 ShaneBee, Mar 4, 2017
    Last edited by a moderator: Mar 5, 2017
  9. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Because that syntax doesn't make sense...
    Will test!
     
  10. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    It's make sense

     
  11. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    no because "is flying" isn't an expression nor an effect.
     
    • Agree Agree x 1
  12. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    That isn't English either so that doesn't make sense as well. See my point?
    Note: I know you are not a native English speaker but this is proving my point.
     
  13. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
  14. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
  15. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
  16. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    I want to allow player to fly without a double space.
     
  17. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Does
    Code (Text):
    1. set is flying of {_p} to true
    look like a function?


    @feerko You're correct, you want the is flying expression from Umbaska.
     
  18. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Sorry for the bump but can you make it save peoples hunger/heath? :emoji_slight_smile:
    Also why are you using [<string>]? Could I replace it with [<player>]?
    Also can you put the script in hastebin?
     
  19. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Code (Skript):
    1. command /freeze [<player>]:
    2.     usage: /freeze [<player>]
    3.     trigger:
    4.         set {health.%uuid of arg-1%} to arg-1's health
    5.         set {hunger.%uuid of arg-1%} to arg-1's hunger    
    6.         set gamemode of arg-1 to survival
    7.         set walk speed of arg-1 to 0
    8.         set fly speed of arg-1 to 0
    9.         set hunger of arg-1 to 3
    10.         set saturation of arg-1 to 20
    11.         apply jump 200 to arg-1 for 1 day
    12.      
    13. command /unfreeze [<player>]:
    14.     trigger:
    15.         if arg-1 isn't set:
    16.             send "&7%arg-1% is offline."
    17.             stop
    18.         if arg-1 doesn't have jump:
    19.             send "&7%arg-1% isn't freezed."
    20.             stop
    21.         set arg-1's health to {health.%uuid of arg-1%}
    22.         set arg-1's hunger to {hunger.%uuid of arg-1%}
    23.         delete {health.%uuid of arg-1%}
    24.         delete {hunger.%uuid of arg-1%}
    25.         set walk speed of arg-1 to 0.2
    26.         set fly speed of arg-1 to 0.1
    27.         set saturation of arg-1 to 10
    28.         remove jump from arg-1
    Hastebin: https://hastebin.com/nesuyidozu.vbs
     

Share This Page

Loading...