Solved How can I do these?

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

PantherBoy

Active Member
Jul 20, 2017
74
0
6
24
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
 
Last edited:
code_language.skript:
on damage:
    if attacker's tool is <insert item here>:
        push victim backwards at speed 5
        ignite victim for 10 seconds
        #idk what you mean by 'drawing effect'
        set victim's helmet to grass
        apply blindness to victim for 10 seconds
 
code_language.skript:
on damage of player:
    attacker is holding steak named "derp"
    set victim on fire
    push victim backwards and horizontally at speed 2
    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:
[doublepost=1501186711,1501186676][/doublepost]darn it donut beat me to itXD
 
code_language.skript:
on damage:
    if attacker's tool is <insert item here>:
        push victim backwards at speed 5
        ignite victim for 10 seconds
        #idk what you mean by 'drawing effect'
        set victim's helmet to grass
        apply blindness to player for 10 seconds
THX, how can i make the effect of the drowning?
 
yeah, water particles and losing health
here's the particles. Again this is SKdragon
code_language.skript:
set {_loc} to the location 1 meter above the player
drawDot count 10, particle "watersplash", XYZ .2, .2, .2, center {_loc}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
Poison like Donut said would work well
code_language.skript:
apply potion of poison to the victim for 5 seconds
 
How can I do, that the grass is on the player 2 head is just for 5 seconds?
code_language.skript:
set victim's helmet to grass
wait 5 seconds
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_language.skript:
set {helmet.%player%} to player's helmet
set victim's helmet to grass
wait 5 seconds
set victim's helmet to {helmet.%player%}
 
code_language.skript:
set victim's helmet to grass
wait 5 seconds
set victim's helmet to air
[doublepost=1501188999,1501188957][/doublepost]dammit Wynnevir we always say basically the same exact thing at the same time
 
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:
 
THX its WORKING :emoji_grinning:
But how can i make that, if a variable is 1 than the holding item will be enchanted?
[doublepost=1501190305,1501190058][/doublepost]The part of the code where i would like to put it in:
code_language.skript:
on rightclick:
    if player is holding a redstone named "&4Tűz esszencia":
        if {mana.%player%} = 1:
            set {fire.%player%} to {fire.%player%} + 1
            remove 1 lapis lazuli named "&1Mana" from the player
            set {mana.%player%} to {mana.%player%} - 1
set victim's helmet to air
 
THX its WORKING :emoji_grinning:
But how can i make that, if a variable is 1 than the holding item will be enchanted?
the exact code depends on when you want it to check for the variable value, but it'd be something like this
code_language.skript:
if {variable} is 1:
    make player's held item shiny #(skrayfall, just shiny no  actual enchantment)
    # or   
    enchant player's held item with sharness 1
 
the exact code depends on when you want it to check for the variable value, but it'd be something like this
code_language.skript:
if {variable} is 1:
    make player's held item shiny #(skrayfall, just shiny no  actual enchantment)
    # or 
    enchant player's held item with sharness 1
code_language.skript:
on rightclick:
    if player is holding a redstone named "&4Tűz esszencia":
        if {mana.%player%} = 1:
            make player's held item shiny #Here the shiny code
            set {fire.%player%} to {fire.%player%} + 1
            remove 1 lapis lazuli named "&1Mana" from the player
            set {mana.%player%} to {mana.%player%} - 1
code_language.skript:
on damage:
    if attacker's tool is a blaze rod named "&5Varázspálca":
        if {fire.%attacker%} = 1:
            #set the previous item unshiny <- I want something like that
            set {fire.%attacker%} to {fire.%attacker%} - 1
            ignite victim for 5 seconds
            wait 3 seconds
            give 1 lapis lazuli named "&1Mana" to the attacker
            set {mana.%attacker%} to {mana.%attacker%} + 1
 
code_language.skript:
on rightclick:
    if player is holding a redstone named "&4Tűz esszencia":
        if {mana.%player%} = 1:
            make player's held item shiny #Here the shiny code
            set {fire.%player%} to {fire.%player%} + 1
            remove 1 lapis lazuli named "&1Mana" from the player
            set {mana.%player%} to {mana.%player%} - 1
