home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 July / WPCJUL96.ISO / file.exe / SHARED.DXR / 01073_ADDPlaceAd.ls < prev    next >
Encoding:
Text File  |  1996-05-15  |  1.9 KB  |  68 lines

  1. on ADDPlaceAd
  2.   global addlist, addPallist, ADDMouse, ADDThisNum, ADDKindList, REFAddWatch, REFaddPallist, REFaddlist, REFADDKindList
  3.   go(the frame)
  4.   if REFAddWatch = 0 then
  5.     set thisPall to getAt(getAt(addPallist, ADDThisNum), 2)
  6.   else
  7.     set thisPall to getAt(getAt(REFaddPallist, ADDThisNum), 2)
  8.   end if
  9.   puppetPalette(thisPall)
  10.   if REFAddWatch = 0 then
  11.     set AddTVNum to getAt(getAt(addPallist, ADDThisNum), 1)
  12.   else
  13.     set AddTVNum to getAt(getAt(REFaddPallist, ADDThisNum), 1)
  14.   end if
  15.   set the castNum of sprite 2 to AddTVNum
  16.   set the ink of sprite 2 to 0
  17.   set the locH of sprite 2 to 0
  18.   set the locV of sprite 2 to 0
  19.   set the castNum of sprite 3 to AddTVNum + 1
  20.   set the ink of sprite 3 to 0
  21.   set the locH of sprite 3 to 0
  22.   set the locV of sprite 3 to 0
  23.   puppetSound("NOISE.AIF")
  24.   updateStage()
  25.   if REFAddWatch = 0 then
  26.     repeat while 1
  27.       if the castNum of sprite 3 = (AddTVNum + 5) then
  28.         set the castNum of sprite 3 to AddTVNum - 4
  29.       else
  30.         set the castNum of sprite 3 to the castNum of sprite 3 + 1
  31.       end if
  32.       if the mouseUp then
  33.         set ADDMouse to 1
  34.       end if
  35.       if the mouseDown and (ADDMouse = 1) then
  36.         exit repeat
  37.       end if
  38.       updateStage()
  39.     end repeat
  40.     deleteAt(ADDKindList, ADDThisNum)
  41.     deleteAt(addlist, ADDThisNum)
  42.     deleteAt(addPallist, ADDThisNum)
  43.   else
  44.     repeat while 1
  45.       if the castNum of sprite 3 = (AddTVNum + 5) then
  46.         set the castNum of sprite 3 to AddTVNum - 4
  47.       else
  48.         set the castNum of sprite 3 to the castNum of sprite 3 + 1
  49.       end if
  50.       if the mouseUp then
  51.         set ADDMouse to 1
  52.       end if
  53.       if the mouseDown and (ADDMouse = 1) then
  54.         exit repeat
  55.       end if
  56.       updateStage()
  57.     end repeat
  58.   end if
  59.   set ADDMouse to 0
  60.   set the locH of sprite 2 to 2000
  61.   set the locH of sprite 3 to 2000
  62.   puppetPalette(0)
  63.   puppetSound(0)
  64.   updateStage()
  65.   go("ADDBLACK")
  66.   updateStage()
  67. end
  68.