1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Bulk Send Messages to Global List of players

Discussion in 'Skript' started by Shadow Klassic, Sep 19, 2020.

Thread Status:
Not open for further replies.
  1. Shadow Klassic

    Joined:
    Sep 19, 2020
    Messages:
    20
    Likes Received:
    0
    So I recently had an Idea to create Factions on my RPG server. Somehow when I store a player's UUID to a list like {bloodlust::*}, and then send the message to that variable, It ain't work :/. Any idea how to do this?

    My Code:

    Code (Text):
    1. on quit:
    2.     remove player's uuid from {bloodlust::*}
    3.     remove player's uuid from {vanguard::*}
    4.     delete {team.%player%}
    5.  
    6. command /faction [<text>] [<text>]:
    7.     trigger:
    8.         if arg-1 is "join":
    9.             if {team.%player%} is not set:
    10.                 if arg-2 is "bloodlust":
    11.                     if {first.faction.%player%} is true:
    12.                         set {team.%player%} to true
    13.                         add player's uuid to {bloodlust::*}
    14.                         set {first.faction.%player%} to false
    15.                         set {cant.move.%player%} to false
    16.                         send "&6Faction: &fJoined the &cBloodlusts &fteam!" to player
    17.                     else:
    18.                         send "Error: You're already in a faction!" to player
    19.                 if arg-2 is "vanguard":
    20.                     if {first.faction.%player%} is true:
    21.                         set {team.%player%} to true
    22.                         add player's uuid to {vanguard::*}
    23.                         set {first.faction.%player%} to false
    24.                         set {cant.move.%player%} to false
    25.                         send "&6Faction: &fJoined the &9Vanguard &fteam!" to player
    26.                     else:
    27.                         send "Error: You're already in a faction!" to player
    28.         if arg-1 is "chat":
    29.             if {first.faction.%player%} is false:
    30.                 if arg-2 is set:
    31.                     if {bloodlust::*} contains player's uuid:
    32.                         send "&6Faction: &f%player%: %arg-2%" to {bloodlust::*}
    33.                         send "blody" to player
    34.                     else if {vanguard::*} contains player's uuid:
    35.                         send "&6Faction: &f%player%: %arg-2%" to {vanguard::*}
    36.                         send "vany" to player
    37.                     else:
    38.                         send "&cError: You aren't in a faction"
    39.  
    40. command /factionblood:
    41.     trigger:
    42.         send "%{bloodlust::*}%" to player
    43.  
    44. command /factionvangu:
    45.     trigger:
    46.         send "%{vanguard::*}%" to player
     

    Attached Files:

  2. Best Answer:
    Post #2 by neolia, Sep 19, 2020
  3. neolia

    neolia New Member

    Joined:
    Sep 19, 2020
    Messages:
    5
    Likes Received:
    0
    you probably could just loop that variable to send it like
    Code (Text):
    1.         if {bloodlust::*} contains player's uuid:
    2.             loop {bloodlust::*}:
    3.                 send "&6Faction: &f%player%: %arg-2%" to loop-value
    4.         else if {vanguard::*} contains player's uuid:
    5.             loop {vanguard::*}:
    6.                 send "&6Faction: &f%player%: %arg-2%" to loop-value
    but.. i would do it like this just saying i've edited your skript a little
    Code (Text):
    1. on chat:
    2.     if {TeamChat.%player%} is true:
    3.         if {bloodlust::*} contains player's uuid:
    4.             loop {bloodlust::*}:
    5.                 send "&6Faction: &f%player%: %message%" to loop-value
    6.         else if {vanguard::*} contains player's uuid:
    7.             loop {vanguard::*}:
    8.                 send "&6Faction: &f%player%: %message%" to loop-value
    9.  
    10.  
    11.  
    12.  
    13. on quit:
    14.     remove player's uuid from {bloodlust::*}
    15.     remove player's uuid from {vanguard::*}
    16.     delete {team.%player%}
    17.     delete {TeamChat.%player%}
    18.  
    19. command /faction [<text>] [<text>]:
    20.     trigger:
    21.         if arg-1 is "join":
    22.             if {team.%player%} is not set:
    23.                 if arg-2 is "bloodlust":
    24.                     if {first.faction.%player%} is true:
    25.                         set {team.%player%} to true
    26.                         add player's uuid to {bloodlust::*}
    27.                         set {first.faction.%player%} to false
    28.                         set {cant.move.%player%} to false
    29.                         send "&6Faction: &fJoined the &cBloodlusts &fteam!" to player
    30.                     else:
    31.                         send "Error: You're already in a faction!" to player
    32.                 if arg-2 is "vanguard":
    33.                     if {first.faction.%player%} is true:
    34.                         set {team.%player%} to true
    35.                         add player's uuid to {vanguard::*}
    36.                         set {first.faction.%player%} to false
    37.                         set {cant.move.%player%} to false
    38.                         send "&6Faction: &fJoined the &9Vanguard &fteam!" to player
    39.                     else:
    40.                         send "Error: You're already in a faction!" to player
    41.         if arg-1 is "chat":
    42.             if {first.faction.%player%} is false:
    43.                 if arg-2 is set:
    44.                     if {bloodlust::*} contains player's uuid:
    45.                         if {TeamChat.%player%} is true:
    46.                             send "&6Faction: &fChat Mode &4Disabled" to player
    47.                             set {TeamChat.%player%} to false
    48.                             stop
    49.  
    50.                         set {TeamChat.%player%} to true
    51.                         send "&6Faction: &fChat Mode &2Enable" to player
    52.                     else if {vanguard::*} contains player's uuid:
    53.                         if {TeamChat.%player%} is true:
    54.                             send "&6Faction: &fChat Mode &4Disabled" to player
    55.                             set {TeamChat.%player%} to false
    56.                             stop
    57.  
    58.                         set {TeamChat.%player%} to true
    59.                         send "&6Faction: &fChat Mode &2Enable" to player
    60.                     else:
    61.                         send "&cError: You aren't in a faction"
    62.  
    63. command /factionblood:
    64.     trigger:
    65.         send "%{bloodlust::*}%" to player
    66.  
    67. command /factionvangu:
    68.     trigger:
    69.         send "%{vanguard::*}%" to player
    just basicly put the chat feature in a chat event
     
  4. Shadow Klassic

    Joined:
    Sep 19, 2020
    Messages:
    20
    Likes Received:
    0
    I will try this out. Thank you so much.
    --- Double Post Merged, Sep 19, 2020, Original Post Date: Sep 19, 2020 ---
    I doesn't work. No errors. It doesn't send to any of the players on the list.
    --- Double Post Merged, Sep 23, 2020 ---
    I figured it out, so you need to send it to the {bloodlust::*} or loop-value PARSED as a PLAYER
    --- Double Post Merged, Sep 23, 2020 ---
    Code (Text):
    1. loop {bloodlust::*}:
    2.     send "Hello." to loop-value parsed as a player
     
Thread Status:
Not open for further replies.

Share This Page

Loading...