mayor_script: type: world events: on player right clicks block with wheat: - take iteminhand quantity:1 - drop mayor_placer on player right clicks block with mayor_placer: - LocationTag.add[] - create player mayor save:mayorID - take iteminhand quantity:1 - assignment set script:mayor_assignment npc: - determine cancelled mayor_assignment: type: assignment actions: on assignment: - trigger name:click state:true interact scripts: - 1 mayor_interact mayor_interact: type: interact steps: 1: click trigger: script: - inventory open d:in@mayor_menu on player clicks on mayor_hire_soldier: - chat "hired" - determine cancelled on player clicks on mayor_dismiss: - chat "goodbye" - remove mayor - determine cancelled mayor_placer: type: item material: bat_spawn_egg display name: Mayor spawner mayor_hire_soldier: type: item material: stone_sword display name: Hire a soldier for 64 Wheat mayor_dismiss: type: item material: barrier display name: Dismiss the mayor mayor_menu: type: inventory title: Mayor size: 27 slots: - "[] [] [] [] [] [] [] [] [i@mayor_dismiss]" - "[] [] [] [] [] [i@mayor_hire_soldier] [] [] []" - "[] [] [] [] [] [] [] [] []"