-----------card41----------
On opencard 41
lock screen
hide btn TwoDishes
hide btn OneDish

unlock screen
 if game_on is not 1 then
  play cakewo
   put 3 into ntx
   naratoranimex
  wait 1 seconds

  play bokuwo
   put 5 into ntx
   naratoranimex
  end if
  put 41 into presentcard
put 0 into init41
put 1 into CastraDivideLevel
put 0 into getcastraylevel
put 0 into getcastrarlevel
put 0 into getcastrablevel
repeat with i = 1 to 10
  put 0 into Item i of arrayb
  put 0 into Item i of arrayr
  put 20 + i into Item i of arrayPlate
end repeat
setOnlyOneDishes
 
end opencard


On startshare
play click
put 1 into CastraDivideLevel
put 0 into getcastraylevel
put 0 into getcastrarlevel
put 0 into getcastrablevel
lock screen
 hidecastraall
set loc of btn castra1 to 309, 285
show btn castra1
show btn castraClick
unlock screen
End startshare

On setOneDishes
put 1 into DishSuu
showyellowdish
 put random(10) into click41
 repeat  click41 times
  clickcastra
end repeat
put random( click41 ) into any41
 repeat any41 times
   getcastray
 end repeat
lock screen
--show btn TwoDishes
--hide btn OneDish
hide btn 40
hide btn 41
hide btn 43
hide btn 44
show btn 17
unlock screen
End setOneDishes

On setOnlyOneDishes
put 1 into DishSuu
showyellowdish
 put random(10) into click41
 repeat  click41 times
  clickcastra
end repeat
lock screen
--show btn TwoDishes
--hide btn OneDish
hide btn 40
--hide btn 41
hide btn 43
hide btn 44
show btn 17
unlock screen
End setOnlyOneDishes

On  showyellowdish
--play click
put 1 into CastraDivideLevel
put 0 into getcastraylevel
put 0 into getcastrarlevel
put 0 into getcastrablevel
lock screen
 hidecastraall
set loc of btn castra1 to 309, 285
show btn castra1
show btn castraClick
show btn yeldish
show btn 38
hide btn reddish
--hide btn 42
hide btn bluedish
--hide btn 41
unlock screen
End showyellowdish



On setTwoDishes
put 2 into DishSuu
showredbluedish
 put random(10) into click41
 repeat  click41 times
  clickcastra
end repeat
put random( click41 ) into any41
 repeat any41 times
   getcastrab
 end repeat

if click41 is not any41 then
   put click41 - any41 into extra41
  repeat extra41 times
   getcastrar
  end repeat
end if
lock screen
--hide btn TwoDishes
--show btn OneDish
show btn 40
--show btn 41
show btn 43
show btn 44
hide btn 17
unlock screen
End setTwoDishes

















On setOnlyTwoDishes
put 2 into DishSuu
showredbluedish
 put random(10) into click41
 repeat  click41 times
  clickcastra
end repeat
lock screen
--hide btn TwoDishes
--show btn OneDish
show btn 40
--show btn 41
show btn 43
show btn 44
hide btn 17
unlock screen
End setOnlyTwoDishes














On  showredbluedish
--play click
put 1 into CastraDivideLevel
put 0 into getcastraylevel
put 0 into getcastrarlevel
put 0 into getcastrablevel
lock screen
 hidecastraall
set loc of btn castra1 to 309, 285
show btn castra1
show btn castraClick
hide btn yeldish
hide btn 38
show btn reddish
show btn bluedish
--show btn 41
--show btn 42
unlock screen
repeat with i = 1 to 10
  put 0 into Item i of arrayb
  put 0 into Item i of arrayr
  put 20 + i into Item i of arrayPlate
end repeat
End showredbluedish










On hidecastraall

   hide btn Castra1
  repeat with i = 21 to 30
     hide btn %i%
  end repeat

End hidecastraall

On ShowCastra

End ShowCastra



