FrozenRealmColdScript: type: world debug: false events: on block ignites: - define location "l@,64,," - if { - if == 15 { - wait - repeat 10 { - wait 1t - if { - if { - actionbar "<&4><&l>The fire you just started was unable to cope with the low temperature" targets: } } } - modifyblock AIR - playeffect effect:SMOKE qty:10 - playsound sound:BLOCK_FIRE_EXTINGUISH volume:0.3 } } on player places block: - define location "l@,64,," - if { - if contains torch { - if == 15 { - wait - repeat 10 { - wait 1t - if { - actionbar "<&4><&l>The torch you just placed was unable to cope with the low temperature" targets: } } - modifyblock AIR - playeffect effect:SMOKE qty:10 - playsound sound:BLOCK_FIRE_EXTINGUISH volume:0.3 - drop } } } on player equips armor: - run s@FrozenRealmsInsulationScript on player joins: - run s@FrozenRealmsInsulationScript on denizen command: - run s@FrozenRealmsInsulationScript on player dies: - if == frozen { - random { - DETERMINE " Froze to death." - DETERMINE " Became a lonely frozen statue only yo crumble over time." - DETERMINE " Should wear something warmer the next time." } } on system time minutely: - run s@FrozenRealmsInsulationScript - foreach { - define location "l@,64,," - if { - if >= 14 { - if == day { - run s@FrozenRealmDamageScriptDAY } - if == night { - run s@FrozenRealmDamageScriptNIGHT } - run s@FrozenRealmSoundScript def: - run s@FrozenRealmEffectScript def: - flag ColdInsulation:0 duration:1m } } } FrozenRealmsInsulationScript: type: task debug: false script: - foreach { - flag ColdInsulation:0 - if contains i@leather { - flag ColdInsulation:+:1 duration:1m } - if contains i@leather { - flag ColdInsulation:+:1 duration:1m } - if contains i@leather { - flag ColdInsulation:+:1 duration:1m } - if contains i@leather { - flag ColdInsulation:+:1 duration:1m } } FrozenRealmDamageScriptNIGHT: type: task debug: false script: - foreach { - define 1 - define 5 "<&4><&l>With no sun to warm you up the temperature dropped even more, find shelter or you will die!" - define 9 HUNGER - define 10 SLOW - define 11 SLOW_DIGGING - define 12 WEAKNESS - define 13 "<&4><&l>As you wear leather you feel more comfortable, you should however still find shelter for the night." - define 14 "<&4><&l>The insulation of the leather armor helps you fightning the harsh enviroment." - define 15 "<&4><&l>Leather protects you from the harsh enviroment, put on some more and find shelter!" - define 16 "<&4><&l>You are starting to show signs of frostbite, hurry and find a shelter or wear some more leather!" - run s@FrozenRealmsInsulationScript - wait 2s - if == 0 { - if { - flag custom_death_cause:frozen duration:1s - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - ^hurt 2 - repeat 5 { - wait 10 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - ^hurt 2 } } } else if == 1 { - if { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - ^hurt 1 - repeat 5 { - wait 10 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - ^hurt 1 } } } else if == 2 { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - ^hurt 1 - repeat 5 { - wait 10 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - ^hurt 1 } } else if == 3 { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:21s p:1.5 - cast d:21s p:1.5 - cast d:21s p:1.5 - ^hurt 1 - repeat 2 { - wait 20 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:21s p:1.5 - cast d:21s p:1.5 - cast d:21s p:1.5 - ^hurt 1 } } else if == 4 { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:21s p:0.5 - ^hurt 1 - repeat 2 { - wait 20 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:11s p:0.5 - ^hurt 1 } } else { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - ^hurt 2 - repeat 5 { - wait 10 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - cast d:11s p:1.5 - ^hurt 2 } } } FrozenRealmDamageScriptDAY: type: task debug: false script: - foreach { - define 1 - define 4 "<&4><&l>It is freezing outside, find shelter!" - define 6 HUNGER - define 7 SLOW - define 8 SLOW_DIGGING - define 17 "<&4><&l>The enviroments leaves its marks on your condition. Find shelter or wear better protection!" - define 18 "<&4><&l>The harsh enviroment makes you feel miserable, put on some more protection or find shelter!" - define 19 "<&4><&l>To gain full protection against the elements you should wear full armor or find shelter." - define 20 "<&4><&l>The leather and the sun makes you feel comfortable despite the harsh enviroment." - run s@FrozenRealmsInsulationScript - wait 2s - if == 0 { - flag custom_death_cause:frozen duration:1s - cast d:21s p:0.8 - cast d:21s p:0.8 - cast d:21s p:0.8 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:21s p:0.8 - cast d:21s p:0.8 - cast d:21s p:0.8 - ^hurt 1 - repeat 2 { - wait 20 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:21s p:0.8 - cast d:21s p:0.8 - cast d:21s p:0.8 - ^hurt 1 } } else if == 1 { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - cast d:21s p:0.8 - cast d:21s p:0.8 - cast d:21s p:0.8 - repeat 2 { - wait 20 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - cast d:21s p:0.8 - cast d:21s p:0.8 - cast d:21s p:0.8 } } else if == 2 { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - cast d:21s p:0.8 - cast d:21s p:0.8 - repeat 2 { - wait 20 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - cast d:21s p:0.8 - cast d:21s p:0.8 } } else if == 3 { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - cast d:21s p:0.8 - repeat 2 { - wait 20 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - cast d:21s p:0.8 } } else if == 4 { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - repeat 2 { - wait 20 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } } } else { - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:21s p:0.8 - cast d:21s p:0.8 - cast d:21s p:0.8 - ^hurt 1 - repeat 2 { - wait 20 - repeat 5 { - wait 1t - if { - ^actionbar targets: } } - flag custom_death_cause:frozen duration:1s - cast d:21s p:0.8 - cast d:21s p:0.8 - cast d:21s p:0.8 - ^hurt 1 } } } FrozenRealmSoundScript: type: task debug: false script: - repeat 10 { - wait 6 - playsound sound:ITEM_ELYTRA_FLYING volume:0.2 } FrozenRealmEffectScript: type: task debug: false script: - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 } - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 } - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 } - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 } - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 } - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 } - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 } - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 } - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 } - ^foreach ].highest.points_between[].highest>].parse[simple]> { - wait 1t - playeffect l@ effect:CLOUD qty: - playeffect l@ effect:SNOWBALL_BREAK qty:10 }