code_language.skript:
on damage:
    if attacker's tool is a blaze rod named "&5Varázspálca":
        if {fire.%attacker%} = 1:
            #set the previous item unshiny <- I want something like that
            set {fire.%attacker%} to {fire.%attacker%} - 1
            ignite victim for 5 seconds
            wait 3 seconds
            give 1 lapis lazuli named "&1Mana" to the attacker
            set {mana.%attacker%} to {mana.%attacker%} + 1
Looks good:emoji_grinning: it loads without errors?
 
Looks good:emoji_grinning: it loads without errors?
code_language.skript:
variables:
    {fire.%player%} = 0
    {water.%player%} = 0
    {dirt.%player%} = 0
    {air.%player%} = 0
    {mana.%player%} = 1
on first join:
    give a blaze rod named "&5Staff" to the player
    give a redstone named "&4Fire essence" to the player
    give a clay named "&9Water essence" to the player
    give a cocoa beans named "&8Dirt essence" to the player
    give a nether quartz named "&7Air essence" to the player
    give 1 lapis lazuli named "&1Mana" to the player
on player drop:
    cancel event
command /MagicKit:
    trigger:
        give a blaze rod named "&5Staff" to the player
        give a redstone named "&4Fire essence" to the player
        give a clay named "&9Water essence" to the player
        give a cocoa beans named "&8Dirt essence" to the player
        give a nether quartz named "&7Air essence" to the player
        give 1 lapis lazuli named "&1Mana" to the player
command /setmana <player> <int>:
    trigger:
        set {mana.%arg 1%} to arg 2
        message "Your mana is set to: %{mana.%player%}"
on damage:
    if attacker's tool is a blaze rod named "&5Staff":
        if {fire.%attacker%} = 1:
            set {fire.%attacker%} to {fire.%attacker%} - 1
            ignite victim for 5 seconds
            wait 3 seconds
            give 1 lapis lazuli named "&1Mana" to the attacker
            set {mana.%attacker%} to {mana.%attacker%} + 1
        if {water.%attacker%} = 1:
            set {water.%attacker%} to {water.%attacker%} - 1
            apply poison to victim for 5 seconds
            set {_loc.%victim%} to the location 1 meter above the victim
            drawDot count 10, particle "watersplash", XYZ .2, .2, .2, center {_loc.victim}, visibleRange 320, pulseDelay 0, keepFor 20 ticks
            wait 3 seconds
            give 1 lapis lazuli named "&1Mana" to the attacker
            set {mana.%attacker%} to {mana.%attacker%} + 1
        if {dirt.%attacker%} = 1:
            set {dirt.%attacker%} to {dirt.%attacker%} - 1
            apply blindness to victim for 5 seconds
            apply poison to victim for 5 seconds
            set victim's helmet to grass
            wait 5 seconds
            set victim's helmet to air
            wait 3 seconds
            give 1 lapis lazuli named "&1Mana" to the attacker
            set {mana.%attacker%} to {mana.%attacker%} + 1
        if {air.%attacker%} = 1:
            set {air.%attacker%} to {air.%attacker%} - 1
            push victim backwards at speed 5
            wait 3 seconds
            give 1 lapis lazuli named "&1Mana" to the attacker
            set {mana.%attacker%} to {mana.%attacker%} + 1
on rightclick:
    if player is holding a redstone named "&4Fire essence":
        if {mana.%player%} = 1:
            set {fire.%player%} to {fire.%player%} + 1
            remove 1 lapis lazuli named "&1Mana" from the player
            set {mana.%player%} to {mana.%player%} - 1
on rightclick:
    if player is holding a clay named "&9Water essence":
        if {mana.%player%} = 1:
            set {water.%player%} to {water.%player%} + 1
            remove 1 lapis lazuli named "&1Mana" from the player
            set {mana.%player%} to {mana.%player%} - 1
on rightclick:
    if player is holding a cocoa beans named "&8Dirt essence":
        if {mana.%player%} = 1:
            set {dirt.%player%} to {dirt.%player%} + 1
            remove 1 lapis lazuli named "&1Mana" from the player
            set {mana.%player%} to {mana.%player%} - 1
on rightclick:
    if player is holding a quartz named "&7Air essence":
        if {mana.%player%} = 1:
            set {air.%player%} to {air.%player%} + 1
            remove 1 lapis lazuli named "&1Mana" from the player
            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:
 
Status
Not open for further replies.