Autorank

Autorank

380k Downloads

Autorank's ability to support automatic faction powerboost's

player0ne opened this issue ยท 10 comments

commented

Hello Armarr (or whoever may reply to this thread),

I am a head admin on a Tekkit Classic server that is considerably well known throughout the tekkit community. We have a multiple worlds (faction grief/raid world, towny anti-pvp/anti-grief world, and skyblock anti-grief/anti-pvp world) server. We would very much enjoy using autorank as opposed to using our current "Pay to Rank" system which seems to frustrate and confuse players and make them eventually lose interest in our product. We have fully configured the plugin, and everything works well with our current setup using pex + autorank. We have 12 in-game ranks that are availible in a tiered system, and each of those ranks contain different item unlocks and abilities. One of the perks is a progressive faction powerboost (for the ability to claim more land chunks), and this has proved to be an unsupported or unknown to us ability for autorank to control. Is there any suggestion as to a specific config line or permission node that would help us with the problem we are incurring?

The powerboost system goes as follows:

Rank 1: 10 total faction power
Rank 2: 15 total faction power
Rank 3: 20 total faction power
etc...

We would greatly appreciate your help, and regardless of the outcome we still support autorank over any other plugin of the same criteria!

commented

Hello player0ne,

I will take a look at the faction API to see if it enables me to get the total faction power. If I can hook into it, I'll add it for you.

NOTE: Are you using FactionsPlus or just the regular Factions plugin?

commented

Ah, thank you.

commented

@Staartvin
Since I'v been working with the factions API lately:
http://www.massivecraft.com/factions-developer
something like this should work

        UPlayer uplayer = UPlayer.get(player);
        uplayer.setPowerBoost(powerBoost);
commented

Hey staartvin, I am using FactionsPlus, and we are using the most recently compatible version of autorank that is supported for tekkit classic (I believe its 1.25). I will test out what you sent armarr and get back to you guys asap. Thanks for the help!

commented

@player0ne
What I posted isn't going to help you :P it's java code, I was trying to point Staartvin in the right direction
I hope the api for FactionsPlus works the same way though, I'v only worked with regular Factions.

commented

I have a friend who knows java and decompiled it, but he said he doesnt know what to do now. So I'll just wait and see if you guys can come up with a solution!

commented

Yeah, our code is quite complicated. I still get confused sometimes even though I have been working at this for a couple of months. ;)

commented

No need to decompile it, the source code is right here on github.
And your friend wouldn't even need to edit the code to add this.
The reason why the code is so "complicated" (I'd rather say flexible :P) is that it allows something like this from any external plugin

Autorank a = (Autorank) Bukkit.getPluginManager().getPlugin("Autorank");
a.getPlayerChecker().getBuilder().getRequirementBuilder().registerRequirement("factionsPower", FactionsPowerRequirement.class);

then you make the FactionsPowerRequirement class which extends me.armar.plugins.autorank.playerchecker.result.Result.
You can use https://github.com/Armarr/Autorank-2/blob/master/src/me/armar/plugins/autorank/playerchecker/result/MessageResult.java as a simple example of how the results are coded.
We should probably put this stuff on the wiki, works with requirements too btw, you just use getRequirementBuilder() instead.

commented

I was working on this, but I'm not very familiar with the Factions plugin. What would you like Autorank to check? I can check the power of the faction of a player, but is that what you want?

commented

Added faction power requirement in Autorank v2.7 Beta.