NemesisSystemArmor: type: task script: - foreach key:key as:val: - narrate "<[key]> is set as <[val]>" #EquipHelmet: # type: task # script: OrcGruntEquip: debug: false type: world events: on husk||stray||ZOMBIFIED_PIGLIN||PIGLIN||WITHER_SKELETON spawns: - define headgear: - define material: - define pattern: - if : - equip head:<[headgear]> - else: - equip head:].with[trim=;pattern=<[Pattern]>]>]> - if : - define modifier - equip head:<[headgear]>[enchantments=,<[modifier]>] - define chestgear: - define material: - define pattern: - if : - equip chest:<[chestgear]> - else: - equip chest:].with[trim=;pattern=<[Pattern]>]>]> - if : - define modifier - equip chest:<[chestgear]>[enchantments=,<[modifier]>] - define leggear: - define material: - define pattern: - if : - equip legs:<[leggear]> - else: - equip legs:].with[trim=;pattern=<[Pattern]>]>]> - if : - define modifier - equip legs:<[leggear]>[enchantments=,<[modifier]>] - define bootgear: - define material: - define pattern: - if : - equip boots:<[bootgear]> - else: - equip boots:].with[trim=;pattern=<[Pattern]>]>]> - if : - define modifier - equip boots:<[bootgear]>[enchantments=,<[modifier]>] - if matches stray: - if : - random: - mount stray|phantom - mount stray|chicken - mount stray|spider - if : - define modifier - equip hand:bow[enchantments=,<[modifier]>] - stop - if matches wither_skeleton: - if : - random: - mount wither_skeleton|phantom - mount wither_skeleton|chicken - mount wither_skeleton|spider - mount wither_skeleton|wither_skeleton - if : - define modifier - equip hand:bow[enchantments=,<[modifier]>] - stop - random: - random: - repeat 1: - if : - equip offhand:shield - cast slow duration:infinite amplifier:0 - else: - cast speed duration:infinite amplifier:0 - if : - define modifier - equip hand:wooden_sword[enchantments=,<[modifier]>] - repeat 1: - equip hand:stone_sword - if : - equip offhand:shield - cast slow duration:infinite amplifier:0 - else: - cast speed duration:infinite amplifier:0 - if : - define modifier - equip hand:stone_sword[enchantments=,<[modifier]>] - repeat 1: - equip hand:golden_sword - if : - equip offhand:shield - cast slow duration:infinite amplifier:0 - else: - cast speed duration:infinite amplifier:0 - if : - define modifier - equip hand:golden_sword[enchantments=,<[modifier]>] - repeat 1: - equip hand:iron_sword - if : - equip offhand:shield - cast slow duration:infinite amplifier:0 - else: - cast speed duration:infinite amplifier:0 - if : - define modifier - equip hand:iron_sword[enchantments=,<[modifier]>] - repeat 1: - equip hand:diamond_sword - if : - equip offhand:shield - cast slow duration:infinite amplifier:0 - else: - cast speed duration:infinite amplifier:0 - if : - define modifier - equip hand:diamond_sword[enchantments=,<[modifier]>] - repeat 1: - equip hand:netherite_sword - if : - equip offhand:shield - cast slow duration:infinite amplifier:0 - else: - cast speed duration:infinite amplifier:0 - if : - define modifier - equip hand:netherite_sword[enchantments=,<[modifier]>] - random: - repeat 1: - equip hand:wooden_axe - equip offhand:wooden_axe - repeat 1: - equip hand:stone_axe - equip offhand:stone_axe - repeat 1: - equip hand:golden_axe - equip offhand:golden_axe - repeat 1: - equip hand:iron_axe - equip offhand:iron_axe - repeat 1: - equip hand:diamond_axe - equip offhand:diamond_axe - repeat 1: - equip hand:netherite_axe - equip offhand:netherite_axe - equip hand:trident OrcGruntSpearThrow: type: world events: on husk||ZOMBIFIED_PIGLIN||PIGLIN||WITHER_SKELETON targets entity: - if matches trident: - while ]> >= 5 && ]> <= 27: - wait 1s - if : - shoot trident origin: shooter: destination: speed:3 spread:5 - else if <[loop_index]> <= 50: - wait 3s - else: - stop #OrcGruntAxeAttack: # type: world # events: # on husk||ZOMBIFIED_PIGLIN||PIGLIN damages entity with:*_axe: # - determine PlayerStunAttack: type: world events: on player right clicks husk||stray||iron_golem||spider||creeper||ZOMBIFIED_PIGLIN||PIGLIN||MAGMA_CUBE||WITHER_SKELETON||NPC: - ratelimit 2s - if ]> && matches shield: - narrate "<&6>Stun failed! The enemy was facing the shield towards you!" - stop - narrate "<&b>Enemy Stunned!" - flag Stunned expire:8s - playsound sound:ENTITY_BLAZE_HURT - hurt 2 source: - cast slow duration:8s amplifier:4 BackStabAttack: type: world events: on player damages husk||ZOMBIFIED_PIGLIN||PIGLIN||WITHER_SKELETON||NPC: - if matches bow: - stop - if ]> >= 4.5: - stop - if matches *_axe || matches shield: - if ]>: - if !: - narrate "Stun a dual axe-wielding/shield-bearing enemy <&c>(right click) <&f>or attack them from behind to damage them!" - if : - hurt 2 - if matches shield: - animate animation:SHIELD_BLOCK - determine cancelled - if matches *_axe: - hurt 1 NemesisMake: type: world events: on player dies by:husk||stray||ZOMBIFIED_PIGLIN||PIGLIN||WITHER_SKELETON: - announce "Death at " - create Nemesis traits:Sentinel save:NCreate - flag server NemesisList:->: - equip head: - equip legs: - equip chest: - equip boots: - equip hand: - equip offhand: - execute as_server "npc sel " - execute as_server "sentinel addtarget PLAYER" - execute as_server "sentinel respawntime -1" - execute as_server "sentinel enemydrops" - define health - execute as_server "sentinel health <[health]>" - define reach - execute as_server "sentinel reach <[reach]>" - execute as_server "sentinel range 55" - define attackrate - execute as_server "sentinel attackrate <[attackrate]> 'ranged'" - define attackrate - execute as_server "sentinel attackrate <[attackrate]>" - define speed - execute as_server "sentinel speed <[speed]>" - execute as_server "sentinel addtarget NPC:Spawn_Protector" - execute as_server "sentinel chaseranged" - if : - despawn - if : - execute as_server "sentinel addtarget NPC:Nemesis" - flag server Hand: - flag server OffHand: - flag server Helmet: - flag server Leggings: - flag server Chestplate: - flag server Boots: NemesisBuff: type: world events: on player dies by:NPC: - if matches *_sword||*_axe: - define modifier - define RNGEnchant - equip hand:[enchantments=<[RNGEnchant]>,<[modifier]>] - narrate "<&4> got the enchant of <&e><[RNGEnchant]> <&4>with a level of <&e><[modifier]><&4> on their main hand!" - flag server Hand: - if matches bow: - define modifier - define RNGEnchant - equip hand:[enchantments=<[RNGEnchant]>,<[modifier]>] - narrate "<&4> got the enchant of <&e><[RNGEnchant]> <&4>with a level of <&e><[modifier]><&4> on their main hand!" - flag server Hand: - if : - define modifier - define RNGEnchant - equip chest:[enchantments=<[RNGEnchant]>,<[modifier]>] - narrate "<&4> got the enchant of <&e><[RNGEnchant]> <&4>with a level of <&e><[modifier]><&4> on their chestplate!" - flag server Chestplate: - if : - define modifier - define RNGEnchant - equip legs:[enchantments=<[RNGEnchant]>,<[modifier]>] - narrate "<&4> got the enchant of <&e><[RNGEnchant]> <&4>with a level of <&e><[modifier]><&4> on their leggings!" - flag server Leggings: - if : - define modifier - define RNGEnchant - equip head:[enchantments=<[RNGEnchant]>,<[modifier]>] - narrate "<&4> got the enchant of <&e><[RNGEnchant]> <&4>with a level of <&e><[modifier]><&4> on their helmet!" - flag server Helmet: - if : - define modifier - define RNGEnchant - equip boots:[enchantments=<[RNGEnchant]>,<[modifier]>] - narrate "<&4> got the enchant of <&e><[RNGEnchant]> <&4>with a level of <&e><[modifier]><&4> on their boots!" - flag server Boots: - if : - if || || : - stop - define Ability - flag <[Ability]> - narrate "<&4> Learned <&e><[Ability]>!" NemesisPoisonAttack: type: world events: on NPC_flagged:PoisonDamage damages entity: - if : - stop - cast poison amplifier:0 duration:8s NemesisWitherAttack: type: world events: on NPC_flagged:WitherDamage damages entity: - if : - stop - cast wither amplifier:0 duration:8s NemesisHungerAttack: type: world events: on NPC_flagged:HungerDamage damages entity: - if : - stop - cast hunger amplifier:0 duration:8s NemesisDie: type: world events: on NPC dies: - random: - drop Hand]>|Offhand]>|Helmet]>|Chestplate]>|Leggings]>|Boots]> - drop Hand]> - drop Hand]>|Offhand]>|Helmet]>|Chestplate]>|Leggings]>|Boots]>].random> # - announce - flag server NemesisList:<-: - wait 1t # - flag server Hand:! # - flag server OffHand:! # - flag server Helmet:! # - flag server Leggings:! # - flag server Chestplate:! # - flag server Boots:! NemesisTarget: debug: false type: world events: after NPC targets entity: - while ]> >= 0.2 && ]> <= 20: - wait 1s - if : - adjust velocity:0,0.45,0 - else if <[loop_index]> <= 50: - wait 5s - else: - stop NemesisSpawn: type: world debug: false events: on system time secondly every:1: - foreach as:p: - if && <[p].gamemode> == SURVIVAL && !<[p].has_flag[NemesisNear]>: - narrate "<&c>Careful <[p].name>! A Nemesis has spawned near you!" targets:<[p]> - define px - define py - define pz - while !<[p].location.add[<[px]>,<[py]>,<[pz]>].is_spawnable>: - define px - define py - define pz - define RandomNemesis: - despawn <[RandomNemesis]> - wait 1s - spawn <[RandomNemesis]> <[p].location.add[<[px]>,<[py]>,<[pz]>]> - flag NemesisNear expire:2m AttackWhileStunnedCancel: type: world events: on entity_flagged:Stunned damages entity: - determine cancelled SpawnHusk: debug: false type: world events: on zombie spawns: - determine passively cancelled - spawn husk SpawnStray: debug: false type: world events: on skeleton spawns: - determine passively cancelled - spawn stray