Multi location teleport

Discussion in 'Archived: Plugin Requests' started by FlOppy, Dec 26, 2013.

  1. Offline


    Hello everyone hope you have spend a mery christmas. and are ready for the new year.

    I am looking for a multi location teleport, i explain myself, what i am looking for and didn't find, is a plugin which allow to set many locations to be teleported in, with only one command.

    For example you use the command /tp

    And before that you have set for this command 4 location to be teleported in. which has all 25% chance to be trigered.

    I would like a plugin like this for my PVP arena to make a deathmatch looks cool.
  2. Offline


    So basically you set 4 locations and a player will randomly go to one of them.
  3. Offline


    Yeah, this is a great idea i know, but the four location was an example the main goal would be to allow users to set their own numbers and perhaps percentage for each or egual is good to me.
  4. Offline


  5. Offline


  6. Offline


    Yeah but i need the To do thing you plan Jthort

    • Add a way for the admin to set multiple teleport points, and the player would teleport to a random one of them by typing a command."
    And that would be perfect.
  7. Offline


  8. Offline


    To elaborate on HSP if you wanted to use it for this, you can skip all of it's other functionality (and so keep using whatever home/spawn plugin you already have) and just use it's custom command feature to make this happen. Here's a sample config.yml for HSP to do just that:

        - '*'
        class: CustomEventCommand
        event: myrandomspawn
        aliases: [sr]
        class: SetSpawn
        - spawnRandomNamed:1,2,3,4
    What this basically does is disable ALL of HSP's commands, so they won't even exist on your server at all. Then it defines a custom command '/spawnrandom' (with alias /sr for short) which executes the 'myrandomspawn' event chain. That event chain simply picks one of your 4 random named spawns, which you can setup by running "/hspsetspawn 1", "/hspsetspawn 2", etc. This is why the second 'hspsetspawn' command is there, named so that it doesn't conflict with whatever /spawn you're already using.

    Of course you could have 5 or 6 or a dozen random spawn choices if you wanted and you could also define different commands that went to different random spawns instead, that's all up to you.

    Permissions are controlled as hsp.command.spawnrandom and hsp.command.hspsetspawn. Obvious pattern there if you'd like to define other custom commands.

    Of course you could use HSP's other features as well if you wanted to switch your existing home/spawn, but the point of this post was to show how you could use HSP for just the one feature you're asking about.
  9. Offline


    This isn't toooo difficult, right?

    A late happy christmas and a late happy new year back to you :)

Share This Page