Random Integer

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

Congraz

Member
Oct 26, 2018
45
0
0
22
Hallo guys

I have made a skript but cant find out to do this: Where there is {_random} i want what they get fram the random integer there

On right click holding a firework star:
chance of 50%:
wait 3 ticks
add random integer between 0 and 100 to player's balance
send "&8[&6&lO&8] &7You got %{_random}%.You got &2%player's balance% money now"
play "LEVEL_UP" to player at volume 0.99
remove 1 firework star from player




Sorry if you guys dont understand me, im dansih guy. And im not that good to english, but ill try to be. Hope you guys can help and understand what i am trying to say. (-.:
 
Try this

code_language.skript:
On right click holding a firework star:
    chance of 50%:
        wait 3 ticks
        set {%player%.randommoney} to random integer between 1 and 100
        add {player.randommoney} to the player's balance
        send "&8[&6&lO&8] &7You got %{player.randommoney}%.You got &2%player's balance% money now"
        play "LEVEL_UP" to player at volume 0.99
        remove 1 firework star from player
 
Try this

code_language.skript:
On right click holding a firework star:
    chance of 50%:
        wait 3 ticks
        set {%player%.randommoney} to random integer between 1 and 100
        add {player.randommoney} to the player's balance
        send "&8[&6&lO&8] &7You got %{player.randommoney}%.You got &2%player's balance% money now"
        play "LEVEL_UP" to player at volume 0.99
        remove 1 firework star from player
Is is not working. o:
 
Try
code_language.skript:
On right click holding a firework star:
    chance of 50%:
        wait 3 ticks
        set {_r} to random integer between 0 and 100
        add {_r} to player's balance
        send "&8[&6&lO&8] &7You got %{_r}%.You got &2%player's balance% money now"
        play "LEVEL_UP" to player at volume 0.99
        remove 1 firework star from player
@Darrow use local variables for this
 
  • Like
Reactions: Darrow
Status
Not open for further replies.