
-----------------------------------
piglette
Fri Jun 10, 2005 2:03 pm

ok...u don have to read this..but..
-----------------------------------
If u read it, how do u make it better?

setscreen ("graphics:max;max")
var name, start : string
var ch, ch2 : string (1)
var fn : int
var font : int := Font.New ("Arial:12")
var picID, picID2, picID3, picID4, picID5, picID6, picID7, picID8, picID9, picID10, picID11, picID12, picID13, picID14, picID15, picID16, picID17, picID18, picID19, picID20 : int
var x, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20 : int
var y, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12, y13, y14, y15, y16, y17, y18, y19, y20 : int
proc exitt
    % End of Level 1----------------------------
    % askiing to exit or to continue
    getch (ch)
    if ch = "n" or ch = "N" then
        cls
        put "To exit, press 'y' once."
        put "To play, press 'y' twice."
        loop
            % If the user wants to exit, crying picture pops up and exits
            getch (ch)
            if ch = "y" or ch = "Y" then
                put "Bye"
                picID := Pic.FileNew ("smile2.bmp")
                for i : 1 .. 25
                    x := Rand.Int (20, 20)     % Random x
                    y := Rand.Int (20, 20)     % Random y
                    Pic.Draw (picID, x, y, picCopy)
                end for
                Pic.Free (picID)
                exit
            end if
        end loop
    end if
