Solved Level RPG pls quick

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ZachKing

New Member
Dec 20, 2019
6
0
0
29
How do I set player level to this?
Code:
command /level [<offlineplayer>]:
    trigger:
        if arg-1 isn't set:
            send "&8-------------------------" to player
            send "&a&lLevel&f: %{level.%player%}%" to player
            send "&8-------------------------" to player
        if arg-1 is set:
            send "&8-------------------------" to player
            send "&a&l%arg-1%&a&l's Level&f: %{level.%player%}%" to player
            send "&8-------------------------" to player

command /levelm [<text>] [<offlineplayer>] [<number>]:
    aliases: /lvlmng, /lvlm, /levelmng
    permission: levels.manage
    permission message: &cYou do not have permission to execute this command!
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                if arg-1 is "reset":
                    set {level.%arg-2%} to "0"
                    send "&aYou have successfully reset &e%arg-2%&a's level!" to player
                if arg-1 is "set":
                    if arg-3 is set:
                        if arg-3 is more than 100:
                            send "&cYou can't set levels more than 100!" to player
                        else:
                            set {level.%arg-2%} to "%arg-3%"
                            send "&aYou set &e%arg-2%&a's level to &6%arg-3%&a!" to player
                    else:
                        send "&c&lUsage: /levelm <Reset | Set> <Player> [number]" to player
            else:
                send "&c&lUsage: /levelm <Reset | Set> <Player> [number]" to player
        else:
            send "&c&lUsage: /levelm <Reset | Set> <Player> [number]" to player
                   

on join:
    if {level.%player%} isn't set:
        set {level.%player%} to "0"
       
on chat:
    set chat format to "&7[%{level.%player%}%&7] &7%player's display name% &e➳ &f%message%"

this not working pls help me
 

Attachments

  • Capture.PNG
    Capture.PNG
    9.3 KB · Views: 194
Can you give me more information? The attachment you sent is just a screenshot of two people saying "test" and "ddd"
 
I am no expert, but I think this might work. If it doesn't, do you mind sending a screenshot of any errors?

Code:
command /level [<offlineplayer>]:
    trigger:
        if arg-1 isn't set:
            send "&8-------------------------" to player
            send "&a&lLevel&f: %{_level.%player%::*}%" to player
            send "&8-------------------------" to player
        if arg-1 is set:
            send "&8-------------------------" to player
            send "&a&l%arg-1%&a&l's Level&f: %{_level.%player%::*}%" to player
            send "&8-------------------------" to player

command /levelm [<text>] [<offlineplayer>] [<number>]:
    aliases: /lvlmng, /lvlm, /levelmng
    permission: levels.manage
    permission message: &cYou do not have permission to execute this command!
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                if arg-1 is "reset":
                    set {_level.%arg-2%::*} to "0"
                    send "&aYou have successfully reset &e%arg-2%&a's level!" to player
                if arg-1 is "set":
                    if arg-3 is set:
                        if arg-3 is more than 100:
                            send "&cYou can't set levels more than 100!" to player
                        else:
                            set {_level.%arg-2%::*} to "%arg-3%"
                            send "&aYou set &e%arg-2%&a's level to &6%arg-3%&a!" to player
                    else:
                        send "&c&lUsage: /levelm <Reset | Set> <Player> [number]" to player
            else:
                send "&c&lUsage: /levelm <Reset | Set> <Player> [number]" to player
        else:
            send "&c&lUsage: /levelm <Reset | Set> <Player> [number]" to player
                  

on join:
    if {_level.%player%::*} isn't set:
        set {_level.%player%::*} to "0"
      
on chat:
    set chat format to "&7[%{_level.%player%::*}%&7] &7%player's display name% &e➳ &f%message%"
 
Still not working
It still does not set to player level
maybe you can try to change it because
I think im doing the skript wrong
[level] {displayname} >> {message}
like that
 

Attachments

  • InkedCapture_LI.jpg
    InkedCapture_LI.jpg
    919.1 KB · Views: 212