On ClickCastra
if  getcastrablevel = 0 and  getcastrarlevel = 0 and  getcastraylevel = 0 then
lock screen
 if CastraDivideLevel >=1  and CastraDivideLevel <=9 then
      hidecastraall
      if CastraDivideLevel + 1 = 2 then
             repeat with j = 1 to CastraDivideLevel + 1
                 put j+20 into btn_j
              set bitmap of btn %btn_j% to Castra2
              set loc of btn %btn_j% to 389 - 160 *(j-1), 284
              show btn %btn_j%
             end repeat
         end if
         if CastraDivideLevel + 1 = 3 then
             repeat with j = 1 to CastraDivideLevel + 1
                 put j+20 into btn_j
              set bitmap of btn %btn_j% to Castra3
              set loc of btn %btn_j% to 417 - 107 *(j-1), 284
              show btn %btn_j%
             end repeat
         end if
         if CastraDivideLevel + 1 = 4 then
             repeat with j = 1 to CastraDivideLevel + 1
                 put j+20 into btn_j
              set bitmap of btn %btn_j% to Castra4
              set loc of btn %btn_j% to 429 - 80 *(j-1), 284
              show btn %btn_j%
               end repeat
       end if
         if CastraDivideLevel + 1 = 5 then
             repeat with j = 1 to CastraDivideLevel + 1
                 put j+20 into btn_j
              set bitmap of btn %btn_j% to Castra5
              set loc of btn %btn_j% to 437 - 64 *(j-1), 284
              show btn %btn_j%
             end repeat
         end if
         if CastraDivideLevel + 1 = 6 then
             repeat with j = 1 to CastraDivideLevel + 1
                 put j+20 into btn_j
              set bitmap of btn %btn_j% to Castra6
              set loc of btn %btn_j% to 442 - 53 *(j-1), 284
              show btn %btn_j%
             end repeat
         end if
         if CastraDivideLevel + 1 = 7 then
             repeat with j = 1 to CastraDivideLevel + 1
                 put j+20 into btn_j
              set bitmap of btn %btn_j% to Castra7
              set loc of btn %btn_j% to 446 - 46 *(j-1), 284
              show btn %btn_j%
             end repeat
         end if
         if CastraDivideLevel + 1 = 8 then
             repeat with j = 1 to CastraDivideLevel + 1
                 put j+20 into btn_j
              set bitmap of btn %btn_j% to Castra8
              set loc of btn %btn_j% to 449 - 40 *(j-1), 284
              show btn %btn_j%
             end repeat
         end if
         if CastraDivideLevel + 1 = 9 then
             repeat with j = 1 to CastraDivideLevel + 1
                 put j+20 into btn_j
              set bitmap of btn %btn_j% to Castra9
              set loc of btn %btn_j% to 451 - 36 *(j-1), 284
              show btn %btn_j%
             end repeat
         end if
         if CastraDivideLevel + 1 = 10 then
             repeat with j = 1 to CastraDivideLevel + 1
                 put j+20 into btn_j
              set bitmap of btn %btn_j% to Castra10
              set loc of btn %btn_j% to 453 - 32 *(j-1), 284
              show btn %btn_j%
              end repeat
         end if

           put  CastraDivideLevel + 1 into CastraDivideLevel

        else
              put 1 into CastraDivideLevel
              set loc of btn castra1 to 309, 285
             repeat with i = 21 to 30
               hide btn %i%
             end repeat
             show btn castra1
        end if
    if CastraDivideLevel is not 1 then
          put LocH of btn 21 - locH of btn 22 into CastraDiff
          put 20 +  CastraDivideLevel into MostLeftBtnNo
          put 21 into MostRightBtnNo
          put LocH of btn %MostLeftBtnNO% into xofLeftBTn
          put LocV of btn %MostLeftBtnNO% into yofLeftBTn
          put LocH of btn %MostRightBtnNO% into xofRightBTn
          put LocV of btn %MostRightBtnNO% into yofRightBTn

    end if
unlock screen
 
end if
end ClickCastra


On getCastray
if CastraDivideLevel = 1 and  getcastraylevel = 0 then
     
   set loc of btn castra1 to LocH of btn yeldish, LocV of btn yeldish - 17
   put getcastraylevel + 1 into getcastraylevel
