home *** CD-ROM | disk | FTP | other *** search
/ Car Screensaver - Toyota / TOYOTA.iso / mjparty / no1_demo / dnorp01a.dxr / script_9.ls < prev    next >
Encoding:
Text File  |  1996-10-31  |  8.3 KB  |  384 lines

  1. on counth2
  2.   global gtime1
  3.   if gtime1 = 12 then
  4.     set gtime1 to 1
  5.   else
  6.     set gtime1 to gtime1 + 1
  7.   end if
  8.   yfishh()
  9.   b1fishh()
  10.   b2fishh()
  11.   if (gtime1 mod 2) = 0 then
  12.     curh()
  13.     kujirah()
  14.     takoh()
  15.     azah()
  16.   end if
  17.   if (gtime1 mod 3) = 0 then
  18.     lionh()
  19.     kanh()
  20.     penh()
  21.   end if
  22.   if (gtime1 mod 4) = 0 then
  23.     kituh()
  24.     kidsh()
  25.   end if
  26.   if (gtime1 mod 12) = 0 then
  27.     eleh()
  28.   end if
  29.   startTimer()
  30. end
  31.  
  32. on kidsh
  33.   repeat with n = 9 to 13
  34.     set num to the memberNum of sprite n
  35.     if num > 35 then
  36.       set the memberNum of sprite n to num - 5
  37.       next repeat
  38.     end if
  39.     if random(5) = 1 then
  40.       set the memberNum of sprite n to num + 5
  41.     end if
  42.   end repeat
  43. end
  44.  
  45. on curh
  46.   global gwlist1
  47.   setAt(gwlist1, 1, getAt(gwlist1, 1) * -1)
  48.   if getAt(gwlist1, 1) = 1 then
  49.     cursor([3, 4])
  50.   else
  51.     cursor([5, 6])
  52.   end if
  53. end
  54.  
  55. on lionh
  56.   global gwlist1
  57.   set num to getAt(gwlist1, 2)
  58.   if num = 6 then
  59.     set num to 1
  60.   else
  61.     set num to num + 1
  62.   end if
  63.   setAt(gwlist1, 2, num)
  64.   if (num = 2) or (num = 4) then
  65.     set the memberNum of sprite 16 to 62
  66.   else
  67.     set the memberNum of sprite 16 to 61
  68.   end if
  69. end
  70.  
  71. on eleh
  72.   global gwlist1
  73.   set num to getAt(gwlist1, 3)
  74.   if num = 3 then
  75.     set num to 1
  76.   else
  77.     set num to num + 1
  78.   end if
  79.   setAt(gwlist1, 3, num)
  80.   if num = 1 then
  81.     set the memberNum of sprite 17 to 63
  82.   else
  83.     if num = 2 then
  84.       set the memberNum of sprite 17 to 64
  85.     end if
  86.   end if
  87. end
  88.  
  89. on kanh
  90.   global gwlist1
  91.   set num to getAt(gwlist1, 4)
  92.   if num = 9 then
  93.     set num to 1
  94.   else
  95.     set num to num + 1
  96.   end if
  97.   setAt(gwlist1, 4, num)
  98.   if num > 7 then
  99.     exit
  100.   else
  101.     if (num mod 2) = 1 then
  102.       set the memberNum of sprite 18 to 65
  103.     else
  104.       set the memberNum of sprite 18 to 66
  105.     end if
  106.   end if
  107. end
  108.  
  109. on kituh
  110.   global gwlist1
  111.   setAt(gwlist1, 5, getAt(gwlist1, 5) * -1)
  112.   if getAt(gwlist1, 5) = 1 then
  113.     set the memberNum of sprite 19 to 67
  114.   else
  115.     set the memberNum of sprite 19 to 68
  116.   end if
  117. end
  118.  
  119. on kujirah
  120.   global gwlist1
  121.   set num to getAt(gwlist1, 6)
  122.   if num = 20 then
  123.     set num to 1
  124.   else
  125.     set num to num + 1
  126.   end if
  127.   setAt(gwlist1, 6, num)
  128.   if num = 1 then
  129.     set p to random(2)
  130.     set the locH of sprite 20 to getAt([160, 417], p)
  131.     set the locV of sprite 20 to getAt([407, 312], p)
  132.   else
  133.     if num < 6 then
  134.       set the memberNum of sprite 20 to 69 + num
  135.     else
  136.       if (num > 9) and (num < 13) then
  137.         set the memberNum of sprite 20 to 83 - num
  138.       else
  139.         if num = 13 then
  140.           set the memberNum of sprite 20 to 20
  141.         end if
  142.       end if
  143.     end if
  144.   end if
  145. end
  146.  
  147. on penh
  148.   global gwlist1
  149.   set num to getAt(gwlist1, 7)
  150.   if num = 18 then
  151.     set num to 1
  152.   else
  153.     set num to num + 1
  154.   end if
  155.   setAt(gwlist1, 7, num)
  156.   case num of
  157.     2, 11:
  158.       set the locH of sprite 21 to 614
  159.       set the locV of sprite 21 to 165
  160.       if num = 11 then
  161.         set the memberNum of sprite 21 to 75
  162.       end if
  163.     3, 12:
  164.       set the locH of sprite 21 to 595
  165.       set the locV of sprite 21 to 176
  166.       if num = 3 then
  167.         set the memberNum of sprite 21 to 76
  168.       end if
  169.     4:
  170.       set the memberNum of sprite 21 to 77
  171.     5:
  172.       set the locH of sprite 21 to 700
  173.     9:
  174.       set the locH of sprite 21 to 595
  175.     10:
  176.       set the memberNum of sprite 21 to 76
  177.   end case
  178. end
  179.  
  180. on takoh
  181.   global gwlist1
  182.   takomoveh(0)
  183.   if getAt(gwlist1, 9) <> 0 then
  184.     takomoveh(1)
  185.   else
  186.     if random(12) = 1 then
  187.       set pos to takoposh(22)
  188.       set the locH of sprite 23 to getAt([208, 267, 386], pos)
  189.       set the locV of sprite 23 to getAt([381, 430, 366], pos)
  190.       takomoveh(1)
  191.     end if
  192.   end if
  193. end
  194.  
  195. on takomoveh p
  196.   global gwlist1
  197.   set num to getAt(gwlist1, 8 + p)
  198.   if num = 12 then
  199.     set num to 1
  200.   else
  201.     set num to num + 1
  202.   end if
  203.   setAt(gwlist1, 8 + p, num)
  204.   case num of
  205.     2, 3, 4:
  206.       set the memberNum of sprite (22 + p) to 76 + num
  207.     7, 8:
  208.       set the memberNum of sprite (22 + p) to 86 - num
  209.     9:
  210.       set the memberNum of sprite (22 + p) to 20
  211.     12:
  212.       if p = 0 then
  213.         if getAt(gwlist1, 9) = 0 then
  214.           set pos to random(3)
  215.         else
  216.           set pos to takoposh(23)
  217.         end if
  218.         set the locH of sprite 22 to getAt([208, 267, 386], pos)
  219.         set the locV of sprite 22 to getAt([381, 430, 366], pos)
  220.       else
  221.         setAt(gwlist1, 9, 0)
  222.       end if
  223.   end case
  224. end
  225.  
  226. on takoposh sp
  227.   set p to getPos([208, 267, 386], the locH of sprite sp)
  228.   repeat with n = 1 to 1
  229.     set pos to random(3)
  230.     if pos = p then
  231.       set n to n - 1
  232.     end if
  233.   end repeat
  234.   return pos
  235. end
  236.  
  237. on yfishh
  238.   global gwlist1
  239.   set num to getAt(gwlist1, 10)
  240.   if num = 26 then
  241.     set num to 1
  242.   else
  243.     set num to num + 1
  244.   end if
  245.   setAt(gwlist1, 10, num)
  246.   if num = 1 then
  247.     set the memberNum of sprite 24 to 81
  248.     set the memberNum of sprite 25 to 81
  249.   else
  250.     if num < 12 then
  251.       set the locV of sprite 24 to 390 + random(10)
  252.       set the locV of sprite 25 to 418 + random(10)
  253.       set the locH of sprite 24 to 466 - (num * 6)
  254.       set the locH of sprite 25 to 492 - (num * 12)
  255.     else
  256.       if num = 14 then
  257.         set the memberNum of sprite 24 to 82
  258.         set the memberNum of sprite 25 to 82
  259.       else
  260.         if (num > 14) and (num < 25) then
  261.           set the locV of sprite 24 to 390 + random(10)
  262.           set the locV of sprite 25 to 418 + random(10)
  263.           set the locH of sprite 24 to 400 + ((num - 14) * 6)
  264.           set the locH of sprite 25 to 360 + ((num - 14) * 12)
  265.         end if
  266.       end if
  267.     end if
  268.   end if
  269. end
  270.  
  271. on b1fishh
  272.   global gwlist1
  273.   set num to getAt(gwlist1, 11)
  274.   if num = 52 then
  275.     set num to 1
  276.   else
  277.     set num to num + 1
  278.   end if
  279.   setAt(gwlist1, 11, num)
  280.   if num < 27 then
  281.     if (num mod 2) = 1 then
  282.       set the memberNum of sprite 26 to 83
  283.     else
  284.       set the memberNum of sprite 26 to 84
  285.     end if
  286.   else
  287.     if (num mod 2) = 1 then
  288.       set the memberNum of sprite 26 to 85
  289.     else
  290.       set the memberNum of sprite 26 to 86
  291.     end if
  292.   end if
  293.   if (num > 1) and (num < 14) then
  294.     set the locV of sprite 26 to 163 - random(5)
  295.     set the locH of sprite 26 to 335 - (num * 5)
  296.   else
  297.     if (num > 13) and (num < 23) then
  298.       set the locV of sprite 26 to 155 - random(5)
  299.       set the locH of sprite 26 to 335 - (num * 5)
  300.     else
  301.       if (num > 27) and (num < 44) then
  302.         set the locV of sprite 26 to 138 + random(5)
  303.         set the locH of sprite 26 to 225 + ((num - 27) * 5)
  304.       else
  305.         if (num > 43) and (num < 49) then
  306.           set the locV of sprite 26 to 145 + random(5)
  307.           set the locH of sprite 26 to 225 + ((num - 27) * 5)
  308.         end if
  309.       end if
  310.     end if
  311.   end if
  312. end
  313.  
  314. on b2fishh
  315.   global gwlist1
  316.   set num to getAt(gwlist1, 12)
  317.   if num = 34 then
  318.     set num to 1
  319.   else
  320.     set num to num + 1
  321.   end if
  322.   setAt(gwlist1, 12, num)
  323.   if num < 20 then
  324.     if (num mod 2) = 1 then
  325.       set the memberNum of sprite 27 to 85
  326.     else
  327.       set the memberNum of sprite 27 to 86
  328.     end if
  329.   else
  330.     if (num mod 2) = 1 then
  331.       set the memberNum of sprite 27 to 83
  332.     else
  333.       set the memberNum of sprite 27 to 84
  334.     end if
  335.   end if
  336.   if (num > 1) and (num < 10) then
  337.     set the locH of sprite 27 to 11 + (num * 5)
  338.     set the locV of sprite 27 to 393 - (num * 3) - random(4)
  339.   else
  340.     if (num > 13) and (num < 18) then
  341.       set the locH of sprite 27 to 56 + ((num - 13) * 2) + random(7)
  342.       set the locV of sprite 27 to 366 + ((num - 13) * 6)
  343.     else
  344.       if (num > 21) and (num < 32) then
  345.         set the locH of sprite 27 to 68 - ((num - 21) * 5)
  346.         set the locV of sprite 27 to 388 + random(5)
  347.       end if
  348.     end if
  349.   end if
  350. end
  351.  
  352. on azah
  353.   global gwlist1
  354.   set num to getAt(gwlist1, 13)
  355.   if num = 36 then
  356.     set num to 1
  357.   else
  358.     set num to num + 1
  359.   end if
  360.   setAt(gwlist1, 13, num)
  361.   if num < 18 then
  362.     if (num mod 2) = 1 then
  363.       set the memberNum of sprite 28 to 87
  364.     else
  365.       set the memberNum of sprite 28 to 88
  366.     end if
  367.   else
  368.     if (num mod 2) = 1 then
  369.       set the memberNum of sprite 28 to 89
  370.     else
  371.       set the memberNum of sprite 28 to 90
  372.     end if
  373.   end if
  374.   if (num > 1) and (num < 16) then
  375.     set the locH of sprite 28 to 375 + (num * 5)
  376.     set the locV of sprite 28 to 166 - random(4)
  377.   else
  378.     if (num > 19) and (num < 34) then
  379.       set the locH of sprite 28 to 450 - ((num - 19) * 5)
  380.       set the locV of sprite 28 to 154 + random(4)
  381.     end if
  382.   end if
  383. end
  384.