Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var name : string
- var font1, font2 : int
- var answer : string
- var pic: int
- var wrongcounter : int
- var scorecounter : int
- var housename : string
- wrongcounter := 0
- scorecounter := 0
- colorback (15)
- View.Set ("graphics:602;402,nobuttonbar")
- pic := Pic.FileNew ("harrypotter.jpg")
- Pic.Draw (pic, 0, 0, picCopy)
- %delay(10000)
- Pic.Free (pic)
- cls
- colourback (43)
- cls
- font1 := Font.New ("Harrington:16:bold")
- assert font1 > 0
- font2 := Font.New ("Harrington:13:bold")
- assert font2 > 0
- Font.Draw ("Please enter you name", 10, maxy - 20, font1, black)
- locate (3, 3)
- get name
- delay (1000)
- cls
- Font.Draw("Hello ,", 10, maxy - 20, font1, black)
- Font.Draw(name, 80,380, font1, black)
- delay (1000)
- cls
- loop
- Font.Draw("Welcome to my trivia game. Please type 'P' to", 10,375, font1, black)
- Font.Draw("play 'I' for instructions, or 'Q' to quit,", 10,350, font1, black)
- locate (5, 3)
- get answer
- if answer = "I" or answer = "i" then
- cls
- Font.Draw("In the words of McGonagall in the Philosopher's Stone, you will select a ", 10,375, font2, black)
- Font.Draw("House to play for. Every right answer will gain you ten points for your", 10,350, font2, black)
- Font.Draw("House. There is ten questions that this quiz is out of, and at the end", 10, 325, font2, black)
- Font.Draw("there is an additional four questions at the end four you to try and", 10, 300, font2, black)
- Font.Draw(" increase your score on.", 10, 275, font2, black)
- delay (10000)
- cls
- elsif answer = "Q" or answer = "q" then
- quit
- elsif answer = "P" or answer = "p" then
- exit when answer = "P" or answer = "p"
- end if
- end loop
- cls
- loop
- Font.Draw ("Please type the house which you belong to: ", 10, maxy - 20, font1, black)
- Font.Draw ("1. Slytherin", 40,350, font1, black)
- Font.Draw ("2. Griffindor", 40,325, font1, black)
- Font.Draw ("3. Hufflepuff", 40,300, font1, black)
- Font.Draw ("4. Ravenclaw", 40,275, font1, black)
- locate (10, 3)
- get housename
- if housename = "Griffindor" or housename = "griffindor" or housename = "Slytherin" or housename = "slytherin" or housename = "Hufflepuff" or housename = "huffleepuff" or housename = "Ravenclaw" or housename = "ravenclaw" then
- exit when housename = "Griffindor" or housename = "griffindor" or housename = "Slytherin" or housename = "slytherin" or housename = "Hufflepuff" or housename = "huffleepuff" or housename = "Ravenclaw" or housename = "ravenclaw"
- else
- Font.Draw ("Invalid. Please type the house which you belong to", 10, 200, font1, black)
- end if
- end loop
- delay (1000)
- cls
- Font.Draw ("1. How many Harry Potter books are there?", 10, maxy - 20, font1, black)delay (1000)
- Font.Draw ("a) 4", 40, 350, font2, black)delay (500)
- Font.Draw ("b) 7", 40, 325, font2, black)delay (500)
- Font.Draw ("c) 36", 40, 300, font2, black)delay (500)
- Font.Draw ("d) Way too many", 40, 275, font2, black)delay (500)
- locate (10, 3)
- get answer
- put ""
- if answer = "b" or answer = "B" then
- Music.PlayFile ("")
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "a" or answer = "A" or answer = "c" or answer = "C" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- elsif answer = "d" or answer = "D" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Font.Draw ("Invalid", 40, 200, font1, black)
- Music.PlayFile ("Wha-Wha.mp3")
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("harry-potter-books-1-7111.jpg")
- Pic.Draw (pic, 150, 50, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("2. Who are Harry's best friends (make up the golden trio)", 10, maxy - 20, font1, black)delay (1000)
- Font.Draw ("a) Rose and Hugo", 40, 350, font2, black)delay (500)
- Font.Draw ("b) Draco Malfoy and Voldemort", 40, 325, font2, black)delay (500)
- Font.Draw ("c) Ron Weasley and Hermione Granger", 40, 300, font2, black)delay (500)
- Font.Draw ("d) Remus Lupin and Sirius Black", 40, 275, font2, black)delay (500)
- locate (10, 3)
- get answer
- put ""
- if answer = "c" or answer = "C" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "a" or answer = "A" or answer = "d" or answer = "D" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- elsif answer = "b" or answer = "B" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("goldentrio.jpg")
- Pic.Draw (pic, 100, 20, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("3. What are the three Deathly Hallows?", 10, maxy - 20, font1, black)delay (1000)
- Font.Draw ("a) The Lion, The Witch, and The Wardrobe", 40, 350, font2, black)delay (500)
- Font.Draw ("b) The Hand of Glory, The Deluminator, and The Mirror of Erised", 40, 325, font2, black)delay (500)
- Font.Draw ("c) The Cauldron, The Vanishing Cabinet, and The Time-Turners", 40, 300, font2, black)delay (500)
- Font.Draw ("d) The Elder Wand, The Resurrection Stone, and", 40, 275, font2, black)
- Font.Draw ("The Cloak of Invisibility", 60, 250, font2, black)delay (500)
- locate (11, 3)
- get answer
- put ""
- if answer = "d" or answer = "D" then
- Font.Draw ("Correct, ten points to", 40, 175, font1, black)
- Font.Draw (housename, 260, 175, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "b" or answer = "B" or answer = "c" or answer = "C" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 175, font1, black)
- elsif answer = "a" or answer = "A" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 175, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 175, font1, black)
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("deathly-hallows.jpg")
- Pic.Draw (pic, 150, 50, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("4. In the game of Quidditch, what position did Harry play?", 10, maxy - 20, font1, black)delay (1000)
- Font.Draw ("a) Chaser", 40, 350, font2, black) delay (500)
- Font.Draw ("b) Keeper", 40, 325, font2, black) delay (500)
- Font.Draw ("c) Seeker", 40, 300, font2, black) delay (500)
- Font.Draw ("d) Line back", 40, 275, font2, black) delay (500)
- locate (10, 3)
- get answer
- put ""
- if answer = "c" or answer = "C" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "a" or answer = "A" or answer = "b" or answer = "B" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- elsif answer = "d" or answer = "D" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("seeker.jpg")
- Pic.Draw (pic, 150, 1, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("5. Which Weasley twin died in the Deathly Hallows?", 10, maxy - 20, font1, black) delay (1000)
- Font.Draw ("a) Fred", 40, 350, font2, black) delay (500)
- Font.Draw ("b) Crabbe", 40, 325, font2, black) delay (500)
- Font.Draw ("c) Charlie", 40, 300, font2, black) delay (500)
- Font.Draw ("d) George", 40, 275, font2, black) delay (500)
- locate (10, 3)
- get answer
- put ""
- if answer = "a" or answer = "A" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "b" or answer = "B" or answer = "d" or answer = "D" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- elsif answer = "b" or answer = "B" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("Fred_Weasley.jpg")
- Pic.Draw (pic, 175, 50, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("6. Which are the traits to be in Griffindor?", 10, maxy - 20, font1, black) delay (1000)
- Font.Draw ("a) Stupidity, Choosing the wrong side and Delusional", 40, 350, font2, black) delay (500)
- Font.Draw ("b) Knowelege and Wit", 40, 325, font2, black) delay (500)
- Font.Draw ("c) Cunning and Ambitious", 40, 300, font2, black) delay (500)
- Font.Draw ("d) Daring, Nerve, and Chivalry", 40, 275, font2, black) delay (500)
- locate (10, 3)
- get answer
- put ""
- if answer = "d" or answer = "D" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "b" or answer = "B" or answer = "c" or answer = "C" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- elsif answer = "a" or answer = "A" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("250px-Gryffindorcrest.jpg")
- Pic.Draw (pic, 150, 1, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("7. Who said this?", 10, maxy - 20, font1, black)
- Font.Draw ("'Make way for the heir of Slytherin, seriously evil wizard coming through...'", 10, 350, font2, black)delay (1000)
- Font.Draw ("a) Fred and George Weasley", 40, 325, font2, black)delay (500)
- Font.Draw ("b) Jacob Black", 40, 300, font2, black) delay (500)
- Font.Draw ("c) Draco Malfoy", 40, 275, font2, black) delay (500)
- Font.Draw ("d) Tom Riddle", 40, 250, font2, black) delay (500)
- locate (11, 3)
- get answer
- put ""
- if answer = "a" or answer = "A" then
- Font.Draw ("Correct, ten points to", 40, 175, font1, black)
- Font.Draw (housename, 260, 175, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "D" or answer = "d" or answer = "c" or answer = "C" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 175, font1, black)
- elsif answer = "b" or answer = "B" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 175, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 175, font1, black)
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("twins-gf.jpg")
- Pic.Draw (pic, 100, 50, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("8. What destroyed the Diadem of Ravenclaw?", 10, maxy - 20, font1, black) delay (1000)
- Font.Draw ("a) The Sword of Griffindor", 40, 350, font2, black) delay (500)
- Font.Draw ("b) Riptide stabbed it when turned into it`s sword form", 40, 325, font2, black) delay (500)
- Font.Draw ("c) The spell 'Fiendfyre'", 40, 300, font2, black) delay (500)
- Font.Draw ("d) Basilisk Venom from the Chamber of Secrets", 40, 275, font2, black) delay (500)
- locate (10, 3)
- get answer
- put ""
- if answer = "c" or answer = "C" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "D" or answer = "d" or answer = "a" or answer = "A" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- elsif answer = "b" or answer = "B" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("normal_rescuef.jpg")
- Pic.Draw (pic, 175, 1, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("9. What is Harry's wand made out of, and how long is it?", 10, maxy - 20, font1, black) delay (1000)
- Font.Draw ("a) Holly and phoenix feather, eleven inches", 40, 350, font2, black) delay (500)
- Font.Draw ("b) Thorn and unicorn hair, nine inches", 40, 325, font2, black) delay (500)
- Font.Draw ("c) Fairy Dust and sparkles, thirteen inches", 40, 300, font2, black) delay (500)
- Font.Draw ("d) Dragon heartstring and Veela hair, fourteen inches ", 40, 275, font2, black) delay (500)
- locate (10, 3)
- get answer
- put ""
- if answer = "a" or answer = "A" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "b" or answer = "B" or answer = "D" or answer = "d" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- elsif answer = "c" or answer = "C" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("wand.jpg")
- Pic.Draw (pic, 100, 50, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("10. What was Dumbledore`s Bogart?", 10, maxy - 20, font1, black) delay (1000)
- Font.Draw ("a) Harry Potter failing to defeat Voldemort", 40, 350, font2, black) delay (500)
- Font.Draw ("b) The corpse of Ariana,", 40, 325, font2, black) delay (500)
- Font.Draw ("c) A pair of wooden socks, as said in the Philosopher's Stone", 40, 300, font2, black) delay (500)
- Font.Draw ("d) Gaining control of the Deathly Hallows", 40, 275, font2, black) delay (500)
- locate (10, 3)
- get answer
- put ""
- if answer = "b" or answer = "B" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "a" or answer = "A" or answer = "d" or answer = "D" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- elsif answer = "c" or answer = "C" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- wrongcounter := wrongcounter + 1
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- pic := Pic.FileNew ("ariana_dumbledore.jpg")
- Pic.Draw (pic, 175, 50, picCopy)
- delay(3000)
- Pic.Free (pic)
- cls
- Font.Draw ("Final Four!", 10, maxy - 20, font1, black) delay (1000)
- Font.Draw ("This is your last chance to make up for previous questions", 40, 350, font2, black)
- delay (3000)
- cls
- Font.Draw ("Who did Draco Malfoy end up marrying?", 1, 375, font1, black)delay (1000)
- Font.Draw ("a) Astoria Greengrass", 40, 350, font2, black) delay (500)
- Font.Draw ("b) Hermione Granger", 40, 325, font2, black) delay (500)
- Font.Draw ("c) Pansy Parkinson", 40, 300, font2, black) delay (500)
- Font.Draw ("d) Ironically an unknown muggle", 40, 275, font2, black) delay (500)
- locate (11, 3)
- get answer
- if answer = "a" or answer = "A" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "b" or answer = "B" or answer = "d" or answer = "D" or answer = "c" or answer = "C" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- Font.Draw ("What did Hermione Granger do after the Deathly Hallows?", 1, 375, font1, black) delay (1000)
- Font.Draw ("a) Trained along side Harry and Ron to be and Aurour", 40, 350, font2, black) delay (500)
- Font.Draw ("b) Went back to school to complete her NEWTs", 40, 325, font2, black) delay (500)
- Font.Draw ("c) Became a housewife after marrying Harry", 40, 300, font2, black) delay (500)
- Font.Draw ("d) She died in the final battle trying to save Ron", 40, 275, font2, black) delay (500)
- locate (11, 3)
- get answer
- put ""
- if answer = "b" or answer = "B" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "a" or answer = "A" or answer = "d" or answer = "D" or answer = "c" or answer = "C" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- Font.Draw ("What team did Ginny play Quidditch for?", 1, 375, font1, black) delay (1000)
- Font.Draw ("a) Chudley Cannons", 40, 350, font2, black)delay(500)
- Font.Draw ("b) The Wigtown Wanderers", 40, 325, font2, black)delay (500)
- Font.Draw ("c) The Holyhead Harpies", 40, 300, font2, black) delay (500)
- Font.Draw ("d) The Applebee Arrows", 40, 275, font2, black) delay (500)
- locate (11, 3)
- get answer
- if answer = "c" or answer = "C" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "a" or answer = "A" or answer = "d" or answer = "D" or answer = "b" or answer = "B" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- delay (3000)
- cls
- Font.Draw ("What was Albus Dumbledore's desire when he was 17?", 1, 375, font1, black) delay (1000)
- Font.Draw ("a) To become theP Minister of Magic", 40, 350, font2, black) delay (500)
- Font.Draw ("b) To be the Headmaster of Hogwarts", 40, 325, font2, black) delay (500)
- Font.Draw ("c) We never found out", 40, 300, font2, black) delay (500)
- Font.Draw ("d) To work toward the 'Greater Good'", 40, 275, font2, black) delay (500)
- locate (11, 3)
- get answer
- if answer = "d" or answer = "D" then
- Font.Draw ("Correct, ten points to", 40, 200, font1, black)
- Font.Draw (housename, 260, 200, font1, black)
- scorecounter := scorecounter + 10
- elsif answer = "a" or answer = "A" or answer = "b" or answer = "B" or answer = "c" or answer = "C" then
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Sorry, not the right answer", 40, 200, font1, black)
- else
- Music.PlayFile ("Wha-Wha.mp3")
- Font.Draw ("Invalid", 40, 200, font1, black)
- end if
- cls
- Font.Draw ("You have finished the Harry Potter Trivia game.", 10, maxy - 20, font1, black)
- Font.Draw ("Your score out of ten, with the four last chance is ,", 40, 350, font2, black)
- Font.Draw (intstr (scorecounter), 450, 350, font2, black)
- if scorecounter >= 80 then
- Font.Draw ("Congratulations, you are a Harry Potter Fanatic!!!", 40, 325, font2, black)
- elsif wrongcounter >= 5 then
- Font.Draw ("You don't know anything about Harry Potter do you...", 40, 325, font2, black)
- end if
Add Comment
Please, Sign In to add comment