end if

   if CastraDivideLevel > 1 and  getcastraylevel + 1 <= CastraDivideLevel then
      if getcastraylevel  < 5 then
                 if getcastraylevel = 0 then
                       set loc of btn 21 to LocH of btn yeldish, LocV of btn yeldish - 17
                    end if
                  if getcastraylevel = 1 then
                
                       set loc of btn 22 to LocH of btn yeldish - CastraDiff , LocV of btn yeldish - 17
                    end if
                     if getcastraylevel = 2   then
                        set loc of btn 23 to LocH of btn yeldish + CastraDiff, LocV of btn yeldish - 17
                    end if
                   if getcastraylevel = 3 then
                           set loc of btn 24 to LocH of btn yeldish - (CastraDiff * 2) , LocV of btn yeldish - 17
                       end if
                     if getcastraylevel = 4 then
                      set loc of btn 25 to LocH of btn yeldish + (CastraDiff * 2), LocV of btn yeldish - 17
                      end if
            else
                    if getcastraylevel = 5 then
                       set loc of btn 26 to LocH of btn yeldish, LocV of btn yeldish - 50
                   end if
                    if getcastraylevel = 6 then
                
                        set loc of btn 27 to LocH of btn yeldish - CastraDiff, LocV of btn yeldish - 50
                      end if
                    if getcastraylevel = 7   then
                         set loc of btn 28 to LocH of btn yeldish + CastraDiff, LocV of btn yeldish - 50
                     end if
                    if getcastraylevel = 8 then
                      set loc of btn 29 to LocH of btn yeldish - CastraDiff * 2 , LocV of btn yeldish - 50
                     end if
                     if getcastraylevel = 9 then
                       set loc of btn 30 to LocH of btn yeldish + CastraDiff * 2, LocV of btn yeldish - 50
                     end if
            end if
 
      put getcastraylevel + 1 into getcastraylevel


end if
 
End getCastray


On ReturnCastray
          put 20 + getcastraylevel + 1 into JustLeftPlateCastra
           put 20 + getcastraylevel  into LastDishCastra
if CastraDivideLevel = 1 and  getcastraylevel = 1 then
     
   set loc of btn castra1 to  309, 285
   put getcastraylevel - 1 into getcastraylevel
end if

if CastraDivideLevel > 1 and  getcastraylevel - 1 >= 0 and  (getcastraylevel is not CastraDivideLevel) then
          set loc of btn %LastDishCastra% to LocH of btn %JustLeftPlateCastra% + CastraDiff, LocV of btn  %JustLeftPlateCastra%
          put  getcastraylevel - 1 into getcastraylevel 
        end if

 if CastraDivideLevel > 1 and  getcastraylevel - 1 >= 0 and  (getcastraylevel is CastraDivideLevel) then
          set loc of btn %LastDishCastra% to xofLeftBTn, yofLeftBTn
          put  getcastraylevel - 1 into getcastraylevel 
        end if


End ReturnCastray












On getCastrab
put CastraDivideLevel - getcastrablevel - getcastrarlevel  into PlateRemainLevel
if PlateRemainLevel  > 0 and  CastraDivideLevel > 1 then
   repeat with i = 1 to 10
     if Item i of ArrayPlate is not 0 then 
             put Item i of ArrayPlate into next_btn_no
            exit repeat
    end if
   end repeat
end  if

if CastraDivideLevel = 1 and  PlateRemainLevel> 0 then
     
   set loc of btn castra1 to LocH of btn bluedish, LocV of btn bluedish - 17
   put getcastrablevel + 1 into getcastrablevel
   put 0 into PlateRemainLevel
