[INACTIVE][ADMIN/RPG] RCSkills v1.2 - Leveling based on Permission groups [860-953]

Discussion in 'Inactive/Unsupported Plugins' started by silthus, Jun 6, 2011.

  1. Offline

    silthus

    RCSkills v1.2




    Legacy: v1.0 v1.1

    If you updated you will have to reconfigure your config.yml. A backup of the old one is made automatically and stored as config.yml_old.


    This plugin was originally created for my own server to be a framework for a RPG Levelsystem which doesn't rely on the plugin alone but rather uses the groups from Permissions to give out special ranks and skills.
    It uses Persistance to store information about the player, like what level he is at and how many skills he already bought. Since Persistance can be either MySQL or SQlite its easy for websites to get to data and build nice user profiles.

    Features:
    • Uses Permissions Groups and their Permissions for a Level System
    • Build in EXP System via MySQL or SQLite Database
    • Formula to calculate how many EXP are needed for the next Levelup
    • Exchange Items(Configurable) for EXP (e.g. Sponges)
    • Integrated Skillsystem which is based on Permissions
    • You can define groups that should not levelup but can buy all skills
    • You can buy new Skills for Coins and Skillpoints, which are dished out at configured Levelups
    • Daily EXP Bonus on the first login: Configurable for VIPs and Normal Players
    • Easy to use and a lot of Admin commands to make your life easier (e.g.: You can set Skillpoints, Exp and Level induvidually)
    • Highly configurable (even a own language file)
    • Supports any Major Economy Plugin (iConomy5, EssentialsEco, BOSEconomy)
    Configuration & Installation:

    Installation (open)

    1. Install and Setup Permissions & iConomy
    2. Download the RCSkills.jar and put it in your plugins folder
    3. Edit the bukkit.yml in your minecraft server root folder only if you want to use MySQL instead of SQLite
    4. Restart your server
    5. You should now find three file in the /plugins/RCSkills/ folder:
    6. Now InGame type /rcs reload and all your config settings will be loaded.
    7. Now the only thing left todo is to create some groups in permissions and give your users the right permission nodes.


    config.yml (open)

    Code:
    # Configversion - DO NOT TOUCH!
    configversion: 3
    ######################################################
    # Whats the name of your Server?
    title: RaidCraft
    # Set to 0 if you dont want to convert any items
    Item ID: 19
    # The name of the item (only relevant for the chat)
    Item Name: Sponge
    # What is the max Level a player can get?
    maxLevel: 25
    # In what intervall shall we grant skillponts?
    Skillpoints Interval: 5
    # How many skillpoints shall we give them?
    Skillpoints: 1
    # Configure the formula to calculate EXP for the next level here
    # Use "lvl" variable as the Level you want the xp to be calculated for
    # e.g.: expCalculation: '((((lvl) * (lvl)) - ((lvl) * 5) + 20))'
    expCalculation: '((((lvl) * (lvl)) - ((lvl) * 5) + 20))'
    # Config for the daily login bonus.
    DailyExp:
        # Set to true if you want to give players a daily exp bonus on their first login.
        giveDailyExp: false
        # How many EXP should players with lvlup.exp.normal get?
        normalExp: 20
        # How many EXP should players with lvlup.exp.vip get?
        vipExp: 40
    # Configure the groups that are not supposed to level here
    # only needed for groups that have the level permissions
    # Format: groupname: negativeLevel
    dontLevel:
        Admins: -20
        Mods: -10

    bukkit.yml (open)

    SQLite:
    Code:
    settings:
        update-folder: update
    database:
        username: bukkit
        isolation: SERIALIZABLE
        driver: org.sqlite.JDBC
        password: walrus
        url: jdbc:sqlite:{DIR}{NAME}.db
    MySQL:
    Code:
    settings:
        update-folder: update
    database:
        username: yourdbuser
        isolation: SERIALIZABLE
        driver: com.mysql.jdbc.Driver
        password: yourdbpw
        url: jdbc:mysql://127.0.0.1:3306/database

    skills.yml (open)

    Code:
    skills:
        # The name of the skill for the database. No spaces!
        SkillName:
            # A short name for the skill. Can contain spaces.
            name: Kaboom
            # A description of the skill.
            description: Makes a loud kaboooooom!
            # In what Permissions group is the skill defined?
            group: kaboom
            # Requirements for the skill
            requires:
                # At what level can a player get this skill?
                level: 5
                # How many skillpoints are needed for this skill?
                skillpoints: 1
                # How much of whatever your currency is costs this skill?
                costs: 1000

    Permissions Setup - groups.yml (open)


    Code:
        Level0:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: false
            inheritance:
            permissions:
                - 'rcs.player.*'
        Level1:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level0
            permissions:
        Level2:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level1
            permissions:
                - 'bar.foo'
        Level3:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level2
            permissions:
                - 'bar.foo'
        Level4:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level3
            permissions:
                - 'bar.foo'
        Level5:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level4
            permissions:
                - 'bar.foo'
    This is an example of a simple group which will be used as a skill.

    Code:
        kaboom:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*'

    Commands (open)


    Permission Nodes (open)



    ToDo:
    • Make groups entirely configurable in config
    • Add customizable XP Calculation formula
    • Add some more config options for the skills
    • Fix bugs (please tell me if you find any)
    Thanks to:

    • Tagette for his great Template which I used for the framework of this plugin
    • Nijikokun for his great Register Libary
    • Keiler for joining the DEV Team
    • Everybody who awnsered my questions in the Dev Forum =)
    Changelog:

    Version 1.2
    • Formula for XP Calculation to the next level is now configurable in the config.yml
    • RCSkills now supports all major Economies
    • Fixed a lot of bugs
    • Tested working with RB#953
    Changelog (open)

    Version 1.1
    • Added option in config.yml to define groups that have the permission to level but shouldn't (old config will be renamed to config.yml_old)
    • If you are in one of these defined groups you can see and buy all skills but can't level
    • Added alias for /rcs player <playername> --> /rcs stats <playername>
    • Added Op support: (Ops now have access to all admin commands)
    • Fixed small bug in lang.yml (you need to redownload lang_german.yml)
    • Fixed pagination and now checks for correct page and number input
    • Fixed some other small bugs
    • Tested to work with RB#860
    Version 1.0

    • Initial Release of RCSkills
     
    kahlilnc likes this.
  2. Offline

    killacalli

    Ahh download links are broken for me D:

    "This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>D7915027E749CADC</RequestId><HostId>pesMC4UZ1mjzWNrElQf2asxwkiWtWp2MhdSABQTdkruGRqMmlVZwMS8hEHifhJiN</HostId></Error>"

    EDIT: By the way, will this work permissionsEx?
     
  3. Offline

    Semirotta

    why perms 3.x ?
    cant work at 2.7.4?
    i dont understand how i get 3.x work , when i get it my permissions fuck up and stop working :/
     
  4. Offline

    kamakaziebanzai

    damnit! i need this i started making something very similar when i found this but ow its down..its not just me either...
     
  5. Offline

    silthus

    Mmmh there seems to be a problem with Github.
    I will fix this when I get home in about 4 hours.
     
  6. Offline

    1hacker

    Request for PermissionsEx support, please ;-)
     
  7. Offline

    silthus

    I uploaded the file again and it should work now.

    Sorry but I wont go and write support for an other Permissions Plugin when the native Permissions Support of Bukkit is coming out any day now.
     
  8. Offline

    killacalli

    I love this plugin and how it incorporates the economy money like exp. However i'm a little confused on setting up the configs.

    ok finally set up most of the configs(confusing switching from pex to permissions3x) :(
    I level up my test character, get all the messages yadda yadda... wait whats this i'm still level0 but im in group level1. help pl

    do all the defaults have to = true?

    I got this error:
    01:59:45 [SEVERE] Could not pass event PLAYER_JOIN to RCSkills
    java.lang.NullPointerException
    at com.silthus.rcskills.RCPermissions.getParents(RCPermissions.java:176)

    bleh i tried so many different things to get it to work:(...but if i issue /rcs lvl player test, their level sets to 1 and everything works perfectly afterwards. do i remove group "Level0"?

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

    kahlilnc

    I dont no how to explain this except by example so here it is.
    I want to have 4 main groups and only want each of the groups to have separate groups to level up to next.
    Orc-Human-Elf-Chaos
    Orc2-Human2-Elf2-Chaos2
    etc
    like that but only orc can level to orc and human can only level to human and so on. Is that possible?
     
  10. Offline

    1hacker

    That's a shame, because PermissionsEX is much better than Permissions 3 and I have no intention to switch over.
    I don't think the native permission support is coming out any day soon, but I may be wrong about that :p
     
  11. Offline

    silthus

    Can you post a snapshot of your users.yml with the testuser and the groups.yml with groups Level0-Level3 pls?

    At the moment that is not possible but will be available in the future.
     
    kahlilnc likes this.
  12. Offline

    killacalli

    i tried to simplify my permissions group down alot since that error but none the less i still get it, anyways here it is:
    groups:

    default:
    default: false
    inheritance:
    permissions:

    Level0:
    default: true
    info:
    prefix: '&0(&fLv0&0)&7'
    inheritance:
    permissions:
    - globalshop.trade.*
    - commandbook.kit.kits.starter
    - commandbook.rules
    - modifyworld.chat
    - rcs.player.*

    Level1:
    default: true
    info:
    prefix: '&0(&aLv1&0)&7 '
    permissions:
    inheritance:
    - Level0

    Level2:
    default: true
    info:
    prefix: '&0(&aLv2&0)&7 '
    inheritance:
    - Level1
    permissions:

    Sprint:
    default: false
    permissions:
    - sprint.allow
    inheritance:

    Admins:
    permissions:
    - '*'
    inheritance:

    Error:
    "22:23:32 [INFO] Done (0.292s)! For help, type "help" or "?"
    22:23:46 [INFO] test12 [/5.34.102.1:49452] logged in with entity id 135 at ([Kil
    laWorld] 34.5, 84.62000000476837, -45.5)
    22:23:46 [SEVERE] Could not pass event PLAYER_JOIN to RCSkills
    java.lang.NullPointerException
    at com.silthus.rcskills.RCPermissions.getParents(RCPermissions.java:176)

    at com.silthus.rcskills.RCPlayer.setCanLevel(RCPlayer.java:237)
    at com.silthus.rcskills.RCPlayer.<init>(RCPlayer.java:55)
    at com.silthus.rcskills.listeners.RCPlayerListener.onPlayerJoin(RCPlayer
    Listener.java:26)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:244)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:321)
    at net.minecraft.server.ServerConfigurationManager.c(ServerConfiguration
    Manager.java:124)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:74)
    at net.minecraft.server.Packet1Login.a(SourceFile:43)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:40)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    22:23:46 [INFO] Creating user test12
    22:23:46 [INFO] [LockIP] Registered test12 to ip 5.34.102.1
    >stop
    22:23:57 [INFO] Stopping the server.."

    I believe I'm using permissions 3.1.6. Really want to get this plugin running, it's exactly what i was looking for. The weird thing is, if I use /rcs lvl player test12, he will level up and everything runs perfectly afterwards

    perhaps i will try permissions 3.1.4. nope same error. Also tried removing all my plugins except rcskills and permissions and i get the same error

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

    silthus


    You only can have ONE group be the default group. And in your config Level0 through Level3 are all default groups.
    Try changing
    Code:
    default: true to default:false
    in all groups but the Level0 group.
     
  14. Offline

    killacalli

    i'm pretty sure i tried that and it didnt matter but, ill try it again.

    Edit: all groups except level0 changed to false and i still got the error

    04:50:08 [SEVERE] Could not pass event PLAYER_JOIN to RCSkills
    java.lang.NullPointerException
    at com.silthus.rcskills.RCPermissions.getParents(RCPermissions.java:176)

    at com.silthus.rcskills.RCPlayer.setCanLevel(RCPlayer.java:237)
    at com.silthus.rcskills.RCPlayer.<init>(RCPlayer.java:55)
    at com.silthus.rcskills.listeners.RCPlayerListener.onPlayerJoin(RCPlayer
    Listener.java:26)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:244)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:321)
    at net.minecraft.server.ServerConfigurationManager.c(ServerConfiguration
    Manager.java:124)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:74)
    at net.minecraft.server.Packet1Login.a(SourceFile:43)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:40)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  15. Offline

    silthus

    Can u post me your users.yml pls because I think you have two Level* groups on one user.
     
  16. Offline

    killacalli

    users:
    World:
    info:
    prefix: '&0(&4Admin&0)&7 '
    groups:
    - Admins
    permissions:
    intension92:
    groups:
    - Admins
    permissions:
    killacalli89:
    groups:
    - Admins
    permissions:
    test:
    permissions:
    groups:
    - Level0
    test1:
    permissions:
    groups:
    - Level0
    test2:
    permissions:
    groups:
    - Level2
    test0:
    permissions:
    groups:
    - Level1
    test11:
    permissions:
    groups:
    - Level0
    test12:
    permissions:
    groups:
    - Level0
    test14:
    permissions:
    groups:
    - Level0
    test15:
    permissions:
    groups:
    - Level0

    is the "L" in the Level* group name supposed to be lower case or it doesnt matter?

    wait a second, i just made a new player and tried to join but it didnt get put into users.yml... hm maybe ill try deleting all the users and reloading everything... ahh it isn't adding the new players to the default group now.

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

    silthus

    Users in the default group never get put into the users.yml.
    What version of Permissions are you using?
     
  18. Offline

    killacalli

    permssions 3.1.6

    Weird i just got this error using: /rcs lvl player test

    06:00:44 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'rcs'
    in plugin RCSkills v1.2
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12
    9)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2
    98)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:711)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:676)

    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
    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:84)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
    at com.silthus.rcskills.RCPermissions.getParents(RCPermissions.java:176)

    at com.silthus.rcskills.RCPlayer.setCanLevel(RCPlayer.java:237)
    at com.silthus.rcskills.RCPlayer.<init>(RCPlayer.java:55)
    at com.silthus.rcskills.commands.CMDrcs.onCommand(CMDrcs.java:487)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more

    I used it just a second ago and it worked. now it doesn't
    i log in a different user name and now it works when i use "/rcs lvl player" >.>

    So when i use the Op and use /rcs lvl player command it works, but the /rcs lvl command won't let the player level up

    i hope you can solve these errors. Tbh I think I prefer this plugin over the new heros one coming out

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

    silthus

  20. Offline

    killacalli

    alright, I'll test it out

    still got the same error and the same thing happens when i try to level up. also when the server starts up it says rcskills 1.2 still

    when i level up, it moves me to the correct group but the plugin says im still level0

    17:05:34 [INFO] test5 [/5.34.102.1:49685] logged in with entity id 212 at ([Kill
    aWorld] 25.5, 84.62000000476837, -33.5)
    17:05:34 [SEVERE] Could not pass event PLAYER_JOIN to RCSkills
    java.lang.NullPointerException
    at com.silthus.rcskills.RCPermissions.getParents(RCPermissions.java:176)

    at com.silthus.rcskills.RCPlayer.setCanLevel(RCPlayer.java:255)
    at com.silthus.rcskills.RCPlayer.<init>(RCPlayer.java:55)
    at com.silthus.rcskills.listeners.RCPlayerListener.onPlayerJoin(RCPlayer
    Listener.java:26)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:244)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:321)
    at net.minecraft.server.ServerConfigurationManager.c(ServerConfiguration
    Manager.java:124)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:74)
    at net.minecraft.server.Packet1Login.a(SourceFile:43)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:40)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    17:05:35 [INFO] Creating user test5

    oh weird i just tried something... and it sort of seemed to work. So if i give test player enough sponges to level up to level 2 it works but if i only give him enough sponges for level 1 it resets back to zero

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

    Codex Arcanum

    Random feature request: The ability to configure amounts of EXP for various tasks (killing monsters, breaking blocks, etc.). That way once the path system is functioning it can be a proper RPG class system.
     
  22. Offline

    Fuzetsu

    i am not getting the plugin.jar file i do just get a bunch of useless files :C
     
  23. Offline

    silthus

    Dont unzip it ^^
     
  24. Offline

    Fuzetsu

    hmm. makes sense xD
     
  25. Offline

    charleeesh

    Same problem here. Log says that player level up to Level 1, put him in right permission group but after /rcs command it show that he is still Level0. And this happen all over again. Couldnt move from Level0.

    Other thing I notice that Sponges are took away from player after reconnect automaticly. So if he have sponges in inventory after relog they are automaticly used for leveling
     
  26. Offline

    olimoli123

    Still in development?
     
  27. Offline

    silthus

    Yes but I am still on vacation until the 27. august and not Availablr
     
  28. Offline

    Tauryuu

    Please update to Bukkit 1060 and PermissionsBukkit. :)
     

Share This Page