Island protect

  • 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 community!

    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.

AvantyCZ

Member
Jul 10, 2017
15
0
1
Hello there,
I need a little help with my one block skript. I need island protect code.
Idk how to code it.

There is a create command to implement variables for island protect.

Code:
        if arg-1 is "create":
            if {ob.%player%} is false:
                if {obhome.%player%} is not set:
                    set {ob.%player%} to true
                    teleport player to {obsvet}
                    set {_xob} to random integer between 0 and 25000
                    set {_yob} to 100
                    set {_zob} to random integer between -0 and -25000
                    set {_locationob} to location at {_xob}, {_yob}, {_zob}
                    teleport player to {_locationob}
                    set block under player to podzol
                    set {oblevel::%player%} to 1
                    set {obxp.%player%} to 0
                    set {obxpup.%player%} to 100
                    set {obukolwb.%player%} to true
                    set {obhome.%player%} to location of player
                    give 1 oak sapling to player
                    play "ENTITY_EXPERIENCE_ORB_PICKUP" to player at volume 1
                    send title "{@ob}" with subtitle "&aVítej na svém OneBlocku" to player for 3 seconds                                       
                else:
                    send "{@ob} Již ostrov vlastníš."
            else:
                send "{@ob} Již ostrov vlastníš."
Protect for owner of island and player's on his island.
How to block grief on island for other players please ? Without Residence or region.

Thx for any help.
 
If you have skBee, you can make a skBee bound within where the island belongs, and whenever a player does something such as break a block, check if they are within their own island bound. If you don't have skBee, you could save 2 locations for the island. One in one corner and another in the other corner of an island. And whenever a player does something, check if they are within their own island region.

Also, you should use player's uuid instead of just player so if the player ever changes their name, they won't lose their island.
 
Status
Not open for further replies.