end if

  if CastraDivideLevel > 1 and  PlateRemainLevel > 0 then
      if getcastrablevel  < 5  then
                 if getcastrablevel = 0 then
                 set loc of btn %next_btn_no% to LocH of btn bluedish, LocV of btn bluedish - 17

                    end if
                  if getcastrablevel = 1 then
                
                       set loc of btn %next_btn_no% to LocH of btn bluedish - CastraDiff , LocV of btn bluedish - 17
                    end if
                     if getcastrablevel = 2   then
                        set loc of btn %next_btn_no% to LocH of btn bluedish + CastraDiff, LocV of btn bluedish - 17
                    end if
                   if getcastrablevel = 3 then
                           set loc of btn %next_btn_no% to LocH of btn bluedish - (CastraDiff * 2) , LocV of btn bluedish - 17
                       end if
                     if getcastrablevel = 4 then
                      set loc of btn %next_btn_no% to LocH of btn bluedish + (CastraDiff * 2), LocV of btn bluedish - 17
                      end if
            else
                    if getcastrablevel = 5 then
                       set loc of btn %next_btn_no% to LocH of btn bluedish, LocV of btn bluedish - 50
                   end if
                    if getcastrablevel = 6 then
                
                        set loc of btn %next_btn_no% to LocH of btn bluedish - CastraDiff, LocV of btn bluedish - 50
                      end if
                    if getcastrablevel = 7   then
                         set loc of btn %next_btn_no% to LocH of btn bluedish + CastraDiff, LocV of btn bluedish - 50
                     end if
                    if getcastrablevel = 8 then
                      set loc of btn %next_btn_no% to LocH of btn bluedish - CastraDiff * 2 , LocV of btn bluedish - 50
                     end if
                     if getcastrablevel = 9 then
                       set loc of btn %next_btn_no% to LocH of btn bluedish + CastraDiff * 2, LocV of btn bluedish - 50
                     end if
            end if
 
      put getcastrablevel + 1 into getcastrablevel
      put next_btn_no into Item getcastrablevel of arrayb
      put next_btn_no -20 into n
       put 0 into Item n  of ArrayPlate
   

end if
 
End getCastrab


On ReturnCastrab
if CastraDivideLevel = 1 and  getcastrablevel = 1 then
     
   set loc of btn castra1 to  309, 285
   put getcastrablevel - 1 into getcastrablevel
end if

if CastraDivideLevel > 1 and  getcastrablevel - 1 >= 0  then
          put Item getcastrablevel of Arrayb into b
          put xofRightBTn - (b -21) * CastraDiff into x
          put yofRightBTn  into y

          set loc of btn %b% to x,y
          put 0 into Item getcastrablevel of Arrayb 
          put b -20 into n
          put b into Item n of ArrayPlate
          put  getcastrablevel - 1 into getcastrablevel 
          
        end if


End ReturnCastrab






















On getCastrar
put CastraDivideLevel - getcastrablevel - getcastrarlevel  into PlateRemainLevel


if PlateRemainLevel  > 0 and  CastraDivideLevel > 1 then
   repeat with i = 1 to 10
     if Item i of ArrayPlate is not 0 then 
             put Item i of ArrayPlate into next_btn_no
     exit repeat
    end if
   end repeat
end if


if CastraDivideLevel = 1 and  PlateRemainLevel> 0 then
     
   set loc of btn castra1 to LocH of btn reddish, LocV of btn reddish - 17
   put getcastrarlevel + 1 into getcastrarlevel
   put 0 into PlateRemainLevel
end if

   if CastraDivideLevel > 1 and  PlateRemainLevel > 0 then
      if getcastrarlevel  < 5  then
                 if getcastrarlevel = 0 then
                       set loc of btn %next_btn_no% to LocH of btn reddish, LocV of btn reddish - 17

                    end if
                  if getcastrarlevel = 1 then
                
                       set loc of btn %next_btn_no% to LocH of btn reddish - CastraDiff , LocV of btn reddish - 17
                    end if
                     if getcastrarlevel = 2   then
                        set loc of btn %next_btn_no% to LocH of btn reddish + CastraDiff, LocV of btn reddish - 17
                    end if
                   if getcastrarlevel = 3 then
                           set loc of btn %next_btn_no% to LocH of btn reddish - (CastraDiff * 2) , LocV of btn reddish - 17
                       end if
                     if getcastrarlevel = 4 then
                      set loc of btn %next_btn_no% to LocH of btn reddish + (CastraDiff * 2), LocV of btn reddish - 17
                      end if
            else
                    if getcastrarlevel = 5 then
                       set loc of btn %next_btn_no% to LocH of btn reddish, LocV of btn reddish - 50
                   end if
                    if getcastrarlevel = 6 then
                
                        set loc of btn %next_btn_no% to LocH of btn reddish - CastraDiff, LocV of btn reddish - 50
                      end if
                    if getcastrarlevel = 7   then
                         set loc of btn %next_btn_no% to LocH of btn reddish + CastraDiff, LocV of btn reddish - 50
                     end if
                    if getcastrarlevel = 8 then
                      set loc of btn %next_btn_no% to LocH of btn reddish - CastraDiff * 2 , LocV of btn reddish - 50
                     end if
                     if getcastrarlevel = 9 then
                       set loc of btn %next_btn_no% to LocH of btn reddish + CastraDiff * 2, LocV of btn reddish - 50
                     end if
            end if
 
      put getcastrarlevel + 1 into getcastrarlevel
      put next_btn_no into Item getcastrarlevel of arrayr
      put next_btn_no -20 into n

        put 0 into Item n  of arrayPlate