Here you go!
.
.
code_language.skript:
command level [<offline player>]:
    trigger:
        if arg 1 is not set:
            send "&aYour current level is:&e %{Level::%uuid of player%}%"
        else:
            send "&a%arg 1%'s current level is:&e %{Level::%uuid of arg 1%}%"
command /levelm [<text>] [<offlineplayer>] [<number>]:
    aliases: /lvlmng, /lvlm, /levelmng
    permission: levels.manage
    permission message: &cYou do not have permission to execute this command!
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                if arg 3 is set:
                    if arg 1 is "set":
                        if arg 3 is not bigger than 100:
                            set {Level::%uuid of arg 2%} to arg 3
                            send "&aSucessfully set level of %arg 2% to: &e%arg 3%"
                           
                        else:
                            send "&cLevels cannot be bigger than 100"
                    if arg 1 is "reset":
                        set {Level::%uuid of arg 2%} to 0
                        send "&aSucessfully reseted level of %arg 2%!"
on join:
    if {Level::%uuid of player%} is not set:
        set {Level::%uuid of player%} to 0
[doublepost=1576922762,1576922593][/doublepost]
I am no expert, but I think this might work. If it doesn't, do you mind sending a screenshot of any errors?

Code:
command /level [<offlineplayer>]:
    trigger:
        if arg-1 isn't set:
            send "&8-------------------------" to player
            send "&a&lLevel&f: %{_level.%player%::*}%" to player
            send "&8-------------------------" to player
        if arg-1 is set:
            send "&8-------------------------" to player
            send "&a&l%arg-1%&a&l's Level&f: %{_level.%player%::*}%" to player
            send "&8-------------------------" to player

command /levelm [<text>] [<offlineplayer>] [<number>]:
    aliases: /lvlmng, /lvlm, /levelmng
    permission: levels.manage
    permission message: &cYou do not have permission to execute this command!
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                if arg-1 is "reset":
                    set {_level.%arg-2%::*} to "0"
                    send "&aYou have successfully reset &e%arg-2%&a's level!" to player
                if arg-1 is "set":
                    if arg-3 is set:
                        if arg-3 is more than 100:
                            send "&cYou can't set levels more than 100!" to player
                        else:
                            set {_level.%arg-2%::*} to "%arg-3%"
                            send "&aYou set &e%arg-2%&a's level to &6%arg-3%&a!" to player
                    else:
                        send "&c&lUsage: /levelm <Reset | Set> <Player> [number]" to player
            else:
                send "&c&lUsage: /levelm <Reset | Set> <Player> [number]" to player
        else:
            send "&c&lUsage: /levelm <Reset | Set> <Player> [number]" to player
                

on join:
    if {_level.%player%::*} isn't set:
        set {_level.%player%::*} to "0"
    
on chat:
    set chat format to "&7[%{_level.%player%::*}%&7] &7%player's display name% &e➳ &f%message%"

1. Local Variables won't work its "Local" works just on the trigger that shes been put in
2. Why List "::*" (Don't tryina be rude)
3. Don't put numbers in Strings (Ex. "0") Exept you will do "set {_var} to {EXVAR} parsed as number"
 
It become like this still not woking
 

Attachments

  • Capture.PNG
    Capture.PNG
    76.2 KB · Views: 201
Im kinda inefficient with my skripts, but I don't see why this wouldn't work.

Code:
on chat:
    cancel event
    send "&7[%{Level::%uuid of player%}%] %player%&f: %message%"
 
You mean:
code_language.skript:
on chat:
   cancel event
   broadcast "<EX TEXT>" in player's world
.
The only bad thing in this method is that you need to Make your own chat system because Now With the "cancel event" the AntiSwear Plugin or ChatManager Plugin has no meaning and also The Mute Plugin
.
Do not think of removing "cancel event" this will cause Duplicated Message
.
Example if removed:
.
<novastosha> Hello
[1] novastosha: Hello
 
then how i dot it?
it still not linked yet to mine
it be
.
[0] JackInTheBushes : Hi
 
on chat:
set chat format to "&7[%level of player%] &7%player's display name% &e➳ &f%message%"


Its like this and it works

Btw thx for helping me hope you guys can still help me in future
:emoji_slight_smile:
 
Status
Not open for further replies.