Promote Kit

Discussion in 'Archived: Plugin Requests' started by MrPokeDSDude, Apr 13, 2013.

  1. Offline

    MrPokeDSDude

    Hello again bukkit forums!
    I'm looking for a plugin, in which after a player uses a certain kit, they are promoted to a certain rank in Permissions. I'm not too sure how this would be possible but the idea is...
    If a player types in for instance '/kit Ares' they would get the items for 'Ares' and be promoted to the group in permissions called 'Ares'.
    If there is a way to do this simply in Essentials that would be great but I don't think you can so any links or info would be nice!
    Thank you in advance.
    :)
     
  2. Offline

    45zeldafan

    You should use Variable Triggers.

    Create a Command Trigger with Variable triggers. Here is the script you should use with it.
    Code:
      kit ares:
        Override: false
        Script:
        - '@CMDCON command/arguments'
     
  3. Offline

    MrPokeDSDude

    45zeldafan Could you explain that script to me?
    As in, an algorithm explanation

    45zeldafan Also, what would I put in the 'command/arguments' if I wanted the player who typed the command to go to the group in Permissions 'Ares'?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  4. Offline

    45zeldafan

    Code:
      kit ares:
        Override: false
        Script:
        - '@CMDCON command/arguments'
    If player uses command /kit ares, then @CMDCON runs command as if it were to be entered through the console. Very simple
     
  5. Offline

    MrPokeDSDude

    Thank you! Didn't realise it was that simple but thank you for explaining it!
     
  6. Offline

    45zeldafan

    No problem. If you need any more help, just quote me and tell me the server IP.
     
  7. Offline

    MrPokeDSDude

    I don't think you'll need the IP for this, but for the command, how would I make it the person who typed the command to go up a group? The command is: /pex user <user> group add <group>
    So how would I make the <user> be the person who typed the command?
     
  8. Offline

    bennie3211

    i think thats 'arg1'
     
  9. Offline

    aronuserparty98

    %player%
    Probably.

    /Aron
     
  10. Offline

    45zeldafan

    Code:
      kit ares:
        Override: false
        Script:
        - '@CMDCON pex user <playername> group add <group>'

    Leave <playername> alone. It is a placeholder for the player name. Only change <group> to the group you want.


    Edit 1: Fixed command

    Edit 2: DO NOT put the /'s for commands with CMDCON, CMDOP, or CMD, unless the command has 2 /'s such as world edit.
     
  11. Offline

    MrPokeDSDude

    WOW! Thank you for that load of info! So <playername> will just automatically change to whoever puts in the command. Really useful, now just to copy and paste!

    45zeldafan
    What config do I put this into? :oops: And how do I put it in? I tried putting it in the CommandTriggers.yml and put myself into the Default group.
    When I typed the command, I got the kit but stayed in the same group. My CommandTriggers.yml looks like this
    Code:
    Commands:
      kit a:
        Override: false
        Script:
        - '@CMDCON pex user <playername> group add Ares'
      kit d:
        Override: false
        Script:
        - '@CMDCON pex user <playername> group add Demeter'
      kit h:
        Override: false
        Script:
        - '@CMDCON pex user <playername> group add Hephaestus'
    
    Is it the wrong file? Or am I missing something really obvious and just being really stupid?
    Thanks in advance

    MrPokeDSDude 45zeldafan Hmm, I created some others, but put a '_' between 'kit' and 'a' etc. Though creating another command, it does work, so do I need a code for a space?

    EDIT: What I mean is, can I put something between 'kit' and 'a' so it recognises the command as '/kit a' and not just '/kit' when it ignores the 'a'

    EDIT 2: Also, I changed 'ares' to an 'a', 'demeter' to a 'd' and hephaestus to a 'h'.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  12. Offline

    45zeldafan

    I don't quite understand what you mean. Make sure you quote me if u want a reply
     

Share This Page