home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 August / WPCAUG96.ISO / reswaug.dxr / 00008_RESLeave,RESReturn.ls < prev    next >
Encoding:
Text File  |  1996-06-14  |  4.1 KB  |  105 lines

  1. on RESLeave y
  2.   global IFLButtonList, IFLResourcesNameSprite, ADDADCOntTwo, ADDAdCount, RESMasterList, ADDADvertSprite
  3.   set the castNum of sprite 41 to 32
  4.   set the locH of sprite 35 to 2000
  5.   updateStage()
  6.   repeat with f = 1 to count(RESMasterList)
  7.     set TwochangeSprite to getAt(RESMasterList, f)
  8.     if count(TwochangeSprite) > 2 then
  9.       setAt(TwochangeSprite, 2, the castNum of sprite getAt(TwochangeSprite, 1))
  10.       setAt(TwochangeSprite, 5, the ink of sprite getAt(TwochangeSprite, 1))
  11.       setAt(TwochangeSprite, 3, the locH of sprite getAt(TwochangeSprite, 1))
  12.       setAt(TwochangeSprite, 4, the locV of sprite getAt(TwochangeSprite, 1))
  13.     else
  14.       setAt(TwochangeSprite, 2, 0)
  15.     end if
  16.     if y = 1 then
  17.       if getAt(TwochangeSprite, 1) <> 2 then
  18.         set the locH of sprite getAt(TwochangeSprite, 1) to 2000
  19.         set the locV of sprite getAt(TwochangeSprite, 1) to 2000
  20.       end if
  21.       next repeat
  22.     end if
  23.     set the locH of sprite getAt(TwochangeSprite, 1) to 2000
  24.     set the locV of sprite getAt(TwochangeSprite, 1) to 2000
  25.   end repeat
  26.   if y = 1 then
  27.     set the castNum of sprite IFLResourcesNameSprite to the castNum of sprite IFLResourcesNameSprite + 1
  28.   end if
  29.   set the locH of sprite ADDADvertSprite to 2000
  30.   if y = 2 then
  31.     set the locH of sprite 1 to 2000
  32.     repeat with f = 1 to count(IFLButtonList)
  33.       set ThisTempList to getAt(IFLButtonList, f)
  34.       setAt(ThisTempList, 2, the castNum of sprite getAt(ThisTempList, 1))
  35.       if getAt(ThisTempList, 1) = IFLResourcesNameSprite then
  36.         setAt(ThisTempList, 3, the locH of sprite getAt(ThisTempList, 1))
  37.         setAt(ThisTempList, 4, the locV of sprite getAt(ThisTempList, 1))
  38.       end if
  39.     end repeat
  40.     repeat with t = 39 to 47
  41.       set the locH of sprite t to 2000
  42.     end repeat
  43.     set the castNum of sprite IFLResourcesNameSprite to getAt(getAt(IFLButtonList, 3), 5)
  44.     set ADDADCOntTwo to 0
  45.     set ADDAdCount to 0
  46.     set the locH of sprite ADDADvertSprite to 2000
  47.     ADDLOADAdd()
  48.   end if
  49.   updateStage()
  50. end
  51.  
  52. on RESReturn y
  53.   global RESMasterList, IFLButtonList, IFLResourcesNameSprite, ESprite
  54.   puppetSound(0)
  55.   if y = 1 then
  56.     repeat with g = 1 to 6
  57.       set the castNum of sprite IFLResourcesNameSprite to the castNum of sprite IFLResourcesNameSprite - 1
  58.       wait(0.05)
  59.       updateStage()
  60.     end repeat
  61.   end if
  62.   puppetSound("resback.wav")
  63.   updateStage()
  64.   repeat with f = 1 to count(RESMasterList)
  65.     set TwochangeSprite to getAt(RESMasterList, f)
  66.     if count(TwochangeSprite) > 2 then
  67.       set the castNum of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 2)
  68.       set the locH of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 3)
  69.       set the locV of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 4)
  70.       set the ink of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 5)
  71.       set the visible of sprite getAt(TwochangeSprite, 1) to 1
  72.       next repeat
  73.     end if
  74.     set the locH of sprite getAt(TwochangeSprite, 1) to 2000
  75.   end repeat
  76.   if y = 1 then
  77.     set the castNum of sprite IFLResourcesNameSprite to the castNum of sprite IFLResourcesNameSprite - 1
  78.   end if
  79.   if y = 2 then
  80.     repeat with f = 1 to count(IFLButtonList)
  81.       set TwochangeSprite to getAt(IFLButtonList, f)
  82.       set the castNum of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 2)
  83.       set the locH of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 3)
  84.       set the locV of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 4)
  85.     end repeat
  86.   end if
  87.   set the locH of sprite 1 to 325
  88.   set the locV of sprite 1 to 271
  89.   ADDAdvertBreak(3)
  90.   updateStage()
  91.   if y = 1 then
  92.     wait(1)
  93.     repeat with height in [106, 136, 166, 200, 210]
  94.       set the locV of sprite IFLResourcesNameSprite to height
  95.       updateStage()
  96.       wait(0.05)
  97.     end repeat
  98.     set the castNum of sprite IFLResourcesNameSprite to the castNum of sprite IFLResourcesNameSprite - 2
  99.     set the locH of sprite ESprite to the locH of sprite IFLResourcesNameSprite
  100.     set the locV of sprite ESprite to the locV of sprite IFLResourcesNameSprite
  101.     updateStage()
  102.   end if
  103.   go("RESSection")
  104. end
  105.