end if
 
End getCastrar


On ReturnCastrar
if CastraDivideLevel = 1 and  getcastrarlevel = 1 then
     
   set loc of btn castra1 to  309, 285
   put getcastrarlevel - 1 into getcastrarlevel
end if

if CastraDivideLevel > 1 and  getcastrarlevel - 1 >= 0  then
          put Item getcastrarlevel of arrayr into b
          put xofRightBTn - (b -21) * CastraDiff into x
          put yofRightBTn  into y

          set loc of btn %b% to x,y
          put 0 into Item getcastrarlevel of arrayr 
          put  getcastrarlevel - 1 into getcastrarlevel 
          put b -20 into n
          put b into Item n of ArrayPlate
         
        end if


End ReturnCastrar




On Game_BunboBunsi

play click
hide btn speech41

If DishSuu = 1 then
showyellowdish
 put random(10) into click41

 repeat  click41 times
  clickcastra
end repeat
wait 3 seconds
put click41 + 1 into clickclick
if clickclick = 11 then
  put 1 into clickclick
end if
put random( clickclick ) into any41
 repeat any41 times
   getcastray
 end repeat
lock screen
hide btn TwoDishes
hide btn OneDish
hide btn 40
--hide btn 41
hide btn 43
hide btn 44
hide btn 17
unlock screen
----------------
 QuizDlg10 "__/__ del pastel completo est en el plato verde", clickclick, any41
      repeat while quiz_quit = 0
         wait 30 ticks
      end repeat
      put 0 into quiz_quit
  if math_answer is not 1 then
       if math_answer is  -1 then
          play  uhoh2


lock screen
             if DishSuu = 1 then
                show btn 17
                show btn 38

              else
                show btn 43
                show btn 44
                show btn 40


              end if 
unlock screen     




                   
         else
              play jawharp
          showwitch_surprised
        end if

       else

           play good
           show_pengin_good
 

 

    end if

end if


If DishSuu = 2 then
showredbluedish
 put random(10) into click41
 repeat  click41 times
  clickcastra
end repeat


wait 3 seconds
put click41 + 1 into clickclick
if clickclick = 11 then
  put 1 into clickclick
end if
put random( clickclick ) into any41




 repeat any41 times
   getcastrab
 end repeat

if clickclick is not any41 then
   put clickclick - any41 into extra41
   put random( extra41 ) into extra41_2
  repeat extra41_2 times
   getcastrar
  end repeat
else
 put 0 into extra41_2
end if

lock screen
hide btn TwoDishes
hide btn OneDish
hide btn 40
--hide btn 41
hide btn 43
hide btn 44
hide btn 17
unlock screen



----------------
If any41 - Extra41_2 >= 0 then
  put any41 - extra41_2 into anyany
 QuizDlg10 "El pastel del plato azl supera al del plato rojo por __/__", clickclick, anyany
else
Put Extra41_2  - Any41  into SomeSome
 QuizDlg10 "El pastel del plato rojo supera al del plato azl por __/__", clickclick, SomeSome
end if
      repeat while quiz_quit = 0
         wait 30 ticks
      end repeat
      put 0 into quiz_quit
  if math_answer is not 1 then
       if math_answer is  -1 then
          play  uhoh2

lock screen
             if DishSuu = 1 then
                show btn 17
                show btn 38

              else
                show btn 43
                show btn 44
                show btn 40


              end if 
unlock screen     


          show btn speech41
          exit Game_BunboBunsi
        else
              play jawharp
          showwitch_surprised
        end if

       else
           play good
           show_pengin_good
          put score + 1 into score



 

    end if

end if

