kitpvpConfig: type: yaml data config: streaks: a: 50 b: 100 c: 200 d: 500 e: 1000 ## MainEventsKitPvp: type: world events: on server start: - run looping_scoreboard_script instantly - inject Kitpvp_Load_Config on reload scripts: - inject Kitpvp_Load_Config on shutdown: - execute as_server "denizen save" on player join: - if { - flag player kitpvp_kills:0 } - flag player kitpvp_spree:0 - flag player kitpvp_bounty:0 on player death: - if { - define player "" - run player_specific_streak_count player: instantly - inject kitpvp_spree_shutdown } else if { - define player "" - run player_specific_streak_count player: instantly - inject kitpvp_spree_shutdown } on player shoots bow: - if < 1.0 { - determine CANCELLED } on player breaks BEACON: - if { - queue clear } - execute as_server "tempban 1h Auto-beacon-detector fandt dig!" - determine cancelled on player damages BEACON: - repeat 5 { - narrate "<&c>ADVARSEL<&co> Smadring af BEACON medfører ban!" } - execute as_server "spawn " Kitpvp_Load_Config: type: task script: - if { - yaml create id:ggpvp_scoreboard # Setup Basics - yaml id:ggpvp_scoreboard set Text.Scoreboard_Header:&3GGPVP - yaml id:ggpvp_scoreboard set Text.Online:&bOnline - yaml id:ggpvp_scoreboard set Text.Penge:&bPenge - yaml id:ggpvp_scoreboard set Text.Kills:&bKills - yaml id:ggpvp_scoreboard "savefile:../GGPVP/scoreboard.yml" } else { - yaml "load:../GGPVP/scoreboard.yml" id:ggpvp_scoreboard } kitpvp_spree_shutdown: type: task script: - if { - if > 0 { - playsound ANVIL_LAND Volume:0.5 Pitch:2.0 - drop i@NetherStar qty: - define action "<&6> <&1>på <&6> kills blev <&4>SHUDOWN <&1>af <&c> (Bounty<&co> )" - flag player kitpvp_bounty:0 - flag player kitpvp_spree:0 - repeat 10 { - adjust action_bar: - wait 1s } } } announce_killstreaks_bounty: type: task script: - flag player kitpvp_bounty:++ - playsound ORB_PICKUP Volume:0.2 Pitch:0.5 - define action "<&6> <&1>er på <&6><&l> <&1>streaks! <&7>(BOUNTY<&co> )" - repeat 10 { - adjust action_bar: - wait 1s } player_specific_streak_count: type: task script: - flag player kitpvp_kills:++ - flag player kitpvp_spree:++ - if { - if == { - inject announce_killstreaks_bounty } else if == { - inject announce_killstreaks_bounty } else if == { - inject announce_killstreaks_bounty } else if == { - inject announce_killstreaks_bounty } else if == { - inject announce_killstreaks_bounty } } - if { - if == 1 { - narrate "<&a><&l>DOUBLE KILL" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:7s power:1 - flag player kitpvp_combo:2 duration:140t } else if == 2 { - narrate "<&a><&l>TRIPLE KILL" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:8s power:1 - flag player kitpvp_combo:3 duration:160t } else if == 3 { - narrate "<&a><&l>QUADRA KILL" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:9s power:1 - flag player kitpvp_combo:4 duration:180t } else if == 4 { - narrate "<&a><&l>PENTA KILL" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - cast fire_resistance duration:10s power:1 - flag player kitpvp_combo:5 duration:200t } else if == 5 { - narrate "<&a><&l>HEXA KILL" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:6 duration:200t } else if == 6 { - narrate "<&a><&l>SEPTA KILL" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:7 duration:200t } else if == 7 { - narrate "<&a><&l>OCTA KILL (8)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:8 duration:200t } else if == 8 { - narrate "<&a><&l>NONA KILL (9)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:9 duration:200t } else if == 9 { - narrate "<&a><&l>DECA KILL (10)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:10 duration:200t } else if == 10 { - narrate "<&a><&l>HENDECA KILL (11)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:11 duration:200t } else if == 11 { - narrate "<&a><&l>DODECA KILL (12)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:12 duration:200t } else if == 12 { - narrate "<&a><&l>TRIDECA KILL (13)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:13 duration:200t } else if == 13 { - narrate "<&a><&l>QUADECA KILL (14)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:14 duration:200t } else if == 14 { - narrate "<&a><&l>PENTADECA KILL (15)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:15 duration:200t } else if == 15 { - narrate "<&a><&l>HEXADECA KILL (16)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:16 duration:200t } else if == 16 { - narrate "<&a><&l>HEPTADECA KILL (17)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:17 duration:200t } else if == 17 { - narrate "<&a><&l>OCTADECA KILL (18)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:18 duration:200t } else if == 18 { - narrate "<&a><&l>ENEADECA KILL (19)" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:19 duration:200t } else if == 19 { - narrate "<&a><&l>ICOSA KILL (20)" - playsound sound:WITHER_DEATH volume:0.6 pitch:1 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:20 duration:200t - announce "<&4><&l> har fået ICOSA KILL! (20)" - if { - flag player kitpvp_icosa:++ } else { - flag player kitpvp_icosa:1 } - wait 3s - repeat 15 { - firework star primary:yellow fade:white - wait 5t } - flag player kitpvp_bounty:++ - playsound ORB_PICKUP Volume:0.2 Pitch:0.5 - define action "<&6> <&1>er på <&6><&l> <&1>streaks! <&7>(BOUNTY<&co> )" - repeat 10 { - adjust action_bar: - wait 1s } } else if == 29 { - narrate "<&a><&l>TRIACONTA KILL (30)" - playsound sound:WITHER_DEATH volume:0.6 pitch:1 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:30 duration:200t - announce "<&6><&l> har fået TRIACONTA KILL! (30)" - wait 3s - repeat 15 { - firework star primary:yellow fade:white - wait 5t } - flag player kitpvp_bounty:++ - playsound ORB_PICKUP Volume:0.2 Pitch:0.5 - define action "<&6> <&1>er på <&6><&l> <&1>streaks! <&7>(BOUNTY<&co> )" - repeat 10 { - adjust action_bar: - wait 1s } } else if == 39 { - narrate "<&a><&l>TETRACANTA KILL (40)" - playsound sound:WITHER_DEATH volume:0.6 pitch:1 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:40 duration:200t - announce "<&c><&l> har fået TETRACANTA KILL! (40)" - wait 3s - repeat 15 { - firework star primary:yellow fade:white - wait 5t } - flag player kitpvp_bounty:++ - playsound ORB_PICKUP Volume:0.2 Pitch:0.5 - define action "<&6> <&1>er på <&6><&l> <&1>streaks! <&7>(BOUNTY<&co> )" - repeat 10 { - adjust action_bar: - wait 1s } } else if == 49 { - narrate "<&a><&l>PENTACONTA KILL (50)" - playsound sound:WITHER_DEATH volume:0.6 pitch:1 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - flag player kitpvp_combo:50 duration:200t - announce "<&c><&l> har fået PENTACONTA KILL! (50)" - wait 3s - repeat 15 { - firework star primary:yellow fade:white - wait 5t } - flag player kitpvp_bounty:++ - playsound ORB_PICKUP Volume:0.2 Pitch:0.5 - define action "<&6> <&1>er på <&6><&l> <&1>streaks! <&7>(BOUNTY<&co> )" - repeat 10 { - adjust action_bar: - wait 1s } } else { - flag player kitpvp_combo:++ duration:200t - narrate "<&6><&l> KILL ()" - playsound sound:ENDERDRAGON_GROWL volume:10 pitch:2 - playeffect effect:HAPPY_VILLAGER qty:100 data:1 offset:1.5 - cast speed duration:10s power:1 - firework power:1 star primary:red trail - if kitpvp_combo: } } else { - flag player kitpvp_combo:1 duration:140t } looping_scoreboard_script: type: task debug: false script: - while true { - foreach { - wait 2t - run player_specific_scoreboard_script player: instantly } - wait 2t } player_specific_scoreboard_script: type: task debug: false script: ##Syntax: - sidebar (add/remove/{set}) (title:) (lines:<#>|...) (values:<line>|...) (start:<#>/{num_of_lines}) (increment:<#>/{-1}) (players:<player>|...) (per_player) - define ID <player.name><server.current_time_millis> - scoreboard add id:<def[ID]> - scoreboard add id:<def[ID]> "objective:<yaml[ggpvp_scoreboard].read[Text.Scoreboard_Header].parse_color>" "lines:<yaml[ggpvp_scoreboard].read[Text.Penge].parse_color>" "score:<player.money.as_int>" - scoreboard add id:<def[ID]> "objective:<yaml[ggpvp_scoreboard].read[Text.Scoreboard_Header].parse_color>" "lines:<yaml[ggpvp_scoreboard].read[Text.Online].parse_color>" "score:<server.list_online_players.size>" - scoreboard add id:<def[ID]> "objective:<yaml[ggpvp_scoreboard].read[Text.Scoreboard_Header].parse_color>" "lines:<yaml[ggpvp_scoreboard].read[Text.Kills].parse_color>" "score:<player.flag[kitpvp_kills].as_int>" ## - scoreboard add id:<def[ID]> "objective:<yaml[ggpvp_scoreboard].read[Text.Scoreboard_Header].parse_color>" "lines:<&e>TEST: <&7><server.current_time_millis>" "score:1" - scoreboard add id:<def[ID]> viewers:<player> - wait <server.list_online_players.size.mul_int[2].add_int[<server.list_online_players.size>].add_int[2]>t - scoreboard remove id:<def[ID]> RefreshScoreboard: type: command name: boardgo script: - if !<player.is_op> { - narrate 'You must be an administrator to use this command!' - queue clear } - run looping_scoreboard_script instantly KitPvpCommands: type: command name: kpstats script: - if <context.args.size> > 0 { - if <context.args.get[1]> == "help" { - narrate "<&7>/kpstats help" - narrate "<&7>/kpstats <<>player<>>" - if !<player.is_op> { - narrate 'You must be an administrator to use this command!' - queue clear } - narrate "<&7>/kpstats reset <<>player<>>" } else if <context.args.get[1]> == "reset" { - if !<player.is_op> { - narrate 'You must be an administrator to use this command!' - queue clear } - if %arg_size% == 1 { - narrate "<&c>Wrong arguments! Brug <&7>/kpstats help" } else { - narrate "<&7>Reseting <context.args.get[2]>..." - flag server ResetPlayerKitPvpFinder:<context.args.get[2]> - flag server ResetPlayerKitPvpCheck:False - foreach <server.list_online_players> { - run ResetPlayerKitPvpRunner player:<def[value]> instantly - wait 1t } - if <server.flag[ResetPlayerKitPvpCheck]> == "True" - narrate "<&7>Succesfully reset player<&co> <context.args.get[2]>" else { - narrate "<&c>No player found to reset!" } } } else <context.args.size> == 1 { - define Target <server.match_offline_player[<context.args.get[1]>]||null> - if <def[Target]> == null { - narrate "Ingen spiller fundet!" - queue clear } - narrate "<&a><def[Target].name> har <&6><def[Target].flag[kitpvp_kills].as_int> <&a>kills." - queue clear } else { - narrate "<&c>For mange arguments! Brug <&7>/kpstats help" } } else { - narrate "<&a>Du har <&6><player.flag[kitpvp_kills].as_int> <&a>kills." } ResetPlayerKitPvpRunner: type: task script: - if <player.name> == <server.flag[ResetPlayerKitPvpFinder]> { ## Check plugin ! <pl@plugin.name> <el@element.as_plugin> ## - narrate "<&a>Dine stats er nu blevet reset!" - flag player kitpvp_kills:0 - flag player kitpvp_deaths:0 - flag server ResetPlayerKitPvpCheck:True }