home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 August / WPCAUG96.ISO / artwaug.dxr / 00020_ARTGraphics.ls < prev    next >
Encoding:
Text File  |  1996-06-17  |  7.3 KB  |  153 lines

  1. on ARTGraphics
  2.   global ARTGraphicsList, ARTWhichGraphics, ARTGraphicsLocList, ARTGraphicsBoxList, ArtGraphicsBoxSprite, ARTGraphicsVeiwFrame, IFLCanChange, ARTNoGo, IFLArtsNameSprite, ARTComp
  3.   repeat with g = 1 to count(ARTGraphicsList)
  4.     if rollOver(getAt(getAt(ARTGraphicsList, g), 1)) then
  5.       if the mouseDown and (getAt(getAt(ARTGraphicsList, g), 3) = 0) then
  6.         setAt(getAt(ARTGraphicsList, g), 3, 1)
  7.         if g = 1 then
  8.           if ARTWhichGraphics <> 1 then
  9.             set ARTWhichGraphics to 1
  10.             set ARTComp to 0
  11.             set LitTempList to getAt(ARTGraphicsList, g)
  12.             repeat with x = 4 to count(LitTempList)
  13.               set TwoLitTempList to getAt(LitTempList, x)
  14.               set the castNum of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 2)
  15.               set the locH of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 3)
  16.               set the locV of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 4)
  17.               set the ink of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 5)
  18.             end repeat
  19.             updateStage()
  20.           end if
  21.         else
  22.           if g = 2 then
  23.             if ARTWhichGraphics <> 2 then
  24.               set ARTComp to 0
  25.               set ARTWhichGraphics to 2
  26.               set LitTempList to getAt(ARTGraphicsList, g)
  27.               repeat with x = 4 to count(LitTempList)
  28.                 set TwoLitTempList to getAt(LitTempList, x)
  29.                 set the castNum of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 2)
  30.                 set the locH of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 3)
  31.                 set the locV of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 4)
  32.                 set the ink of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 5)
  33.               end repeat
  34.               updateStage()
  35.             end if
  36.           else
  37.             if g = 3 then
  38.               if ARTWhichGraphics <> 3 then
  39.                 set ARTComp to 1
  40.                 set ARTWhichGraphics to 3
  41.                 set LitTempList to getAt(ARTGraphicsList, g)
  42.                 repeat with x = 4 to count(LitTempList)
  43.                   set TwoLitTempList to getAt(LitTempList, x)
  44.                   set the castNum of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 2)
  45.                   set the locH of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 3)
  46.                   set the locV of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 4)
  47.                   set the ink of sprite getAt(TwoLitTempList, 1) to getAt(TwoLitTempList, 5)
  48.                 end repeat
  49.                 updateStage()
  50.               end if
  51.             end if
  52.           end if
  53.         end if
  54.         repeat with f = 1 to count(ARTGraphicsList)
  55.           if (getAt(getAt(ARTGraphicsList, f), 3) = 1) and (f <> g) then
  56.             set LastPlace to f
  57.             setAt(getAt(ARTGraphicsList, f), 3, 0)
  58.           end if
  59.         end repeat
  60.       end if
  61.       if getAt(getAt(ARTGraphicsList, g), 2) = 0 then
  62.         set the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) to the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) + 1
  63.         setAt(getAt(ARTGraphicsList, g), 2, 1)
  64.         repeat with f = 1 to count(ARTGraphicsList)
  65.           if (getAt(getAt(ARTGraphicsList, f), 2) = 1) and (f <> g) and (getAt(getAt(ARTGraphicsList, f), 3) = 0) then
  66.             set the castNum of sprite getAt(getAt(ARTGraphicsList, f), 1) to the castNum of sprite getAt(getAt(ARTGraphicsList, f), 1) - 1
  67.             setAt(getAt(ARTGraphicsList, f), 2, 0)
  68.           end if
  69.         end repeat
  70.       end if
  71.     end if
  72.   end repeat
  73.   repeat with g = 1 to count(ARTGraphicsList)
  74.     if not rollOver(getAt(getAt(ARTGraphicsList, g), 1)) then
  75.       if (getAt(getAt(ARTGraphicsList, g), 2) = 1) and (getAt(getAt(ARTGraphicsList, g), 3) = 0) then
  76.         set the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) to the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) - 1
  77.         setAt(getAt(ARTGraphicsList, g), 2, 0)
  78.       end if
  79.     end if
  80.   end repeat
  81.   if ARTWhichGraphics = 2 then
  82.     repeat with z = 1 to count(ARTGraphicsLocList)
  83.       if (the mouseH > getAt(getAt(ARTGraphicsLocList, z), 1)) and (the mouseH < getAt(getAt(ARTGraphicsLocList, z), 2)) and (the mouseV > getAt(getAt(ARTGraphicsLocList, z), 3)) and (the mouseV < getAt(getAt(ARTGraphicsLocList, z), 4)) then
  84.         set the locH of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 1)
  85.         set the locV of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 2)
  86.         updateStage()
  87.         if the mouseDown and (IFLCanChange = 1) then
  88.           repeat with b = 39 to 48
  89.             if rollOver(b) and (b <> IFLArtsNameSprite) then
  90.               set ARTNoGo to 1
  91.             end if
  92.           end repeat
  93.           if ARTNoGo = 0 then
  94.             set IFLCanChange to 0
  95.             set ARTGraphicsVeiwFrame to z
  96.             ARTLeaveArts(3)
  97.           end if
  98.           next repeat
  99.         end if
  100.         set ARTNoGo to 0
  101.       end if
  102.     end repeat
  103.     if (the mouseH < getAt(getAt(ARTGraphicsLocList, 1), 1)) or (the mouseH > getAt(getAt(ARTGraphicsLocList, 4), 2)) or (the mouseV < getAt(getAt(ARTGraphicsLocList, 1), 3)) or (the mouseV > getAt(getAt(ARTGraphicsLocList, 16), 4)) then
  104.       set the locH of sprite ArtGraphicsBoxSprite to 2000
  105.       updateStage()
  106.     end if
  107.   end if
  108.   if (ARTWhichGraphics = 1) or (ARTWhichGraphics = 2) then
  109.     if (the mouseH < 64) and (the mouseH > 28) and (the mouseV < 289) and (the mouseV > 253) then
  110.       set the castNum of sprite 48 to getAt(getAt(getAt(ARTGraphicsList, ARTWhichGraphics), 6), 2)
  111.       set the ink of sprite 48 to 36
  112.       set the locH of sprite 48 to 317
  113.       set the locV of sprite 48 to 189
  114.       put the ink of sprite 48 = 0
  115.       updateStage()
  116.       repeat while (the mouseH < 64) and (the mouseH > 28) and (the mouseV < 289) and (the mouseV > 253)
  117.       end repeat
  118.       set the locH of sprite 48 to 2000
  119.       updateStage()
  120.     end if
  121.   end if
  122.   if ARTWhichGraphics = 1 then
  123.     repeat with z = 1 to count(ARTGraphicsLocList)
  124.       if (the mouseH > getAt(getAt(ARTGraphicsLocList, z), 1)) and (the mouseH < getAt(getAt(ARTGraphicsLocList, z), 2)) and (the mouseV > getAt(getAt(ARTGraphicsLocList, z), 3)) and (the mouseV < getAt(getAt(ARTGraphicsLocList, z), 4)) then
  125.         set the locH of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 1)
  126.         set the locV of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 2)
  127.         updateStage()
  128.         if the mouseDown and (IFLCanChange = 1) then
  129.           repeat with b = 39 to 48
  130.             if rollOver(b) and (b <> IFLArtsNameSprite) then
  131.               set ARTNoGo to 1
  132.             end if
  133.           end repeat
  134.           if ARTNoGo = 0 then
  135.             set IFLCanChange to 0
  136.             set ARTGraphicsVeiwFrame to z
  137.             ARTLeaveArts(3)
  138.           end if
  139.           next repeat
  140.         end if
  141.         set ARTNoGo to 0
  142.       end if
  143.     end repeat
  144.     if (the mouseH < getAt(getAt(ARTGraphicsLocList, 1), 1)) or (the mouseH > getAt(getAt(ARTGraphicsLocList, 4), 2)) or (the mouseV < getAt(getAt(ARTGraphicsLocList, 1), 3)) or (the mouseV > getAt(getAt(ARTGraphicsLocList, 16), 4)) then
  145.       set the locH of sprite ArtGraphicsBoxSprite to 2000
  146.       updateStage()
  147.     end if
  148.   end if
  149.   if ARTWhichGraphics = 3 then
  150.     set ARTComp to 1
  151.   end if
  152. end
  153.