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.

How do I stop Team A from healing Team B with a splash potion of healing

Discussion in 'Skript' started by Zackwall, Apr 21, 2022.

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

    Zackwall New Member

    Joined:
    Apr 21, 2022
    Messages:
    6
    Likes Received:
    0
    Ok, so I'm trying to make it so that when Team A or Team B has a splash potion of healing it would only heal their team and not the enemy team. I checked the
    event and it doesn't have a `event-shooter` and `event-healed` or something

    this is what I'm kinda looking for
    Code (Text):
    1. on heal:
    2.     shooter is "%shooter%"
    3.     if healed is not "%healed%"
    4.     cancel event
    obviously this doesn't work but I'm looking for something like that could anyone help me?
    --- Double Post Merged, Apr 25, 2022, Original Post Date: Apr 21, 2022 ---
    bump
     
  2. Mich

    Mich Active Member

    Joined:
    Jul 15, 2020
    Messages:
    145
    Likes Received:
    5
    On heal is too late you need to use on healing to cancel the event
     
  3. Practice

    Practice Member

    Joined:
    Apr 23, 2022
    Messages:
    37
    Likes Received:
    1
  4. Zackwall

    Zackwall New Member

    Joined:
    Apr 21, 2022
    Messages:
    6
    Likes Received:
    0
    ah no its not the code its just an example because `shooter` in on heal doesn't exist
    the reason for the `shooter` is because if a player throws a splash potion of healing to another player it would heal them and that's the thing i want to cancel event
    --- Double Post Merged, Apr 26, 2022, Original Post Date: Apr 26, 2022 ---
    yes... but it doesn't have `event-shooter` or something for splash potion of healing
     
  5. Mich

    Mich Active Member

    Joined:
    Jul 15, 2020
    Messages:
    145
    Likes Received:
    5
    I have been thinking and you might be able to use on right click with the potions and set a location at the player location then on heal detect a radius around that location the loop players and if the player is not from the team cancel event
     
  6. Zackwall

    Zackwall New Member

    Joined:
    Apr 21, 2022
    Messages:
    6
    Likes Received:
    0
    great idea! the only problem is that if the other team also throws a healing potion at the same time it might detect it as the enemys team and heals the enemy team
    --- Double Post Merged, Apr 28, 2022, Original Post Date: Apr 27, 2022 ---
    bump
    --- Double Post Merged, Apr 30, 2022 ---
    bump
    --- Double Post Merged, May 2, 2022 ---
    bump
     
  7. JakeTheChad

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    83
    Likes Received:
    5
    Code (Text):
    1. on right click with red dye:
    2.   name of tool contains "&dHeal Spell"
    3.   remove 1 of tool from tool
    4.   loop all players in a radius of 5 around player where [{team::%input%} = "red"]:
    5.     heal loop-player by 4 hearts
    6.     send "&dYou have been healed by %player%"
    7.  
    Not exactly what you're looking for but still does the job, the problem with splash potions is that there apparently isn't much you can do with them in skript (from my experience).

    Change the team variable with whatever variable you use for teams
     
Thread Status:
Not open for further replies.

Share This Page

Loading...