[SOLVED] spawn mobs on players?

Discussion in 'Support' started by GeckoZRule, Aug 7, 2018.

  1. GeckoZRule

    GeckoZRule New Member

    Joined:
    Jul 25, 2016
    Messages:
    24
    Likes Received:
    0
    is there any way to spawn a mythicmob at a players locations, not just coordinates?
     
    #1
  2. GeckoZRule

    GeckoZRule New Member

    Joined:
    Jul 25, 2016
    Messages:
    24
    Likes Received:
    0
    i want it done through the command /mythicmobs mobs spawn <mob> <location>
     
    #2
  3. Omanoctoa

    Omanoctoa Active Member
    Supporter Premium Supporter

    Joined:
    Mar 10, 2016
    Messages:
    371
    Likes Received:
    33
    If you can target the player using another mob, often a dummy mob that is nothing more than an invisible armour stand that despawn afterwards, you could use that mob to spawn the real mob at the players location. Pretty sure this would use the exact coordinates opposed to the block location. I'm on my phone atm so I can't make up an example for you but basically a dummy mob could target the player's exact location. This also makes it easier to apply fancy spawning effects like particles.
     
    #3
  4. GeckoZRule

    GeckoZRule New Member

    Joined:
    Jul 25, 2016
    Messages:
    24
    Likes Received:
    0
    I kinda follow what you're saying, how would I target the correct player though? My dev made a plugin to run a command when clicking on a certain item (to make it a custom spawn egg) It runs the command from console so not sure how it would target the correct player?
     
    #4
  5. Omanoctoa

    Omanoctoa Active Member
    Supporter Premium Supporter

    Joined:
    Mar 10, 2016
    Messages:
    371
    Likes Received:
    33
    Finding the target's coordinates for a command is easy - there are Variables for it:
    <target.l.x> <target.l.y> <target.l.z>
    The plugin makes a custom mob egg...is that all you need? A custom egg? If that's the case, just create a mythicmob egg Item using this:
    Code:
    AuraEgg:
      Id: 383
      Display: '§7§l-= §9Aura Egg §7§l=-'
      Lore:
      - '§8§oA Mythical Egg that can'
      - '§8§obe used to resurrect a'
      - '§8§oAura'
    ...then simply give the players that Item.

    Using variables with another plugin...not so easy. As long as you can send the player's coordinates to Console then the command will run no problem.

    To use it as a skill you would use...
    Code:
    - command{c="mm mobs spawn -s Your_mob 1 world_name,<target.l.x>,<target.l.y>,<target.l.z>"}
    The -s spawns it in silently.
     
    #5
  6. GeckoZRule

    GeckoZRule New Member

    Joined:
    Jul 25, 2016
    Messages:
    24
    Likes Received:
    0
    I have mythic artifacts plugin, could I just use that to have it run the command instantly? Would that work?
     
    #6
  7. Omanoctoa

    Omanoctoa Active Member
    Supporter Premium Supporter

    Joined:
    Mar 10, 2016
    Messages:
    371
    Likes Received:
    33
    Hmmmm yes I'm pretty sure that would work, but instead of <target.l.x> just use @self or @origin then it will target the player's location.
     
    #7
  8. GeckoZRule

    GeckoZRule New Member

    Joined:
    Jul 25, 2016
    Messages:
    24
    Likes Received:
    0
    It finally worked! Thank you so much for your continuous support <3
     
    #8
  9. Omanoctoa

    Omanoctoa Active Member
    Supporter Premium Supporter

    Joined:
    Mar 10, 2016
    Messages:
    371
    Likes Received:
    33
    No problem! Happy to hear it worked!
     
    #9

Share This Page