Solved Can't use variabels in "if player is in the region {celler::*}:"

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

_ToastDK

Member
Aug 16, 2017
15
0
0
24
Hello :emoji_slight_smile:

Im trying to make a skript where i want to see if the player is in a region..

Its not working when it is a variabel

I have put the name of region(s) in this variabel{celler::*}
code_language.skript:
if player is in the region {celler::*}:

Full code:
code_language.skript:
on break of chest, trapped chest or furnace:
    if player is in the region {celler::*}:
        remove chest from {chests::*}
        remove trapped chest from {chests::*}
        remove furnace from {chests::*}
        message "Block fjernet - %{chests::*}%"

Sry for my bad english..
 
I'm not sure what the value you have for {celler::*} is right now, but the trouble may be that when checking a region you have to include the world.
code_language.skript:
if "%region%" is "RegionName in world world":
So the value of {celler::*} would need to be like "celler in world world" if your region name is celler
 
Thanks for you helping :emoji_slight_smile:

It still not working.. When i reload is there a error

Here is a photo of the error https://gyazo.com/0c9a71f449c5446a82d84d9c3e392788



Full code:
code_language.skript:
command /ransag:
    trigger:
        remove 3456 of bread from {chests::*}'s inventory
        remove 3456 of iron helmet from {chests::*}'s inventory
        remove 3456 of iron chestplate from {chests::*}'s inventory
        remove 3456 of iron legs from {chests::*}'s inventory
        remove 3456 of iron boots from {chests::*}'s inventory
        send "Ransag færdig!"
        
on place of chest, trapped chest or furnace:
    if "%region%" is "%{celler::*}%":
        add event-block to {chests::*}
        message "Block sat - %{chests::*}%"

on break of chest, trapped chest or furnace:
    if "%region%" is {celler::*}:
        remove chest from {chests::*}
        remove trapped chest from {chests::*}
        remove furnace from {chests::*}
        message "Block fjernet - %{chests::*}%"
    
command /celler [<text>] [<text>]:
    trigger:
        if arg 1 is not set:
            message "Skriv /celler (add/remove) (Celle region)"

        if arg 1 is "list":
            message "List:"
            message "%{celler::*}%"
            
        if arg 1 is "remove":
            if arg 2 is set:
                message "Fjerner %arg 1% fra loop"
                remove arg 2 from {celler::*}
        
        if arg 1 is "add":
            if arg 2 is set:
                message "Tilføjer %arg 1% til loop"
                add arg 2 to {celler::*}
#
[doublepost=1503003413,1503001862][/doublepost]Do you have a idea to make this work? :emoji_slight_smile:

code_language.skript:
if "%region of player%" identical with {celler::*}:
 
Thanks for you helping :emoji_slight_smile:

It still not working.. When i reload is there a error

Here is a photo of the error https://gyazo.com/0c9a71f449c5446a82d84d9c3e392788



Full code:
code_language.skript:
command /ransag:
    trigger:
        remove 3456 of bread from {chests::*}'s inventory
        remove 3456 of iron helmet from {chests::*}'s inventory
        remove 3456 of iron chestplate from {chests::*}'s inventory
        remove 3456 of iron legs from {chests::*}'s inventory
        remove 3456 of iron boots from {chests::*}'s inventory
        send "Ransag færdig!"
       
on place of chest, trapped chest or furnace:
    if "%region%" is "%{celler::*}%":
        add event-block to {chests::*}
        message "Block sat - %{chests::*}%"

on break of chest, trapped chest or furnace:
    if "%region%" is {celler::*}:
        remove chest from {chests::*}
        remove trapped chest from {chests::*}
        remove furnace from {chests::*}
        message "Block fjernet - %{chests::*}%"
   
command /celler [<text>] [<text>]:
    trigger:
        if arg 1 is not set:
            message "Skriv /celler (add/remove) (Celle region)"

        if arg 1 is "list":
            message "List:"
            message "%{celler::*}%"
           
        if arg 1 is "remove":
            if arg 2 is set:
                message "Fjerner %arg 1% fra loop"
                remove arg 2 from {celler::*}
       
        if arg 1 is "add":
            if arg 2 is set:
                message "Tilføjer %arg 1% til loop"
                add arg 2 to {celler::*}
#
[doublepost=1503003413,1503001862][/doublepost]Do you have a idea to make this work? :emoji_slight_smile:

code_language.skript:
if "%region of player%" identical with {celler::*}:
I was playing around with it and got this to work using "%region at player%"
code_language.skript:
command /test:
    trigger:
        loop {region-list::*}:
            if "%region at player%" contains "%loop-value%":
                broadcast "success"
 
Status
Not open for further replies.