Not Offline Spawning

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

SafaYVS

Member
Jun 22, 2018
30
0
0
25
if skyblock team member not online, item spawner not working,how to they do it

Code:
command /CoinSpawner <text> <player>:
    permission: coinsp.admin
    permission message: '&cGerekli Yetkin Yok.'
    trigger:
        if arg-1 is "give":
            if arg-2 is not set:
                give 1 yellow wool named "&bPCNW &9» &eCoin Spawner" to player
            if arg-2 is set:
                give 1 yellow wool named "&bPCNW &9» &eCoin Spawner" to arg-2
        if arg-1 is "clear":
            clear {isspanwer::*}
     
on place of yellow wool:
    if name of player's tool is "&bPCNW &9» &eCoin Spawner":
        set {_owner} to asb owner of island at location of player
        if {isspanwer::%{_owner}%} is not set:
            set {isspanwer::%{_owner}%} to true
            if name of player's tool is "&bPCNW &9» &eCoin Spawner":
                create holo object "&eCoin &6Spawner;ItemStack:prismarine crystals;;&6Sahibi &9» &e%player%;&6Süre &9» &e10 Saniye;&6Miktar &9» &e1" with id "%event-block's location%" at location 2.8 meters above block
                set {_location} to location of targeted block
                set {coinspawner::%{_location}%} to {_location}   
                set {_x} to x coord of event-location
                set {_y} to y coord of event-location
                set {_z} to z coord of event-location
                wait 2 tick
                stop
        if {isspanwer::%{_owner}%} is true:
            cancel event
            send "&bPCNW &9» &aHer adaya en fazla 1 adet koyulabilir."
            stop

on break of yellow wool:
    if {coinspawner::%location of targeted block%} is set:
        cancel event
        set block to air
        delete holo object "%event-block's location%"   
        remove location of targeted block from {coinspawner::*}
        clear {coinspawner::%location of targeted block%}   
        give 1 yellow wool named "&bPCNW &9» &eCoin Spawner" to player
        set {_owner} to asb owner of island at location of player
        delete {isspanwer::%{_owner}%}

every 10 second:
    loop {coinspawner::*}:
        drop 1 prismarine crystals named "&eCoin" at block 0 above loop-value
 
Use the is online condition

code_language.skript:
player is online

In your case, you can store the player teammate in a variable and check if it is online.

code_language.skript:
set {teammate.%player%} to {otherPlayer}
...
if {teammate.%player%} is online:
    message "Your teammate is online!"
 
how to add my skript please :emoji_slight_smile:

'-' I don't know how your skript works, but i think it should be something like this.

code_language.skript:
every 10 second:
    loop {coinspawner::*}:
        set {_owner} to asb owner of island at loop-value
        if {teammate.%{_owner}%} is online:
            if {_owner} is online:
                drop 1 prismarine crystals named "&eCoin" at block 0 above loop-value

command /teammate <player>:
    trigger:
        if {teammate.%arg 1%} is not set:
            if {teammate.%player%} is not set:
                set {teammate.%player%} to arg 1
                set {teammate.%arg 1%} to player
                message "Your teammate is now %arg 1%"
                message "Your teammate is now %player%" to arg 1

This is the basic, you can always add to the other player accept the teammate request..
 
Idont want this. I want to work in teams is one of the island online. You can't use the command /teammate