
On OpenCard
	Lock Screen
	Show btn hakari1k
	Hide btn hakari2k
	Put 1 Into hakariMode
	Put 0 Into hakariWeight

	SetHakari
    setting44
    hideomoriall
	Unlock Screen
If Game_on is not 1 then
  play omosa
    put 3 into ntx
   naratoranimex
   wait 2 seconds
  play bokuwo
    put 5 into ntx
   naratoranimex
end if
End OpenCard

On hideomoriall
   repeat with i = 1 to 8
    put Item i of twokilogramomori into nn
    hide btn %nn%
   end repeat

End hideomoriall


On setting44
 put  24 into Item 1 of onekilogramomori
 put  19 into Item 2 of onekilogramomori
 put  25 into Item 3 of onekilogramomori
 put  20 into Item 4 of onekilogramomori
 put  26 into Item 5 of onekilogramomori
 ---------------
 put  24 into Item 1 of twokilogramomori
 put  19 into Item 2 of twokilogramomori
 put  25 into Item 3 of twokilogramomori
 put  20 into Item 4 of twokilogramomori
 put  26 into Item 5 of twokilogramomori
 put  21 into Item 6 of twokilogramomori
 put  22 into Item 7 of twokilogramomori
 put  23 into Item 8 of twokilogramomori
end setting44
----------------------
On Quiz44
put 0 into score44
Repeat 5 times
Set Data of btn hari to 0
Put 0 Into hakariWeight
if hakariMode = 1 then

  put random( 5 ) into ww
   if ww = 1 then
       put 20 - ww into xx
   end if
   if ww = 2 then
       put 40 - ww into xx
   end if
   if ww = 3 then
       put 60 - ww into xx
   end if
   if ww = 4 then
       put 80 - ww into xx
   end if
   if ww = 5 then
       put 100 - ww into xx
   end if
 lock screen
   put Item ww of onekilogramomori into bb
   hideomoriall
   show btn %bb%
unlock screen
   
  Repeat with i= 1 to xx
   WeightUp1
end repeat

---------------
put xx * 10 into ans_44
QuizDlg12 "Pesa ____Kg____g.", ans_44
      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
             exit repeat

           else
              play jawharp
              showwitch_surprised
           end if
       else
           play good
           show_frog_good
           put score44 + 1 into score44
  end if


---------------
else
-------------
  put random( 8 ) into ww
   if ww = 1 then
       put 10 - random(4) into xx
   end if
   if ww = 2 then
       put 20 - random(4) into xx
   end if
   if ww = 3 then
       put 30 - random(4) into xx
   end if
   if ww = 4 then
       put 40 - random(4) into xx
   end if
   if ww = 5 then
       put 50 - random(4) into xx
   end if
   if ww = 6 then
       put 60 - random(4) into xx
   end if
   if ww = 7 then
       put 80 - random(4) into xx
   end if
   if ww = 8 then
       put 100 - random(4) into xx
   end if
 lock screen
   put Item ww of twokilogramomori into bb
   repeat with i = 1 to 8
    put Item i of twokilogramomori into nn
    hide btn %nn%
   end repeat
   show btn %bb%
unlock screen
   
  Repeat with i= 1 to xx
   WeightUp1
  end repeat

---------------
put xx * 20 into ans_44
QuizDlg12 "Pesa ____Kg____g.", ans_44
      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

             exit repeat

           else
              play jawharp
              showwitch_surprised
           end if
   else
           play good
           show_frog_good
           put score44 + 1 into score44
 end if

-----------
end if
End repeat
if score44 =5 then
   ok100
end if
if score44 =4 then
   ok80
end if
if score44 =3 then
   ok60
end if
             lock screen
             hideomoriall
             Set Data of btn hari to 0
             Put 0 Into hakariWeight
             unlock screen

End Quiz44

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




On SetHakari
	Put hakariWeight * 3.6 Into kaku
	Set Data of btn hari to kaku
