Autorank

Autorank

380k Downloads

I can't find any reason why this wouldnt work, can anyone review this?

Opened this issue ยท 13 comments

commented

My friend and I have been trying to fix these ranks for hours, but for some reason it gets "stuck" on GNoviceIV, promotes up and demotes down despite the fact that theres no demotion configs, and thinks im in two groups at once despite pex saying that I'm only in one group. We've reloaded everything multiple times to make sure theres no wonky settings that might have gotten changed along the way, played around with wording and tried reordering everything or using different settings.
Is there any part of this thats typed so horribly wrong that would cause all these errors to happen? I have no clue where to begin to start fixing this. Anyone else experienced similar errors?

Its meant to promote you through GNovice I-V depending on mcmmo power level, or move you to the DGNovice I-V group if you've been on for 12 hours.

GNovice:
    requirements:
        time:
            value: 12h
            results:
                rank change: GNovice; DGNovice
                message: 'Congratulations, you have ranked up to &2DarkGreen &fNovice!'
                command: 'say &p has been playing for 12 hours and is now a DarkGreen Novice!; pay &p 1000; tell &p You have earned 1000 Credits'
        mcmmo power level:
            value: 100
            results:
                rank change: GNovice; GNoviceII
                command: 'say &p has ranked up to Novice II!; eco give &p 250; tell &p You have earned 250 Credits'
                message: 'Congratulations, you have ranked up to Novice II!'
    results:
        rank change: GNovice; GNoviceII
GNoviceII:
    requirements:
        time:
            value: 12h
            results:
                rank change: GNoviceII; DGNoviceII
                message: 'Congratulations, you have ranked up to &2DarkGreen &fNovice II!'
                command: 'say &p has been playing for 12 hours and is now a DarkGreen Novice II!; pay &p 1000; tell &p You have earned 1000 Credits'
        mcmmo power level:
            value: 200
            results:
                rank change: GNoviceII; GNoviceIII
                command: 'say &p has ranked up to Novice III!; eco give &p 250; tell &p You have earned 250 Credits'
                message: 'Congratulations, you have ranked up to Novice III!'
    results:
        rank change: GNoviceII; GNoviceIII
GNoviceIII:
    requirements:
        time:
            value: 12h
            results:
                rank change: GNoviceII; DGNoviceII
                message: 'Congratulations, you have ranked up to &2DarkGreen &fNovice III!'
                command: 'say &p has been playing for 12 hours and is now a DarkGreen Novice III!; pay &p 1000; tell &p You have earned 1000 Credits'
        mcmmo power level:
            value: 300
            results:
                rank change: GNoviceIII; GNoviceIV
                command: 'say &p has ranked up to Novice IV!; eco give &p 250; tell &p You have earned 250 Credits'
                message: 'Congratulations, you have ranked up to Novice IV!'
    results:
        rank change: GNoviceIII; GNoviceIV
GNoviceIV:
    requirements:
        time:
            value: 12h
            results:
                rank change: GNoviceIV; DGNoviceIV
                message: 'Congratulations, you have ranked up to &2DarkGreen &fNovice III!'
                command: 'say &p has been playing for 12 hours and is now a DarkGreen Novice IV!; pay &p 1000; tell &p You have earned 1000 Credits'
        mcmmo power level:
            value: 400
            results:
                rank change: GNoviceIV; GNoviceV
                command: 'say &p has ranked up to Novice V!; eco give &p 250; tell &p You have earned 250 Credits'
                message: 'Congratulations, you have ranked up to Novice V!'
    results:
        rank change: GNoviceIV; GNoviceV
GNoviceV:
    requirements:
        time:
            value: 12h
            results:
                rank change: GNoviceV; DGNoviceV
                message: 'Congratulations, you have ranked up to &2DarkGreen &fNovice V!'
                command: 'say &p has been playing for 12 hours and is now a DarkGreen Novice V!; pay &p 1000; tell &p You have earned 1000 Credits'
        mcmmo power level:
            value: 500
            results:
                rank change: GNoviceV; GCommoner
                command: 'say &p has ranked up to Commoner!; eco give &p 1000; tell &p You have earned 1000 Credits'
                message: 'Congratulations, you have ranked up to Commoner!'
    results:
        rank change: GNoviceV; GCommoner
