home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / NinetyOne.dxr / 00060_cards.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  4.6 KB  |  155 lines

  1. property spriteNum, oldloc
  2. global currentcard, stack1, stack2, stack3, stack4, stack5, stack6, stack7, stack8, stack9, stack10, stack11, stack12, stack13, orig
  3.  
  4. on beginSprite me
  5.   oldloc = sprite(spriteNum).loc
  6.   sprite(spriteNum).visible = 0
  7. end
  8.  
  9. on mouseDown me
  10.   puppetSound(3, "pickcard")
  11.   if sprite(spriteNum).memberNum <> 53 then
  12.     if currentcard = 0 then
  13.       sprite(25).loc = sprite(spriteNum).loc
  14.       sprite(25).visible = 1
  15.       sprite(25).memberNum = sprite(spriteNum).memberNum
  16.       currentcard = 25
  17.       ack = findPos(stack1, sprite(spriteNum).memberNum)
  18.       if ack > 0 then
  19.         deleteAt(stack1, count(stack1))
  20.         orig = 1
  21.         if count(stack1) > 0 then
  22.           sprite(10).memberNum = stack1[count(stack1)]
  23.         else
  24.           sprite(10).memberNum = 53
  25.         end if
  26.       end if
  27.       ack = findPos(stack2, sprite(spriteNum).memberNum)
  28.       if ack > 0 then
  29.         deleteAt(stack2, count(stack2))
  30.         orig = 2
  31.         if count(stack2) > 0 then
  32.           sprite(11).memberNum = stack2[count(stack2)]
  33.         else
  34.           sprite(11).memberNum = 53
  35.         end if
  36.       end if
  37.       ack = findPos(stack3, sprite(spriteNum).memberNum)
  38.       if ack > 0 then
  39.         deleteAt(stack3, count(stack3))
  40.         orig = 3
  41.         if count(stack3) > 0 then
  42.           sprite(12).memberNum = stack3[count(stack3)]
  43.         else
  44.           sprite(12).memberNum = 53
  45.         end if
  46.       end if
  47.       ack = findPos(stack4, sprite(spriteNum).memberNum)
  48.       if ack > 0 then
  49.         deleteAt(stack4, count(stack4))
  50.         orig = 4
  51.         if count(stack4) > 0 then
  52.           sprite(13).memberNum = stack4[count(stack4)]
  53.         else
  54.           sprite(13).memberNum = 53
  55.         end if
  56.       end if
  57.       ack = findPos(stack5, sprite(spriteNum).memberNum)
  58.       if ack > 0 then
  59.         deleteAt(stack5, count(stack5))
  60.         orig = 5
  61.         if count(stack5) > 0 then
  62.           sprite(14).memberNum = stack5[count(stack5)]
  63.         else
  64.           sprite(14).memberNum = 53
  65.         end if
  66.       end if
  67.       ack = findPos(stack6, sprite(spriteNum).memberNum)
  68.       if ack > 0 then
  69.         deleteAt(stack6, count(stack6))
  70.         orig = 6
  71.         if count(stack6) > 0 then
  72.           sprite(15).memberNum = stack6[count(stack6)]
  73.         else
  74.           sprite(15).memberNum = 53
  75.         end if
  76.       end if
  77.       ack = findPos(stack7, sprite(spriteNum).memberNum)
  78.       if ack > 0 then
  79.         deleteAt(stack7, count(stack7))
  80.         orig = 7
  81.         if count(stack7) > 0 then
  82.           sprite(16).memberNum = stack7[count(stack7)]
  83.         else
  84.           sprite(16).memberNum = 53
  85.         end if
  86.       end if
  87.       ack = findPos(stack8, sprite(spriteNum).memberNum)
  88.       if ack > 0 then
  89.         deleteAt(stack8, count(stack8))
  90.         orig = 8
  91.         if count(stack8) > 0 then
  92.           sprite(17).memberNum = stack8[count(stack8)]
  93.         else
  94.           sprite(17).memberNum = 53
  95.         end if
  96.       end if
  97.       ack = findPos(stack9, sprite(spriteNum).memberNum)
  98.       if ack > 0 then
  99.         deleteAt(stack9, count(stack9))
  100.         orig = 9
  101.         if count(stack9) > 0 then
  102.           sprite(18).memberNum = stack9[count(stack9)]
  103.         else
  104.           sprite(18).memberNum = 53
  105.         end if
  106.       end if
  107.       ack = findPos(stack10, sprite(spriteNum).memberNum)
  108.       if ack > 0 then
  109.         deleteAt(stack10, count(stack10))
  110.         orig = 10
  111.         if count(stack10) > 0 then
  112.           sprite(19).memberNum = stack10[count(stack10)]
  113.         else
  114.           sprite(19).memberNum = 53
  115.         end if
  116.       end if
  117.       ack = findPos(stack11, sprite(spriteNum).memberNum)
  118.       if ack > 0 then
  119.         deleteAt(stack11, count(stack11))
  120.         orig = 11
  121.         if count(stack11) > 0 then
  122.           sprite(20).memberNum = stack11[count(stack11)]
  123.         else
  124.           sprite(20).memberNum = 53
  125.         end if
  126.       end if
  127.       ack = findPos(stack12, sprite(spriteNum).memberNum)
  128.       if ack > 0 then
  129.         deleteAt(stack12, count(stack12))
  130.         orig = 12
  131.         if count(stack12) > 0 then
  132.           sprite(21).memberNum = stack12[count(stack12)]
  133.         else
  134.           sprite(21).memberNum = 53
  135.         end if
  136.       end if
  137.       ack = findPos(stack13, sprite(spriteNum).memberNum)
  138.       if ack > 0 then
  139.         deleteAt(stack13, count(stack13))
  140.         orig = 13
  141.         if count(stack13) > 0 then
  142.           sprite(22).memberNum = stack13[count(stack13)]
  143.         else
  144.           sprite(22).memberNum = 53
  145.         end if
  146.       end if
  147.       repeat while the mouseDown
  148.         sprite(currentcard).locH = the mouseH
  149.         sprite(currentcard).locV = the mouseV
  150.         updateStage()
  151.       end repeat
  152.     end if
  153.   end if
  154. end
  155.