Skript /welcome help!

Status
This thread has been locked.

Gamefacts

Feedback score
0
Posts
10
Reactions
1
Resources
0
I need help with a skript I've been working on. I suck at making skripts and maybe someone can help me.

What my idea is:

When a new players joins, 3 people can do /welcome <playername> and it will give the player that ran the command a reward (like 3 diamond) and broadcast in chat "<player> has welcomed <played>"

It has to work only on NEW PLAYERS

When the command has been ran 3 times already it has to say something like "This command has already been used 3 times on <Player>"

This is what I have right now:

command /welcome <text>:
permission: test.test
trigger:
set {message} to arg 1
message "&c%player% &bhas welcomed &c%{message}%"

Help me :(
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Macrolect

I'm Batman.
Premium
Feedback score
7
Posts
476
Reactions
196
Resources
0
Do you still need help with this? If so PM me I can help you.
I'm the only Bat Man in these parts.

I need help with a skript I've been working on. I suck at making skripts and maybe someone can help me.

What my idea is:

When a new players joins, 3 people can do /welcome <playername> and it will give the player that ran the command a reward (like 3 diamond) and broadcast in chat "<player> has welcomed <played>"

It has to work only on NEW PLAYERS

When the command has been ran 3 times already it has to say something like "This command has already been used 3 times on <Player>"

This is what I have right now:

command /welcome <text>:
permission: test.test
trigger:
set {message} to arg 1
message "&c%player% &bhas welcomed &c%{message}%"

Help me :(
I'll make this quickly and PM it to you.[DOUBLEPOST=1492487286][/DOUBLEPOST]I haven't wrote any Skript in awhile, but try this out:

Code:
on first join:
    set {welcome::%player%} to 0

command /welcome [<player>]:
    executable by: players
    trigger:
        if arg-1 is not set:
            message "&cYou must put a player's username to welcome!"
        else:
            if {welcome::%arg-1%} is less than 3:
                if {welcome::%player%::%arg-1%} is false:
                    if {welcome::%arg-1%} is equal to 0:
                        add 1 to {welcome::%arg-1%}
                    else if {welcome::%arg-1%} is equal to 1:
                     add 1 to {welcome::%arg-1%}
                    else if {welcome::%arg-1%} is equal to 2:
                        add 1 to {welcome::%arg-1%}
                        if arg-1's inventory can hold itemstack:
                            give arg-1 3 diamonds
                            broadcast "&a&l%arg-1% has been officially welcomed to the server!"
                        else if arg-1's inventory can not hold 3 diamonds:
                            drop 3 diamonds at arg-1
                            broadcast "&a&l%arg-1% has been officially welcomed to the server!"
                    message "&aYou've welcomed %arg-1%!"
                    set {welcome::%player%::%arg-1} to true
                    else:
                else if {welcome::%player%::%arg-1} is true:
                    message "&cYou've already welcomed this player!"
            else if {welcome::%arg-1%} is more than or equal to 3:
                message "&cThis player's already been welcomed!"
 
Last edited:
Status
This thread has been locked.
Top