lock screen
             if DishSuu = 1 then
                show btn 17
                show btn 38
                showyellowdish

              else
                show btn 43
                show btn 44
                show btn 40
                showredbluedish


              end if 
unlock screen     
          show btn speech41

End Game_BunboBunsi










----------------------------------------------------------------------


On Game_BunboBunsi5_2
--put random(2) into Dishsuu

put 0 into score
Repeat 2 times
If DishSuu = 1 then
showyellowdish
 put random(10) into click41

 repeat  click41 times
  clickcastra
end repeat
wait 3 seconds
put click41 + 1 into clickclick
if clickclick = 11 then
  put 1 into clickclick
end if
put random( clickclick ) into any41
 repeat any41 times
   getcastray
 end repeat
lock screen
hide btn TwoDishes
hide btn OneDish
hide btn 40
--hide btn 41
hide btn 43
hide btn 44
hide btn 17
unlock screen
----------------
 QuizDlg10 "__/__ del pastel completo est en el plato verde", clickclick, any41
      repeat while quiz_quit = 0
         wait 30 ticks
      end repeat
      put 0 into quiz_quit
  if math_answer is not 1 then
       if math_answer =  -1 then
          play  uhoh2

lock screen
             if DishSuu = 1 then
                show btn 17
                show btn 38

              else
                show btn 43
                show btn 44
                show btn 40


              end if 
unlock screen     


                   
          exit repeat
        else
              play jawharp
          showwitch_surprised
          exit repeat
        end if

       else

           play good
           show_frog_good
           put score + 1 into score


 

    end if

end if


If DishSuu = 2 then

showredbluedish
 put random(10) into click41
 repeat  click41 times
  clickcastra
end repeat


wait 3 seconds
put click41 + 1 into clickclick
if clickclick = 11 then
  put 1 into clickclick
end if
put random( clickclick ) into any41




 repeat any41 times
   getcastrab
 end repeat

if clickclick is not any41 then
   put clickclick - any41 into extra41
   put random( extra41 ) into extra41_2
  repeat extra41_2 times
   getcastrar
  end repeat
else
 put 0 into extra41_2
end if




lock screen
hide btn TwoDishes
hide btn OneDish
hide btn 40
--hide btn 41
hide btn 43
hide btn 44
hide btn 17
unlock screen



----------------

----------------
If any41 - Extra41_2 >= 0 then
  put any41 - extra41_2 into anyany
 QuizDlg10 "El pastel del plato azl supera al del plato rojo por __/__", clickclick, anyany
else
Put Extra41_2  - Any41  into SomeSome
 QuizDlg10 "El pastel del plato rojo supera al del plato azl por __/__", clickclick, SomeSome
end if



      repeat while quiz_quit = 0
         wait 30 ticks
      end repeat
      put 0 into quiz_quit
  if math_answer is not 1 then
       if math_answer is  -1 then
          play  uhoh2

lock screen
             if DishSuu = 1 then
                show btn 17
                show btn 38

              else
                show btn 43
                show btn 44
                show btn 40


              end if 
unlock screen     

          exit Game_BunboBunsi5_2                   
        else
              play jawharp
          showwitch_surprised
          exit Game_BunboBunsi5_2                   

        end if

       else
           play good
           show_frog_good
          put score + 1 into score



 

    end if

end if

end repeat

if score = 5 then
    ok100
end if
if score = 4 then
    ok80
end if
if score = 3 then
    ok60
end if
lock screen
             if DishSuu = 1 then
                show btn 17
                show btn 38
                showyellowdish

              else
                show btn 43
                show btn 44
                show btn 40
                showredbluedish


              end if 
unlock screen     

End Game_BunboBunsi5_2















On Game_BunboBunsi5
--put random(2) into Dishsuu

put 0 into score
Repeat 5 times
If DishSuu = 1 then
showyellowdish
 put random(10) into click41

 repeat  click41 times
  clickcastra
end repeat
wait 3 seconds
put click41 + 1 into clickclick
if clickclick = 11 then
  put 1 into clickclick
end if
put random( clickclick ) into any41
 repeat any41 times
   getcastray
 end repeat
