Inactive [FUN] Sprint v1.3 - Enable users to sprint by using sneak [953]

Discussion in 'Inactive/Unsupported Plugins' started by Carbon131, Apr 4, 2011.

  1. Offline

    Carbon131

    Sprint - Enable Users To Sprint:
    Version: v1.3

    Sprint allows users to sprint by holding down your sneak key and moving. It does this by multiplying the velocity of a user by a given number when they hold shift and are moving. It has a configurable speed and permission support.

    Features:
    • Lets users sprint while holding sneak key
    • Configurable sprint speed
    • Configurable energy meter
    • Live in-game configuration editing
    • Permission support
    • Easy installation
    Download:

    Download Sprint.jar
    Source Code

    Installation:
    Download the Sprint.jar and extract it to your plugins directory. Run your server and a Sprint folder will be created in your plugins directory with a config.yml in it.
    Now edit your config.yml:
    Code:
    requires-item:
        item-id: 301 # id of the item which is required to wear to sprint (must be either boots, chestplate, leggings, or helment)
        enabled: false # if a item is required to be worn in order to sprint (true = enabled, false = disabled)
    held-item:
        item-id: 0 # id of the item which is held by the user to enable/disable sprinting by left clicking
        enabled: false # enable/disable being able to enable/disable sprinting by left clicking with a specified item in a person's hand
    messages:
        interval: 5 # use 5 or 10 for this option. (every 5 or 10 % amount of energy used/gained a message will appear with your current energy left)
        energy-lost-color: f # the color that is displayed when a user is losing energy
        energy-gained-color: f # the color that is displayed when a user is gaining energy
    options:
        energy-gained-per-second: 1 # amount of energy gained while not sprinting
        speed: 0.6 # controls the sprint speed (its what the player's direction's velocity is multiplied by)
        energy-lost-per-second: 1 # amount of energy lost per second while sprinting
        requires-command-enabled: false # if set to true, it will allow people to enable/disable sprinting by using '/sprint on' or '/sprint off'
        high-jump-enabled: false # if set to true, it will allow users to jump high while sprinting, but if set to false, users will jump the same height while sprinting as the normal jumping height
    NOTE: If upgrading from v1.0 or below to v1.1+ you must delete your Sprint folder and restart your server or plugin for the new config file to be created! If not the plugin will not work!

    Permission Nodes (open)

    sprint.admin # allow users access to sprint administrative commands
    sprint.allow # allow users or groups access to sprint
    sprint.highjump # allow users who have sprint.allow be able to jump high while sprinting

    NOTE: If no permission nodes are detected, it will default to using ops.txt.

    Commands (open)

    Sprint Commands:
    /sprint on : Enables sprinting.
    /sprint off : Disables sprinting.

    Sprint Administrative Commands:
    /sprint speed <amount> : Change sprint speed.
    /sprint energygainedpersecond <amount> : Change energy gained per second.
    /sprint energylostpersecond <amount> : Change energy lost per second.
    /sprint highjump <enable|disable> : Enable/disable sprint highjump.
    /sprint requiresitem <enable|disable> : Enable/disable require item to wear.
    /sprint requirescommand <enable|disable> : Enable/disable require command to enable/disable sprinting.
    /sprint helditem <enable|disable> : Enable/disable being able to enable/disable sprint using an item.
    /sprint helditemid <id> : Change the item that is used to enable/disable sprinting.
    /sprint itemid <id> : Change the required item to be worn.
    /sprint messagesinterval <seconds> : Change the interval between messages sent while sprinting.
    /sprint energygainedcolor <color> : Change the color of the energy gained message.
    /sprint energylostcolor <color> : Change the color of the energy lost message.

    Changelog (open)

    Version 1.3
    • Changed it so when energy-lost-per-second is set to 0 the stamina messages wont show up
    Version 1.2
    • Divided '/sprint admin' into 2 separate pages
    • Fixed bug where you were required to have 'requires-command-enabled' enabled to use 'held-item.enabled'
    Version 1.1
    • Added ability to enable/disable sprinting by using commands
    • Added in game administrative commands (you can change any setting in the configuration file in real time)
    • Added ability to enable/disable sprinting by left clicking with a specified item
    Version 1.0
    • Fixed no permissions detected problem (wouldn't work without permissions)
    • Added Sprint version check (notifies you in the console if there is a new version of Sprint available)
    Version 0.9

    • Added sprint.highjump permission node
    Version 0.8

    • Added high-jump-enabled option to config
    Version 0.7

    • Added energy-gained-color and energy-lost-color to config.yml
    • Changed messages to display as 'Stamina: #%'
    Version 0.6

    • Reconfigured config.yml
    • Added decimal support for energy-lost-per-second and energy-gained-per-second
    • Added item-id option
    • Added messages options (interval and color)
    • Fixed message bug (spammed 15%)
    Version 0.5

    • Converted config.properties to config.yml
    Version 0.4

    • Added energy meter and config options (energy-lost-per-second, energy-gained-per-second)
    • Fixed minor bugs
    Version 0.3

    • Fixed glitch were a user could go infinitely in the air
    Version 0.2

    • Attempting to fix Mac error (was using ancient version of eclipse)
    • Added leatherboot option in config
    Version 0.1

    • Initial Release
     
  2. Offline

    Carbon131

    Alright, well I'm working on the v0.8 plugin this weekend, I've had a load of work this week so sorry for the delay!

    @Zarius
    I would have to agree with you, the super jump is a nice side effect and is quite handy. I may make a release for an option to keep / remove it.

    @xxXAcePilotXxx
    Whatever key you use for crouch, default is shift.

    @Mentioum
    I'd have to agree with you :)

    Thats quite alright, you can send it whenever you have the time. I know how it is to be busy!
     
  3. Offline

    BioRage

    @Carbon131

    If you hold shift, walk and spam jump, it either bugs or glitches and you gain a ridiculous amount of speed, by holding shift, w, spamming space.
     
  4. Offline

    RomaClanServer

    Would it be possible to have a default speed modifier, to make the speeds run/walk for realism's sake? Thanks
     
  5. Offline

    DCSiira

    Hey, could you add a feature so that certain groups can have certain stamina or speed? I want my moderators to be faster than the normal users.
     
  6. Offline

    xxXAcePilotXxx

    what bout sneakin?
     
  7. Offline

    Zarius

    You can set the plugin to use require an item to be worn before sprinting - I've made this leather boots. Take them off and you can sneak.
     
  8. Offline

    CptBonex

    I dont use permission but i want all players to be able to sprint.
     
  9. Offline

    heroanth2345

    If you have any time to loose:
    Maybe you could had that you sprint faster on certain types of block
    Because on ice, you're not suppose to run faster xD
     
  10. Offline

    kronflux

    What I'd like to see is a basic setup where you can customize certain things to go different speeds.
    For example:
    Sprint1:
    - Item: 301
    - Speed: 0.5
    Sprint2:
    - Item: 305
    - Speed: 1
    Sprint3:
    - Item: 309
    - Speed: 1.5
    Sprint4:
    - Item: 317
    - Speed: 2
    Sprint5:
    -Item: 313
    - Speed: 2.5

    So that we could have different items(boots in this case) go faster(in this case, depending on quality of boots)
     
  11. Offline

    Mentioum

    Suggestion:

    Now you have given the option to have superjump on and off. Please add a permissions node for the superjump if possible so that I can make it a privilege. This is one of the plug-ins which gets the most interesting response on the server.
     
  12. Offline

    Carbon131

    @Mentioum
    Alright, added it to v0.9 which I'll release soon.
     
  13. Offline

    Zarius

    Confirming it seems to work fine in CB716.

    Just a quick note on the speed config option - the comment says this is the number the velocity is multiplied by however the default is 0.6. Wouldn't this mean if the player velocity is 10 then 10x0.6 = 6, hence slower? Or is a lower "velocity" faster in this case?
     
  14. Offline

    Crent

    My friend and I were actually just thinking about something like this. This is exactly the same was as we imagined, except for we thought it would be cool if you could somehow level up your sprint, so that you could add perks such as faster running speed, faster recharge, run longer, etc.
     
  15. Offline

    lordthree

    Very cool mod. high jump doesn't seen to be working on this test build of craftbukkit (can't remember which build and can't figure out how to check?) - i think it's like 714 or 707 or something...

    Anyway- I'm surprised nobody mentioned this yet-

    Can you make it so server has the option to make sprint be disabled if other items of armor are worn. So for example, If I was wearing only leather boots and otherwise armor-naked, then I could sprint. But as soon as I adorn any other armor, it disables sprint?

    I'd like to be able to configure this so that players can have the option of having the extra armor protection, or sacrifice the armor bonus for a speed bonus - so that people can't have both... one or the other... and they can kinda balance out that way...

    Did I explain that well enough?

    Thanks for this - good work! Just installed it, and now I'm going to tweak it and roll with it. looks fun!
     
  16. I love the idea, and the plugin
    A energy bar would be a better way to view your stamina
    Does the player actually look like he's running? or just speed crouching?
    In fact, If there's any way to totally separate crouching from sprinting...
     
  17. Offline

    Zarius

    Working fine in RB733 - high jump enabled :)

    I agree with this idea, if it's possible - a player in full iron/gold/etc armour (excepting boots) shouldn't be able to sprint and superjump the same as no armour. Great plugin - I go through so many leather boots (they keep getting damaged from falls) :)
     
  18. Offline

    lordthree

    That's strange. I just updated to RB733 off the main page and now Sprint doesn't seem to work at all for me. :'(
    Console reads exactly the same as it did before... no errors...

    Other than update to 733, everything else is the exact same as it was- I'm running out of ideas!
     
  19. Offline

    Carbon131

    @Zarius
    It actually multiplies the player's direction which is a vector value, then sets the velocity of your direction. So I guess I made the note a little misleading - sorry about that.

    @lordthree
    Sounds interesting, I'll look into it. Though how exactly would you like the configuration file to be set up (just so I don't make it too complicated or too simple)

    @lordthree
    I just tested it on my server with build 733 and it works perfectly - can you post your config file?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  20. Offline

    lordthree

    No, I'm apparently just stupid... I'd taken off my shoes and forgot to put them back on! It's working fine. I really spaced out on that one :D!

    I guess it could be as simple as something like
    That way the server would have the quick option of just turning off other armor without going thru and listing specific item IDs (which some people might want to specify!)

    That way if it was set to
    Then under specific you could list all the item id's you want to not allow, for example... only chest plates would prevent sprinting......

    I don't really know the proper syntax or any of it, and I don't know how robust that would be... I'm sure you can prolly figure out the best way.

    And I 'guess' high jump is working. It's definately fast, but it's not really so 'high'. Can someone tell me if this is what it's supposed to do? (sorry for the lag and quality... my machine is munching away RAM right now...)


    Much much faster than normal sprint. I also noticed to highjump I don't even need to hold the forward key, just shift-jump works :)

    The crouch animation actually looks a lot like sprinting at that speed. I did a few foot races on smp last night, and because he's kinda leaned over when you crouch, it looks a lot like a run. It's very cool. (the video above doesn't demo it as well as If there were other people... I might record another one later)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  21. Offline

    Carbon131

    @lordthree
    Alright that makes sense. I'll probably get working on that soon.

    And for the high jump, you must aim towards the air to jump high.
     
  22. Offline

    lordthree

    AHHHHHHHHHHHHh :rolleyes: I feel even dumber! lol
     
  23. Offline

    Carbon131

    @lordthree
    Haha, nah it happens, its mostly my fault since I assumed everyone knew that you had to aim towards the air to high jump :p

    And a heads up, if you aim a little bit more straight (align to the horizon) when you sprint, it wont be as bumpy - it'll be much more smooth.
     
  24. Offline

    Aeron

    Holding sprint button and spamming jump button does make it faster, but there is a flaw in this mod - you can't sneak with it, I changed the sneak button to LCTRL, but it doesn't sprint anymore with LSHIFT, but works with LCTRL, you should bind the sprint to a button not the state of the player (which is crawling atm).
     
  25. Offline

    Zarius

    Because this is a server side mod it can't create new keys - hence using the sneak key. On my server I require leather boots (you can make this gold or diamond to be more rare) to be worn before sprinting, this way anyone wanting to sneak just takes the boots off.
     
  26. Offline

    KoryuObihiro

    I didn't see it here, so...perhaps in the way of addressing running/crouching you could just use a toggle command? i.e., /funsprint, with alias /fs, or the like?
     
  27. Offline

    King_Koopa

    Love this plugin, but if you could add a command that I could turn sprint off for when my friends and I are goofing around.

    I'll give you an example, my buddy was tea bagging an animal and he sprinted off a cliff and died. Humorous yes, but an on/off command would be great!

    EDIT: I forgot that I could just take off the boots if I decide I do not want to sprint. But the above is just an idea anyways :)
     
  28. Offline

    Bman212121

    I'm thinking about mapping it to the knife (Sword) for obvious reasons.... :p

    (Everyone runs faster with a knife - FPS Doug)
     
  29. Offline

    Manbeast77

    Just a heads up, I get a could not pass PLAYER_MOVE event when I try yo use this.
     
  30. Offline

    murdrums

    Got exactly the same issue on my server. Hopefully this is fixed.
     
  31. Offline

    enchanter100

    I'm having problems with actual SNEAK after this plugin. When I don't have leather boots equipped, I like using sneak to build things without falling of the edge of ledges. Well ever since installing this plugin, I fall of ledges "sometimes" while sneaking without leather boots.
     

Share This Page