Jump to content
  • 0

A Few Questions..


Ezekia

Question

First Question:

On someone's skript MinehutRanks (can't remember who sorry) has no permission. Basically, if you have a rank, you can't get things like fly and stuff. I'm only using this skript since most rank plugins don't work on my server. So, how could I add permissions for each rank?

Second Question:

How could I do a infinite loop in skript? Because, again, instead of using a plugin I decided to code it. I'm doing a info thing where it tells you about the server every 2 minutes. Currently, it only shows it when you do /infoall. Here is the code:

command /infoall:
  permission: op
  trigger:
    broadcast " "
    broadcast "&eFrollix &f>> &6Season 1 &f* &6Invite your friends!"
    broadcast " "

Do I just use 'every 2 minutes' or something?

By reading this you are a confirmed nerd

IMG_1036.PNG

lolololol.PNG

lmao.PNG

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hey there, can you send over the skript regarding your first question, I’m having a bit of trouble understanding exactly what you mean. As for your second question, yes, every 2 minutes: would work. You could do something like this 

every 2 minutes:

  broadcast " "

  broadcast "Message"

  broadcast " "

  • Thanks 1
Link to comment
Share on other sites

  • 0

Here is the Skript (I changed rank names and stuff)

Variables:
    {playerrank.%player%}  = "default"

command /rank [<offlineplayer>] [<text>]:
    trigger:
        if player is op:
            if arg-1 is set:
                if arg-2 is set:
                    if arg-1 is "default":
                        set {playerrank.%arg-1%} to "default"
                        send "&3You have set &b%player%&b's &3rank to &bDefault"
                        make console execute the command "/sudo %arg-1% tablist"
                    if arg-2 is "vip":
                        send "&3You have set &b%player%&b's &3rank to &bVIP"
                        set {playerrank.%arg-1%} to "vip"
                        make console execute the command "/sudo %arg-1% tablist"
                    if arg-2 is "pro":
                        send "&3You have set &b%player%&b's &3rank to &bPRO"
                        set {playerrank.%arg-1%} to "pro"
                        make console execute the command "/sudo %arg-1% tablist"
                    if arg-2 is "legend":
                        send "&3You have set &b%player%&b's &3rank to &bLEGEND"
                        set {playerrank.%arg-1%} to "legend"
                        make console execute the command "/sudo %arg-1% tablist"
                    if arg-2 is "patron":
                        send "&3You have set &b%player%&b's &3rank to &bPATRON"
                        set {playerrank.%arg-1%} to "patron"
                        make console execute the command "/sudo %arg-1% tablist"
                    if arg-2 is "jrmod":
                        send "&3You have set &b%player%&b's &3rank to &bJR.MOD"
                        set {playerrank.%arg-1%} to "jrmod"
                        make console execute the command "/sudo %arg-1% tablist"
                    if arg-2 is "mod":
                        send "&3You have set &b%player%&b's &3rank to &bMOD"
                        set {playerrank.%arg-1%} to "jrmod"
                        make console execute the command "/sudo %arg-1% tablist"
                    if arg-2 is "srmod":
                        send "&3You have set &b%player%&b's &3rank to &bSR.MOD"
                        set {playerrank.%arg-1%} to "srmod"
                        make console execute the command "/sudo %arg-1% tablist"
                    if arg-2 is "admin":
                        send "&3You have set &b%player%&b's &3rank to &bADMIN"
                        set {playerrank.%arg-1%} to "admin"
                        make console execute the command "/sudo %arg-1% tablist"
                else:
                    send "&c/rank (player) (rank)"
            else:
                send "&c/rank (player) (rank)"
        else:
            send "&cInsufficient permissions!"

