• 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!

Adrihun

Member
Feb 1, 2017
368
6
0
Category: Ranks

Suggested name: UpdaterRank

What I want:
I want a simple script. If you type in /rank add (name of the player) (name of the rank) it will give the player the rank that you typed in (OWNER, BUILDER etc) and console will then execute command "pex user NAME group set OWNER" then a few happy villager particles will appear around the player who executed this command, and the player that got the rank. Also they both get a really cool sound effect (ORB PICKUP AT VOLUME 1.6)
the player that got the rank will get a message in the middle of the screen saying "You are promoted" the player who gave the rank will get "Success" or something like that (in green - &a) If you want to remove the rank from the player just write /rank del, this will reset their rank and put them as PLAYER.

NOTE: I DON'T WANT A PEX REMAKE, I WANT THIS TO BE COMPATIBLE WITH PEX, SO INSTEAD OF USING /PEX USER ...... YOU CAN JUST DO /RANK ADD, AND THERE WILL BE COOL EFFECTS LIKE SOUNDS, PARTICLES.


Ideas for commands:
/rank add (NAME) (RANK) Gives rank to the player

/rank del (NAME) (RANK) This will reset the specified player to PLAYER, if you type this in, console will execute command "pex user NAME group set default"

Ideas for permissions:
- rank.add
so you can do /rank add
- rank.del so you can do /rank del

When I'd like it by: Asap please. If you are going to make a script like this, tell me in the comments so i know.
[doublepost=1486816708,1486779736][/doublepost]bump
 

Attachments

  • 985af58ae7b259a6c4babee014cc0ccd0ca55746.png
    985af58ae7b259a6c4babee014cc0ccd0ca55746.png
    156.9 KB · Views: 426
Here you go, didn't test this but it should be working (at least there is no reasong for it to not to).

code_language.skript:
command /rank [<text>] [<player>] [<text>]:
    trigger:
        if player has permission "rank.help":
            if arg 1 is not set:
                message "&7/Rank add &7[player] [rank] &8- Set player's rank"
                message "&7/Rank del &7[player] &8- Delete player's rank"
                stop
            if arg 1 is "add":
                if player has permission "rank.add":
                    make player execute command "/pex user %player% add %arg-3%"
                    send player title "&6You've been promoted to" with subtitle "&f&l&n%arg-3%&r Congrats :)"
                    loop 3 times:
                        wait 4 tick
                        spawn a firework at player
            if arg 1 is "del" or "delete" or "reset":
                if player has permission "rank.del":
                    make player execute command "/pex user %player% group set default"
                    send player title "&cYou've been demoted!" with subtitle "Sorry :("
 
code_language.skript:
command /rank [<text>] [<player>] [<text>]:
    trigger:
        if player has permission "rank.help":
            if arg 1 is not set:
                message "&7/Rank add &7[player] [rank] &8- Set player's rank"
                message "&7/Rank del &7[player] &8- Delete player's rank"
                stop
            if arg 1 is "add":
                if player has permission "rank.add":
                    make player execute command "/pex user %arg-2% add %arg-3%"
                    send arg-2 title "&6You've been promoted to" with subtitle "&f&l&n%arg-3%&r Congrats :)"
                    loop 3 times:
                        wait 4 tick
                        spawn a firework at arg-2
            if arg 1 is "del" or "delete" or "reset":
                if player has permission "rank.del":
                    make player execute command "/pex user %arg-2% group set default"
                    send arg-2 title "&cYou've been demoted!" with subtitle "Sorry :("

If you just read the code, it's a really simple fix :|
 
code_language.skript:
command /rank [<text>] [<player>] [<text>]:
    trigger:
        if player has permission "rank.help":
            if arg 1 is not set:
                message "&7/Rank add &7[player] [rank] &8- Set player's rank"
                message "&7/Rank del &7[player] &8- Delete player's rank"
                stop
            if arg 1 is "add":
                if player has permission "rank.add":
                    make player execute command "/pex user %arg-2% add %arg-3%"
                    send arg-2 title "&6You've been promoted to" with subtitle "&f&l&n%arg-3%&r Congrats :)"
                    loop 3 times:
                        wait 4 tick
                        spawn a firework at arg-2
            if arg 1 is "del" or "delete" or "reset":
                if player has permission "rank.del":
                    make player execute command "/pex user %arg-2% group set default"
                    send arg-2 title "&cYou've been demoted!" with subtitle "Sorry :("

thx, is there a way to set particles instead of fireworks also if you only do /rank add , it would say wrong usage. same with /rank add Owner, /rank add Name
 
code_language.skript:
command /rank [<text>] [<player>] [<text>]:
    trigger:
        if player has permission "rank.help":
            if arg 1 is not set:
                message "&7/Rank add &7[player] [rank] &8- Set player's rank"
                message "&7/Rank del &7[player] &8- Delete player's rank"
                stop
            if arg 1 is "add":
                if player has permission "rank.add":
                    make player execute command "/pex user %arg-2% add %arg-3%"
                    send arg-2 title "&6You've been promoted to" with subtitle "&f&l&n%arg-3%&r Congrats :)"
                    loop 3 times:
                        wait 4 tick
                        spawn a firework at arg-2
            if arg 1 is "del" or "delete" or "reset":
                if player has permission "rank.del":
                    make player execute command "/pex user %arg-2% group set default"
                    send arg-2 title "&cYou've been demoted!" with subtitle "Sorry :("

If you just read the code, it's a really simple fix :|

Yeah thanks for taking care of this, didn't see it last night.

thx, is there a way to set particles instead of fireworks also if you only do /rank add , it would say wrong usage. same with /rank add Owner, /rank add Name

Dude, you asked for a simple script.. and you got it, i can add you the particle thing but not gonna mess around with checking if you didn't put a name or not in the command.

code_language.skript:
show 50 "heart" particles at location of player for player offset by 0.4, 0.7, 0.4

Just add this line instead of the firework one, and make sure you have skRayFall addon -> http://skunity.com/SkRayFall
 
Last edited by a moderator:
Yeah thanks for taking care of this, didn't see it last night.



Dude, you asked for a simple script.. and you got it, i can add you the particle thing but not gonna mess around with checking if you didn't put a name or not in the command.

code_language.skript:
show 50 "heart" particles at location of player for player offset by 0.4, 0.7, 0.4

Just add this line instead of the firework one, and make sure you have skRayFall addon -> http://skunity.com/SkRayFall
Thanks.