home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / BakersGame.dxr / 00072_hotspot3.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  2.4 KB  |  51 lines

  1. on beginSprite me
  2.   global tableau
  3.   sprite(me.spriteNum).blendLevel = 0
  4.   sprite(me.spriteNum).loc = sprite(tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].spnum).loc
  5. end
  6.  
  7. on mouseEnter me
  8.   global tableau, equalvalue, hotcard
  9.   if tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count > 0 then
  10.     if (the clickOn <> 0) and (the clickOn <> me.spriteNum) and (the clickOn <> tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].spnum) then
  11.       if tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count > 0 then
  12.         if (the clickOn <> 0) and (the clickOn <> (me.spriteNum - 8)) and (the clickOn <> me.spriteNum) then
  13.           if (sprite(the clickOn).visible = 1) and (sprite(the clickOn).moveableSprite = 1) then
  14.             xybaby = gethotcardtwo(the clickOn)
  15.             if tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].compare_suit(xybaby) = 1 then
  16.               if tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].rankvalue = (xybaby.rankvalue + 1) then
  17.                 equalvalue = 1
  18.                 hotcard = tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].spnum + 1
  19.               else
  20.                 equalvalue = 0
  21.                 hotcard = 0
  22.               end if
  23.             end if
  24.           end if
  25.         end if
  26.       end if
  27.     end if
  28.   else
  29.     if (the clickOn <> 0) and (the clickOn <> me.spriteNum) and (the clickOn <> (me.spriteNum - 120)) then
  30.       if chars(member(sprite(the clickOn).memberNum).name, 1, 4) = "king" then
  31.         equalvalue = 1
  32.         hotcard = me.spriteNum - 120
  33.       else
  34.         equalvalue = 0
  35.         hotcard = 0
  36.       end if
  37.     end if
  38.   end if
  39. end
  40.  
  41. on mouseLeave me
  42.   global equalvalue, hotcard, tableau
  43.   if tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count > 0 then
  44.     sprite(me.spriteNum).loc = tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards[tableau[symbol(string(sprite(me.spriteNum).startFrame))].cards.count].location
  45.   else
  46.     sprite(me.spriteNum).loc = sprite(me.spriteNum - 120).loc
  47.   end if
  48.   equalvalue = 0
  49.   hotcard = 0
  50. end
  51.