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

  1. property spriteNum, iam, stime
  2. global curr, deck
  3.  
  4. on beginSprite me
  5.   sprite(spriteNum).memberNum = 14
  6.   iam = spriteNum - 10
  7. end
  8.  
  9. on mouseDown me
  10.   global points
  11.   puppetSound(3, "pickcard")
  12.   if sprite(spriteNum).memberNum = 14 then
  13.     sprite(spriteNum).memberNum = deck[iam]
  14.     updateStage()
  15.     stime = the ticks
  16.     repeat while (the ticks - stime) < 20
  17.     end repeat
  18.     if deck[iam] = (curr + 1) then
  19.       curr = deck[iam]
  20.       if curr = 13 then
  21.         if the timer < 1000 then
  22.           points = 5000
  23.         end if
  24.         if the timer < 2000 then
  25.           points = 1000
  26.         end if
  27.         if the timer < 4000 then
  28.           points = 800
  29.         end if
  30.         if the timer < 6000 then
  31.           points = 600
  32.         end if
  33.         if the timer < 8000 then
  34.           points = 400
  35.         end if
  36.         if the timer < 10000 then
  37.           points = 300
  38.         end if
  39.         if the timer > 10000 then
  40.           points = 50
  41.         end if
  42.         member("points").text = "points:" && string(points)
  43.         go(3)
  44.       end if
  45.     else
  46.       curr = 0
  47.       repeat with b = 11 to 23
  48.         sprite(b).memberNum = 14
  49.       end repeat
  50.     end if
  51.   end if
  52. end
  53.