PlayerSkillUseEvent

Discussion in 'Plugin Development' started by MattTheBeast, Jul 9, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    MattTheBeast

    Hi guys, I'm acutally on vacation rn and dont have my computer so I cant code, but I got this cool idea and I was wondering is this would actually work or just be way to buggy.

    The idea:
    So basicly, I was thinking of making a mmorpg type of server that has usable skills, the only server I'v played that has skills is wayncraft, but I don't really like the way they call a skill/spell. So I thought of a way to make it more like mmorpg's today, a skill event that I will make will be called when a player goes to a hotbarslot.

    The way I'm planning to make it:

    Hotbar slots:
    -1 (Weapon)
    -2(Skill 1)
    -3(Skill 2)
    -4(Skill 3)
    -5(Skill 4)
    -6(Skill 5)
    -7(Skill 6)
    -8(Something els)
    -9(Something els)

    So to call the SkillUseEvent I need to first get the hotbar slot that they changed to, if its slot 2-7, use the skill and call the SkillUseEvent, then finnaly set thier slot back to the weapon slot

    How I plan to do this is by creating a repeating task(1 tick), for looping all online players, getting the players slot, if the slot is 2-7, call the SkillUseEvent, finnaly, set the slot back to 1.

    So I'm currently wondering and debating if I should or should not make this, Im planning on having many many diffrent unique skills that will take me so much time to make, so I really need to make sure this skill calling system will not be buggy.

    I'm open to any advise or suggestions, thank you.
     
  2. Offline

    Zombie_Striker

    @MattTheBeast
    Setting the slot back to 0 will be annoying; In intense combat situation, the player will have to stop moving or let go of the mouse in order to hit the number keys (and you would not be able to use the mouse wheel, as 1 tick will only allow you to move one slot over)
     
  3. Offline

    MattTheBeast

    @Zombie_Striker

    Well thats why hotkeys will be a thing, Iv played on servers that needed you to combo diffrent hotkey slots and it was lots of fun, the only diffrence is the setSlot. And the skills will have delays so players wont really be spamming them.
    I can understand how it can be annoying tho but idk how I can make it more efficient, any ideas?
     
  4. RcExtract likes this.
  5. Offline

    MattTheBeast

    @AlvinB I didn't know that existed. Can it cancel the even flawlessly or will the slot be changed?
     
    Last edited: Jul 10, 2017
  6. Offline

    RcExtract

    That event is cancelable
     
    MattTheBeast likes this.
Thread Status:
Not open for further replies.

Share This Page