"Citizenship": type: assignment interact scripts: - 1 Offer Citizenship actions: on assignment: # This enables interaction with NPC via clicking, entering proximity and damage. - trigger name:click toggle:true - trigger name:proximity toggle:true # Make the NPC look at players - lookclose state:true "Offer Citizenship": type: interact steps: 1: proximity trigger: entry: script: - ^narrate " looks down at you from his counter..."" - ^chat "Oh great.... Another adventurer" - ^narrate " rolls his eyes and sighs..." - ^chat "If you are interested in citizenship for a town click me and we can get this over with." - ^playsound location: sound:chicken_idle click trigger: script: - chat "Would you like to join the Hatchling Isle or take the Bathum citizenship test?" chat trigger: 1: Trigger: "I would like to joing /Hatchling/ Isle." Script: - execute as_op "townyadmin town Bathum remove " - execute as_op "townyadmin town FarmField add " - execute as_op "region addmember NewHatchlingIsle " 2: trigger: "I would like to take the /Bathum/ test." Script: - if == Claimed { - narrate " rolls their eyes in clear dissapointment." - chat "You again... You can only apply for citizenship to Bathum once a day." } else { - flag player passBathumQuiz:true - inventory open d:in@BathumQuiz1 } ## ## Bathum Quiz ## BathumQuiz1: type: inventory inventory: CHEST title: <&c>Answer to question one? <&9> size: 9 definitions: A: i@BathumQuiz1AnswerA B: i@BathumQuiz1AnswerB C: i@BathumQuiz1AnswerC D: i@BathumQuiz1AnswerD E: i@BathumQuiz1AnswerE slots: - "[A] [] [B] [] [C] [] [D] [] [E]" BathumQuiz1AnswerA: type: item material: red_wool display name: "Wrong" correct: false BathumQuiz1AnswerB: type: item material: blue_wool display name: "Wrong" correct: false BathumQuiz1AnswerC: type: item material: green_wool display name: "Wrong" correct: false BathumQuiz1AnswerD: type: item material: yellow_wool display name: "Correct" correct: true BathumQuiz1AnswerE: type: item material: Black_wool display name: "Wrong" correct: false BathumQuiz2: type: inventory inventory: CHEST title: <&c>Answer to question two? <&9> size: 9 definitions: A: i@BathumQuiz2AnswerA B: i@BathumQuiz2AnswerB C: i@BathumQuiz2AnswerC D: i@BathumQuiz2AnswerD E: i@BathumQuiz2AnswerE slots: - "[A] [] [B] [] [C] [] [D] [] [E]" BathumQuiz2AnswerA: type: item material: red_wool display name: "Wrong" correct: false BathumQuiz2AnswerB: type: item material: blue_wool display name: "Correct" correct: true BathumQuiz2AnswerC: type: item material: green_wool display name: "Wrong" correct: false BathumQuiz2AnswerD: type: item material: yellow_wool display name: "Wrong" correct: false BathumQuiz2AnswerE: type: item material: Black_wool display name: "Wrong" correct: false BathumQuiz3: type: inventory inventory: CHEST title: <&c>Answer to question three? <&9> size: 9 definitions: A: i@BathumQuiz3AnswerA B: i@BathumQuiz3AnswerB C: i@BathumQuiz3AnswerC D: i@BathumQuiz3AnswerD E: i@BathumQuiz3AnswerE slots: - "[A] [] [B] [] [C] [] [D] [] [E]" BathumQuiz3AnswerA: type: item material: red_wool display name: "Wrong" correct: false BathumQuiz3AnswerB: type: item material: blue_wool display name: "Wrong" correct: false BathumQuiz3AnswerC: type: item material: green_wool display name: "Wrong" correct: false BathumQuiz3AnswerD: type: item material: yellow_wool display name: "Wrong" correct: false BathumQuiz3AnswerE: type: item material: Black_wool display name: "Correct" correct: true ## ## Bathum Quiz Events ## BathumQuizEvents: type: world events: ## Question 1 on player clicks BathumQuiz1AnswerA in BathumQuiz1: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz2 on player clicks BathumQuiz1AnswerB in BathumQuiz1: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz2 on player clicks BathumQuiz1AnswerC in BathumQuiz1: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz2 on player clicks BathumQuiz1AnswerD in BathumQuiz1: - flag player passBathumQuiz - narrate - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz2 on player clicks BathumQuiz1AnswerE in BathumQuiz1: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz2 ## Question 2 on player clicks BathumQuiz2AnswerA in BathumQuiz2: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz3 on player clicks BathumQuiz2AnswerB in BathumQuiz2: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz3 on player clicks BathumQuiz2AnswerC in BathumQuiz2: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz3 on player clicks BathumQuiz2AnswerD in BathumQuiz2: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz3 on player clicks BathumQuiz2AnswerE in BathumQuiz2: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - inventory open d:in@BathumQuiz3 ## Question 3 on player clicks BathumQuiz3AnswerA in BathumQuiz3: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - run BathumQuizEnd on player clicks BathumQuiz3AnswerB in BathumQuiz3: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - run BathumQuizEnd on player clicks BathumQuiz3AnswerC in BathumQuiz3: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - run BathumQuizEnd on player clicks BathumQuiz3AnswerD in BathumQuiz3: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - run BathumQuizEnd on player clicks BathumQuiz3AnswerE in BathumQuiz3: - flag player passBathumQuiz - determine cancelled passively - inventory close d: - run BathumQuizEnd BathumQuizEnd: type: task script: - narrate "Testing against true" - if player.flag[passBathumQuiz] == "true" { - execute as_op "townyadmin town FarmField remove " - execute as_op "townyadmin town Bathum add " - execute as_op "region addmember Bathum " } else { - ^flag bathumQuiz:Failed "duration:20h" - narrate "With a shake of their head they stamp a red X on your test." - narrate "I'm sorry. At least one of your questions were answered wrong. You can try again in a day." }