#Timer for a minigame

1 messages · Page 1 of 1 (latest)

sterile zephyr
#

How should i do it the best way?

golden path
#

send your skript

sterile zephyr
#

Timer for a minigame (solved for now)

#

Timer for a minigame

#

wait ill indent

#
    permission: ops
    Trigger: 
        clear all players's inventory
        remove all players from {tagged::*}
        remove all players from {survivor::*}
        add all players to {survivor::*}
        set {tagged} to random player out of all players
        remove {tagged} from {survivor::*}
        add {tagged} to {tagged::*}
        broadcast "Game has begun!"
        execute console command "/lp user %{tagged}% parent set tagged"
        execute console command "/lp user %{survivor}% parent set survivor"

on damage:
    if {tagged::*} contains attacker:
        if attacker is a player:
            if victim is a player:
                add victim to {tagged::*}
                broadcast "%attacker% got %victim%!"
on damage:
    if {tagged::*} contains victim:
        Message "you can't tag tagged players" to attacker

every 30 seconds:
    set {items::1} to 1 of feather named "<white><bold>Lift Boost" with lore "<lime>Right click to Fly!"
    set {items::2} to chorus fruit named "<grey><bold>Smoke Bomb" with lore "<lime>Use to blind tagged players within 5 blocks"
    set {items::3} to 5-10 of green stained glass named "<white><bold>Glass" with lore "<lime>Can be placed anywhere, will be destroyed after 10 seconds!"
    set {items::4} to saddle named "<white><bold>Chicken Taxi" with lore "<lime>Right click to fire a chicken which will make taggers stuck on for 3 seconds"
    set {items::5} to end rod named "<white><bold>Eye laser" with lore "<lime>Right click to show the taggers for 3 seconds"
    add random item out of {items::*} to {survivor::*}'s inventory

every 60 seconds:
    set {items2::*} to eye of ender named "<purple><bold>Magic Eye" with lore "<red>Shows the survivors location for 10 seconds"
    add random item out of {items2::*} to {tagged::*}'s inventory```
#

@golden path

#

done

sterile zephyr
golden path
#

try it

#

it wont work becausse in the other indents you used a tab BUT in this indent you used 2 spaces

#

do this

#
    if {tagged::*} contains attacker:
        if attacker is a player:
            if victim is a player:
                add victim to {tagged::*}
                broadcast "%attacker% got %victim%!"```
sterile zephyr
#

oh thx

golden path
#

np

sterile zephyr
#

but i need help with a timer too

golden path
#

what kind of timer

sterile zephyr
#

like for a mini game

#

when it starts the timer starts then if {survivor::*}=0 then game over

#

or timer is over and {survivor::*}>0

golden path
#

sorry but i caant spoonfeed try to make it on your own and i can help you on your way

neon falcon
#

Set a variable to now when the game starts and display time since {variable}

sterile zephyr
#

ok

#

ill try and come back here

sterile zephyr
#

doesnt seem to work...

golden path
#

send code

sterile zephyr
#

it worked yesterday and i forgot to tell