
-------------------card 36 --------------------

On opencard 36
lock screen
 set loc of btn hand  to   -10, 351
 set loc of btn hok0_1a to  435,151
 set bitmap of btn knob1 to knob1l
 unlock screen
   put random(12 ) into numberwaterlevel
   if game_on is not 1 then
   wait 1 seconds
   play broom
   put 3 into ntx
   naratoranimex
     wait 1 seconds
  play bokuwo
  put 5 into ntx
 naratoranimex

   end if
  put 1 into onetimeknobamount
  put 1 into sizebacket
lock screen
 set loc of btn hok0_1a to  435,151
 set bitmap of btn knob1 to knob1l
 unlock screen
end opencard




On quiz36
play w_inside
   put 3 into ntx
   naratoranimex
   wait 2 seconds
cover36hide2
 put 999 into quiz36on
 repeat 3 times
   if random(2) = 1  then
       if numberwaterlevel + sizebacket   > 12 then
          put random(numberwaterlevel) into sub36
         put sub36/onetimeknobamount into kaisu_a
           if kaisu_a > 5 then 
              put kaisu_a mod 5 into kaisu_a
           end if

          repeat with iii = 1 to kaisu_a
           Psubtract
          end repeat
       else
          put random(12 - numberwaterlevel) into nn
         put nn/sizebacket  into kaisu_b
            if kaisu_b > 5 then 
              put kaisu_b  mod 5 into kaisu_b
           end if
        repeat with iii = 1 to kaisu_b
          Paddition
         end repeat
       end if
   else
        if numberwaterlevel - onetimeknobamount < 0 then
            put random(12-numberwaterlevel) into n
          put n/sizebacket  into kaisu_c
            if kaisu_c > 5 then 
              put kaisu_c mod 5  into kaisu_c
           end if
            repeat with iii = 1 to kaisu_c
             PAddition
            end repeat
        else
        put random(numberwaterlevel) into nn
         put nn/onetimeknobamount into kaisu_d
           if kaisu_d > 5 then 
              put kaisu_d mod 5 into kaisu_d
           end if
        repeat with iii = 1 to kaisu_d
          Psubtract
         end repeat
        end if
   end if
end repeat
 
      put numberwaterlevel  into LitterRemained
     QuizDlg14 "Quedan __L__ml de agua", LitterRemained
      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
            set loc of btn hok0_1a to  435,151
            show btn hok0_1a
            unlock screen
             exit  quiz36
            else
               play jawharp
               showwitch_surprised
            end if
       else
           play good
           show_frog_good
      end if


cover36hide2

 put 0 into quiz36on
            set loc of btn hok0_1a to  435,151
            show btn hok0_1a

End quiz36

------ usuful when game is  on ------------
On kingdom_quiz36
      wait 1 seconds
      play w_inside
      put 5 into ntx 
      naratoranimex
      wait 1 seconds
      cover36hide2
   put random(numberpolliwog) into sub36
   if (sub36 < 1 or numberpolliwog = sub36) and numberpolliwog > 0 then
     psubtract
  else
   if numberpolliwog - sub36 > 0 then 
     repeat sub36 times
       psubtract
     end repeat
    end if
   end if
     QuizDlg4 "Cuntos renacuajos quedan?", numberpolliwog
      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
           else
            play jawharp
          showwitch_surprised
          end if
       else
           play good
           show_frog_good
      end if
      cover36hide3

End kingdom_quiz36


------ end usuful when game is  on ------------










On cover36hide
  play click
  lock screen
  hide btn cover
  hide fld watch
  repeat with i36 = 1 to 12
     put 20 + i36 -1 into wlevel
     if i36 <= numberwaterlevel then
        set loc of btn %wlevel% to 308, 383-(i36 -1) * 10
        show btn %wlevel%
     else
         hide btn %wlevel%
     end if
  end repeat
  unlock screen
 repeat until  mouseclick()
  wait 1 ticks
 end repeat
     play click
    lock screen
     show btn cover
     show fld watch
    unlock screen

End cover36hide


















On waterlevelset
-- play river
if  numberwaterlevel = 0 then
  put random(12 ) into numberwaterlevel
end if
end waterlevelset

On cover36hide2
-- play click
  lock screen
  hide btn cover
  hide fld watch
   repeat with i36 = 1 to 12
     put 20 + i36 -1 into wlevel
     if i36 <= numberwaterlevel then
        set loc of btn %wlevel% to 308, 383-(i36 -1) * 10
        show btn %wlevel%
     else
         hide btn %wlevel%
   end if
  end repeat
  unlock screen
     wait 5 seconds
    lock screen
     show btn cover
     show fld watch
   unlock screen

End cover36hide2

On cover36hide3
 play click
  lock screen
  hide btn cover
  hide fld watch
  repeat with i36 = 1 to 12
     put 20 + i36 -1 into wlevel
     if i36 <= numberwaterlevel then
        set loc of btn %wlevel% to 308, 383-(i36 -1) * 10
        show btn %wlevel%
     else
         hide btn %wlevel%
     end if
  end repeat
  unlock screen

End cover36hide3







On PAddition
-- play river
      if numberwaterlevel +  sizebacket > 12 then
         if quiz36on is not 999 then
            show btn t_writer
            message2 289, 31, 9, "Est lleno de agua!"
            hide btn t_writer
         end if
       else
           put numberwaterlevel +  sizebacket into numberwaterlevel
           Pour_Water_by_hoki
      end if
End PAddition






