home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Japan / Panasonic- / funcity / tokyo / e / boxing.dcr / 00001_movie script.ls next >
Encoding:
Text File  |  2017-09-21  |  5.8 KB  |  258 lines

  1. global oncursor, kidobj, naobj, gamemode, userid, userpw, userpg, userpm, jumpmoviename, jumpmode, lasteventtime
  2.  
  3. on startMovie
  4.   set oncursor to [the number of cast "onCursor", the number of cast "onCursor" + 1]
  5.   set kidobj to EMPTY
  6.   set naobj to EMPTY
  7.   if not voidp(userid) then
  8.     put userid into field "userID"
  9.   end if
  10.   put 0 into field "label"
  11.   put 0 into field "point"
  12.   set lasteventtime to the ticks
  13.   resetcursor()
  14. end
  15.  
  16. on stopMovie
  17.   put " " into field "addInfo"
  18. end
  19.  
  20. on resetcursor
  21.   cursor(oncursor)
  22. end
  23.  
  24. on allreset
  25.   set kidobj to EMPTY
  26.   set naobj to EMPTY
  27.   repeat with s = 1 to 48
  28.     set the puppet of sprite s to 0
  29.   end repeat
  30. end
  31.  
  32. on gameback
  33.   if (the ticks - lasteventtime) > 15 then
  34.     if the frame >= (label("check") - 1) then
  35.       allreset()
  36.       go("loop")
  37.     else
  38.       if the frame >= (label("help") - 1) then
  39.         if objectp(kidobj) then
  40.           set the puppet of sprite clickOn() to 0
  41.           go(label("game") + 1)
  42.         else
  43.           go("loop")
  44.         end if
  45.       else
  46.         if the frame >= label("game") then
  47.           allreset()
  48.           go("loop")
  49.         else
  50.           allreset()
  51.           jumpnetmovie("menu.dcr", 0)
  52.         end if
  53.       end if
  54.     end if
  55.   end if
  56.   set lasteventtime to the ticks
  57. end
  58.  
  59. on gamehelp
  60.   set the puppet of sprite clickOn() to 0
  61.   go("help")
  62.   abort()
  63. end
  64.  
  65. on gamequit
  66.   if (the ticks - lasteventtime) > 15 then
  67.     if the frame >= (label("check") - 1) then
  68.       allreset()
  69.       jumpnetmovie("menu.dcr", 0)
  70.     else
  71.       showscore()
  72.     end if
  73.   end if
  74.   set lasteventtime to the ticks
  75. end
  76.  
  77. on jumpnetmovie mname, jmode
  78.   set jumpmoviename to mname
  79.   set jumpmode to jmode
  80.   if userid = "guest" then
  81.     set jumpmode to 1
  82.   end if
  83.   repeat with s = 1 to 48
  84.     set the puppet of sprite s to 0
  85.   end repeat
  86.   if jumpmode then
  87.     gotonetmovie(mname)
  88.   else
  89.     setuserpm()
  90.   end if
  91.   go("move")
  92. end
  93.  
  94. on setuserpm
  95.   getnettext("http://202.224.191.2/cgi-bin/EcOpe.cgi?name=" & userid & "&password=" & userpw & "&amount=" & userpg & "¶meter=" & userpm)
  96. end
  97.  
  98. on checknetresult
  99.   if jumpmode then
  100.     exit
  101.   end if
  102.   if netdone() then
  103.     set nresult to nettextresult()
  104.     if nresult starts "<" then
  105.       alert(deletetag(nresult))
  106.       go("loop")
  107.       abort()
  108.     else
  109.       if nresult starts "E000" then
  110.         if line 1 of nresult = "E0000" then
  111.           set rtext to "Error : Server System Error"
  112.         else
  113.           if line 1 of nresult = "E0001" then
  114.             set rtext to "Error : " & userid & "The name is not registered."
  115.           else
  116.             if line 1 of nresult = "E0002" then
  117.               set rtext to "Error : The password is wrong."
  118.             else
  119.               if line 1 of nresult = "E0003" then
  120.                 set rtext to "Error : The parameter's form is wrong."
  121.               else
  122.                 if line 1 of nresult = "E0003" then
  123.                   set rtext to "Error : Your balance is short - you cannot make a withdrawal."
  124.                 end if
  125.               end if
  126.             end if
  127.           end if
  128.         end if
  129.         alert(rtext)
  130.         go("loop")
  131.         abort()
  132.       else
  133.         set jumpmode to 1
  134.         gotonetmovie(jumpmoviename)
  135.       end if
  136.     end if
  137.   end if
  138. end
  139.  
  140. on deletetag ctext
  141.   repeat while ctext contains "<"
  142.     set fchar to offset("<", ctext)
  143.     set echar to offset(">", ctext)
  144.     delete char fchar to echar of ctext
  145.   end repeat
  146.   return ctext
  147. end
  148.  
  149. on resetgame
  150.   set kidobj to birth(script "kid script", 290, 155, 3)
  151.   set naobj to birth(script "national script", 170, 151, 2)
  152.   puppetSound("gong")
  153. end
  154.  
  155. on dogame
  156.   rolloverbtn()
  157.   kidmove(kidobj)
  158.   namove(naobj)
  159. end
  160.  
  161. on guard
  162.   if the frame >= label("help") then
  163.     exit
  164.   end if
  165.   kidguard(kidobj)
  166. end
  167.  
  168. on punchl
  169.   if the frame >= label("help") then
  170.     exit
  171.   end if
  172.   kidpunchl(kidobj)
  173. end
  174.  
  175. on punchr
  176.   if the frame >= label("help") then
  177.     exit
  178.   end if
  179.   kidpunchr(kidobj)
  180. end
  181.  
  182. on showscore
  183.   repeat with s = 38 to 43
  184.     set the puppet of sprite s to 0
  185.   end repeat
  186.   set ulabel to integer(9 - the dcount of kidobj)
  187.   if ulabel < 0 then
  188.     set ulabel to 0
  189.   end if
  190.   if the dcount of naobj < 9 then
  191.     set ulabel to 0
  192.   end if
  193.   put ulabel into char 9 of userpm
  194.   put integer(ulabel * 10) into field "point"
  195.   if ulabel = 9 then
  196.     put 100 into field "label"
  197.     put "You have been awarded 10 bonus points." & RETURN & "Total points is 100." into field "addInfo"
  198.   else
  199.     put integer(ulabel * 10) into field "label"
  200.     put " " into field "addInfo"
  201.   end if
  202.   go("check")
  203. end
  204.  
  205. on rolloverbtn
  206.   set rcnum to the mouseCast
  207.   if rcnum > 0 then
  208.     set rcname to string(the name of cast rcnum)
  209.     if item 2 of rcname = "off" then
  210.       repeat with s = 38 to 43
  211.         if the castNum of sprite s = rcnum then
  212.           set the puppet of sprite s to 1
  213.           set the castNum of sprite s to rcnum + 1
  214.           next repeat
  215.         end if
  216.         set the puppet of sprite s to 0
  217.       end repeat
  218.     else
  219.       if item 2 of rcname = "on" then
  220.         repeat with s = 38 to 43
  221.           if the castNum of sprite s = rcnum then
  222.             if the mouseDown and (clickOn() = s) then
  223.               set the castNum of sprite s to rcnum + 1
  224.               updateStage()
  225.               do(item 1 of rcname)
  226.             end if
  227.           end if
  228.         end repeat
  229.       else
  230.         if item 2 of rcname = "click" then
  231.           repeat with s = 38 to 43
  232.             if the castNum of sprite s = rcnum then
  233.               if the mouseUp then
  234.                 set the castNum of sprite s to rcnum - 1
  235.                 next repeat
  236.               end if
  237.             end if
  238.           end repeat
  239.         else
  240.           repeat with s = 38 to 43
  241.             set the puppet of sprite s to 0
  242.           end repeat
  243.         end if
  244.       end if
  245.     end if
  246.   else
  247.     repeat with s = 38 to 43
  248.       set the puppet of sprite s to 0
  249.     end repeat
  250.   end if
  251. end
  252.  
  253. on allpuppetoff
  254.   repeat with s = 1 to 48
  255.     set the puppet of sprite s to 0
  256.   end repeat
  257. end
  258.