home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Fácil 3 / CDFACIL3.iso / lazer / desafios / stact012.Dxr / 00401.ls < prev    next >
Encoding:
Text File  |  1996-12-01  |  976 b   |  40 lines

  1. on InitFace ChannelList
  2.   global custchecks, chancast, chanact
  3.   if count(ChannelList) = 0 then
  4.     set custchecks to 0
  5.     exit
  6.   end if
  7.   set fish to 1
  8.   set chancast to []
  9.   set chanact to []
  10.   set custchecks to count(ChannelList) / 2
  11.   repeat with xxx = 1 to custchecks
  12.     set kipper to getAt(ChannelList, fish)
  13.     set karp to getAt(ChannelList, fish + 1)
  14.     set fish to fish + 2
  15.     set epp to the castNum of sprite kipper
  16.     append(chancast, epp)
  17.     append(chanact, karp)
  18.   end repeat
  19. end
  20.  
  21. on UseFace
  22.   global custchecks, chancast, chanact, curnorm, curstate
  23.   set changeto to curstate
  24.   if custchecks > 0 then
  25.     set mighty to the mouseCast
  26.     repeat with xxx = 1 to custchecks
  27.       set ack to getAt(chancast, xxx)
  28.       if ack = mighty then
  29.         set pbsst to getAt(chanact, xxx)
  30.         set changeto to pbsst
  31.       end if
  32.     end repeat
  33.     if changeto = -1 then
  34.       cursor(curnorm)
  35.     else
  36.       cursor([changeto, changeto + 1])
  37.     end if
  38.   end if
  39. end
  40.