Random command?

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

JuanDouCore_

New Member
May 20, 2017
7
0
0
23
I'm trying to get a random command with this code to make an event, but apparently this way with commands does not work, any idea to get a random command from a specific command list?

code_language.skript:
on rightclick:
    if event-location == {medialet}:
        if event-block is end portal frame:
            add "eco give %player% 3000" to {_premios::*}
            add "eco give %player% 2000" to {_premios::*}
            set {_premio} to random command of {_premios::*}
            wait 3 seconds
 
code_language.skript:
on rightclick:
    if event-location == {medialet}:
        if event-block is end portal frame:
            add 300 to {_Eco::*}
            add 1000 to {_eco::*}
            make console execute command "/eco give %player% %random element out of {_Eco::*}%"
            wait 3 seconds
 
code_language.skript:
on rightclick:
    if event-location == {medialet}:
        if event-block is end portal frame:
            add 300 to {_Eco::*}
            add 1000 to {_eco::*}
            make console execute command "/eco give %player% %random element out of {_Eco::*}%"
            wait 3 seconds

The problem that what I give will not be just economy, I also have permissions and other commands ...
 
Status
Not open for further replies.