Random Command

Discussion in 'Plugin Requests' started by OMGTurtlesFTW, Jan 11, 2016.

Thread Status:
Not open for further replies.
  1. Plugin category: Mechanics

    Suggested name: Random Commands

    What I want: So I want a plugin that I can make a list of commands with and then execute one of them at random from the list I chose.
    For example: When a player types the command /RCP run <ListName> the plugin will take a command at random from a list you set in the config file and run it as the player.

    What the Config File would look like (I'm not sure if its in the right format):

    ListName: example
    Commands:
    - say hi
    - tp @a 0 0 0
    - summon ~ ~ ~ Zombie
    ListName: random_warps
    Commands:
    - warp pvp
    - warp tower
    - warp fishing_area
    - warp spawn
    - warp hill

    You can add as many lists to the config file as you need by just copying the format of the example lists.
    Everything will be done in the config file unless some of the commands below are added.

    NOTE: Commands will be run from the player not the console!

    Ideas for commands: /RCP run <ListName> - Pick a random command from the list and execute it.
    I don't really need any other commands but if you have any spare time it would be really handy to have something like:
    /RCP create list <ListName> - Creates a list for plugins to be stored.
    /RCP remove list <ListName> - Deletes a list.
    /RCP add <command> <ListName> - Adds a command to an existing list.
    /RCP delete <command> <ListName> - Deletes a command from an existing list.

    Ideas for permissions: The Permissions will only need to be added if the extra commands are added.
    RCP.create - /RCP create list <ListName>
    RCP.remove - /RCP remove list <ListName>
    RPC.add - /RCP add <command> <ListName>
    RPC.delete - /RCP delete <command> <ListName>

    When I'd like it by: A weeks time?

    Thank you for your time and I hoped you enjoyed reading my thread/idea.
    If you have any suggestions to add leave a comment.

    -pewax
     
  2. Offline

    timtower Administrator Administrator Moderator

    OMGTurtlesFTW likes this.
  3. I think this is more for creating custom commands than actually making them random but there is some type of random command thing in there ;)

    Thanks for the help though.
     
  4. Offline

    timtower Administrator Administrator Moderator

    If it can do what you need...
     
  5. Offline

    mrCookieSlime

    @OMGTurtlesFTW @timtower
    Yep, CommandOverride is able to handle this.

    Example:

    /randomwarp:
    - 'RANDOM 1 5'
    - 'command:/warp pvp'
    - 'command:/warp tower'
    - 'command:/warp fishing_area'
    - 'command:/warp spawn'
    - 'command:/warp hill'

    This is going to select 1 random Command from the following 5.
     
  6. Thanks @mrCookieSlime and btw this is a bit weird but I have just started playing on your server like 1 day before I wrote this and it's really fun XD
     
    mrCookieSlime likes this.
Thread Status:
Not open for further replies.

Share This Page