Skip to content

Commit

Permalink
use match instated of constants, fix reset again
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Oct 25, 2023
1 parent cb7422b commit abb7be9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
5 changes: 4 additions & 1 deletion data/lt/functions/milestones/collectible.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#Grant players collectibles
execute if score collectible stats >= Goal1 constants as @a[current_world=true,tag=!collectibles.granted-one] run function lt:milestones/grant/one
execute if score collectible stats >= Goal2 constants as @a[current_world=true,tag=!collectibles.granted-two] run function lt:milestones/grant/two
execute if score collectible stats >= Goal3 constants as @a[current_world=true,tag=!collectibles.granted-there] run function lt:milestones/grant/there
execute if score collectible stats >= Goal4 constants as @a[current_world=true,tag=!collectibles.granted-four] run function lt:milestones/grant/four
execute if score collectible stats >= Goal5 constants as @a[current_world=true,tag=!collectibles.granted-five] run function lt:milestones/grant/five
execute if score collectible stats >= Goal5 constants as @a[current_world=true,tag=!collectibles.granted-five] run function lt:milestones/grant/five

execute as @a[tag=collectibles.admin] run function lt:milestones/util/update_from_score
9 changes: 1 addition & 8 deletions data/lt/functions/milestones/setup.mcfunction
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
scoreboard objectives add stats dummy
scoreboard objectives add stats constants

scoreboard players set Goal1 constants 5000
scoreboard players set Goal2 constants 10000
scoreboard players set Goal3 constants 15000
scoreboard players set Goal4 constants 20000
scoreboard players set Goal5 constants 25000
scoreboard objectives add stats dummy
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ collectible clear @s ltminigames:disguise{donation_goal:true,disguise:{entity:{t
collectible clear @s ltminigames:disguise{disguise:{entity:{type:"dummyplayers:dummy_player",tag:{ProfileID: [I; -1505211345, -855292401, -2116995351, 764383134], NoBasePlate:true,ShowArms:1,ArmorItems:[{},{},{},{id:"ltminigames:mob_hat",Count:1b,tag:{entity: {type: "tropicraft:failgull"}}}],HandItems:[{id:"minecraft:cookie",Count:1b},{id:"minecraft:cookie",Count:1b}],Pose:{LeftArm:[0f,261f,268f],RightArm:[0f,0f,91f]}}}}}
tag @s remove collectibles.granted-one
tag @s remove collectibles.granted-two
tag @s remove collectibles.granted-three
tag @s remove collectibles.granted-there
tag @s remove collectibles.granted-four
tag @s remove collectibles.granted-five
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
execute if score @s stats_controller matches 5 run scoreboard objectives setdisplay sidebar.team.dark_aqua
execute if score @s stats_controller matches 10 run scoreboard objectives setdisplay sidebar.team.dark_aqua stats
execute if score @s stats_controller matches 15 run team join stats @s
execute if score @s stats_controller matches 20 run team leave @s
scoreboard players set @s stats_controller 0
scoreboard players enable @s stats_controller

0 comments on commit abb7be9

Please sign in to comment.