home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Japan / Fujitsu- / image / odenstg.dcr / 00003_MainLoop.ls < prev    next >
Encoding:
Text File  |  2017-09-21  |  6.8 KB  |  242 lines

  1. on exitFrame
  2.   global enevit, enex, eney, enemx, enemy, odenx, odeny, msx, msy, billy, bgy, enebcnt, enedcnt, sf
  3.   set the mouseDownScript to "ShotWeapon"
  4.   puppetSprite(4, 1)
  5.   set odenx to the mouseH
  6.   set odeny to the mouseV
  7.   set the locH of sprite 4 to odenx
  8.   set the locV of sprite 4 to odeny
  9.   updateStage()
  10.   if (eney + 20) > odeny then
  11.     puppetSound("dead_y.aif")
  12.     repeat with i = 1 to 3
  13.       set the castNum of sprite 4 to the number of cast "jiki2"
  14.       updateStage()
  15.       set the castNum of sprite 4 to the number of cast "jiki"
  16.       updateStage()
  17.     end repeat
  18.     set the castNum of sprite 4 to the number of cast "boom"
  19.     updateStage()
  20.     gotonetpage("../gbad.html")
  21.   end if
  22.   if (odenx < 50) or (190 < odenx) then
  23.     puppetSound("dead_y.aif")
  24.     repeat with i = 1 to 3
  25.       set the castNum of sprite 4 to the number of cast "jiki2"
  26.       updateStage()
  27.       set the castNum of sprite 4 to the number of cast "jiki"
  28.       updateStage()
  29.     end repeat
  30.     set the castNum of sprite 4 to the number of cast "boom"
  31.     updateStage()
  32.     gotonetpage("../gbad.html")
  33.   end if
  34.   if (75 < enevit) and (enevit < 101) then
  35.     set cx1 to enex - 40
  36.     set cx2 to enex + 40
  37.     set cy1 to eney + 23
  38.     set cy2 to eney - 23
  39.   else
  40.     if (50 < enevit) and (enevit < 76) then
  41.       set cx1 to enex - 50
  42.       set cx2 to enex + 50
  43.       set cy1 to eney + 29
  44.       set cy2 to eney - 29
  45.     else
  46.       if (25 < enevit) and (enevit < 51) then
  47.         set cx1 to enex - 65
  48.         set cx2 to enex + 65
  49.         set cy1 to eney + 40
  50.         set cy2 to eney - 40
  51.       else
  52.         if enevit < 26 then
  53.           set cx1 to enex - 80
  54.           set cx2 to enex + 80
  55.           set cy1 to eney + 45
  56.           set cy2 to eney - 45
  57.         end if
  58.       end if
  59.     end if
  60.   end if
  61.   if (cx1 < (odenx - 10)) and ((odenx + 10) < cx2) and (cy2 < (odeny + 10)) and ((odeny - 10) < cy1) then
  62.     puppetSound("dead_y.aif")
  63.     repeat with i = 1 to 3
  64.       set the castNum of sprite 4 to the number of cast "jiki2"
  65.       updateStage()
  66.       set the castNum of sprite 4 to the number of cast "jiki"
  67.       updateStage()
  68.     end repeat
  69.     set the castNum of sprite 4 to the number of cast "boom"
  70.     updateStage()
  71.     gotonetpage("../gbad.html")
  72.   end if
  73.   set enedcnt to enedcnt - 1
  74.   if enedcnt = 0 then
  75.     set enedcnt to 3
  76.     puppetSprite(5, 1)
  77.     set eney to eney + 1
  78.     set the locV of sprite 5 to eney
  79.     if (50 < enevit) and (enevit < 76) then
  80.       if sf <> 1 then
  81.         puppetSound("deb.aif")
  82.         set sf to 1
  83.       end if
  84.       set the castNum of sprite 5 to the number of cast "pu2"
  85.     else
  86.       if (25 < enevit) and (enevit < 51) then
  87.         if sf <> 2 then
  88.           puppetSound("deb.aif")
  89.           set sf to 2
  90.         end if
  91.         set the castNum of sprite 5 to the number of cast "pu3"
  92.       else
  93.         if (0 < enevit) and (enevit < 26) then
  94.           if sf <> 3 then
  95.             puppetSound("deb.aif")
  96.             set sf to 3
  97.           end if
  98.           set the castNum of sprite 5 to the number of cast "pu4"
  99.         else
  100.           if enevit < 1 then
  101.             if sf <> 4 then
  102.               puppetSound("deb.aif")
  103.               set sf to 4
  104.             end if
  105.             set the castNum of sprite 5 to the number of cast "pu5"
  106.           end if
  107.         end if
  108.       end if
  109.     end if
  110.     updateStage()
  111.   end if
  112.   repeat with i = 1 to 5
  113.     if getAt(msx, i) <> 0 then
  114.       set x to getAt(msx, i)
  115.       set y to getAt(msy, i) - 15
  116.       setAt(msy, i, y)
  117.       puppetSprite(i + 10, 1)
  118.       set the locH of sprite (i + 10) to x
  119.       set the locV of sprite (i + 10) to y
  120.       updateStage()
  121.       if y < -10 then
  122.         setAt(msx, i, 0)
  123.       end if
  124.       if (75 < enevit) and (enevit < 101) then
  125.         set cx1 to enex - 40
  126.         set cx2 to enex + 40
  127.         set cy1 to eney + 23
  128.         set cy2 to eney - 23
  129.       else
  130.         if (50 < enevit) and (enevit < 76) then
  131.           set cx1 to enex - 50
  132.           set cx2 to enex + 50
  133.           set cy1 to eney + 29
  134.           set cy2 to eney - 29
  135.         else
  136.           if (25 < enevit) and (enevit < 51) then
  137.             set cx1 to enex - 65
  138.             set cx2 to enex + 65
  139.             set cy1 to eney + 40
  140.             set cy2 to eney - 40
  141.           else
  142.             if enevit < 26 then
  143.               set cx1 to enex - 80
  144.               set cx2 to enex + 80
  145.               set cy1 to eney + 45
  146.               set cy2 to eney - 45
  147.             end if
  148.           end if
  149.         end if
  150.       end if
  151.       if (cx1 < x) and (x < cx2) and (cy1 > y) and (cy2 < y) then
  152.         puppetSound("misairu.aif")
  153.         set the castNum of sprite (i + 10) to the number of cast "hit"
  154.         updateStage()
  155.         set enevit to enevit - 2
  156.         setAt(msx, i, 0)
  157.         puppetSprite(i + 10, 0)
  158.       end if
  159.     end if
  160.   end repeat
  161.   if (getPos(enemx, 0) <> 0) and (enevit > 0) then
  162.     set p to getPos(enemx, 0)
  163.     set r to random(10)
  164.     if r = 1 then
  165.       set x to random(140) + 50
  166.       set y to eney + 30
  167.       setAt(enemx, p, x)
  168.       setAt(enemy, p, y)
  169.     end if
  170.   end if
  171.   repeat with i = 1 to 5
  172.     if getAt(enemx, i) <> 0 then
  173.       set x to getAt(enemx, i)
  174.       set y to getAt(enemy, i) + 10
  175.       setAt(enemy, i, y)
  176.       puppetSprite(i + 15, 1)
  177.       set the locH of sprite (i + 15) to x
  178.       set the locV of sprite (i + 15) to y
  179.       updateStage()
  180.       if y > 310 then
  181.         setAt(enemx, i, 0)
  182.       end if
  183.       set cx1 to odenx - 12
  184.       set cx2 to odenx + 12
  185.       set cy1 to odeny - 12
  186.       set cy2 to odeny + 12
  187.       if (cx1 < x) and (x < cx2) and (cy1 < y) and (y < cy2) then
  188.         puppetSound("dead_y.aif")
  189.         repeat with i = 1 to 3
  190.           set the castNum of sprite 4 to the number of cast "jiki2"
  191.           updateStage()
  192.           set the castNum of sprite 4 to the number of cast "jiki"
  193.           updateStage()
  194.         end repeat
  195.         set the castNum of sprite 4 to the number of cast "boom"
  196.         updateStage()
  197.         gotonetpage("../gbad.html")
  198.       end if
  199.     end if
  200.   end repeat
  201.   puppetSprite(1, 1)
  202.   puppetSprite(2, 1)
  203.   if (enevit < 0) and (enebcnt < 40) then
  204.     if sf <> 5 then
  205.       puppetSound("dead.aif")
  206.       set sf to 5
  207.     end if
  208.     set billy to billy - 2
  209.     set enebcnt to enebcnt + 1
  210.   else
  211.     if enebcnt > 39 then
  212.       repeat with t = 1 to 5
  213.         set the castNum of sprite 5 to the number of cast "namida"
  214.         updateStage()
  215.         set the castNum of sprite 5 to the number of cast "pu5"
  216.         updateStage()
  217.       end repeat
  218.       repeat with i = 11 to 20
  219.         puppetSprite(i, 0)
  220.       end repeat
  221.       gotonetpage("../ghappy.html")
  222.     else
  223.       set billy to billy - 10
  224.     end if
  225.   end if
  226.   if billy = 0 then
  227.     set billy to 300
  228.   end if
  229.   set the locV of sprite 1 to billy
  230.   set the locV of sprite 2 to billy
  231.   updateStage()
  232.   puppetSprite(3, 1)
  233.   set bgy to bgy - 0.5
  234.   if bgy > -50 then
  235.     set the locV of sprite 3 to bgy
  236.   else
  237.     puppetSound("dead_y.aif")
  238.     gotonetpage("../gbad.html")
  239.   end if
  240.   go(the frame)
  241. end
  242.