1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

Custom Buff/Debuff Time

Discussion in 'Plugin Suggestions' started by bippity, Jul 5, 2013.

  1. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    300
    This is coming off the top of my head. I'm wondering if you are able to customize how long buffs last without using the "/buff" commands. Where players are normally buffed/debuffed from potions or mobs, but the time that they are buffed are customized to be longer or shorter.
    I don't know if I'm making sense here, but here are some examples:
    • A player uses a health potion to heal himself and get "potion sickness". Instead of waiting 45 seconds to heal again, he only has to wait 10 seconds to use another healing potion.
    • A player triggers a cave trap and gets poisoned by a dart trap. Instead of the usual poison time, he only becomes poisoned for 3 seconds.
     
  2. Loganizer

    Plugin Developer

    Joined:
    Dec 2, 2012
    Messages:
    212
    I think it would be possible with some NetMessage stuff, but I couldn't do it.
     
  3. Olink

    Olink Admin note: Actually a really nice person now

    Joined:
    Jul 21, 2011
    Messages:
    1,397
    This would work assuming that the time a buff lasts for is overwritten and not just the largest of the two durations is used.

    The client(or the server) sets the buff on a player, so you could tie in code to rebuff immediately with a different duration, but there is no context on why a player is buffed...
     
  4. Ijwu

    Ijwu Level 11

    Joined:
    Apr 4, 2012
    Messages:
    644
    You could dig for the context on why someone is buffed. If their current active item is a potion then it was probably via a potion. If they have X potions before the buff and X-1 potions after, it was probably a potion. So on and so forth, so it's possible but not too easily obtainable. It's a lot of work for not much pay off.
     
  5. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    300
    Just adding on to your list of context digging Ijwu: If they get healed by the same amount the potion heals?(For now, I'm just mainly looking for a way to limit the amount of time of "Potion Sickness")
    Well, I'd appreciate anyone who would try to develop a plugin like this or find a less-complex way of developing this idea.