home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 July / WPCJUL96.ISO / file.exe / RESFINJ.DXR / 00008_RESLeave,RESReturn.ls < prev    next >
Encoding:
Text File  |  1996-05-15  |  4.0 KB  |  102 lines

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