home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1997 January / WPCJAN97.ISO / artwjan.dxr / 00014_ARTGraphics.ls < prev    next >
Encoding:
Text File  |  1996-11-07  |  6.5 KB  |  136 lines

  1. on ARTGraphics
  2.   global ARTGraphicsList, ARTWhichGraphics, ARTGraphicsLocList, ARTGraphicsBoxList, ArtGraphicsBoxSprite, ARTGraphicsVeiwFrame, IFLCanChange, ARTNoGo, IFLArtsNameSprite, ARTComp, ARTImageGO
  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.           end if
  37.         end if
  38.         repeat with f = 1 to count(ARTGraphicsList)
  39.           if (getAt(getAt(ARTGraphicsList, f), 3) = 1) and (f <> g) then
  40.             set LastPlace to f
  41.             setAt(getAt(ARTGraphicsList, f), 3, 0)
  42.           end if
  43.         end repeat
  44.       end if
  45.       if getAt(getAt(ARTGraphicsList, g), 2) = 0 then
  46.         set the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) to the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) + 1
  47.         setAt(getAt(ARTGraphicsList, g), 2, 1)
  48.         repeat with f = 1 to count(ARTGraphicsList)
  49.           if (getAt(getAt(ARTGraphicsList, f), 2) = 1) and (f <> g) and (getAt(getAt(ARTGraphicsList, f), 3) = 0) then
  50.             set the castNum of sprite getAt(getAt(ARTGraphicsList, f), 1) to the castNum of sprite getAt(getAt(ARTGraphicsList, f), 1) - 1
  51.             setAt(getAt(ARTGraphicsList, f), 2, 0)
  52.           end if
  53.         end repeat
  54.       end if
  55.     end if
  56.   end repeat
  57.   repeat with g = 1 to count(ARTGraphicsList)
  58.     if not rollOver(getAt(getAt(ARTGraphicsList, g), 1)) then
  59.       if (getAt(getAt(ARTGraphicsList, g), 2) = 1) and (getAt(getAt(ARTGraphicsList, g), 3) = 0) then
  60.         set the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) to the castNum of sprite getAt(getAt(ARTGraphicsList, g), 1) - 1
  61.         setAt(getAt(ARTGraphicsList, g), 2, 0)
  62.       end if
  63.     end if
  64.   end repeat
  65.   if ARTWhichGraphics = 2 then
  66.     repeat with z = 1 to count(ARTGraphicsLocList)
  67.       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
  68.         set the locH of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 1)
  69.         set the locV of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 2)
  70.         updateStage()
  71.         if the mouseDown and (IFLCanChange = 1) then
  72.           repeat with b = 39 to 48
  73.             if rollOver(b) and (b <> IFLArtsNameSprite) then
  74.               set ARTNoGo to 1
  75.             end if
  76.           end repeat
  77.           if ARTNoGo = 0 then
  78.             set IFLCanChange to 0
  79.             set ARTGraphicsVeiwFrame to z
  80.             set ARTImageGO to 0
  81.             ARTLeaveArts(3)
  82.           end if
  83.           next repeat
  84.         end if
  85.         set ARTNoGo to 0
  86.       end if
  87.     end repeat
  88.     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
  89.       set the locH of sprite ArtGraphicsBoxSprite to 2000
  90.       updateStage()
  91.     end if
  92.   end if
  93.   if (ARTWhichGraphics = 1) or (ARTWhichGraphics = 2) then
  94.     if (the mouseH < 64) and (the mouseH > 28) and (the mouseV < 289) and (the mouseV > 253) then
  95.       set the castNum of sprite 48 to getAt(getAt(getAt(ARTGraphicsList, ARTWhichGraphics), 6), 2)
  96.       set the ink of sprite 48 to 36
  97.       set the locH of sprite 48 to 317
  98.       set the locV of sprite 48 to 189
  99.       put the ink of sprite 48 = 0
  100.       updateStage()
  101.       repeat while (the mouseH < 64) and (the mouseH > 28) and (the mouseV < 289) and (the mouseV > 253)
  102.       end repeat
  103.       set the locH of sprite 48 to 2000
  104.       updateStage()
  105.     end if
  106.   end if
  107.   if ARTWhichGraphics = 1 then
  108.     repeat with z = 1 to count(ARTGraphicsLocList)
  109.       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
  110.         set the locH of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 1)
  111.         set the locV of sprite ArtGraphicsBoxSprite to getAt(getAt(ARTGraphicsBoxList, z), 2)
  112.         updateStage()
  113.         if the mouseDown and (IFLCanChange = 1) then
  114.           repeat with b = 39 to 48
  115.             if rollOver(b) and (b <> IFLArtsNameSprite) then
  116.               set ARTNoGo to 1
  117.             end if
  118.           end repeat
  119.           if ARTNoGo = 0 then
  120.             set IFLCanChange to 0
  121.             set ARTGraphicsVeiwFrame to z
  122.             set ARTImageGO to 0
  123.             ARTLeaveArts(3)
  124.           end if
  125.           next repeat
  126.         end if
  127.         set ARTNoGo to 0
  128.       end if
  129.     end repeat
  130.     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
  131.       set the locH of sprite ArtGraphicsBoxSprite to 2000
  132.       updateStage()
  133.     end if
  134.   end if
  135. end
  136.