Solved Not repeat

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

Kristian Rahbek

New Member
Jun 12, 2018
9
0
1
24
United States
So the thing is that i made a auto sell mining script.
But the thing is that it spams whenever i mine a block (because i did so it would send you a message of the money you earned.)
But the thing is that i only want the message sometimes.
For example like whenever i mined 4 blocks it says that i earned something so your chat doens't gets over spammed! :emoji_grinning:

This is maybe a little confusion but i hope you guys understand it! :emoji_wink:
on break of stone:
if player has permission "normal":
cancel event
set event-block to air
add 1 to player's balance
send "&a+1$"
Thats my code, and instead of "send "&a+1$" i would like it to send sometimes not everytime you mine the block.
 
Last edited:
You should put your code, its hard to help if we dont know what youre working with
[doublepost=1533274750,1533269454][/doublepost]
So the thing is that i made a auto sell mining script.
But the thing is that it spams whenever i mine a block (because i did so it would send you a message of the money you earned.)
But the thing is that i only want the message sometimes.
For example like whenever i mined 4 blocks it says that i earned something so your chat doens't gets over spammed! :emoji_grinning:

This is maybe a little confusion but i hope you guys understand it! :emoji_wink:
on break of stone:
if player has permission "normal":
cancel event
set event-block to air
add 1 to player's balance
send "&a+1$"
Thats my code, and instead of "send "&a+1$" i would like it to send sometimes not everytime you mine the block.

This is a simple way you could do this.
You can chance the loop time to however long you want in between this message popping up.
code_language.skript:
on break of stone:
    if player has permission "normal":
        cancel event
        set event-block to air
        add 1 to balance of player
        add 1 to {mining::money::%player%}


every 10 seconds:
    loop all players:
        if {mining::money::%loop-player%} is set:
            send "&a+%{mining::money::%loop-player%}%$" to loop-player
            delete {mining::money::%loop-player%}
 
  • Like
Reactions: Kristian Rahbek
If you don't want to use looping here is different version
code_language.skript:
on break of stone:
    if player has permission "normal":
        cancel event
        set event-block to air
        add 1 to balance of player
        add 1 to {mining::money::%uuid of player%}
        add 1 to {notifications.%uuid of player}
        if {notifications.%uuid of player} >= 5:
            set {notifications.%uuid of player} to 0
            send "&a+&c%{mining::money::%player%}%&a$"
            
            
            
            
on quit:
    set {notifications.%uuid of player} to 0
 
Status
Not open for further replies.