Paste #101981: Berserker_Chestplate_Script (OLD)

Date: 2022/10/04 16:23:16 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste Edit Of Paste 101980 View Edit Report
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20


berserker_chestplate_script:
    type: world
    debug: true
    events:
        on player damaged:
        - if <player.equipment_map.get[chestplate].advanced_matches[berserker_chestplate].if_null[false]>:
            - define armor_multiplier <player.health.div[-20].add[1].mul[3.5].add[8]>
            - define armor_toughness_multiplier <player.health.div[-20].add[1].mul[5].add[3]>
            - definemap armor_boost:
                generic_armor:
                    1:
                        operation: ADD_SCALAR
                        amount: <[armor_multiplier]>
                        slot: chest
                generic_armor_toughness:
                    1:
                        operation: ADD_SCALAR
                        amount: <[armor_toughness_multiplier]>
                        slot: chest
            - inventory adjust slot:chest attribute_modifiers:<[armor_boost]>