Solved Skript mirror MCMMO ranks

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Wynnevir

Well-Known Member
Jul 9, 2017
1,015
62
48
30
Elsewhere
Category: Depression

Suggested name: MCMMO Ranks

Spigot/Skript Version: 1.15

What I want:
I'd really like a script that can evaluate MCMMO's powerlevels and on a command, rank someone up based off them. The addon I used a long time ago is depreciated. And while I understand Skript mirror can do it, I don't have the time to learn java anymore, and was struggling a bit with it. I understand it needs to import classes from mcmmo's api, but without knowing more about java I'm at a loss for what exactly needs to come over and how to go about it.

Ideas for commands:
Code:
#Something to the effect of this
importy bits:
    ;-;

command /rankup [<text>]:
    trigger:
        if arg 1 is not set:
            send "Available ranks: rank1, rank2, rank3"
            stop
        if arg 1 is "rank1":
            if player's power level is > 999:
                execute console command "/lp user %player% promote mcmmo"
        if arg 1 is "rank2":
            yada yada blah blah etc etc and so on


Ideas for permissions: sk.ImSoTired

When I'd like it by: Anytime would be great, it'd be much appreciated
 
Code:
import:
    com.gmail.nossr50.api.ExperienceAPI

expression [mcmmo] power level of %player%:
     get:
        if expression-1 is online:
            return ExperienceAPI.getPowerLevel(expression-1)
        else:
            return ExperienceAPI.getPowerLevelOffline(uuid of expression-1)
 
Code:
import:
    com.gmail.nossr50.api.ExperienceAPI

expression [mcmmo] power level of %player%:
     get:
        if expression-1 is online:
            return ExperienceAPI.getPowerLevel(expression-1)
        else:
            return ExperienceAPI.getPowerLevelOffline(uuid of expression-1)
Thank you java angel <3 I didn't realize you could make it an expression too that is really awesome
jJzMDP0.gif
 
Thank you java angel <3 I didn't realize you could make it an expression too that is really awesome
jJzMDP0.gif

Np!

Don't mind sending a message for more expressions/effects/conditions/events.

U can send me a message here:

- In this thread
- Dm me on skunity
- Make a new thread don't forget to tag me.
- Discord _#3393 (Bc of the weird letters u might need to search 1999 on the skunity discord propably will find me that way too.)