From 19b03bba8abc6e86544064351ed0ef485e785b6d Mon Sep 17 00:00:00 2001 From: Anorak_1 Date: Fri, 12 Aug 2022 18:34:10 +0000 Subject: [PATCH] Migrate GitHub to GiTea --- flags.sk | 607 +++++++++++++++++++++++++++++++++++++++++++++++++++ flagsloop.sk | 313 ++++++++++++++++++++++++++ fs.sk | 299 +++++++++++++++++++++++++ init.sk | 45 ++++ papik.sk | 112 ++++++++++ 5 files changed, 1376 insertions(+) create mode 100644 flags.sk create mode 100644 flagsloop.sk create mode 100644 fs.sk create mode 100644 init.sk create mode 100644 papik.sk diff --git a/flags.sk b/flags.sk new file mode 100644 index 0000000..fcb4432 --- /dev/null +++ b/flags.sk @@ -0,0 +1,607 @@ +command /minigame_flags_start: + description: Zapni celou minihru flags + usage: /minigame_flags_start + executable by: the console and players + permission: skript.op + trigger: + execute console command "/gamerule keepInventory true" + clear {gaming_players::*} + loop 10 times: + loop entries of team "IDList%loop-number%": + add loop-value-2 to {gaming_players::*} + broadcast "Načítám minihru Vlajky" + send title "§2Vlajky" to all players + set {game_status} to "init" + set {game_on} to "True" + wait 2 seconds + send subtitle "Teleportuji" to all players + wait 1 second + set {intro} to "True" + set gamemode of {gaming_players::*} to adventure + teleport {gaming_players::*} to {introlocation} + set {stop_players} to "True" + hide {gaming_players::*} + wait 1 seconds + send "§e----------- Vlajky -----------" to {gaming_players::*} + send " V této minihře máte za úkol jako první získat vlajku na středu, kterou §cvezmene pravým kliknutím §ra donést jí domů. Pozor, protivník vás může zabít na jednu ránu lukem! Po stranách jsou pak instakill potiony." to {gaming_players::*} + wait 15 seconds + set {stop_players} to "False" + reveal {gaming_players::*} + + while {game_on} is "True": + if {game_status} is "init": # kód před prvním startem + + # procesy před startem + + clear {flag_won::*} + set {teamscore::1} to 0 + set {teamscore::2} to 0 + set {teamscore::3} to 0 + set {teamscore::4} to 0 + set {teamscore::5} to 0 + set {teamscore::6} to 0 + set {teamscore::7} to 0 + set {teamscore::8} to 0 + set {teamscore::9} to 0 + set {teamscore::10} to 0 + + clear {flag_won::*} + + # procesy před startem + + set {flags_kola} to 1 + clear inventory of all players + wait 20 ticks + send title "§c§l1. KOLO" to all players + + if {flags_kola} is 1: + spawngate(3) + spawnteam(1,1) + spawnteam(2,2) + spawnteam(3,3) + spawnteam(10,4) + spawnteam(4,5) + spawnteam(9,6) + spawnteam(5,7) + spawnteam(8,8) + spawnteam(6,9) + spawnteam(7,10) + + loop {flag_locations::*}: + set block at loop-value to white banner + + + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + + set {game_status} to "playing" + + set {flags_timer} to {čas_kola} + + wait 5 seconds + send title "§c§l%{flags_kola}%. KOLO" with subtitle "3" to all players + play sound "custom.cas" at volume 50 to all players + wait 1 second + send title "§c§l%{flags_kola}%. KOLO" with subtitle "2" to all players + play sound "custom.cas" at volume 50 to all players + spawngate(2) + wait 1 second + send title "§c§l%{flags_kola}%. KOLO" with subtitle "1" to all players + play sound "custom.cas" at volume 50 to all players + wait 1 second + send title "GO" with subtitle "" to all players + play sound "custom.cas2" at volume 50 to all players + spawngate(1) + + + if {game_status} is "next": + + loop {flag_locations::*}: + loop all blocks in radius 35 around loop-value-1: + if loop-value-2 is banner: + set block at loop-value-2 to air + loop dropped items in radius 35 around loop-value-1: + kill loop-value-2 + + + loop 10 times: + loop entries of team "IDList%loop-number%": + if {flag_won::*} contains loop-value-2: + set {teamscore::%loop-number-1%} to {teamscore::%loop-number-1%} + 1 + clear inventory of all players + loop {potion_locations::*}: + loop all entities in radius 4 around loop-value-1: + kill loop-value-2 + + set {flags_kola} to {flags_kola} + 1 + + + clear {flag_won::*} + spawngate(3) + + if {flags_kola} is 2: + + spawnteam(2,1) + spawnteam(3,2) + spawnteam(1,3) + spawnteam(7,4) + spawnteam(8,5) + spawnteam(6,6) + spawnteam(9,7) + spawnteam(5,8) + spawnteam(4,9) + spawnteam(10,10) + + loop {flag_locations::*}: + set block at loop-value to white banner + + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + + set {game_status} to "playing" + + if {flags_kola} is 3: + spawnteam(6,1) + spawnteam(9,2) + spawnteam(8,3) + spawnteam(7,4) + spawnteam(3,5) + spawnteam(1,6) + spawnteam(4,7) + spawnteam(2,8) + spawnteam(5,9) + spawnteam(10,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 4: + spawnteam(10,1) + spawnteam(6,2) + spawnteam(2,3) + spawnteam(5,4) + spawnteam(3,5) + spawnteam(4,6) + spawnteam(1,7) + spawnteam(8,8) + spawnteam(7,9) + spawnteam(9,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 5: + spawnteam(5,1) + spawnteam(3,2) + spawnteam(6,3) + spawnteam(2,4) + spawnteam(7,5) + spawnteam(10,6) + spawnteam(8,7) + spawnteam(9,8) + spawnteam(4,9) + spawnteam(1,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 6: + spawnteam(1,1) + spawnteam(9,2) + spawnteam(10,3) + spawnteam(8,4) + spawnteam(2,5) + spawnteam(7,6) + spawnteam(3,7) + spawnteam(6,8) + spawnteam(4,9) + spawnteam(5,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 7: + spawnteam(5,1) + spawnteam(1,2) + spawnteam(6,3) + spawnteam(4,4) + spawnteam(7,5) + spawnteam(3,6) + spawnteam(8,7) + spawnteam(2,8) + spawnteam(9,9) + spawnteam(10,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 8: + spawnteam(5,1) + spawnteam(6,2) + spawnteam(1,3) + spawnteam(10,4) + spawnteam(2,5) + spawnteam(9,6) + spawnteam(3,7) + spawnteam(8,8) + spawnteam(4,9) + spawnteam(7,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 9: + spawnteam(9,1) + spawnteam(3,2) + spawnteam(10,3) + spawnteam(2,4) + spawnteam(6,5) + spawnteam(1,6) + spawnteam(7,7) + spawnteam(5,8) + spawnteam(8,9) + spawnteam(4,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + if {flags_kola} is 10: + set {game_status} to "end" + else: + + send title "§c§l%{flags_kola}%. KOLO" to all players + wait 5 second + send title "§c§l%{flags_kola}%. KOLO" with subtitle "3" to all players + play sound "custom.cas" at volume 50 to all players + wait 1 second + send title "§c§l%{flags_kola}%. KOLO" with subtitle "2" to all players + play sound "custom.cas" at volume 50 to all players + spawngate(2) + wait 1 second + send title "§c§l%{flags_kola}%. KOLO" with subtitle "1" to all players + play sound "custom.cas" at volume 50 to all players + wait 1 second + send title "GO" with subtitle "" to all players + play sound "custom.cas2" at volume 50 to all players + spawngate(1) + + set {flags_timer} to {čas_kola} # NASTAVENÍ ČASU + + if {game_status} is "playing": # kód kontroly konce kola + send action bar "§4§lČas: §7%{flags_timer}%" to all players + set {flags_timer} to {flags_timer} - 1 + wait 1 second + if {flags_timer} is 0: + send title "§c§lDošel čas!" to all players + set {gaming_players::*}'s gamemode to spectator + set {game_status} to "next" + wait 5 seconds + + if size of {flag_won::*} is 5: + set {game_status} to "next" + set {gaming_players::*}'s gamemode to spectator + wait 1 second + send title "§c§lKonec kola!" to all players + wait 5 seconds + + if {game_status} is "end": + send "game end" + send title "&4Konec hry" to all players + # VYHODNOCENÍ BODŮ + + loop 10 times: + execute console command "/scoreboard players set @a[scores={IDlist=%loop-number%}] Win %{teamscore::%loop-number%}%" + if loop-number is 10: + execute console command "/scoreboard players set @a[scores={IDlist=20}] Win %{teamscore::%loop-number%}%" + else: + execute console command "/scoreboard players set @a[scores={IDlist=1%loop-number%}] Win %{teamscore::%loop-number%}%" + + set {game_on} to "False" + send "game stop" + wait 5 seconds + make console execute command "/function ctf:vlajky" + wait 3 seconds + teleport all players to {lobbylocation} + set {gaming_players::*}'s gamemode to adventure + wait 5 seconds + execute console command "/stopscript_flags" + +#/give Anorak_1 minecraft:splash_potion{CustomPotionEffects:[{Id:7,Amplifier:10,Duration:1}]} 1 +command /flags_setpotionitem: + permission: skript.op + trigger: + clear player's inventory + execute console command "/give %player% minecraft:lingering_potion{CustomPotionEffects:[{Id:7,Amplifier:10,Duration:1}]} 1" + set {dmgpotion} to player's held item + clear player's inventory + +#/give Anorak_1 bow{Enchantments:[{id:power,lvl:50}],HideFlags:1} 1 +command /flags_setbowitem: + permission: skript.op + trigger: + clear player's inventory + execute console command "/give %player% bow{Enchantments:[{id:power,lvl:50}],HideFlags:1} 1" + set {instabow} to player's held item + clear player's inventory + +command /flags_setwhiteflag: + permission: skript.op + trigger: + clear player's inventory + execute console command "/give %player% minecraft:white_banner" + set {white_flag} to player's held item + clear player's inventory + +function spawnteam(team: integer, spawner: integer): + loop entries of team "IDList%{_team}%": + teleport loop-value to location at {spawn_location::%{_spawner}%} + set loop-value's gamemode to adventure + give loop-value {instabow} + give loop-value 16 arrow + +function spawngate(otvor: number): + loop 10 times: + set {_struct} to structure named "flags_gate%{_otvor}%" + if {gate_rotation::%loop-number%} is "Ne": + set rotation of structure {_struct} to NONE + if {gate_rotation::%loop-number%} is "Ano": + set rotation of structure {_struct} to clockwise 90 + place structure {_struct} at {gate_location::%loop-number%} + +on click on a banner: + if block is white_banner: + if event-player's gamemode is adventure: + set event-block to air + add event-player to {flag_claimed::*} + play sound "block.note_block.bell" at volume 50 to player + give player {white_flag} + +on death of player: + if {flag_claimed::*} contains victim: + remove victim from {flag_claimed::*} + set block at victim's location to white banner + add victim's uuid to {deadplayers::*} + launch ball large coloured yellow fading to light green and black at victim's location with duration 0 + +on respawn: + if {deadplayers::*} contains player's uuid: + clear player's inventory + set player's gamemode to spectator + teleport player to {spectatorlocation} + wait 20 ticks + set player's gamemode to adventure + set player's gamemode to spectator + +on food bar change: + cancel event + +on walking on carpet: + if event-player's gamemode is adventure: + loop blocks in radius 0.5 around the event-block: + if loop-block is hopper: + if {flag_claimed::*} contains event-player: + send "Gratuluji, ukořistil jsi vlajku" to event-player + play sound "entity.firework_rocket.launch" at volume 50 to player + launch ball large coloured green, lime and yellow fading to light green and black at player's location with duration 0.01 + remove event-player from {flag_claimed::*} + add event-player to {flag_won::*} + loop entries of team of event-player: + set loop-value-2's gamemode to spectator + +on player move: + if {stop_players} is "True": + if {gaming_players::*} contains player: + cancel event + +command /flags_checklist: + permission: skript.op + trigger: + if size of {spawn_location::*} is 10: + send "Spawny: §a✔" to player + else: + send "Spawny: §4✕" to player + if size of {potion_locations::*} is 10: + send "Potiony: §a✔" to player + else: + send "Potiony: §4✕" to player + if size of {flag_locations::*} is 5: + send "Vlajky: §a✔" to player + else: + send "Vlajky: §4✕" to player + if size of {gate_location::*} is 10: + send "Brány: §a✔" to player + else: + send "Brány: §4✕" to player + if {spectatorlocation} exists: + send "Spectator spawn: §a✔" + else: + send "Spectator spawn: §4✕" + if {introlocation} exists: + send "Intro lokace: §a✔" to player + else: + send "Intro lokace: §4✕" to player + if {lobbylocation} exists: + send "Lobby lokace: §a✔" + else: + send "Lobby lokace: §4✕" + if {dmgpotion} exists: + send "Potion pro spawner: §a✔" + else: + send "Potion pro spawner: §4✕" + if {white_flag} exists: + send "Vlajka do inventáře: §a✔" + else: + send "Vlajka do inventáře: §4✕" + if {instabow} exists: + send "Luk do inventáře: §a✔" + else: + send "Luk do inventáře: §4✕" + +command /flags_scorelist: + permission: skript.op + trigger: + loop 10 times: + send "Team %loop-number%:" + send {teamscore::%loop-number%} + +command /flags_scoreinit: + permission: skript.op + trigger: + set {teamscore::1} to 0 + set {teamscore::2} to 0 + set {teamscore::3} to 0 + set {teamscore::4} to 0 + set {teamscore::5} to 0 + set {teamscore::6} to 0 + set {teamscore::7} to 0 + set {teamscore::8} to 0 + set {teamscore::9} to 0 + set {teamscore::10} to 0 + +command /flags_forcestop: + permission: skript.op + trigger: + execute console command "/gamerule keepInventory false" + set {game_status} to "end" + +command /flags_setintroloc: + permission: skript.op + trigger: + set {introlocation} to player's location + send "Lokace Intra nastavena" + +command /flags_setlobbyloc: + permission: skript.op + trigger: + set {lobbylocation} to player's location + send "Lokace Lobby nastavena" + +command /flags_setgate : + description: Set one of the gate positions + usage: /spawnerset + permission: skript.op + trigger: + if arg-2 is "Ano" or "Ne": + if arg-1 < 11: + if arg-1 > 0: + set {gate_location::%arg-1%} to player's location + set {gate_rotation::%arg-1%} to arg-2 + send "Set gate location %arg-1%" to player + if arg-1 < 0: + send "You must specify a number from 1-10" + if arg-1 > 10: + send "You can only set 10 gate positions" + else: + send "Nastavení rotace musí být Ano nebo Ne" + +command /flags_listgates: + permission: skript.op + trigger: + loop 10 times: + send "Gate %loop-number%:" to player + send {gate_location::%loop-number%} to player + send {gate_rotation::%loop-number%} to player + +command /flags_setflag: + permission: skript.op + description: Set flag location + executable by: players + trigger: + add player's location to {flag_locations::*} + +command /flags_listflags: + description: List flag locations + usage: /flaglist + permission: skript.op + trigger: + loop {flag_locations::*}: + send "&4%loop-index%: &7%loop-value%" to player + +command /flags_removeflags: + description: Remove all flags + permission: skript.op + trigger: + clear {flag_locations::*} + +command /flags_setspawner : + description: Set one of the spawn positions + permission: skript.op + trigger: + if arg-1 < 11: + if arg-1 > 0: + set {spawn_location::%arg-1%} to player's location + send "Set spawn location %arg-1%" to player + if arg-1 < 0: + send "You must specify a number from 1-10" + if arg-1 > 10: + send "You can only set 10 spawn positions" + +command /flags_listspawners: + description: List all spawn positions + permission: skript.op + trigger: + loop 10 times: + send "Spawn point %loop-number%:" to player + send {spawn_location::%loop-number%} to player + +command /flags_removespawners: + description: Remove all spawn positions + permission: skript.op + trigger: + loop 10 times: + clear {spawn_locations::%loop-number%} + send "Removed all spawn locations" + +command /flags_setpotion: + description: Set potion location + permission: skript.op + trigger: + add player's location to {potion_locations::*} + send "Potion location set" + +command /flags_listpotions: + description: List potion locations + usage: /potionlist + permission: skript.op + trigger: + send "Potion list:" + loop {potion_locations::*}: + send "&4%loop-index%: &7%loop-value%" to player + +command /flags_removepotions: + description: Remove all potions + usage: /potionremoveall + permission: skript.op + trigger: + clear {potion_locations::*} + send "Removed ALL potion locations" + +command /flags_listclaims: + description: list claims + permission: skript.op + trigger: + send {flag_claimed::*} to player + +command /flags_setspectatorspawn: + permission: skript.op + trigger: + set {spectatorlocation} to player's location + send "Spectator nastaven" + +command /flags_nextround: + permission: skript.op + trigger: + set {game_status} to "next" diff --git a/flagsloop.sk b/flagsloop.sk new file mode 100644 index 0000000..78b9c42 --- /dev/null +++ b/flagsloop.sk @@ -0,0 +1,313 @@ +command /minigame_flags_start: + description: Zapni celou minihru flags + usage: /minigame_flags_start + executable by: the console and players + permission: skript.op + trigger: + execute console command "/gamerule keepInventory true" + clear {gaming_players::*} + loop 10 times: + loop entries of team "IDList%loop-number%": + add loop-value-2 to {gaming_players::*} + broadcast "Načítám minihru Vlajky" + send title "§2Vlajky" to all players + set {game_status} to "init" + set {game_on} to "True" + wait 2 seconds + send subtitle "Teleportuji" to all players + wait 1 second + set {intro} to "True" + set gamemode of {gaming_players::*} to adventure + teleport {gaming_players::*} to {introlocation} + set {stop_players} to "True" + hide {gaming_players::*} + wait 1 seconds + send "§e----------- Vlajky -----------" to {gaming_players::*} + send " V této minihře máte za úkol, jako první získat vlajku na středu, kterou vezmene pravím kliknutím a donést jí domů, ale pozor, protivník tě může dát na jednu rádu lukem, proto jsou po stranách instakill potiony, který můžeš použít jako obranu." to {gaming_players::*} + wait 15 seconds + set {stop_players} to "False" + reveal {gaming_players::*} + + while {game_on} is "True": + if {game_status} is "init": # kód před prvním startem + + # procesy před startem + + clear {flag_won::*} + set {teamscore::1} to 0 + set {teamscore::2} to 0 + set {teamscore::3} to 0 + set {teamscore::4} to 0 + set {teamscore::5} to 0 + set {teamscore::6} to 0 + set {teamscore::7} to 0 + set {teamscore::8} to 0 + set {teamscore::9} to 0 + set {teamscore::10} to 0 + + + # //procesy před startem + + set {flags_kola} to 1 + clear inventory of all players + wait 20 ticks + send title "§4§l1. KOLO" to all players + + if {flags_kola} is 1: + spawngate(3) + spawnteam(1,1) + spawnteam(2,2) + spawnteam(3,3) + spawnteam(10,4) + spawnteam(4,5) + spawnteam(9,6) + spawnteam(5,7) + spawnteam(8,8) + spawnteam(6,9) + spawnteam(7,10) + + loop {flag_locations::*}: + set block at loop-value to white banner + + + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + + set {game_status} to "playing" + + set {flags_timer} to {čas_kola} + + wait 5 seconds + send title "§4§l%{flags_kola}%. KOLO" with subtitle "3" to all players + play sound "block.note_block.bell" at volume 50 to all players + wait 1 second + send title "§4§l%{flags_kola}%. KOLO" with subtitle "2" to all players + play sound "block.note_block.bell" at volume 50 to all players + spawngate(2) + wait 1 second + send title "§4§l%{flags_kola}%. KOLO" with subtitle "1" to all players + play sound "block.note_block.bell" at volume 50 to all players + wait 1 second + send title "GO" with subtitle "" to all players + play sound "block.note_block.bell" at volume 50 with pitch 18 to all players + spawngate(1) + + + if {game_status} is "next": + + loop {flag_locations::*}: + loop all blocks in radius 35 around loop-value-1: + if loop-value-2 is banner: + set block at loop-value-2 to air + loop 10 times: + loop entries of team "IDList%loop-number%": + if {flag_won::*} contains loop-value-2: + set {teamscore::%loop-number-1%} to {teamscore::%loop-number-1%} + 1 + clear inventory of all players + loop {potion_locations::*}: + loop all entities in radius 4 around loop-value-1: + kill loop-value-2 + + set {flags_kola} to {flags_kola} + 1 + + + clear {flag_won::*} + spawngate(3) + + if {flags_kola} is 2: + + spawnteam(2,1) + spawnteam(3,2) + spawnteam(1,3) + spawnteam(7,4) + spawnteam(8,5) + spawnteam(6,6) + spawnteam(9,7) + spawnteam(5,8) + spawnteam(4,9) + spawnteam(10,10) + + loop {flag_locations::*}: + set block at loop-value to white banner + + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + + set {game_status} to "playing" + + if {flags_kola} is 3: + spawnteam(6,1) + spawnteam(9,2) + spawnteam(8,3) + spawnteam(7,4) + spawnteam(3,5) + spawnteam(1,6) + spawnteam(4,7) + spawnteam(2,8) + spawnteam(5,9) + spawnteam(10,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 4: + spawnteam(10,1) + spawnteam(6,2) + spawnteam(2,3) + spawnteam(5,4) + spawnteam(3,5) + spawnteam(4,6) + spawnteam(1,7) + spawnteam(8,8) + spawnteam(7,9) + spawnteam(9,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 5: + spawnteam(5,1) + spawnteam(3,2) + spawnteam(6,3) + spawnteam(2,4) + spawnteam(7,5) + spawnteam(10,6) + spawnteam(8,7) + spawnteam(9,8) + spawnteam(4,9) + spawnteam(1,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 6: + spawnteam(1,1) + spawnteam(9,2) + spawnteam(10,3) + spawnteam(8,4) + spawnteam(2,5) + spawnteam(7,6) + spawnteam(3,7) + spawnteam(6,8) + spawnteam(4,9) + spawnteam(5,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 7: + spawnteam(5,1) + spawnteam(1,2) + spawnteam(6,3) + spawnteam(4,4) + spawnteam(7,5) + spawnteam(3,6) + spawnteam(8,7) + spawnteam(2,8) + spawnteam(9,9) + spawnteam(10,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 8: + spawnteam(5,1) + spawnteam(6,2) + spawnteam(1,3) + spawnteam(10,4) + spawnteam(2,5) + spawnteam(9,6) + spawnteam(3,7) + spawnteam(8,8) + spawnteam(4,9) + spawnteam(7,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + + if {flags_kola} is 9: + spawnteam(9,1) + spawnteam(3,2) + spawnteam(10,3) + spawnteam(2,4) + spawnteam(6,5) + spawnteam(1,6) + spawnteam(7,7) + spawnteam(5,8) + spawnteam(8,9) + spawnteam(4,10) + loop {flag_locations::*}: + set block at loop-value to white banner + loop {potion_locations::*}: + drop {dmgpotion} named "§4Insta-kill potion" at loop-value + set {game_status} to "playing" + if {flags_kola} is 10: + set {game_status} to "end" + else: + + send title "§4§l%{flags_kola}%. KOLO" to all players + wait 5 second + send title "§4§l%{flags_kola}%. KOLO" with subtitle "3" to all players + play sound "block.note_block.bell" at volume 50 to all players + wait 1 second + send title "§4§l%{flags_kola}%. KOLO" with subtitle "2" to all players + play sound "block.note_block.bell" at volume 50 to all players + spawngate(2) + wait 1 second + send title "§4§l%{flags_kola}%. KOLO" with subtitle "1" to all players + play sound "block.note_block.bell" at volume 50 to all players + wait 1 second + send title "GO" with subtitle "" to all players + play sound "block.note_block.bell" at volume 50 with pitch 18 to all players + spawngate(1) + + set {flags_timer} to {čas_kola} # NASTAVENÍ ČASU + + if {game_status} is "playing": # kód kontroly konce kola + send action bar "§4§lČas: §7%{flags_timer}%" to all players + set {flags_timer} to {flags_timer} - 1 + wait 1 second + if {flags_timer} is 0: + send title "§4§lDošel čas!" to all players + set {gaming_players::*}'s gamemode to spectator + set {game_status} to "next" + wait 5 seconds + + if size of {flag_won::*} is 5: + set {game_status} to "next" + set {gaming_players::*}'s gamemode to spectator + wait 1 second + send title "§a§lKonec kola!" to all players + wait 5 seconds + + if {game_status} is "end": + send "game end" + send title "&4Konec hry" to all players + # VYHODNOCENÍ BODŮ + + loop 10 times: + execute console command "/scoreboard players add @a[scores={IDlist=%loop-number%}] Win %{teamscore::%loop-number%}%" + if loop-number is 10: + execute console command "/scoreboard players add @a[scores={IDlist=20}] Win %{teamscore::%loop-number%}%" + else: + execute console command "/scoreboard players add @a[scores={IDlist=1%loop-number%}] Win %{teamscore::%loop-number%}%" + + set {game_on} to "False" + send "game stop" + wait 5 seconds + make console execute command "/function ctf:vlajky" + wait 3 seconds + teleport {gaming_players::*} to {lobbylocation} + set {gaming_players::*}'s gamemode to adventure diff --git a/fs.sk b/fs.sk new file mode 100644 index 0000000..a6622dd --- /dev/null +++ b/fs.sk @@ -0,0 +1,299 @@ +# A script by Death_Source +# Discord: Death_Source#0336 +# Have fun with it! + + +#OPTIONS HERE + +Options: + + #People who are allowed to use IGS + allowed: Anorak_1 + +#DO NOT DELETE + +on script load: + set {allowed::*} to split "{@allowed}" at ", " +on command "sk reload igs": + set {allowed::*} to split "{@allowed}" at ", " + + +#CODE HERE +#Challenge: edit the code using the code while in-game and then use the edited code to re-put the old code in this code + +command /scripts [] [] [] [] []: + permission: scripts.access + trigger: + if arg-1 is "reload": + make player execute command "sk reload fs" + if arg-1 is "create": + if {allowed::*} contains player's name: + if arg-2 is set: + if arg-2 does not contain ".sk": + send "&6You forgot to add the &d.sk &6extension!" + stop + send "&dCreating file..." + create file path "plugins/Skript/scripts/%arg-2%" + wait 1 second + loop 50 times: + wait 1 tick + set {_loop_number_create} to loop-number + if {_loop_number_create} is 1: + set line {_loop_number_create} of file path "plugins/Skript/scripts/%arg-2%" to "##Your empty .sk file made in -game!&f##" + send {_loop_number_create} to player + else: + set line {_loop_number_create} of file path "plugins/Skript/scripts/%arg-2%" to "####" + send {_loop_number_create} to player + + execute console command "sk reload %arg-2%" + send "&eComplete! &a%arg-2% &a has been successfully built." + if arg-1 is "open3": + if {allowed::*} contains player's name: + if arg-2 is set: + if arg-2 does not contain ".sk": + send "&dUse &e.sk &dafter the file name!" + stop + send "" + send "&a+++++ &dOpening &e%arg-2% &d(part 3)... &a+++++" + wait 1 second + send formatted "&dClick &ahere &dto add line!" + send "" + loop 70 times: + set {_l} to loop-value + 139 + if line {_l} of file path "plugins/Skript/scripts/%arg-2%" is set: + if {_l} = 210: + send " " + send formatted "&dCould only load part of the script due to its length! &6>>" + stop + set {_linee::%{_l}%} to line {_l} of file path "plugins/Skript/scripts/%arg-2%" + send formatted " &d(%{_l}%&d)&e %{_linee::%{_l}%}%" + if arg-1 is "open2": + if {allowed::*} contains player's name: + if arg-2 is set: + if arg-2 does not contain ".sk": + send "&dUse &e.sk &dafter the file name!" + stop + send "" + send "&a+++++ &dOpening &e%arg-2% &d(part 2)... &a+++++" + wait 1 second + send formatted "&dClick &ahere &dto add line!" + send "" + loop 70 times: + set {_l} to loop-value + 69 + if line {_l} of file path "plugins/Skript/scripts/%arg-2%" is set: + if {_l} = 140: + send " " + send formatted "&dCould only load part of the script due to its length! &6>>" + stop + set {_linee::%{_l}%} to line {_l} of file path "plugins/Skript/scripts/%arg-2%" + send formatted " &d(%{_l}%&d)&e %{_linee::%{_l}%}%" + if arg-1 is "open": + if {allowed::*} contains player's name: + if arg-2 is set: + if arg-2 does not contain ".sk": + send "&dUse &e.sk &dafter the file name!" + stop + send "" + send "&a+++++ &dOpening &e%arg-2%&d... &a+++++" + wait 1 second + send formatted "&dClick &ahere &dto add line!" + send "" + loop 70 times: + set {_l} to loop-value + if line {_l} of file path "plugins/Skript/scripts/%arg-2%" is set: + if {_l} = 70: + send " " + send formatted "&dCould only load part of the script due to its length! &6>>" + stop + set {_linee::%loop-value%} to line loop-value of file path "plugins/Skript/scripts/%arg-2%" + send formatted " &d(%loop-value%&d)&e %{_linee::%loop-value%}%" + if arg-1 is "remove": + if {allowed::*} contains player's name: + if file path "plugins/Skript/scripts/%arg-2%" exists: + + send formatted "&e &4Are you sure you want to remove this file: &e%arg-2%&4? &e &a-confirm-" + if arg-1 is "forceremove": + if {allowed::*} contains player's name: + delete file path "plugins/Skript/scripts/%arg-2%" + send "&dSuccessfully removed file &e%arg-2%&d." + execute console command "sk reload deaths.sk" + if arg-1 is "addline": + if {allowed::*} contains player's name: + set metadata "edit2" of player to true + send "&dType up to which line to fill in!" + set metadata "editscript" of player to arg-2 + + if arg-1 is "help": + if {allowed::*} contains player's name: + if arg-2 is "open": + send "&d&l------------------------------" + send " " + send "&eCommand: &d/scripts open (script name).sk" + send " " + send "&eDescription: " + send "&cOpens a certain script file, sending it in your chat. Due to its size you may need to click the option &ePart (2/3/4) &cat the end of the script file. It also sends a menu of other options." + send " " + send formatted "&d<< Back to Help " + send " " + send "&d&l------------------------------" + stop + if arg-2 is "create": + send "&d&l------------------------------" + send " " + send "&eCommand: &d/scripts create (script name).sk" + send " " + send "&eDescription: " + send "&cThis is the option for creating a script file from blank. It will set the first 50 lines of your script file to &e""##"" &cas to accomodate editing." + send " " + send formatted "&d<< Back to Help " + send " " + send "&d&l------------------------------" + stop + if arg-2 is "edit": + send "&d&l------------------------------" + send " " + send "&eCommand: &d/scripts edit (script name).sk &a(line number)" + send " " + send "&eDescription: " + send "&cAlthough this command may be used, it is much easier to directly edit scripts from the &e/scripts open &cmethod. However if you choose to use it, it will let you edit directly any line of any script in your scripts folder." + send " " + send "&eExample: &d/scripts edit igs.sk 5" + send " " + send formatted "&d<< Back to Help " + send " " + send "&d&l------------------------------" + stop + if arg-2 is "list": + send "&d&l------------------------------" + send " " + send "&eCommand: &d/scripts list" + send " " + send "&eDescription: " + send "&cSends the list of all scripts in your scripts folder. You can edit them from this menu by clicking on their names." + send " " + + send formatted "&d<< Back to Help " + send " " + send "&d&l------------------------------" + stop + if arg-2 is "remove": + send "&d&l------------------------------" + send " " + send "&eCommand: &d/scripts remove (script name)" + send " " + send "&eDescription: " + send "&cDeletes a certain script. Requires confirmation to proceed." + send " " + send formatted "&d<< Back to Help " + send " " + send "&d&l------------------------------" + stop + send " " + send " " + send "&d&l-------&r&eList of &aIGS Commands&o&d&l--------" + send " " + send formatted " &e(&d?&e) &6/scripts &bopen &e(script name)" + send formatted " &e(&d?&e) &6/scripts &bcreate &e(script name)" + send formatted " &e(&d?&e) &6/scripts &bedit &e(script name) &b(line number)" + send formatted " &e(&d?&e) &6/scripts &blist" + send formatted " &e(&d?&e) &6/scripts &bremove &e(script name)" + send " " + send "&d&l------------------------------" + send " " + + + + if arg-1 is "edit": + if {allowed::*} contains player's name: + if arg-2 is set: + if arg-3 is set: + if line arg-3 of file path "plugins/Skript/scripts/%arg-2%" is set: + set {_linee::%arg-3%} to line arg-3 of file path "plugins/Skript/scripts/%arg-2%" + send "&d-----Line %arg-3%&d-----" + send "&c%{_linee::%arg-3%}%" + send "&6Type out what you want the line to become! To close, type ""close""." + set metadata tag "editscript" of player to arg-2 + set metadata tag "editline" of player to arg-3 + set metadata tag "edit" of player to true + if arg-1 is "list": + if {allowed::*} contains player's name: + set {_content2::*} to all files of dir path "plugins/Skript/scripts" + loop all numbers from 1 to 30: + set {_l} to loop-value + if "%{_l}th element of {_content2::*}%" is not "": + set {_lc} to {_l}th element of {_content2::*} + + set {_name} to file name of file path "%{_lc}%" + add {_name} to {_content1::*} + set {_n} to amount of {_content1::*} + send "&dWow! &eThere are &a%{_n}% &escript files:" + loop {_n} times: + set {_l} to loop-value + set {_c} to {_l}th element of {_content1::*} + + send formatted " &c%{_l}th element of {_content1::*}% " + + if arg-1 is "setline": + if {allowed::*} contains player's name: + if arg-2 is set: + if arg-3 is set: + send "&dSuccessfully changed line &e%arg-3% &dof &e%arg-2% &dto:" + send "&e%arg-5%" + send "&6Indentation: %arg-4% &6tabs." + send formatted "&dClick &ahere &dto reload!" + send formatted " &dOpen File " + set {_num} to arg-4 + set {_space} to " " + set {_text} to "" + loop {_num} times: + set {_text} to "%{_space}%%{_text}%" + + set line arg-3 of file path "plugins/Skript/scripts/%arg-2%" to "%{_text}%%arg-5%" + if arg-1 is "setspace": + if {allowed::*} contains player's name: + set metadata tag "edit1" of player to true + set metadata tag "editscript" of player to arg-2 + set metadata tag "editline" of player to arg-3 + set metadata tag "message" of player to arg-5 + send "&dType the number of spaces there will be!" + if arg-1 is not set: + if {allowed::*} contains player's name: + make player execute command "scripts help" + stop + +on chat: + if metadata tag "edit" of player is true: + if message is "close": + cancel event + set metadata "edit" of player to false + stop + else: + cancel event + set {_script} to metadata tag "editscript" of player + set {_line} to metadata tag "editline" of player + set metadata tag "edit" of player to false + send "&dWhat should the indentation be (spaces)?" + send formatted " &e[&d0&e]" + send formatted " &e[&d1&e]" + send formatted " &e[&d2&e]" + send formatted " &e[&d3&e]" + send formatted " &e[&d4&e]" + send formatted " &e[&d5&e]" + send formatted " &e[&d6&e]" + send formatted " &e[&d7&e]" + send formatted " &e[&d8&e]" + send formatted " &e[&dCustom&e]" + if metadata "edit1" of player is true: + cancel event + make player execute command "scripts setline %metadata tag "editscript" of player% %metadata tag "editline" of player% %message parsed as number% %metadata tag "message" of player%" + set metadata tag "edit1" of player to false + if metadata "edit2" of player is true: + set {_script} to metadata "editscript" of player + set {_num} to message parsed as number + set line {_num} of file path "plugins/Skript/scripts/%{_script}%" to "##" + + + + + +#execute console command "minecraft:give %player% written_book{pages:['{""text"":""%{_content2::*}%""}'],title:Book,author:""http://minecraft.tools/""}" diff --git a/init.sk b/init.sk new file mode 100644 index 0000000..9511af0 --- /dev/null +++ b/init.sk @@ -0,0 +1,45 @@ +on load: + send "[GG_Systems] Init Loaded" to console + send "[GG_Systems] Flags Ready" + set {čas_kola} to 90 + +on skript start: + if file path "plugins/Skript/scripts/-flags.sk" is not missing: + if file path "plugins/Skript/scripts/flags.sk" is not missing: + delete file path "plugins/Skript/scripts/-flags.sk" + wait 1 second + disable script file "flags.sk" + set {flags_state} to "stop" + +command /startscript_flags: + description: Start the flags script and allow it to be used + usage: /startflags + executable by: players and console + permission: skript.op + trigger: + if file path "plugins/Skript/scripts/flags.sk" is not missing: + disable script file "flags.sk" + #delete file path "plugins/Skript/scripts/flags.sk" + if file path "plugins/Skript/scripts/-flags.sk" is missing: + download from "https://raw.githubusercontent.com/Adamnumber1/flags_skript/main/flags.sk" to file path "plugins/Skript/scripts/-flags.sk": + enable script file "flags.sk" + reload script "flags" + enable script file "flags" + reload script "flags" + broadcast "§aNačítám Vlajky... " + wait 5 seconds + execute console command "/minigame_flags_start" + +command /stopscript_flags: + description: Stop the flags minigame and disable all commands + events + usage: /stopflags + executable by: players and console + permission: skript.op + trigger: + disable script file "flags.sk" + broadcast "§4Ukončuji Vlajky... " + +command /doas : + permission: skript.op + trigger: + execute console command arg-1 diff --git a/papik.sk b/papik.sk new file mode 100644 index 0000000..218a6a7 --- /dev/null +++ b/papik.sk @@ -0,0 +1,112 @@ +command /scoreupdate: + permission: skript.op + trigger: + set {teampoints_reset} to 0 + +on join: + set join message to "§e%player% se připojil." + +on quit: + set leave message to "§e%player% se odpojil." + +on placeholderapi placeholder request for the prefix "player": + if the identifier is "teammate": # The placeholder would be 'custom_message' + loop entries of team placeholder "team_name" from player: + if loop-value is not player: + if loop-value's gamemode is spectator: + add "§m&7%loop-value% ☠" to {_team_players::*} + else: + add "%loop-value% §a%loop-value's health * 2%%placeholder "team_color" from player%❤" to {_team_players::*} + if {_team_players::*} is not set: + set the result to "&7-" + else: + set the result to "%{_team_players::*}%" + + if the identifier is "myself": + set the result to "%player% §a%player's health * 2%%placeholder "team_color" from player%❤" + + if the identifier is "teampoints": + loop entries of team placeholder "team_name" from player: + add placeholder "objective_score_GridoGames" from loop-value to {_team_points::*} + loop {_team_points::*}: + set {_team_point} to {_team_point} + loop-value parsed as integer + set the result to "%{_team_point}%" + +on placeholderapi placeholder request for the prefix "game": + if the identifier is "kola": + set {_name} to "Kola" parsed as offline player + set the result to placeholder "objective_score_XD" from {_name} + if the identifier is "hra": + set {_name} to "Hry" parsed as offline player + set the result to placeholder "objective_score_XD" from {_name} + if the identifier is "poradi1": + if {teampoints_reset} < 0: + set {_lu} to "Anorak_1" parsed as player + clear {team_all_points::*} + loop 10 times: + clear {_team_point} + clear {_team_points::*} + loop entries of team "IDList%loop-number%": + add placeholder "objective_score_GridoGames" from loop-value-2 to {_team_points::*} + loop {_team_points::*}: + set {_team_point} to {_team_point} + loop-value-2 parsed as integer + if entries of team "IDList%loop-number%" is set: + set {teampoints::IDList%loop-number%} to {_team_point} + add {_team_point} to {team_all_points::*} + set {team_all_point::*} to reversed sorted {team_all_points::*} + + clear {1stteam} + clear {2stteam} + clear {3stteam} + set {1stset} to "" + set {2stset} to "" + set {3stset} to "" + loop 10 times: + if 3st element of {team_all_point::*} is {teampoints::IDList%loop-number%}: + if {3stteam} is not set: + set {3stteam} to "IDList%loop-number%" + #remove "IDList%loop-number%" from {_teams::*} + set {3stset} to "True" + continue + if 2st element of {team_all_point::*} is {teampoints::IDList%loop-number%}: + if {2stteam} is not set: + set {2stteam} to "IDList%loop-number%" + #remove "IDList%loop-number%" from {_teams::*} + set {2stset} to "True" + continue + if 1st element of {team_all_point::*} is {teampoints::IDList%loop-number%}: + if {1stteam} is not set: + set {1stteam} to "IDList%loop-number%" + #remove "IDList%loop-number%" from {_teams::*} + set {1stset} to "True" + + # reset loop + + set {teampoints_reset} to 60 + else: # {teampoints_reset} < 0: + set {teampoints_reset} to {teampoints_reset} - 1 + + if prefix of team {1stteam} is set: + if {teampoints::%{1stteam}%} is 0: + set the result to "&7-" + else: + set the result to "%prefix of team {1stteam}% &r%{teampoints::%{1stteam}%}%" + else: + set the result to "&7-" + #set {new::*} to sorted {play::*} + if the identifier is "poradi2": + if prefix of team {2stteam} is set: + if {teampoints::%{2stteam}%} is 0: + set the result to "&7-" + else: + set the result to "%prefix of team {2stteam}% &r%{teampoints::%{2stteam}%}%" + else: + set the result to "&7-" + if the identifier is "poradi3": + if prefix of team {3stteam} is set: + if {teampoints::%{3stteam}%} is 0: + set the result to "&7-" + else: + set the result to "%prefix of team {3stteam}% &r%{teampoints::%{3stteam}%}%" + else: + set the result to "&7-"