[WIP] - ExpSkills v0.8.3 - buy permissions with experience/money [1.2.5-R2.0]

Discussion in 'WIP and Development Status' started by Syd, Sep 27, 2011.

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

    Syd

    ExpSkills v0.8.3 - buy/rent Skills, Perks and Permissions



    Version: 0.8.3
    Download: 0.8.3 (jar) <- permalink
    Source Code: GitHub

    Lastest Dev Build: Download (Updated: 5/27/2012)
    Dev Build Chancelog (open)

    0.8.4_beta1
    • fixed NPE in /exp rented

    Register: Download
    Vault: Download

    If you want to support me:
    [​IMG]

    ExpSkills is a Plugin which allows you to buy Skills (i.e. Permission nodes) with money and/or Skillpoints using common Economy Plugins through Register and the vanilla Experience System of Minecraft, which was added in 1.8.

    Features:
    • buy or rent permission nodes/groups with money and or skillpoints (using Vault/Register and a mix between vanilla and own experience system)
    • let players buy skills after a skilltree
    • let players only buy skills if they have enough playtime or not too much skills
    • show your current experience, level and playtime
    • define your own level formula
    • changed orbdrop/xp loss on player death to the amount of xp he collected to the next level
    • powerfull admin commands to grant, revoke and reset skills and xp of a player
    • translate the languagefile if needed
    Supported/Requried Plugins:
    Economy: all plugins which are supported by Register or Vault, depending on which you are using.
    If you dont want to use economy features set use_economy: in config.yml to false.

    Permissions:
    Full supported: PermissionsEX,bPermissions
    partial supported: Built-In Permission (no groups), Permissions 3.x (no group_earn), PermissionsBukkit (no group_need)

    If you want support for another Permissions Plugin please tell me. (Using Vault as Permissions Provider is planned)

    Usage
    Commands:
    expskills.use - Commands
    /exp help [command] - get Commandlist or more advanced help for a command
    /exp stats [player] - show your/anothers current stats
    /exp list <page> [filter] - list all avaible skills
    /exp info <skill> - get information about a specific skill
    /exp buy <skill> - buy a skill
    /exp rent <skill> [time] - rent a skill for the given time, time can't be higher then 'renttime:'
    /exp current - show's the skills you already bought
    /exp rented - show's the skills you already rented
    expskills.admin - Commands
    /exp <set/add> <player> <xp/level/skill> <amount> - add/set stats of a player
    /exp current <player> - get current skills of a player
    /exp revoke/grant <player> <skill> - grant/revoke skill
    /exp reset <player> [total/level] - resets the player's skills, levels or both

    Permission Nodes:expskills.use - use this Plugin as user (help, stats, list, info, buy)
    expskills.current.others - the player can use /exp current <player>
    expskills.rented.others - the player can use /exp rented <player>
    expskills.admin - use this Plugin as admin (all commands)
    expskills.admin.add - permissions for /exp add
    expskills.admin.set - permissions for /exp set
    expskills.admin.reset - permissions for /exp reset
    expskills.admin.grant - permissions for /exp grant
    expskills.admin.revoke - permissions for /exp revoke

    Config:
    config.yml (open)
    Code:
    general:
        skillpoint_modifier: 2.0 #how much Skillpoints you gain per Level
        currency: Dollar #name of your currency
        use_skilltree: true #want to use the skilltree?
        use_economy: true #want to use economy features?
        formula: 0 #which formula should be used -> 0 = 1.0.0 formula, 1 = 1.8. formula,
    #2 = own formula after y=ax⁴+bx³+cx²+dx+e where x is the level and y the experience.
        formula_a: 0 #for formula: 2
        formula_b: 0
        formula_c: 0
        formula_d: 0
        formula_e: 0
        skill_cap: 0 #max number of skills, a player can buy 0 = unlimited
        updatetime: 300 #every how many seconds the rent's are updated
    skills: #Skill section
        testskill: #the key of this skill
            name: testskill #Display name of you skill
            description: Just an example #a short text for /xp list
            info: Haha #a more advanced info for /xp info <skill>
            cost_type: both #what is charged - money/skillpoints/both - only for /exp list and /exp info
            skillpoints: 2 #how many skillpoints are charged for this skill
            money: 1000 #how much money is charged for this skill
            permissions_need: #the needed permissions to buy this skill
                - 'foobar.bar'
            permissions_earn: #the earned permissions when buying this skill
                - 'foo.bar'
                - 'bar.foo'
            groups_need: #the player needs to be in this group to buy this skill
                - builder
            groups_earn: #the player gets this group when he buy this skills
                - mod
                - admin
            revoke_need_groups: false #revokes all groups_need groups after buying this skill
            level_need: 0 #the level needed to buy this skill
            time: 60 #the playtime in seconds which are needed to buy this skill
            buyable: true #is this skill buyable
            rentable: true #is this skill rentable
            rentcost: 100 #how much money is charged for renting this skill at max
            rentcost_min: 50 #how much money will be charged at least when renting this skill
            rentdiscount: true #will the player get a discount when he uses a lower time
            renttime: 300 #the default and max renttime for this skill (no discount if you rent for lesser time)
            categories: #for /xp list <page> <filter> use
                - 'example'
    version: '0.8.3'
    

    skilltree.yml (open)

    Code:
    skilltree:
        skill0:
            skill_need_type: or #or/all - how many skills are needed
            skill_need: #list of skills which are needed to buy this skill
                - 'skill1'
            skill_illegal: #list of skills which block this skill
                - 'skill2'
            skill_possible: #for /xp info
                - 'foofoo'
    

    <player>.yml (open)
    Code:
    #this file keeps track of bought skills, extra skillpoints and saves EXP
    skills: #current skills of the player
    - testskill
    - mining
    - godmode
    skillpoints: 10 #bonus skillpoints for this player
    experience: 10 #experience value saved to prevent a MC bug
    extra_skills: 0 #raises the skill_cap of a single player - currently without command
    donotchange: 1328621266671 #used for time measurement
    onlinetime: 2846944 #playtime in ms
    


    To-Do List/Road-Map
    Known Issues
    Improvements
    • add skillcap info to /exp stats
    Features
    • more extended rental of skills
    • grant skills on time
    • some statistic fun (0.9)
    • MySQL support (?)
    • Spout (?)
    Changelog
    Version 0.8.3 (5/25/2012)
    • added per command permissions
    • changed Permissions implementation
    • changed that rented skills are only checked for online players
    • changed skillname check to be case insensitive
    • fixed critical bug in Skills per World feature
    • fixed possible bug in skilltree need_type
    • fixed NPE in rented skills check
    • fixed a possible RTO error
    • fixed a missing space char
    Version 0.8.2
    • updated to CraftBukkit-1-1-R7
    • added worlds: <list> node for skills to buy skills only for special worlds
    • added rentcost, rentdiscount, rentcost_min and rentable/buyable nodes for skills
    • added change_expdrop: true/false value in configfile to disable the orbdrop and exp saving (compatibility)
    • added "/skill" and "/skills" alias for "/exp"
    • added Vault Permission Support (untested)
    • fixed a possible conflict between Vault and Register
    • fixed error in "already own skill" check
    • fixed a few NPEs
    Version 0.8.1 (2/8/2012)
    • fixed NPE on startup
    Version 0.8.0 (2/7/2012)
    • updated to CraftBukkit-1.1-R3 (#1846)
    • general code cleanup and refactoring of source code
    • added Vault Economy Support
    • added playtime counter and playtime as requirement for skills
    • added rental of skills
    • added customizable languagefile
    • added message on levelup
    • updated support for bPermissions - it should work with all features now!
    • updated support for PermissionsBukkit - only group_need is not supported as of now
    • updated /exp list -> "/exp list all" or "/exp list <filter>" all shows you all skills no matter if it's buyable for you
    • updated /exp reset -> "/exp reset level" resets only level and exp, "/exp reset total" resets exp and skills, "/exp reset" resets only skills
    • updated 'cost_type:', it does only matter for "/exp list" and "/exp info" anymore. It will now always take the amounts of money/skillpoints given in the config
    • removed the skill0, skill1, skillx limitation, you can now name you skills as you want
    • fixed /exp list to show only buyable skills now
    • fixed a bug in /exp reset which could cause lag
    • maybe a few more fixes due the cleanup
    Version 0.7.0_RC2 (12/13/2011)
    • fixed bug with skill_cap
    Version 0.7.0_RC1 (12/13/2011)
    • built against CraftBukkit #1597 - MC Version 1.0.1
    • added independent level calculation method. See config section for further details.
    • added level_need node for skillsa
    • added revoke_need_groups: true/false node
    • added first try for automatic config updates
    • added skill cap and a "extra_skills" value in player config
    • updated /exp grant/revoke to no longer work with non existing skills
    • updated all commands from /xp to /exp, as /xp is a now a vanilla command
    • removed /exp add/set <player> totalxp
    • fixed /exp revoke to work as intended
    • fixed CRITICAL Typo in Skilltree
    • fixed CRITICAL bug in cost_type: both skills
    • fixed small bug in /exp current <player>
    • fixed some NPE
    • maybe something i forgot to mention here
    older changes (open)

    Version 0.6.4 (11/16/2011)
    • fixed bug with skillpoints
    • fixed /xp help list
    • fixed /xp list <page> filter does not work
    • some changes in PEX to use global permissions, not per world (you may need to update your players permissions)
    Version 0.6.3 (11/6/2011)
    • fixed bug in Register when using iConomy
    Version 0.6.2 (11/6/2011)
    • fixed bug in groups implementation
    Version 0.6.1 (11/6/2011)
    • quickfix for some NPE's
    Version 0.6 (11/6/2011)
    • bPermissions support
    • added group support (PEX/bPerm)
    • added /xp reset <player>
    • more checks against NPE's
    • added XP to next Level display to /xp stats
    Version 0.5 (10/22/2011)
    • fixed a bug in Skilltree implementation
    • fixed bug in /xp list
    • added /xp grant command
    • added /xp revoke command
    • added /xp current <player> for admins
    • added "use_economy" confignode
    • updated to CraftBukkit #1337
    • updated to Register 1.5
    Version 0.4 (10/9/2011)
    • updated to CraftBukkit #1240
    • fixed NPE in /xp info
    • advanced /xp info output for Skilltrees
    • first try in Bukkit built-in Permission
    • added /xp reload command
    • added preferred_economy config node
    Version 0.3.1 (10/3/2011)
    • fixed bug when skilltree was disabled
    Version 0.3 (10/3/2011)
    • bought skill will not be shown in /xp list
    • workaround for logout on death XP bug
      -> when a player lost his XP due a bug he needs to relog or to die and his XP are resettet to the amount in config file
    • first try for Skilltree function
    Version 0.2 (9/29/2011)
    • Updated /xp info to show the price
    • implemented /xp current
    • list categories with /xp help list
    • grant/revoke skillpoints with /xp <add/set> <player> skill <amount>
    • cleaned up some dirty code
    Version 0.1 (9/27/2011)
    • initial release
     
    Pomme72 likes this.
  2. Offline

    Joelsem

    I'm really excited for this plugin, ecspecially the skill trees. Keep it up!
     
  3. Offline

    Syd

    Updated to 0.2

    Version 0.2 (9/29/2011)
    • Updated /xp info to show the price
    • implemented /xp current
    • list categories with /xp help list
    • grant/revoke skillpoints with /xp <add/set> <player> skill <amount>
    • cleaned up some dirty code

    next task: Skilltree :)

    PS: How can I change the title of this thread? oO
     
  4. Offline

    Joelsem

    I'm amazed that I'm the only person that's commented on this. Please keep up the good work, this is exactly what I've been looking for on my server :D.
     
  5. Offline

    Syd

    Updated to 0.3

    Version 0.3 (10/3/2011)
    • bought skill will not be shown in /xp list
    • workaround for logout on death XP bug
      -> when a player lost his XP due a bug he needs to relog or to die and his XP are resettet to the amount in config file
    • first try for Skilltree function
    A skilltree is much more difficult than I expected. :D
    It took a whole day to create one for my server. (And I think it isn't even perfect...)

    PS: How can I change the Topic title? :/

    Quickfix 0.3.1
    fixed a bug when skilltree was disabled

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

    Snaipe

    Link is dead D:
     
  7. Offline

    Syd

    sry, fixed

    Forgot to change it with the new version ;) (the jar link is a permalink btw.)
     
  8. Offline

    ryguy222

    Nice job! Just what I was looking for, just was hoping it would work with bukkit permissions.
     
  9. Offline

    Syd

    Updated to 0.4

    Version 0.4 (10/9/2011)
    • updated to CraftBukkit #1240
    • fixed NPE in /xp info
    • advanced /xp info output for Skilltrees
    • first try in Bukkit built-in Permission
     
  10. Offline

    subflame11

    i got an error. it said in game internal error and on console said: 161 recipes

    12:12:09 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'xp'
    in plugin ExpSkills v0.4
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:41)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:16
    3)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:3
    53)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:756)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:721)

    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:714)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.NullPointerException
    at com.syd.expskills.funcs.buySkill(funcs.java:428)
    at com.syd.expskills.CommandManager.onCommand(CommandManager.java:235)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:39)
    ... 12 more
    >

    i have ico6 pex with chat and modifyworld manager register1.5 and your plugin.
     
  11. Offline

    Syd

    redownload the .jar

    hopefully fixed it (if not I´ll do so after eating)
     
  12. Offline

    subflame11

    thank you so much syd it works. but i also realize i didnt have magic carpet installed when i used it x_x (the plugin i set it for) but still thank you soooo much your always welcome on the server after we establish it! :)
     
  13. Offline

    alanine

    Hey buddy - this plugin is ridiculously useful. And there's not another functioning one that will handle this task either; to my knowledge of way too long searching.

    However - it seems to be having an issue with iConomy it seems..Or maybe register 1.5 If your not already aware of this, I could provide the error information.

    Thank you very much for your work!
     
  14. Offline

    shanko

    does this still work?​
    if not what plugin can i use for this​
     
  15. Offline

    Kwuality

    I rather not have the experience/skill portion of this plugin - but I am very interested in the permission buying feature.
    Is there a way to ignore/disable the skill portion of this plugin?
    Thanks.
     
  16. Offline

    alanine


    You can select 'money' instead of 'exp' or else use 'both'.

    @shanko Any plugin should work as long as it provides permission nodes - it's up to you to decide how to utilize the ability to sell various permission nodes.

    However - as I wrote yesterday, the plugin spits out an error on launch, related to iconomy or perhaps register.
    Commands such as /xp list and /xp buy <skill> also work correctly - until the actual purchase itself.

    I am forced to use buyabilities, which is ridiculously dumb - it defeats much of the purpose if player's permanently purchased permission nodes just decide to up and disappear, which happens all to frequently with buyabilities. On top of that - I am also forced to use permissions 2.7 to handle it. Absolutely ridiculous, lol. I really hope to hear some good news soon.
     
  17. Offline

    Syd

    Yes, this Plugin is still alive and should work (it does for me) ;)
    A new update should come soon.
    After that I need to update it to the new Config API...

    @alanine: please post errorlog, it would help me to find the error, thanks :)
     
  18. Offline

    Syd

    Updated to 0.5

    Version 0.5 (10/22/2011)
    • fixed a bug in Skilltree implementation
    • fixed bug in /xp list
    • added /xp grant command
    • added /xp revoke command
    • added /xp current <player> for admins
    • added "use_economy" confignode
    • updated to CraftBukkit #1337
    • updated to Register 1.5
    If you occur some errors please tell me.
    The change to the new config API could cause a few of them. ;)
     
  19. Offline

    alanine

    Thank you very much for the update! I will check this out tommorow ; rather late at this time.

    However, maybe you could clear something up - If I am using iConomy 5, do I still require register 1.5?
    I may be mistaken, but I though I had read that register was only neccisary for iConomy 6. Again, likely completely wrong, given what register actually is. :D

    Aswell; with the new config format; Do I need to edit my old test config (pretty massive) and remove the additional spaces, or will it accept/change it?

    Thanks again
     
  20. Offline

    Syd

    I have no extra code for iConomy 5, so I think you need Register for using it, too. ;)
    Register 1.5 should be the newest verion. -> Download

    And you don't need to change you config files. It was just a internal change. The format is still the same.
     
  21. Offline

    shanko

    Hey does this use the ingame Experience? Does one get in game experience from PVP battles too?

    I REALLY need this plugin!! but I use permissions bukkit and so does the rest of my stuff on my server... x.x

    wait PermissionsEX is compatible with permissions bukkit... hows that work?

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

    Syd

    This plugin uses ingame experience (which was added with 1.8).
    But you can also get Exp from PvP, when the opponent has some experience collected.

    A player will only drop the Experience he collected to the next level, so you cant lose a Level. ;)

    About PermissionsBukkit.
    The problem is that i found no real API to tell PermissionBukkit to add a node.
    I added a method which uses the built-in Permissions System which is used when no compatible Plugin is found.

    Also I got no problems with PEX on my Server, maybe it's worth a look^^
     
  23. Offline

    ChupaDrahkir

    I'll definitely be using this once the rent-able skills are added. I want it so that players can pay with economy money or skill points to get limited access to abilities, like permission to use /god for 1 hour or /game mode 1 for 1 hour, etc. Could you make it so that commands are used when the players rent time runs out so that if a player buys /god permission, the player can use /god for one hour and once that's up /ungod is used to disable it, same for creative where /game mode 0 would be used on the player once their time is up.
    The time limit should be real time based on the server's clock too not the game time, so if the player pays for 1 hour flight permission, if that player logs out, the player's time will still tick away. It means players have to make the most out of the time they have and if the server needs a quick restart I know it won't affect purchased abilities. If the server crashes, etc I can easily refund players.
     
  24. Offline

    Syd

    Updated to 0.6

    Version 0.6 (11/6/2011)
    • bPermissions support
    • added group support (PEX/bPerm)
    • added /xp reset <player>
    • more checks against NPE's
    • added XP to next Level display to /xp stats
    • fixed bug in config

    The main change is the group support, which was requested from serveral people.
    It just does work with bPermissions and PEX. Just add groups_need and groups_earn nodes in config if you need them.

    Updated to 0.6.1

    Version 0.6.1 (11/6/2011)
    • quickfix for some NPE's (related to /xp info)

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

    floit

    I keep getting the message: Not enough permissions.

    But i have the expskill.use permission, could the config be explained abit more indepth?
     
  26. Offline

    Syd

    Sure you used expskills.use and you have alle permission nodes in *_need?

    Also a bit more detailed description how to reproduce would help me.

    Also it seems so that there is a bug in Register implementation.
    Can someone confirm that? <-- nvm. forgot to update my config... (doh!)
     
  27. Offline

    floit

    This is my config

    Code:
    version: 0.6.1
    general:
      skillpoint_modifier: 2.0
      currency: Dollar
      use_skilltree: false
      use_economy: true
    skills:
      skill0:
        name: testskill
        description: Just a example
        info: This Skill was created to show Admins how to use this configgile!
        cost_type: money
        skillpoints: 2
        money: 1000
        permissions_need:
        - expskills.use
        permissions_earn:
        - bar.foo
        - bar.bar
        groups_need:
        - member
        categories:
        - example
    I've got no clue how to configure it exactly :(
     
  28. Offline

    Syd

    @floit
    Are you member of the group 'member'?

    (Watch out, I think it's case sensitive, that means you must watch upper and lower case)
     
  29. Offline

    floit

    Yea i am member of the group member :p but ive just tried it with proper capitals and i still get the error.

    I can use all commands btw, but only when i use /xp buy testskill i get the error
     
  30. Offline

    Syd

    @floit
    Error found

    Update is comming soon.

    Thank you for you patience and help^^
     
Thread Status:
Not open for further replies.

Share This Page