Solved Region not working

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

drillzy

Member
Aug 6, 2017
22
0
0
20
Hello. i have an problem. im trying to send the player a message when they enter a specific region. Yet it is not working. There are no errors showing up when i reload the skript...

Code:
on region enter:
    if "%region%" is "CRoom":
        if {rewards:%player%} is not set:
            set {rewards:%player%} to 0
        send "&c&lJa&2&lkII &9> &eYou currently have &6%{rewards:%player%}%&8/&615 &eRewards found! &7* &8To find rewards, talk to the npc you find here and you can get some free rewards!" to player
 
the region name will be in the form "region CRoom in world world" so you cant just check if its "CRoom"
 
the region name will be in the form "region CRoom in world world" so you cant just check if its "CRoom"
ok still didnt work for me.
Code:
on region enter:
    if "%region at player%" is "region CRoom in world Haven_City":
        if {rewards:%player%} is not set:
            set {rewards:%player%} to 0
        send "&c&lJa&2&lkII &9> &eYou currently have &6%{rewards:%player%}%&8/&615 &eRewards found! &7* &8To find rewards, talk to the npc you find here and you can get some free rewards!" to player
I made the %region at player% a %region% too still didn't work. Still no errors yet is still doesn't give me the message.
 
broadcast the "%region at player%" to make sure youre getting the name right (and to also make sure the event is firing)
 
broadcast the "%region at player%" to make sure youre getting the name right (and to also make sure the event is firing)
ok the event fires but for some reason it names that 1 region i need is being called as <none> and the rest of the regions are names as needed... i tried re-creating the region and still has not worked
 
idk maybe its a bug, whats your skript version & server version? did you try "%region%" instead of region at player? if worse comes to worse you can always define the corners yourself and check if the player's coords are within them
 
idk maybe its a bug, whats your skript version & server version? did you try "%region%" instead of region at player? if worse comes to worse you can always define the corners yourself and check if the player's coords are within them
haha yeah, %region% worked instead of %region at player%. and the form to get the region was "<region> in world <world>" and not "region <region> in world <world>"
 
Status
Not open for further replies.