Only by sword killing the boss

Discussion in 'Community Support' started by rejdo9544, Jun 14, 2019.

  1. rejdo9544

    rejdo9544 New Member
    Premium Supporter Supporter

    Joined:
    May 31, 2019
    Messages:
    7
    Likes Received:
    0
    Hi,
    is it somehow to set the boss to kill only by the sword?
    For example: I buy a sword called "Kill Boss" and only with this sword will it kill him. Nothing else.
     
    #1
  2. Buguser

    Buguser Active Member
    Supporter Moderator Quality Assurance

    Joined:
    Oct 11, 2016
    Messages:
    268
    Likes Received:
    62
    Yes, using the CancelEvent mechanic:

    In this example the mob "NoDamageMob" can be only damaged by a diamond sword with the lore "Kill Boss".

    Skill.yml
    Code:
    CancelDamageEvent:
      TargetConditions:
      - ownsitemsimple{where=HAND;material=DIAMOND_SWORD;lore=Kill<&sp>Boss;amount=1;action=false}
      Skills:
      - CancelEvent
    
    Mob.yml
    Code:
    NoDamageMob:
      Type: villager
      Skills:
      - skill{s=CancelDamageEvent;sync=true} ~onDamaged
    
     
    #2
  3. rejdo9544

    rejdo9544 New Member
    Premium Supporter Supporter

    Joined:
    May 31, 2019
    Messages:
    7
    Likes Received:
    0
    Děkuji, ale dovolte mi, abych Loreho na cokoliv postavil, takže šéf nemůže být zabit.
     
    #3
  4. Nexto

    Nexto Member

    Joined:
    Dec 3, 2017
    Messages:
    114
    Likes Received:
    10
    English please. Also, you must use mythicmobs extension for it to work
     
    #4
  5. rejdo9544

    rejdo9544 New Member
    Premium Supporter Supporter

    Joined:
    May 31, 2019
    Messages:
    7
    Likes Received:
    0
    Sorry, my bad :/
    Extension? What?
     
    #5
  6. Nexto

    Nexto Member

    Joined:
    Dec 3, 2017
    Messages:
    114
    Likes Received:
    10
  7. rejdo9544

    rejdo9544 New Member
    Premium Supporter Supporter

    Joined:
    May 31, 2019
    Messages:
    7
    Likes Received:
    0
    Working for 1.14.2?
     
    #7
  8. Nexto

    Nexto Member

    Joined:
    Dec 3, 2017
    Messages:
    114
    Likes Received:
    10
    nope. 1.12-1.13
     
    #8

Share This Page