commented

One thing I noticed was you have to many results lines, there should be on results line that lines up with requirements like your last one, it if all the requirements are meet then rank up is how it works. Below is how I would set it up:

http://pastebin.com/6W0ZKA0y

commented

we are attempting to use the superadvancedconfig yml, which has more than one results line, one for each requirement and one at the end.

the example we are using: https://github.com/Armarr/Autorank-2/blob/master/SuperAdvancedConfig.yml

specifically we are referencing the "time" and "exp" requirements for the "member" level of the example... where time is required but exp is optional. we would want our "mcmmo" to be required and the "time" to be optional.

we were playing around with it more last night...still running into the same issues. heres our updated config:
http://pastebin.com/mpC5fzBN

seems like our main problem at the moment is that it puts the user in two groups at once

commented

I don't see any errors yet, but there could be logical errors. I'll use this as a test setup at my test server and see if I can find the problem.

commented

Could try build #356, I've changed some code so that it should work for you now.

commented

Thank you so much for spending the time to write a workaround. We no longer have trouble with it putting the player in two ranks at once.
We wrote up a new config, here's what we have:
http://pastebin.com/8jkh6cme
With this, we are still running into a few issues

If both requirements are optional and one of the requirement is met, it skips directly to the end results and completely ignores the results located under the individual requirements. Because of this we had to set it up so that the player will have to manually check for ontime in order to rank up. However, if you try to rank up ontime again before leveling up mcmmo, it says: "You have already completed this requirement." We would like the player to be able to level up completely with ontime if they wish.

We need the plugin to recognize that we would like either requirement 1 OR requirement 2 fulfilled in order to level up. If you could help by showing us a configuration we are missing or by somehow making another workaround we would be very grateful.

commented

Okay! So..
After much testing and cobbling together we managed this config:
http://pastebin.com/TG0q2tPx
This allows the player to advance on ontime only, and solves the "You have already completed this requirement." issue. It runs /ar complete 1 when the player advances with mcmmo, and we've tied in an alias so that every time the player types /home it'll run /ar complete 1. Its still not fully automatic, but its the closest we've come to the config we need :)
Any additional help or ideas you can provide will still be much appreciated!

commented

I'm not sure if I understand your vision. How do you want to setup your ranking ladder?
An important note: every rank should have at least one REQUIRED (that is, a non-optional) requirement.

commented

We wanted to have two requirements in order to level up. The two requirements would operate independently of one another.

The first requirement, mcmmo, would change the name of the players prefix.
For example from Novice, to NoviceII, NoviceIII, NoviceIV etc.

The second requirement, ontime, would change the color of the players prefix.
For example from Green to DarkGreen to Gray and so on.

An example of a normal leveling scenario:
A player joins the server and begins leveling their mcmmo. They are now a Green NoviceIV. Before they earn enough mcmmo points to level up to Green NoviceV however, they level up to DarkGreen NoviceIV because their ontime has reached 12 hours.
Another leveling scenario:
If a player stands around the whole time and chats or does parkour or whatever without leveling up mcmmo, they could still level up their ontime. They could go from Green Novice to DarkGreen Novice to Grey Novice etc.

Its a bit complicated, but we've manage to put it together and make it work with the config linked above :D

commented

I would do something like this: http://pastebin.com/tpU75NW0
The groups are separated by group colours. A player starts out in Green. If he stays on for long enough, he will be ranked to dark green, then to grey, black, etc..

commented

This is actually one of the first configs we tried. The problem with this is that the plugin skips to the last listed mcmmo requirement. It doesnt change your prefix if your mcmmo level is 40

commented

What do you mean? If you have power level 10, will it change your prefix?

commented

Nope. For some reason it skips straight to the last mcmmo requirement. The only way it will change your prefix is if you have 90 power level

commented

That definitely sounds like a coding error. I'll take a look at it.