home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / konijnen.swf / scripts / DefineSprite_68 / frame_32 / DoAction.as
Encoding:
Text File  |  2007-03-20  |  1.4 KB  |  72 lines

  1. if(eval("/container:klik") == "1")
  2. {
  3.    call("rand");
  4.    klik = eval("/container:klik");
  5. }
  6. else
  7. {
  8.    klik = eval("/container:klik");
  9.    bit = "0";
  10.    while(bit == "0")
  11.    {
  12.       flag = "0";
  13.       call("rand");
  14.       set("/container:choice" add klik,z add x);
  15.       cntr = "1";
  16.       while(cntr < klik)
  17.       {
  18.          trace(eval("/container:choice" add cntr));
  19.          if(eval("/container:choice" add cntr) eq eval("/container:choice" add klik))
  20.          {
  21.             flag = "1";
  22.             trace("dupe found");
  23.          }
  24.          cntr += "1";
  25.       }
  26.       if(flag == "1")
  27.       {
  28.          bit = "0";
  29.       }
  30.       else
  31.       {
  32.          bit = "1";
  33.       }
  34.    }
  35. }
  36. set("/container:choice" add klik,z add x);
  37. count = "1";
  38. raak = "0";
  39. while("5" >= count)
  40. {
  41.    if(z add x eq eval("/ship" add count add ":plek"))
  42.    {
  43.       raak = "1";
  44.       set("/container:found",eval("/container:found") + "1");
  45.       trace(eval("/container:found"));
  46.       if(eval("/container:found") == "5")
  47.       {
  48.          tellTarget("/")
  49.          {
  50.             gotoAndStop("verloren");
  51.          }
  52.       }
  53.       tellTarget("/ship" add count)
  54.       {
  55.          gotoAndPlay(3);
  56.       }
  57.    }
  58.    count += "1";
  59. }
  60. if(raak == "0")
  61. {
  62.    tellTarget("/" add z add x)
  63.    {
  64.       gotoAndPlay(3);
  65.    }
  66. }
  67. tellTarget("/schild")
  68. {
  69.    gotoAndStop(1);
  70. }
  71. stop();
  72.