home *** CD-ROM | disk | FTP | other *** search
/ Oz - The Magical Adventure / Adventure.iso / pc / dkdata / juice.dxr / Internal_38_SaytheMixture.ls < prev    next >
Encoding:
Text File  |  2000-06-01  |  3.5 KB  |  115 lines

  1. on SaytheMixture
  2.   global gGameSol, gGameState, gMasterMoves, gDifficultyLevel, gHostSoundQueue
  3.   gMasterMoves = EMPTY
  4.   theOrder = item 4 of gGameSol
  5.   case gDifficultyLevel of
  6.     1:
  7.       put "57411" & random(3) into item 1 of gMasterMoves
  8.       repeat with i = 1 to 2
  9.         whichFruit = value(char i of theOrder)
  10.         put "5742" & string((whichFruit * 2) - 1) & item whichFruit of gGameSol into item i + 1 of gMasterMoves
  11.       end repeat
  12.       whichFruit = value(char 3 of theOrder)
  13.       put "5742" & string(whichFruit * 2) & item whichFruit of gGameSol into item 4 of gMasterMoves
  14.     2:
  15.       put "575111" into item 1 of gMasterMoves
  16.       refFruit = value(char 1 of theOrder)
  17.       put "5742" & string((refFruit * 2) - 1) & item refFruit of gGameSol into item 2 of gMasterMoves
  18.       put "575112" into item 3 of gMasterMoves
  19.       repeat with i = 2 to 3
  20.         whichFruit = value(char i of theOrder)
  21.         theRelative = value(item whichFruit of gGameSol) - value(item refFruit of gGameSol)
  22.         if theRelative > 0 then
  23.           theResponse = 1
  24.         else
  25.           if theRelative < 0 then
  26.             theResponse = 2
  27.           else
  28.             theResponse = 3
  29.           end if
  30.         end if
  31.         case refFruit of
  32.           1:
  33.           2:
  34.             if whichFruit = 3 then
  35.               theResponse = theResponse + 4
  36.             end if
  37.           3:
  38.             theResponse = theResponse + 4
  39.         end case
  40.         put "5751" & string((2 * whichFruit) + (i - 2)) & string(theResponse) into item i + 2 of gMasterMoves
  41.       end repeat
  42.     3:
  43.       put "574113" into item 1 of gMasterMoves
  44.       refFruit = value(char 1 of theOrder)
  45.       refNum = value(item refFruit of gGameSol)
  46.       case refNum of
  47.         1:
  48.           refVox = "1"
  49.         2:
  50.           refVox = "2"
  51.         4:
  52.           refVox = "3"
  53.         otherwise:
  54.           refVox = "4"
  55.       end case
  56.       put "5742" & string((refFruit * 2) - 1) & item refFruit of gGameSol into item 2 of gMasterMoves
  57.       repeat with i = 2 to 3
  58.         whichFruit = value(char i of theOrder)
  59.         theRelative = value(item whichFruit of gGameSol) - value(item refFruit of gGameSol)
  60.         theRatio = 10 * value(item whichFruit of gGameSol) / value(item refFruit of gGameSol)
  61.         if theRelative > 0 then
  62.           theResponse = 57528
  63.         else
  64.           if theRelative < 0 then
  65.             theResponse = 57524
  66.           else
  67.             theResponse = 57611
  68.           end if
  69.         end if
  70.         case refFruit of
  71.           1:
  72.             if whichFruit = 2 then
  73.               theFruit = 3
  74.             else
  75.               theFruit = 5
  76.             end if
  77.             case theRatio of
  78.               40, 2:
  79.                 theFruit = theFruit + 1
  80.             end case
  81.           2:
  82.             if whichFruit = 1 then
  83.               theFruit = 1
  84.             else
  85.               theFruit = 6
  86.             end if
  87.             case theRatio of
  88.               40, 2:
  89.                 if theFruit = 1 then
  90.                   theFruit = 2
  91.                 else
  92.                   theFruit = 5
  93.                 end if
  94.             end case
  95.           3:
  96.             if whichFruit = 1 then
  97.               theFruit = 2
  98.             else
  99.               theFruit = 4
  100.             end if
  101.             case theRatio of
  102.               40, 2:
  103.                 if theFruit = 2 then
  104.                   theFruit = 1
  105.                 else
  106.                   theFruit = 3
  107.                 end if
  108.             end case
  109.         end case
  110.         put string(theResponse + (i - 2)) & string(theFruit) into item i + 1 of gMasterMoves
  111.       end repeat
  112.   end case
  113.   gHostSoundQueue = gMasterMoves
  114. end
  115.