End SetHakari

On Hakari1kg
	Lock Screen
	Show btn hakari1k
	Hide btn hakari2k
	Put 1 Into hakariMode
	SetHakari
	Unlock Screen
End Hakari1kg

On Hakari2kg
	Lock Screen
	Hide btn hakari1k
	Show btn hakari2k
	Put 2 Into hakariMode
	SetHakari
	Unlock Screen
End Hakari2kg

On WeightUp1
	Put hakariWeight + 1 Into hakariWeight
	if hakariWeight > 99 then
		Put 0 Into hakariWeight
	end if
	SetHakari
End WeightUp1

On WeightUp
	WeightUp1
	Wait 20 ticks
	Repeat While Mouse() is Down
		WeightUp1
		Wait 10 ticks
	end Repeat
End WeightUp

On WeightDown1
	Put hakariWeight - 1 Into hakariWeight
	if hakariWeight < 0 then
		Put 99 Into hakariWeight
	end if
	SetHakari
End WeightDown1

On WeightDown
	WeightDown1
	Wait 20 ticks
	Repeat While Mouse() is Down
		WeightDown1
		Wait 10 ticks
	end Repeat
End WeightDown



----------------------
On Quiz44_2
put random(2) into hakarimode
if hakariMode = 1 then
Hakari1kg
else
Hakari2kg
end if

put 0 into score44
Repeat 2 times
Set Data of btn hari to 0
Put 0 Into hakariWeight
if hakariMode = 1 then

  put random( 5 ) into ww
   if ww = 1 then
       put 20 - ww into xx
   end if
   if ww = 2 then
       put 40 - ww into xx
   end if
   if ww = 3 then
       put 60 - ww into xx
   end if
   if ww = 4 then
       put 80 - ww into xx
   end if
   if ww = 5 then
       put 100 - ww into xx
   end if
 lock screen
   put Item ww of onekilogramomori into bb
   hideomoriall
   show btn %bb%
unlock screen
   
  Repeat with i= 1 to xx
   WeightUp1
end repeat

---------------
put xx * 10 into ans_44
QuizDlg12 "Pesa ____Kg____g.", ans_44
      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
             exit repeat

           else
              play jawharp
              showwitch_surprised
              exit repeat
           end if
       else
           play good
           show_frog_good
           put score44 + 1 into score44
  end if


---------------
else
-------------
  put random( 8 ) into ww
   if ww = 1 then
       put 10 - random(4) into xx
   end if
   if ww = 2 then
       put 20 - random(4) into xx
   end if
   if ww = 3 then
       put 30 - random(4) into xx
   end if
   if ww = 4 then
       put 40 - random(4) into xx
   end if
   if ww = 5 then
       put 50 - random(4) into xx
   end if
   if ww = 6 then
       put 60 - random(4) into xx
   end if
   if ww = 7 then
       put 80 - random(4) into xx
   end if
   if ww = 8 then
       put 100 - random(4) into xx
   end if
 lock screen
   put Item ww of twokilogramomori into bb
   repeat with i = 1 to 8
    put Item i of twokilogramomori into nn
    hide btn %nn%
   end repeat
   show btn %bb%
unlock screen
   
  Repeat with i= 1 to xx
   WeightUp1
  end repeat

---------------
put xx * 20 into ans_44
QuizDlg12 "Pesa ____Kg____g.", ans_44
      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

             exit repeat

           else
              play jawharp
              showwitch_surprised
              exit repeat
           end if
   else
           play good
           show_frog_good
           put score44 + 1 into score44
 end if

-----------
end if
End repeat
if score44 =5 then
   ok100
end if
if score44 =4 then
   ok80
end if
if score44 =3 then
   ok60
end if
             lock screen
             hideomoriall
             Set Data of btn hari to 0
             Put 0 Into hakariWeight
             unlock screen

End Quiz44_2

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