lock screen
hide btn TwoDishes
hide btn OneDish
hide btn 40
--hide btn 41
hide btn 43
hide btn 44
hide btn 17
unlock screen
----------------
 QuizDlg10 "__/__ del pastel completo est en el plato verde", clickclick, any41
      repeat while quiz_quit = 0
         wait 30 ticks
      end repeat
      put 0 into quiz_quit
  if math_answer is not 1 then
       if math_answer is  -1 then
          play  uhoh2

lock screen
             if DishSuu = 1 then
                show btn 17
                show btn 38

              else
                show btn 43
                show btn 44
                show btn 40


              end if 
unlock screen     


                   
          exit repeat
        else
              play jawharp
          showwitch_surprised
        end if

       else

           play good
           show_frog_good
           put score + 1 into score


 

    end if

end if


If DishSuu = 2 then

showredbluedish
 put random(10) into click41
 repeat  click41 times
  clickcastra
end repeat


wait 3 seconds
put click41 + 1 into clickclick
if clickclick = 11 then
  put 1 into clickclick
end if
put random( clickclick ) into any41




 repeat any41 times
   getcastrab
 end repeat

if clickclick is not any41 then
   put clickclick - any41 into extra41
   put random( extra41 ) into extra41_2
  repeat extra41_2 times
   getcastrar
  end repeat
else
 put 0 into extra41_2
end if




lock screen
hide btn TwoDishes
hide btn OneDish
hide btn 40
--hide btn 41
hide btn 43
hide btn 44
hide btn 17
unlock screen



----------------

----------------
If any41 - Extra41_2 >= 0 then
  put any41 - extra41_2 into anyany
 QuizDlg10 "El pastel del plato azl supera al del plato rojo por __/__", clickclick, anyany
else
Put Extra41_2  - Any41  into SomeSome
 QuizDlg10 "El pastel del plato rojo supera al del plato azl por __/__", clickclick, SomeSome
end if



      repeat while quiz_quit = 0
         wait 30 ticks
      end repeat
      put 0 into quiz_quit
  if math_answer is not 1 then
       if math_answer is  -1 then
          play  uhoh2

lock screen
             if DishSuu = 1 then
                show btn 17
                show btn 38

              else
                show btn 43
                show btn 44
                show btn 40


              end if 
unlock screen     

                    
          exit repeat
        else
              play jawharp
          showwitch_surprised
        end if

       else
           play good
           show_frog_good
          put score + 1 into score



 

    end if

end if

end repeat

if score = 5 then
    ok100
end if
if score = 4 then
    ok80
end if
if score = 3 then
    ok60
end if
lock screen
             if DishSuu = 1 then
                show btn 17
                show btn 38
                showyellowdish

              else
                show btn 43
                show btn 44
                show btn 40
                showredbluedish


              end if 
unlock screen     
End Game_BunboBunsi5













on show_pengin_good
repeat 2 times
set bitmap of btn pn_mth1 to pn_mth2
wait 1 ticks 
set bitmap of btn pn_mth1 to pn_mth3
wait 1 ticks 
set bitmap of btn pn_mth1 to pn_mth2
wait 1 ticks 
set bitmap of btn pn_mth1 to pn_mth1
wait 1 ticks 
if mouseclick() then
 exit repeat
end if
end repeat


end show_pengin_good




On OK100
    set loc of btn t_writer to 143, 58
    put LocH of btn t_writer into xmessage
    put LocV of btn t_writer into ymessage

    show btn t_writer
  message2 xmessage-79,ymessage-38, 9, "Felicitaciones! Tus respuestas fueron 100% correctas!"
  hide btn t_writer
End OK100
On OK80
     set loc of btn t_writer to 143, 58
    put LocH of btn t_writer into xmessage
    put LocV of btn t_writer into ymessage

    show btn t_writer
  message2 xmessage-79,ymessage-38, 9, "Felicitaciones! Tus respuestas fueron 80% correctas!"
  hide btn t_writer
End OK80   


On OK60
    set loc of btn t_writer to 143, 58
    put LocH of btn t_writer into xmessage
    put LocV of btn t_writer into ymessage

    show btn t_writer
  message2 xmessage-79,ymessage-38, 9, "Felicitaciones! Tus respuestas fueron 60% correctas!"
  hide btn t_writer
End OK60






