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

Solved How can I do these?

Discussion in 'Skript' started by PantherBoy, Jul 27, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. PantherBoy

    PantherBoy Well-Known Member

    Joined:
    Jul 20, 2017
    Messages:
    72
    Likes Received:
    0
    If player 1 hit player 2 with a specific item
    - push player 2
    - set on fire player 2
    - set drowning effect to player 2
    - give a grass hat and blindness effect to player 2
    ?
    Sorry for bad english
     
    #1 PantherBoy, Jul 27, 2017
    Last edited: Jul 27, 2017
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    Code (Skript):
    1. on damage:
    2.     if attacker's tool is <insert item here>:
    3.         push victim backwards at speed 5
    4.         ignite victim for 10 seconds
    5.         #idk what you mean by 'drawing effect'
    6.         set victim's helmet to grass
    7.         apply blindness to victim for 10 seconds
     
    • Winner Winner x 1
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    Code (Skript):
    1. on damage of player:
    2.     attacker is holding steak named "derp"
    3.     set victim on fire
    4.     push victim backwards and horizontally at speed 2
    5.     apply blindness to the victim for 5 seconds
    I don't know what you mean by grass hat, but you can give the attacker or victim and item with "give victim/attacker item"
    The drawing effect depends on what addon you use but SKDragon has particles, emotes, images from files etc, so you can have pretty much whatever you want:emoji_slight_smile:
    --- Double Post Merged, Jul 27, 2017, Original Post Date: Jul 27, 2017 ---
    darn it donut beat me to itXD
     
    • Useful Useful x 1
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    THX, how can i make the effect of the drowning?
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    • Creative Creative x 1
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    Sorry, i mean drowning :emoji_sweat_smile::emoji_sweat_smile: im too tired
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    haha no worriesXD do you mean drowning like water particles or like the player losing health for a few seconds?
     
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    idk how you could actually make the player drown but you could just apply poison for the same effect
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    yeah, water particles and losing health
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    here's the particles. Again this is SKdragon
    Code (Skript):
    1. set {_loc} to the location 1 meter above the player
    2. drawDot count 10, particle "watersplash", XYZ .2, .2, .2, center {_loc}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
    3.  
    Poison like Donut said would work well
    Code (Skript):
    1. apply potion of poison to the victim for 5 seconds
     
    • Useful Useful x 1
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    How can I do, that the grass is on the player 2 head is just for 5 seconds?
     
  12. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    Code (Skript):
    1. set victim's helmet to grass
    2. wait 5 seconds
    3. set victim's helmet to air
    Though if they're wearing a helmet and you want to return to that you'll need to set it to a variable beforehand like this.
    Code (Skript):
    1. set {helmet.%player%} to player's helmet
    2. set victim's helmet to grass
    3. wait 5 seconds
    4. set victim's helmet to {helmet.%player%}
     
    • Useful Useful x 1
  13. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    Code (Skript):
    1. set victim's helmet to grass
    2. wait 5 seconds
    3. set victim's helmet to air
    --- Double Post Merged, Jul 27, 2017, Original Post Date: Jul 27, 2017 ---
    dammit Wynnevir we always say basically the same exact thing at the same time
     
    • Agree Agree x 1
  14. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    LOL forum race XD
    we should set up a turn taking schedule. I'll take M,W,F and you can have T,TH,SA. sunday can be peace day. sound like a plan? :emoji_stuck_out_tongue:
     
    • Funny Funny x 1
  15. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    THX its WORKING :emoji_grinning:
    But how can i make that, if a variable is 1 than the holding item will be enchanted?
    --- Double Post Merged, Jul 27, 2017, Original Post Date: Jul 27, 2017 ---
    The part of the code where i would like to put it in:
    Code (Skript):
    1. on rightclick:
    2.     if player is holding a redstone named "&4Tűz esszencia":
    3.         if {mana.%player%} = 1:
    4.             set {fire.%player%} to {fire.%player%} + 1
    5.             remove 1 lapis lazuli named "&1Mana" from the player
    6.             set {mana.%player%} to {mana.%player%} - 1
    7. set victim's helmet to air
     
  16. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    the exact code depends on when you want it to check for the variable value, but it'd be something like this
    Code (Skript):
    1. if {variable} is 1:
    2.     make player's held item shiny #(skrayfall, just shiny no  actual enchantment)
    3.     # or  
    4.     enchant player's held item with sharness 1
     
    • Informative Informative x 1
  17. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    Code (Skript):
    1. on rightclick:
    2.     if player is holding a redstone named "&4Tűz esszencia":
    3.         if {mana.%player%} = 1:
    4.             make player's held item shiny #Here the shiny code
    5.             set {fire.%player%} to {fire.%player%} + 1
    6.             remove 1 lapis lazuli named "&1Mana" from the player
    7.             set {mana.%player%} to {mana.%player%} - 1
    Code (Skript):
    1. on damage:
    2.     if attacker's tool is a blaze rod named "&5Varázspálca":
    3.         if {fire.%attacker%} = 1:
    4.             #set the previous item unshiny <- I want something like that
    5.             set {fire.%attacker%} to {fire.%attacker%} - 1
    6.             ignite victim for 5 seconds
    7.             wait 3 seconds
    8.             give 1 lapis lazuli named "&1Mana" to the attacker
    9.             set {mana.%attacker%} to {mana.%attacker%} + 1
     
  18. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    Looks good:emoji_grinning: it loads without errors?
     
    • Friendly Friendly x 1
  19. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,123
    Likes Received:
    158
    Code (Skript):
    1. variables:
    2.     {fire.%player%} = 0
    3.     {water.%player%} = 0
    4.     {dirt.%player%} = 0
    5.     {air.%player%} = 0
    6.     {mana.%player%} = 1
    7. on first join:
    8.     give a blaze rod named "&5Staff" to the player
    9.     give a redstone named "&4Fire essence" to the player
    10.     give a clay named "&9Water essence" to the player
    11.     give a cocoa beans named "&8Dirt essence" to the player
    12.     give a nether quartz named "&7Air essence" to the player
    13.     give 1 lapis lazuli named "&1Mana" to the player
    14. on player drop:
    15.     cancel event
    16. command /MagicKit:
    17.     trigger:
    18.         give a blaze rod named "&5Staff" to the player
    19.         give a redstone named "&4Fire essence" to the player
    20.         give a clay named "&9Water essence" to the player
    21.         give a cocoa beans named "&8Dirt essence" to the player
    22.         give a nether quartz named "&7Air essence" to the player
    23.         give 1 lapis lazuli named "&1Mana" to the player
    24. command /setmana <player> <int>:
    25.     trigger:
    26.         set {mana.%arg 1%} to arg 2
    27.         message "Your mana is set to: %{mana.%player%}"
    28. on damage:
    29.     if attacker's tool is a blaze rod named "&5Staff":
    30.         if {fire.%attacker%} = 1:
    31.             set {fire.%attacker%} to {fire.%attacker%} - 1
    32.             ignite victim for 5 seconds
    33.             wait 3 seconds
    34.             give 1 lapis lazuli named "&1Mana" to the attacker
    35.             set {mana.%attacker%} to {mana.%attacker%} + 1
    36.         if {water.%attacker%} = 1:
    37.             set {water.%attacker%} to {water.%attacker%} - 1
    38.             apply poison to victim for 5 seconds
    39.             set {_loc.%victim%} to the location 1 meter above the victim
    40.             drawDot count 10, particle "watersplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
    41.             wait 3 seconds
    42.             give 1 lapis lazuli named "&1Mana" to the attacker
    43.             set {mana.%attacker%} to {mana.%attacker%} + 1
    44.         if {dirt.%attacker%} = 1:
    45.             set {dirt.%attacker%} to {dirt.%attacker%} - 1
    46.             apply blindness to victim for 5 seconds
    47.             apply poison to victim for 5 seconds
    48.             set victim's helmet to grass
    49.             wait 5 seconds
    50.             set victim's helmet to air
    51.             wait 3 seconds
    52.             give 1 lapis lazuli named "&1Mana" to the attacker
    53.             set {mana.%attacker%} to {mana.%attacker%} + 1
    54.         if {air.%attacker%} = 1:
    55.             set {air.%attacker%} to {air.%attacker%} - 1
    56.             push victim backwards at speed 5
    57.             wait 3 seconds
    58.             give 1 lapis lazuli named "&1Mana" to the attacker
    59.             set {mana.%attacker%} to {mana.%attacker%} + 1
    60. on rightclick:
    61.     if player is holding a redstone named "&4Fire essence":
    62.         if {mana.%player%} = 1:
    63.             set {fire.%player%} to {fire.%player%} + 1
    64.             remove 1 lapis lazuli named "&1Mana" from the player
    65.             set {mana.%player%} to {mana.%player%} - 1
    66. on rightclick:
    67.     if player is holding a clay named "&9Water essence":
    68.         if {mana.%player%} = 1:
    69.             set {water.%player%} to {water.%player%} + 1
    70.             remove 1 lapis lazuli named "&1Mana" from the player
    71.             set {mana.%player%} to {mana.%player%} - 1
    72. on rightclick:
    73.     if player is holding a cocoa beans named "&8Dirt essence":
    74.         if {mana.%player%} = 1:
    75.             set {dirt.%player%} to {dirt.%player%} + 1
    76.             remove 1 lapis lazuli named "&1Mana" from the player
    77.             set {mana.%player%} to {mana.%player%} - 1
    78. on rightclick:
    79.     if player is holding a quartz named "&7Air essence":
    80.         if {mana.%player%} = 1:
    81.             set {air.%player%} to {air.%player%} + 1
    82.             remove 1 lapis lazuli named "&1Mana" from the player
    83.             set {mana.%player%} to {mana.%player%} - 1
    Here the whole code translated to english. It is working fine. With the /MagicKit command you can get the kit. If there is a problem, you can change the mana variable to 1 or 0 with the /setmana <Player> <Amount> . I think it is not bad, this is my first working bigger project. Thanks for the help :emoji_grinning:
     
    • Friendly Friendly x 1
Thread Status:
Not open for further replies.
Loading...