on chat:
    if {playerrank.%player%} = "default":
        set the chat format to "&7%player%&7: &7%message%"
    if {playerrank.%player%} = "vip":
        set the chat format to "&a[VIP] &a%player%&f: &7%message%"
    if {playerrank.%player%} = "pro":
        set the chat format to "&b[PRO] &b%player%&f: &7%message%"
    if {playerrank.%player%} = "legend":
        set the chat format to "&6[LEGEND] &6%player%&f: &7%message%"
    if {playerrank.%player%} = "patron":
        set the chat format to "&3[PATRON] &3%player%&f: &7%message%"
    if {playerrank.%player%} = "jrmod":
        set the chat format to "&e[JR.MOD] &e%player%&f: &7%message%"
    if {playerrank.%player%} = "mod":
        set the chat format to "&e[MOD] &e%player%&f: &7%message%"
    if {playerrank.%player%} = "srmod":
        set the chat format to "&e[SR.MOD] &e%player%&f: &7%message%"
    if {playerrank.%player%} = "admin":
        set the chat format to "&c[ADMIN]&c %player%&f: &7%message%"

command /tablist:
    trigger:
        if {playerrank.%player%} = "default":
            set player's tablist name to "&7%player%"
        if {playerrank.%player%} = "vip":
            set player's tablist name to "&a[VIP] &a%player%"
        if {playerrank.%player%} = "pro":
            set player's tablist name to "&b[PRO] &b%player%"
        if {playerrank.%player%} = "legend":
            set player's tablist name to "&6[LEGEND] &6%player%"
        if {playerrank.%player%} = "patron":
            set player's tablist name to "&3[PATRON] &3%player%"
        if {playerrank.%player%} = "jrmod":
            set player's tablist name to "&e[JR.MOD] &e%player%"
        if {playerrank.%player%} = "mod":
            set player's tablist name to "&e[MOD] &e%player%"
        if {playerrank.%player%} = "srmod":
            set player's tablist name to "&e[SR.MOD] &e%player%"
        if {playerrank.%player%} = "admin":
            set player's tablist name to "&c[ADMIN] &c%player%"

Edited by Ezekia

By reading this you are a confirmed nerd

IMG_1036.PNG

lolololol.PNG

lmao.PNG

Link to comment
Share on other sites

  • 0

You can create groups with a plugin like Permission**** or LuckPerms for each of the ranks, and then move then into that group when you do /rank. Here's an example of what I mean

                    if arg-1 is "default":
                        set {playerrank.%arg-1%} to "default"
                        send "&3You have set &b%player%&b's &3rank to &bDefault"
                        make console execute the command "/sudo %arg-1% tablist"
                        console command "pex user %arg-1% group set default"

I added a console command to add the player to the rank at the end, now all you have to do is set up ranks with a permissions plugin

  • Thanks 1
Link to comment
Share on other sites

  • 0

It is definitely encouraged not to create your own permissions skript as it is unnecessarily difficult when you can just install a plugin like Pex or Luckperms. What I like to say is, in most cases, if there is a non-laggy plugin alternative to a skript, use a plugin.

However it isn't uncommon to, as @DependencyJrsaid, mix skript and a plugin

Edited by Migqy
Change

Support  July 29, 2020 → November 3, 2020

► Helper November 3, 2020 → February 22, 2021

► Moderator February 22, 2021 → May 17, 2021

 I might not always respond to forum dms, however I am always contactable on discord (mig#0069)

Screen Shot 2020-03-20 at 5.23.33 pm.png

Link to comment
Share on other sites

  • 0
5 hours ago, Migqy said:

It is definitely encouraged not to create your own permissions skript as it is unnecessarily difficult when you can just install a plugin like Pex or Luckperms. What I like to say is, in most cases, if there is a non-laggy plugin alternative to a skript, use a plugin.

However it isn't uncommon to, as @DependencyJrsaid, mix skript and a plugin

The only reason I'm using a Skript is that rank plugins don't work on my servers.

Edited by Ezekia

By reading this you are a confirmed nerd

IMG_1036.PNG

lolololol.PNG

lmao.PNG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...