On psubtract
-- play water
      if numberwaterlevel - onetimeknobamount < 0 then
         if quiz36on is not 999 then
            show btn t_writer
            message2 289, 31, 9, "Est vaco!"
            hide btn t_writer
         end if
       else
           put numberwaterlevel - onetimeknobamount into numberwaterlevel
           water_out_by_hand
      end if
end  psubtract




On  water_out_by_hand
set loc of btn hand  to   -10, 320
show btn hand
repeat with i = 1 to 9
set loc of btn hand to -10 + 5 * i, 320
end repeat
set loc of btn hand to 37, 320
wait 20 ticks
play water
lock screen
set loc of btn knob2 to 127, 372
show btn knob2
unlock screen
repeat 5 times
set bitmap of btn knob2 to knob3
set bitmap of btn knob2 to knob2
end repeat
hide btn knob2
repeat with i = 1 to 9
set loc of btn hand to 37- 5 * i, 320
end repeat
set loc of btn hand  to   -10, 320


End water_out_by_hand
 



On Pour_Water_by_hoki
set loc of btn hok0_1a to 670, 151
if sizebacket = 1 then
   set bitmap of btn hok0_1a to hok0_1a
  else
  if sizebacket = 2 then
   set bitmap of btn hok0_1a to hok0_2a
  else
   set bitmap of btn hok0_1a to hok0_3a
  end if
end if
 show btn hok0_1a

repeat with i = 1 to 13
   if i mod 2 = 1 then
         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1a
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_2a
              else
                  set bitmap of btn hok0_1a to hok0_3a
              end if
         end if
    else
         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1b
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_2b
              else
                  set bitmap of btn hok0_1a to hok0_3b
              end if
         end if
   end if
    set loc of btn hok0_1a to 670-30*i, 151
    wait 2 ticks
 
end repeat  
set loc of btn hok0_1a to 267, 151

         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1c
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_2c
              else
                  set bitmap of btn hok0_1a to hok0_3c
              end if
         end if
   
wait 10 ticks

         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1d
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_2d
              else
                  set bitmap of btn hok0_1a to hok0_3d
              end if
         end if
 
wait 10 ticks

         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1e
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_2e
              else
                  set bitmap of btn hok0_1a to hok0_3e
              end if
         end if
wait 3 ticks

         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1f
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_1f
              else
                  set bitmap of btn hok0_1a to hok0_1f
              end if
         end if
 play river
wait 30 ticks
         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1d
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_2d
              else
                  set bitmap of btn hok0_1a to hok0_3d
              end if
         end if
 
wait 10 ticks
set loc of btn hok0_1a to 267, 151

         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1c
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_2c
              else
                  set bitmap of btn hok0_1a to hok0_3c
              end if
         end if
   
wait 10 ticks

----------------
repeat with i = 1 to 13
   if i mod 2 = 1 then
         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1a
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_2a
              else
                  set bitmap of btn hok0_1a to hok0_3a
              end if
         end if
    else
         if sizebacket = 1 then
            set bitmap of btn hok0_1a to hok0_1b
         else
             if sizebacket = 2 then
                  set bitmap of btn hok0_1a to hok0_2b
              else
                  set bitmap of btn hok0_1a to hok0_3b
              end if
         end if
   end if
    set loc of btn hok0_1a to 267-30*(i-1), 151
    wait 2 ticks
  end repeat
lock screen
if game_on is 1 or  quiz36on is 999 then
   hide btn hok0_1a
else
set loc of btn hok0_1a to  435,151
end if
unlock screen
End Pour_Water_by_hoki
 






On frog36anime
  play frog
  set the loc of btn k_frogb1 to 224,280
  set bitmap of btn k_frogb1 to k_frog1
   show btn k_frogb1
   wait 5 ticks
   set the loc of btn k_frogb1 to 70,369
   k_frogbanime
   set the loc of btn k_frogb1 to 0,400
wait 15 ticks
hide btn k_frogb1
end frog36anime




On k_frogbanime
repeat 2 times
set bitmap of btn k_frogb1 to k_frogb1
wait 2 ticks
set bitmap of btn k_frogb1 to k_frogb3
wait 2 ticks
set bitmap of btn k_frogb1 to k_frogb4
wait 2 ticks
set bitmap of btn k_frogb1 to k_frogb3
wait 2 ticks
end repeat

End k_frogbanime







On changeknob
if onetimeknobamount + 1 > =4 then
  put 1 into onetimeknobamount
else
 put onetimeknobamount + 1 into onetimeknobamount
end if
         lock screen
      if onetimeknobamount = 1 then
           set bitmap of btn knob1l to knob1l
           set bitmap of btn knob1 to knob1l
     else
          if onetimeknobamount = 2 then
           set bitmap of btn knob1l to knob2l
           set bitmap of btn knob1 to knob2l
          else
            set bitmap of btn knob1l to knob3l
            set bitmap of btn knob1 to knob3l
         end if
     end if
          unlock screen
End changeknob


On changebacket
if sizebacket + 1 > = 4 then
  put 1 into sizebacket
else
 put  sizebacket + 1 into sizebacket
end if
 lock screen
     if sizebacket <= 1.5 then
           set bitmap of btn backet1 to backet1

            set bitmap of btn hok0_1a to hok0_1a
     else
          if sizebacket <= 2.5 then
             set bitmap of btn backet1 to backet2
           set bitmap of btn hok0_1a to hok0_2a
           else
             set bitmap of btn backet1 to backet3
           set bitmap of btn hok0_1a to hok0_3a
          end if
     end if
 unlock screen
End changebacket


------------------end card36 -----------------
