Paste #68081: My Shop

Date: 2020/04/25 20:16:54 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#Flag discount
PotionNPC:
    type: assignment
    debug: false
    actions: 
        on assignment:
        - trigger name:click state:true
        on click:
        - flag player discount:<npc.flag[discount]>
        - flag player shopkeeper:<npc.name>
        - inventory open d:PotionsBuyInv1

PotionsBuyInv1:
    type: inventory
    debug: false
    inventory: chest
    title: <player.flag[shopkeeper]||Potions>
    size: 54
    slots:
    - [potion[potion_effects=li@NIGHT_VISION,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@NIGHT_VISION,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@INVISIBILITY,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@INVISIBILITY,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@JUMP,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@JUMP,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@JUMP,true,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [i@potion[potion_effects=li@FIRE_RESISTANCE,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [i@potion[potion_effects=li@FIRE_RESISTANCE,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]]
    - [potion[potion_effects=li@SPEED,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@SPEED,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@SPEED,true,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@SLOWNESS,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@SLOWNESS,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@SLOWNESS,true,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@TURTLE_MASTER,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@TURTLE_MASTER,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@TURTLE_MASTER,true,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]]
    - [potion[potion_effects=li@WATER_BREATHING,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@WATER_BREATHING,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@INSTANT_HEAL,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@INSTANT_HEAL,true,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@INSTANT_DAMAGE,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@INSTANT_DAMAGE,true,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@POISON,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@POISON,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@POISON,true,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]]
    - [potion[potion_effects=li@REGEN,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@REGEN,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@REGEN,true,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@STRENGTH,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@STRENGTH,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@STRENGTH,true,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@WEAKNESS,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@WEAKNESS,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@LUCK,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]]
    - [potion[potion_effects=li@SLOW_FALLING,false,false;nbt=li@cost/50;lore=<&7>Buy Price<&co> <&a>$<element[50].mul[<player.flag[discount]>].round_to[2]>]] [potion[potion_effects=li@SLOW_FALLING,false,true;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [] [] [] [] [] [] []
    - [] [] [] [] [ExitBlock] [] [emerald_block[display_name=<&a><&l>Next]] [] [stone[display_name=<&a>Buy]]
PotionsBuyInv2:
    type: inventory
    debug: false
    inventory: chest
    title: <player.flag[shopkeeper]||Potions>
    size: 54
    slots:
    - [splash_potion[potion_effects=li@NIGHT_VISION,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@NIGHT_VISION,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@INVISIBILITY,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@INVISIBILITY,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@JUMP,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@JUMP,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@JUMP,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [i@splash_potion[potion_effects=li@FIRE_RESISTANCE,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [i@splash_potion[potion_effects=li@FIRE_RESISTANCE,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]]
    - [splash_potion[potion_effects=li@SPEED,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@SPEED,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@SPEED,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@SLOWNESS,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@SLOWNESS,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@SLOWNESS,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@TURTLE_MASTER,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@TURTLE_MASTER,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@TURTLE_MASTER,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]]
    - [splash_potion[potion_effects=li@WATER_BREATHING,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@WATER_BREATHING,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@INSTANT_HEAL,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@INSTANT_HEAL,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@INSTANT_DAMAGE,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@INSTANT_DAMAGE,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@POISON,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@POISON,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@POISON,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]]
    - [splash_potion[potion_effects=li@REGEN,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@REGEN,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@REGEN,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@STRENGTH,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@STRENGTH,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@STRENGTH,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@WEAKNESS,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@WEAKNESS,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@LUCK,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]]
    - [splash_potion[potion_effects=li@SLOW_FALLING,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [splash_potion[potion_effects=li@SLOW_FALLING,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [] [] [] [] [] [] []
    - [] [] [emerald_block[display_name=<&a><&l>Back]] [] [ExitBlock] [] [emerald_block[display_name=<&a><&l>Next]] [] [stone[display_name=<&a>Buy]]
PotionsBuyInv3:
    type: inventory
    debug: false
    inventory: chest
    title: <player.flag[shopkeeper]||Potions>
    size: 54
    slots:
    - [lingering_potion[potion_effects=li@NIGHT_VISION,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@NIGHT_VISION,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@INVISIBILITY,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@INVISIBILITY,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@JUMP,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@JUMP,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@JUMP,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [i@lingering_potion[potion_effects=li@FIRE_RESISTANCE,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [i@lingering_potion[potion_effects=li@FIRE_RESISTANCE,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]]
    - [lingering_potion[potion_effects=li@SPEED,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@SPEED,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@SPEED,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@SLOWNESS,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@SLOWNESS,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@SLOWNESS,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@TURTLE_MASTER,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@TURTLE_MASTER,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@TURTLE_MASTER,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]]
    - [lingering_potion[potion_effects=li@WATER_BREATHING,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@WATER_BREATHING,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@INSTANT_HEAL,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@INSTANT_HEAL,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@INSTANT_DAMAGE,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@INSTANT_DAMAGE,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@POISON,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@POISON,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@POISON,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]]
    - [lingering_potion[potion_effects=li@REGEN,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@REGEN,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@REGEN,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@STRENGTH,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@STRENGTH,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@STRENGTH,true,false;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@WEAKNESS,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@WEAKNESS,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@LUCK,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]]
    - [lingering_potion[potion_effects=li@SLOW_FALLING,false,false;nbt=li@cost/75;lore=<&7>Buy Price<&co> <&a>$<element[75].mul[<player.flag[discount]>].round_to[2]>]] [lingering_potion[potion_effects=li@SLOW_FALLING,false,true;nbt=li@cost/100;lore=<&7>Buy Price<&co> <&a>$<element[100].mul[<player.flag[discount]>].round_to[2]>]] [] [] [] [] [] [] []
    - [] [] [emerald_block[display_name=<&a><&l>Back]] [] [ExitBlock] [] [] [] [stone[display_name=<&a>Buy]]

PotionsSellInv1:
    type: inventory
    debug: false
    inventory: chest
    title: <player.flag[shopkeeper]||Potions>
    size: 54
    slots:
    - [potion[potion_effects=li@NIGHT_VISION,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@NIGHT_VISION,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@INVISIBILITY,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@INVISIBILITY,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@JUMP,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@JUMP,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@JUMP,true,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [i@potion[potion_effects=li@FIRE_RESISTANCE,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [i@potion[potion_effects=li@FIRE_RESISTANCE,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]]
    - [potion[potion_effects=li@SPEED,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@SPEED,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@SPEED,true,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@SLOWNESS,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@SLOWNESS,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@SLOWNESS,true,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@TURTLE_MASTER,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@TURTLE_MASTER,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@TURTLE_MASTER,true,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]]
    - [potion[potion_effects=li@WATER_BREATHING,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@WATER_BREATHING,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@INSTANT_HEAL,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@INSTANT_HEAL,true,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@INSTANT_DAMAGE,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@INSTANT_DAMAGE,true,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@POISON,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@POISON,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@POISON,true,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]]
    - [potion[potion_effects=li@REGEN,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@REGEN,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@REGEN,true,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@STRENGTH,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@STRENGTH,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@STRENGTH,true,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@WEAKNESS,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@WEAKNESS,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [potion[potion_effects=li@LUCK,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]]
    - [potion[potion_effects=li@SLOW_FALLING,false,false;nbt=li@cost/10;lore=<&7>Sell Reward<&co> <&a>$10]] [potion[potion_effects=li@SLOW_FALLING,false,true;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [] [] [] [] [] [] []
    - [] [] [] [] [ExitBlock] [] [emerald_block[display_name=<&a><&l>Next]] [] [bedrock[display_name=<&6>Sell]]
PotionsSellInv2:
    type: inventory
    debug: false
    inventory: chest
    title: <player.flag[shopkeeper]||Potions>
    size: 54
    slots:
    - [splash_potion[potion_effects=li@NIGHT_VISION,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@NIGHT_VISION,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@INVISIBILITY,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@INVISIBILITY,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@JUMP,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@JUMP,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@JUMP,true,false;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [i@splash_potion[potion_effects=li@FIRE_RESISTANCE,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [i@splash_potion[potion_effects=li@FIRE_RESISTANCE,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]]
    - [splash_potion[potion_effects=li@SPEED,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@SPEED,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@SPEED,true,false;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@SLOWNESS,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@SLOWNESS,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@SLOWNESS,true,false;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@TURTLE_MASTER,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@TURTLE_MASTER,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@TURTLE_MASTER,true,false;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]]
    - [splash_potion[potion_effects=li@WATER_BREATHING,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@WATER_BREATHING,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@INSTANT_HEAL,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@INSTANT_HEAL,true,false;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@INSTANT_DAMAGE,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@INSTANT_DAMAGE,true,false;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@POISON,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@POISON,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@POISON,true,false;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]]
    - [splash_potion[potion_effects=li@REGEN,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@REGEN,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@REGEN,true,false;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@STRENGTH,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@STRENGTH,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@STRENGTH,true,false;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@WEAKNESS,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@WEAKNESS,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [splash_potion[potion_effects=li@LUCK,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]]
    - [splash_potion[potion_effects=li@SLOW_FALLING,false,false;nbt=li@cost/11;lore=<&7>Sell Reward<&co> <&a>$11]] [splash_potion[potion_effects=li@SLOW_FALLING,false,true;nbt=li@cost/12;lore=<&7>Sell Reward<&co> <&a>$12]] [] [] [] [] [] [] []
    - [] [] [emerald_block[display_name=<&a><&l>Back]] [] [ExitBlock] [] [emerald_block[display_name=<&a><&l>Next]] [] [bedrock[display_name=<&6>Sell]]
PotionsSellInv3:
    type: inventory
    debug: false
    inventory: chest
    title: <player.flag[shopkeeper]||Potions>
    size: 54
    slots:
    - [lingering_potion[potion_effects=li@NIGHT_VISION,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@NIGHT_VISION,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@INVISIBILITY,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@INVISIBILITY,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@JUMP,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@JUMP,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@JUMP,true,false;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [i@lingering_potion[potion_effects=li@FIRE_RESISTANCE,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [i@lingering_potion[potion_effects=li@FIRE_RESISTANCE,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]]
    - [lingering_potion[potion_effects=li@SPEED,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@SPEED,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@SPEED,true,false;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@SLOWNESS,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@SLOWNESS,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@SLOWNESS,true,false;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@TURTLE_MASTER,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@TURTLE_MASTER,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@TURTLE_MASTER,true,false;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]]
    - [lingering_potion[potion_effects=li@WATER_BREATHING,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@WATER_BREATHING,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@INSTANT_HEAL,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@INSTANT_HEAL,true,false;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@INSTANT_DAMAGE,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@INSTANT_DAMAGE,true,false;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@POISON,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@POISON,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@POISON,true,false;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]]
    - [lingering_potion[potion_effects=li@REGEN,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@REGEN,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@REGEN,true,false;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@STRENGTH,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@STRENGTH,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@STRENGTH,true,false;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@WEAKNESS,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@WEAKNESS,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [lingering_potion[potion_effects=li@LUCK,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]]
    - [lingering_potion[potion_effects=li@SLOW_FALLING,false,false;nbt=li@cost/25;lore=<&7>Sell Reward<&co> <&a>$25]] [lingering_potion[potion_effects=li@SLOW_FALLING,false,true;nbt=li@cost/30;lore=<&7>Sell Reward<&co> <&a>$30]] [] [] [] [] [] [] []
    - [] [] [emerald_block[display_name=<&a><&l>Back]] [] [ExitBlock] [] [] [] [bedrock[display_name=<&6>Sell]]

ArcheryNPC:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        on click:
        - flag player discount:<npc.flag[discount]>
        - flag player shopkeeper:<npc.name>
        - inventory open d:ArcheryInv

ArcheryInv:
    type: inventory
    debug: false
    inventory: chest
    title: <&3>

ShopHandler:
    type: world
    debug: false
    events:
        on player clicks in PotionsBuyInv1 priority:1:
        - define inventlist <list[<inventory[PotionsBuyInv1]>|<inventory[PotionsBuyInv2]>|<inventory[PotionsBuyInv3]>]>
        - define index <element[1]>
        - inject OpenBuyShop
        on player closes PotionsBuyInv1:
        - inject LeaveShop
        on player clicks in PotionsBuyInv2 priority:1:
        - define inventlist <list[<inventory[PotionsBuyInv1]>|<inventory[PotionsBuyInv2]>|<inventory[PotionsBuyInv3]>]>
        - define index <element[2]>
        - inject OpenBuyShop
        on player closes PotionsBuyInv2:
        - inject LeaveShop
        on player clicks in PotionsBuyInv3 priority:1:
        - define inventlist <list[<inventory[PotionsBuyInv1]>|<inventory[PotionsBuyInv2]>|<inventory[PotionsBuyInv3]>]>
        - define index <element[3]>
        - inject OpenBuyShop
        on player closes PotionsBuyInv3:
        - inject LeaveShop
        on player clicks in PotionsSellInv1 priority:1:
        - define inventlist <list[<inventory[PotionsSellInv1]>|<inventory[PotionsSellInv2]>|<inventory[PotionsSellInv3]>]>
        - define index <element[1]>
        - inject OpenSellShop
        on player closes PotionsSellInv1:
        - inject LeaveShop
        on player clicks in PotionsSellInv2 priority:1:
        - define inventlist <list[<inventory[PotionsSellInv1]>|<inventory[PotionsSellInv2]>|<inventory[PotionsSellInv3]>]>
        - define index <element[2]>
        - inject OpenSellShop
        on player closes PotionsSellInv2:
        - inject LeaveShop
        on player clicks in PotionsSellInv3 priority:1:
        - define inventlist <list[<inventory[PotionsSellInv1]>|<inventory[PotionsSellInv2]>|<inventory[PotionsSellInv3]>]>
        - define index <element[3]>
        - inject OpenSellShop
        on player closes PotionsSellInv3:
        - inject LeaveShop
        on player clicks ExitBlock in inventory:
        - inventory close d:<context.inventory>

OpenBuyShop:
    type: task
    debug: false
    script:
    - determine passively cancelled
    - if <context.item.display||null> == "<&a><&l>Next":
      - inventory open d:<[inventlist].get[<[index].add[1]>]>
    - if <context.item.display||null> == "<&a><&l>Back":
      - inventory open d:<[inventlist].get[<[index].sub[1]>]>
    - if <context.item.display||null> == "<&a>Buy":
      - inventory open d:PotionsSellInv1
    - if <context.item.has_nbt[cost]>:
      - define price <context.item.nbt[cost].mul[<player.flag[discount]>].round_to[2]>
      - if <player.money> >= <[price]>:
        - if <player.inventory.is_full>:
          - narrate "<&c>Your inventory is full!"
          - stop
        - take money quantity:<[price]>
        - define item <context.item>
        - adjust def:item Lore:
        - adjust def:item remove_nbt
        - give <[item]>
        - narrate "<player.flag[shopkeeper]><&co> <&a>Successfully bought <[item].formatted> for $<[price]>"
      - else:
        - narrate "<&c>You need $<[price].sub[<player.money>]> more to buy this item."

OpenSellShop:
    type: task
    debug: false
    script:
    - determine passively cancelled
    - if <context.item.display||null> == "<&a><&l>Next":
      - inventory open d:<[inventlist].get[<[index].add[1]>]>
    - if <context.item.display||null> == "<&a><&l>Back":
      - inventory open d:<[inventlist].get[<[index].sub[1]>]>
    - if <context.item.display||null> == "<&6>Sell":
      - inventory open d:PotionsBuyInv1
    - if <context.item.has_nbt[cost]>:
      - define item <context.item>
      - adjust def:item Lore:
      - adjust def:item remove_nbt
      - if !<player.inventory.contains[<[item]>]>:
        - narrate "<&c>You don't have that item."
        - stop
      - define reward <context.item.nbt[cost]>
      - take <[item]>
      - give money quantity:<[reward]>
      - narrate "<player.flag[shopkeeper]><&co> <&a>Successfully sold <[item].formatted> for $<[reward]>"

LeaveShop:
    type: task
    debug: false
    script:
    - wait 1s
    - if <player.open_inventory.title> == Chest:
      - flag player discount:!
      - flag player shopkeeper:!
ExitBlock:
    type: item
    material: redstone_block
    display name: <&c><&l>Exit