Levels needed to use a skill

Discussion in 'Community Support' started by ECV_Jesper, Jun 8, 2019.

  1. ECV_Jesper

    ECV_Jesper New Member
    Supporter

    Joined:
    Jun 7, 2019
    Messages:
    15
    Likes Received:
    0
    Is there a code that makes it so need 3level in your xp bar to be able to use the spell on your weapon note: the xp doesnt go away after using it its basicly a level on your character.

    is that possible x'd?
     
    #1
  2. Nexto

    Nexto Member

    Joined:
    Dec 3, 2017
    Messages:
    113
    Likes Received:
    10
    try adding this into your skill
    Conditions:
    level >3
     
    #2
  3. ECV_Jesper

    ECV_Jesper New Member
    Supporter

    Joined:
    Jun 7, 2019
    Messages:
    15
    Likes Received:
    0
    doesnt work for me still did i do something wrong :p?
     

    Attached Files:

    #3
  4. ECV_Jesper

    ECV_Jesper New Member
    Supporter

    Joined:
    Jun 7, 2019
    Messages:
    15
    Likes Received:
    0
    Changed it to - Level >3 still doesnt work somehow " i mean it works but also below level 3"
     
    #4
  5. ECV_Jesper

    ECV_Jesper New Member
    Supporter

    Joined:
    Jun 7, 2019
    Messages:
    15
    Likes Received:
    0
    btw conditions some how just dont work for me at all?
     
    #5
  6. Nexto

    Nexto Member

    Joined:
    Dec 3, 2017
    Messages:
    113
    Likes Received:
    10
    Ah, sorry i didnt noticed it at first glance, you are using your conditions into your items file directly, conditions only work in the skills file. make artifacts do a skill with that conditions
     
    #6
  7. ECV_Jesper

    ECV_Jesper New Member
    Supporter

    Joined:
    Jun 7, 2019
    Messages:
    15
    Likes Received:
    0
    nah im using them in my skill tab haha :p they just dont work somehow at all is there a plugin i need before i can set conditons
     
    #7
  8. Buguser

    Buguser Active Member
    Supporter Quality Assurance Moderator

    Joined:
    Oct 11, 2016
    Messages:
    268
    Likes Received:
    62
    The level condition checks for the Mob Levels of an entity. This means that a player's experience level is not taken into account.

    Since vanilla targeters have been removed from MythicMobs, one of the easiest ways to check for the level of a player is using the %player_level% placeholder of PlaceholderAPI and use it as a value for a variable.

    In the following example, a player can only use the weapon from level 10.

    Skillfile:
    Code:
    CheckLevel:
      Skills:
      - setvariable{var=target.playerLevel;value="%player_level%"} @self
    
    CheckLevelHand:
      TargetConditions:
      - variableInRange{var=target.playerLevel;range=>9} false
      Skills:
      - message{m="&cYou must be at least level 10 to use this weapon."} @self
      - CancelEvent
    
    Add this to any weapon:
    Code:
      Skills:
      - skill{s=CheckLevel} @self ~onTimer:100
      - skill{s=CheckLevelHand} @self ?equipslot{slot=HAND} ~onAttack
    
     
    #8
    Roger M likes this.
  9. ECV_Jesper

    ECV_Jesper New Member
    Supporter

    Joined:
    Jun 7, 2019
    Messages:
    15
    Likes Received:
    0
    oke it basicly gives me the signal i can still cast probaly bcuz i have to implement it in to the skill

    Comet:
    Skills:
    - projectile{onTick=Comet-Tick;onHit=Comet-Hit;v=30;i=1;hR=2;vR=2;hnp=true}
    - sendtitle{title="";subtitle="&6&lTaste my wrath!";d=20} @self
    - effect:sound{s=entity.blaze.shoot;v=3} @Origin ~onUse
    Comet-Tick:
    Skills:
    - effect:particles{p=mobspell;amount=10;hSpread=0.1;vSpread=0.1;speed=0.1;yOffset=0;sE=true} @origin
    - effect:particles{p=reddust;amount=10;hSpread=0.1;vSpread=0.1;speed=0.1;yOffset=0;sE=true} @origin
    - effect:particles{p=flame;amount=10;hSpread=0.1;vSpread=0.1;speed=0.1;yOffset=0;sE=true} @origin
    Comet-Hit:
    Skills:
    - damage{a=100000000000;ignoreArmor=true}
    - effect:particles{p=large_smoke;vs=1;hs=5;a=100;s=1;} @origin
    - effect:particles{p=large_smoke;vs=1;hs=5;a=100;s=1;} @origin
    - effect:particles{p=ghast_fireballs;vs=1;hs=5;a=100;s=1;} @origin
    - effect:particles{p=flame;vs=1;hs=5;a=100;s=1;} @origin
    - effect:particles{p=largeexplode;vs=1;hs=5;a=100;s=0.01;} @origin
    - effect:particles{p=flame;vs=1;hs=5;a=100;s=0.01;} @origin
    - effect:sound{s=entity.ender_dragon.growl;v=3} @origin
    - effect:sound{s=entity.generic.explode;v=3} @origin

    Currently i have it like this i dont really have a idea how to add it in tho :p amazing tho that u worked all that out
     
    #9

Share This Page