home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1997 December / WPCDEC97.ISO / DXRS / RESWDEC.DXR / 00008_RESLeave,RESReturn.ls < prev    next >
Encoding:
Text File  |  1997-10-13  |  4.2 KB  |  105 lines

  1. on RESLeave y
  2.   global IFLButtonList, IFLResourcesNameSprite, ADDADCOntTwo, ADDAdCount, RESMasterList, ADDADvertSprite, IFLHeadInkList
  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 f = 1 to count(IFLHeadInkList)
  41.       set InkTempList to getAt(IFLHeadInkList, f)
  42.       setAt(InkTempList, 2, the ink of sprite getAt(ThisTempList, 1))
  43.     end repeat
  44.     repeat with t = 39 to 47
  45.       set the locH of sprite t to 2000
  46.     end repeat
  47.     set the castNum of sprite IFLResourcesNameSprite to getAt(getAt(IFLButtonList, 3), 5)
  48.     set ADDADCOntTwo to 0
  49.     set ADDAdCount to 0
  50.     set the locH of sprite ADDADvertSprite to 2000
  51.     ADDLOADAdd()
  52.   end if
  53.   updateStage()
  54. end
  55.  
  56. on RESReturn y
  57.   global RESMasterList, IFLButtonList, IFLResourcesNameSprite, ESprite, IFLHeadInkList
  58.   puppetSound(0)
  59.   if y = 1 then
  60.     repeat with g = 1 to 9
  61.       set the castNum of sprite IFLResourcesNameSprite to the castNum of sprite IFLResourcesNameSprite - 1
  62.       updateStage()
  63.     end repeat
  64.   end if
  65.   repeat with f = 1 to count(RESMasterList)
  66.     set TwochangeSprite to getAt(RESMasterList, f)
  67.     if count(TwochangeSprite) > 2 then
  68.       set the castNum of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 2)
  69.       set the locH of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 3)
  70.       set the locV of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 4)
  71.       set the ink of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 5)
  72.       set the visible of sprite getAt(TwochangeSprite, 1) to 1
  73.       next repeat
  74.     end if
  75.     set the locH of sprite getAt(TwochangeSprite, 1) to 2000
  76.   end repeat
  77.   if y = 1 then
  78.     set the castNum of sprite IFLResourcesNameSprite to the castNum of sprite IFLResourcesNameSprite - 1
  79.   end if
  80.   if y = 2 then
  81.     repeat with f = 1 to count(IFLButtonList)
  82.       set TwochangeSprite to getAt(IFLButtonList, f)
  83.       set the castNum of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 2)
  84.       set the locH of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 3)
  85.       set the locV of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 4)
  86.     end repeat
  87.     repeat with f = 1 to count(IFLHeadInkList)
  88.       set TwochangeSprite to getAt(IFLHeadInkList, f)
  89.       set the ink of sprite getAt(TwochangeSprite, 1) to getAt(TwochangeSprite, 2)
  90.     end repeat
  91.   end if
  92.   set the locH of sprite 1 to 325
  93.   set the locV of sprite 1 to 271
  94.   if y = 2 then
  95.     set the castNum of sprite 1 to the number of member "IFLStaticBackground"
  96.     set the ink of sprite 1 to 36
  97.     repeat with f = 39 to 47
  98.       set the ink of sprite f to 36
  99.     end repeat
  100.   end if
  101.   ADDAdvertBreak(3)
  102.   updateStage()
  103.   go("RESSection")
  104. end
  105.