end exitt
% Asking for a name
put "Hi"
put "your name is :"
get name
put name, ", do you like solving easy questions? (y/n)"
loop
%    getch (ch)
 %   if ch = "y" or ch = "Y" then
        cls
        % Level 1 starts------------------------------------------
        var start1 : string
        var ch3, ch4, ch5 : string (1)
       % var  ch6, ch7, ch8, ch9 : 
        put "LEVEL 1"
        put " "
        put " "
        %QUESTION 1 of 5
        put "Question # 1 of 5 "
        put " "
        put "There were 2 pigs and 1 chicken outside. How many animals were there?"
        getch (ch4)
        if ch4 = "3" then
            put "RIGHT"
            delay (1000)
        else
            put "wrong answer!"
            put "See the clue below. any idea?"
            %var picID3, x3, y3 : int
            x3 := Rand.Int (5, 20)
            y3 := Rand.Int (5, 20)
            picID3 := Pic.FileNew ("chickenand2pigs.bmp")
            Pic.Draw (picID3, x3, y3, picCopy)
            getch (ch4)
        end if
        if ch4 = "3" then
            put "GOOD."
            delay (1000)
            cls
        else
            put "Sorry, the answer was 3."
            Pic.Free (picID3)
            delay (1000)
            cls
        end if
        %Q 2 of 5
        put "LEVEL 1"
        put " "
        put " "
        put "Question #2 of 5"
        put " "
        put "There are 2 juicy fruits (gums' name) and 4 bubble gums. How many gums are there?"
        getch (ch4)
        if ch4 = "6" then
            put "RIGHT"
            delay (1000)
        else
            put "wrong answer!"
            put "clue:"
            %var picID4, x4, y4 : int
            x4 := Rand.Int (25, 30)
            y4 := Rand.Int (25, 30)
            picID4 := Pic.FileNew ("bubblegumjf.bmp")
            Pic.Draw (picID4, x4, y4, picCopy)
            getch (ch4)
            if ch4 = "6" then
                put "GOOD"
                delay (1000)
                cls
                % put " press enter to go to next question"
            else
                put "Sorry, the answer was 6."
                Pic.Free (picID4)
            end if
        end if
    

    delay (1000)
    cls
    var ch6 : string (1)
    put "LEVEL 1"
    put " "
    put " "
    put "Question #3 of 5"
    put " "
    put "There are 4 red houses and 3 blue houses. How many houses are there?"
    getch (ch6)
    if ch6 = "7" then
        put "RIGHT"
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        % gives a clue
        x6 := Rand.Int (20, 30)
        y6 := Rand.Int (20, 30)
        picID6 := Pic.FileNew ("7houses.bmp")
        Pic.Draw (picID6, x6, y6, picCopy)
        
      get ch6
        if ch6 = "7" then
            put "GOOD"
        else
            put "Sorry, the answer was 7."
        end if
        Pic.Free (picID6)
    end if
    delay (2000)
    cls
    var ch7 : string (1)
    put "LEVEL 1"
    put " "
    put " "
    put "Question #4 of 5"
    put " "
    put "There are 4 girls and 5 boys in the school. How many people are there?"
    get ch7
    if ch7 = "9" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        x7 := Rand.Int (20, 30)
        y7 := Rand.Int (20, 30)
        picID7 := Pic.FileNew ("boysandgirls.bmp")
        Pic.Draw (picID7, x7, y7, picCopy)
        Pic.Free (picID7)
    end if
    getch (ch7)
    if ch7 = "9" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 9."
    end if
    delay (2000)
    cls
    var ch8 : string (1)
    put "Still LEVEL 1"
    put " "
    put " "
    put "Question #5 of 5"
    put " "
    put "There are 3 English books and 3 science books. How many books are there?"
    get ch8
    if ch8 = "6" then
        put "RIGHT"
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        %var picID8, x8, y8 : int
        x8 := Rand.Int (20, 30)
        y8 := Rand.Int (20, 30)
        picID8 := Pic.FileNew ("engandscibooks.bmp")
        Pic.Draw (picID8, x8, y8, picCopy)
        Pic.Free (picID8)
    end if
    get ch8
    if ch8 = "6" then
        put "GOOD"
    else
        put "Sorry, the answer was 6."
    end if
    cls
    put "YAY"
    put "You finished level 1."
    put "Now go to level 2."
    delay (2000)
    cls
    var chh1 : string
    put "LEVEL 2 - Yay!"
    put " "
    put " "
    put "Question #1 of 5"
    put " "
    put "A girl had 5 combs, but she lost 2 of them. How many combs does she have now? "
    get chh1
    if chh1 = "3" then
        put "RIGHT"
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        %var picID7, x7, y7 : int
        picID7 := Pic.FileNew ("combs.bmp")
        x7 := Rand.Int (20, 30)
        y7 := Rand.Int (20, 30)
        Pic.Draw (picID7, x7, y7, picCopy)
        Pic.Free (picID7)
    end if
    get chh1
    if chh1 = "3" then
        put "GOOD"
    else
        put "Sorry, the answer was 3."
    end if
    delay (2000)
    cls
    var chh2 : string
    put "LEVEL 2 - Yay!"
    put " "
    put " "
    put "Question #1 of 5"
    put " "
    put "There were 7 happy rabbits in the forest. One day, 4 rabbits were angry because of each other."
    put "How many rabbits were still happy?"
    get chh2
    if chh2 = "3" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        picID7 := Pic.FileNew ("rabbits.bmp")
        x7 := Rand.Int (20, 30)
        y7 := Rand.Int (20, 30)
        Pic.Draw (picID7, x7, y7, picCopy)
        Pic.Free (picID7)
    end if
    get chh2
    if chh2 = "3" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 3."
    end if
    delay (1000)
    cls
    var chh3 : string
    put "LEVEL 2"
    put " "
    put " "
    put "Question #2 of 5"
    put " "
    put "There is an apple tree on the hill. It had 10 green apples few days ago."
    put "Now, 8 of them turned red. How many green apples are there?"
    get chh3
    if chh3 = "2" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        %var picID9, x9, y9 : int
        picID9 := Pic.FileNew ("apples.bmp")
        x9 := Rand.Int (20, 30)
        y9 := Rand.Int (20, 30)
        Pic.Draw (picID9, x9, y9, picCopy)
        Pic.Free (picID9)
    end if
    get chh3
    if chh3 = "2" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 2."
    end if
    delay (2000)
    cls
    var chh4 : string
    put "LEVEL 2"
    put " "
    put " "
    put "Question #3 of 5"
    put " "
    put "Your 7 toy buildings are on fire! (not for real) There are 7 buckets with full of water."
    put "You need one bucket for each building. After dumping water to buildings, how many water buckets will be left?"
    get chh4
    if chh4 = "0" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        %var picID10, x10, y10 : int
        picID10 := Pic.FileNew ("buildings.bmp")
        x10 := Rand.Int (20, 30)
        y10 := Rand.Int (20, 30)
        Pic.Draw (picID10, x10, y10, picCopy)
        Pic.Free (picID10)
    end if
    get chh4
    if chh4 = "0" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 0."
    end if
    delay (2000)
    cls
    var chh5 : string
    put "Still LEVEL 2"
    put " "
    put " "
    put "Question #4 of 5"
    put " "
    put "Kids in a Day Camp used 8 brushes out of new 13 brushes."
    put "How many brushes are not used?"
    get chh5
    if chh5 = "5" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        % var picID11, x11, y11 : int
        picID11 := Pic.FileNew ("brushes.bmp")
        x11 := Rand.Int (20, 30)
        y11 := Rand.Int (20, 30)
        Pic.Draw (picID11, x11, y11, picCopy)
        Pic.Free (picID11)
    end if
    get chh5
    if chh5 = "5" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 5."
    end if
    delay (2000)
    cls
    var chh6 : string
    put "Still LEVEL 2"
    put " "
    put " "
    put "Question #5 of 5"
    put " "
    put "There were 8 monkeys in the mighty jungle. They are very hungry."
    put "4 of them found bananas and ate them. 2 of them also found grapes and ate them."
    put "How many monkeys are still hungry?"
    get chh6
    if chh6 = "2" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        picID12 := Pic.FileNew ("monkeys.bmp")
        x12 := Rand.Int (20, 30)
        y12 := Rand.Int (20, 30)
        Pic.Draw (picID12, x12, y12, picCopy)
        Pic.Free (picID12)
    end if
    get chh6
    if chh6 = "2" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 2."
    end if
    delay (2000)
    cls
    put "Yay!!!! You finished LEVEL 2!!!"
    put "Now let's go to LEVEL 3!!!!"
    delay (2000)
    cls
    % LEVEL 3-------------------------------------
    var chhh : string
    put "Finally LEVEL 3"
    put " "
    put " "
    put "Question #1 of 5"
    put " "
    put "A girl went to school with 10 pencils in her pencil case."
    put "Some bad boys came and broke 5 pencils. (They got onto trouble for doing this)"
    put "She taped 3 of them and put them back into her pencil case. How many pencils are in her pencil case?"
    get chhh
    if chhh = "2" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        %var picID13,x13,y13 : int
        picID13 := Pic.FileNew ("pencils.bmp")
        for i13 : 1 .. 25
            x13 := Rand.Int (20, 30)
            y13 := Rand.Int (20, 30)
            Pic.Draw (picID13, x13, y13, picCopy)
        end for
        Pic.Free (picID13)
    end if
    get chhh
    if chhh = "2" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 2."
    end if
    delay (2000)
    cls
    var chhh2 : string
    put "LEVEL 3"
    put " "
    put " "
    put "Question #2 of 5"
    put " "
    put "Mom bought 5 cookies with big chocolate chips on them. She hid them in the cupboard so she can give her children later."
    put "Later she bought 3 more cookies. She also hid them in the same place."
    put "Few days later, she took 4 cookies out and gave them to her children. How many cookies are left in the cupboard? "
    get chhh2
    if chhh2 = "4" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        %var picID14,x14,y14 : int
        picID14 := Pic.FileNew ("cookies.bmp")
        for i14 : 1 .. 25
            x14 := Rand.Int (20, 30)
            y14 := Rand.Int (20, 30)
            Pic.Draw (picID14, x14, y14, picCopy)
        end for
        Pic.Free (picID14)
    end if
    get chhh2
    if chhh2 = "4" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 4."
    end if
    delay (2000)
    cls
    var chhh3 : string
    put "LEVEL 3"
    put " "
    put " "
    put "Question #3 of 5"
    put " "
    put "There were 6 red roses and 4 yellow roses in the small flower shop."
    put "Mr. Ferrara bought 1 yellow rose and 2 red roses there and gave them to his wife, Mrs. Ferrara."
    put "How many roses does Barbie has in her backyard?"
    get chhh3
    if chhh3 = "7" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        %var picID15,x15,y15 : int
        picID15 := Pic.FileNew ("roses.bmp")
        for i15 : 1 .. 25
            x15 := Rand.Int (20, 30)
            y15 := Rand.Int (20, 30)
            Pic.Draw (picID15, x15, y15, picCopy)
        end for
        Pic.Free (picID15)
    end if
    get chhh3
    if chhh3 = "7" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 7."
    end if
    delay (2000)
    cls
    var chhh4 : string
    put "Almost done LEVEL 3"
    put " "
    put " "
    put "Question #4 of 5"
    put " "
    put "There were 10 kids in the kindergaten."
    put "5 kids exercised every day and ate only healthy foods, so they became healthy."
    put "However, 1 kid didn't care and ate junk foods. He became unhealthy."
    put "How many normal kids are there?"
    get chhh4
    if chhh4 = "4" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        %var picID16,x16,y16 : int
        picID16 := Pic.FileNew ("chubbykids.bmp")
        for i16 : 1 .. 25
            x16 := Rand.Int (20, 30)
            y16 := Rand.Int (20, 30)
            Pic.Draw (picID16, x16, y16, picCopy)
        end for
        Pic.Free (picID16)
    end if
    get chhh4
    if chhh4 = "4" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 4."
    end if
    delay (2000)
    cls
    var chhh5 : string
    put "Almost done LEVEL 3"
    put " "
    put " "
    put "Question #5 of 5"
    put " "
    put " "
    put " "
    put "*Hard Question! If it is too hard for you, get help "
    put ""
    put "Paul had 7 stickers. He was very nice so he gave 3 stickers to his firend."
    put "Next day, his sister gave him 2 stickers. After, his cat ruined 5 of them."
    put "His friends felt sorry for him, so they gave 3 stickers to Paul."
    put "How many stickers does Paul have now?"
    get chhh5
    if chhh5 = "4" then
        put "RIGHT"
        delay (1000)
        cls
    else
        put " "
        put "I will give you a clue with the picture below. Any idea?"
        %var picID17,x17,y17 : int
        picID17 := Pic.FileNew ("stickers.bmp")
        for i16 : 1 .. 25
            x17 := Rand.Int (20, 30)
            y17 := Rand.Int (20, 30)
            Pic.Draw (picID17, x17, y17, picCopy)
        end for
        Pic.Free (picID17)
    end if
    get chhh5
    if chhh5 = "4" then
        put "GOOD"
        delay (1000)
        cls
    else
        put "Sorry, the answer was 4."
    end if
    delay (2000)
    cls
    put "YAYAY!!!!!!!!!"
    put "You finished whole thing!!!!"

    put "do you want to play again?"
    getch (ch)
    if ch = "n" or ch = "N" then
        exitt
    end if
end loop
