home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazin 1997 March / Image.iso / wd.dxr / Wettauswahl_75.ls < prev    next >
Encoding:
Text File  |  1996-10-28  |  1.9 KB  |  37 lines

  1. global gNoPlayers, gWetten, gPlayerNumber, gPlayers
  2.  
  3. on exitFrame
  4.   global gNoPlayers
  5.   if gNoPlayers > 1 then
  6.     playSoundOnce(1, "Sprech5")
  7.   else
  8.     playSoundOnce(1, "Sprech4")
  9.   end if
  10.   set gWetten to []
  11.   repeat with i = 0 to 3
  12.     set the text of cast ("Recorde" & i + 1 & "a") to formatPunkte(getPropAt(getAt(gHighScores, (i * 4) + 1), 10)) & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & formatPunkte(getPropAt(getAt(gHighScores, (i * 4) + 3), 10))
  13.     set the text of cast ("Recorde" & i + 1 & "b") to formatPunkte(getPropAt(getAt(gHighScores, (i * 4) + 2), 10)) & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & formatPunkte(getPropAt(getAt(gHighScores, (i * 4) + 4), 10))
  14.     if gNoPlayers = 1 then
  15.       set the text of cast ("Punkte" & i + 1 & "a") to formatPunkte(getAt(getAt(gPlayers, gPlayerNumber), 2 + (i * 4) + 1)) & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & formatPunkte(getAt(getAt(gPlayers, gPlayerNumber), 2 + (i * 4) + 3))
  16.       set the text of cast ("Punkte" & i + 1 & "b") to formatPunkte(getAt(getAt(gPlayers, gPlayerNumber), 2 + (i * 4) + 2)) & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & RETURN & formatPunkte(getAt(getAt(gPlayers, gPlayerNumber), 2 + (i * 4) + 4))
  17.     end if
  18.   end repeat
  19.   if gNoPlayers = 1 then
  20.     set summe to 0
  21.     set anz to 0
  22.     repeat with i = 1 to 16
  23.       if integerp(getAt(getAt(gPlayers, gPlayerNumber), 2 + i)) then
  24.         set anz to anz + 1
  25.         set summe to summe + getAt(getAt(gPlayers, gPlayerNumber), 2 + i)
  26.       end if
  27.     end repeat
  28.     if anz > 0 then
  29.       set the text of cast "Summe" to formatPunkte(summe)
  30.       set the text of cast "Durchschnitt" to formatPunkte(summe / anz)
  31.     else
  32.       set the text of cast "Summe" to formatPunkte(0)
  33.       set the text of cast "Durchschnitt" to formatPunkte(0)
  34.     end if
  35.   end if
  36. end
  37.