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 Region name not being recognized properly.

Discussion in 'Skript' started by mmaalex22112, Aug 4, 2020.

Thread Status:
Not open for further replies.
  1. mmaalex22112

    mmaalex22112 New Member

    Joined:
    Aug 3, 2020
    Messages:
    5
    Likes Received:
    0
    Hey all.

    For some reason, for the life of me I can't get this to work. I'm only ever getting the message one triggered. It seems like it is only reading the pk1 part of the name.

    Code (Text):
    1. on region enter:
    2.     if "%region at player%" is "%{pk1_mine}%":
    3.         if {pk1_mine.%player%} is true:
    4.             message "&8&lMessage One"
    5.             stop
    6.         else:
    7.             set {pk1_mine.%player%} to true
    8.             message "&8&lMessage One Second"
    9.     else if "%region at player%" is "%{pk1_aqua1}%":
    10.         if {pk1_aqua1.%player%} is true:
    11.             message "&8&lMessage Two"
    12.             stop
    13.         else:
    14.             set {pk1_aqua1.%player%} to true
    15.             message "&8&lMessage Two Second"
    Thanks much in advance!
    Alex.
    --- Double Post Merged, Aug 4, 2020, Original Post Date: Aug 4, 2020 ---
    Edit: I'm using 1.16.1, and Skript 2.5-beta1. As well as Skquery and Skellett



     
    #1 mmaalex22112, Aug 4, 2020
    Last edited: Aug 4, 2020
  2. Best Answer:
    Post #5 by mmaalex22112, Aug 4, 2020
  3. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    Use the contains effect instead .
     
  4. mmaalex22112

    mmaalex22112 New Member

    Joined:
    Aug 3, 2020
    Messages:
    5
    Likes Received:
    0
    Yes I've also tried

    Code (Text):
    1. on region enter:
    2.     if "%region at player%" contains "pk1_mine":
    3.         if {pk1_mine.%player%} is true:
    4.             message "&8&lMessage One"
    5.             stop
    No dice. :\
    Nothing registers at all when I use it.
     
    #3 mmaalex22112, Aug 4, 2020
    Last edited: Aug 4, 2020
  5. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    Use Event-Region
     
    • Agree Agree x 1
  6. mmaalex22112

    mmaalex22112 New Member

    Joined:
    Aug 3, 2020
    Messages:
    5
    Likes Received:
    0
    Code (Text):
    1. on region enter:
    2.     if "%event-region%" contains "pk1_mine":
    3.         if {pk1_mine.%player%} is true:
    4.             message "&8&lMessage One"
    5.             stop
    This did work. Thanks Runakai.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...