home *** CD-ROM | disk | FTP | other *** search
/ One Click 5 / ONCE005.iso / Jogos / 1516.swf / scripts / DefineSprite_436 / frame_23 / DoAction.as
Encoding:
Text File  |  2006-05-02  |  1.2 KB  |  55 lines

  1. _X = _X - "15";
  2. _Y = _Y + "12";
  3. _xscale = "100" + "0.2" * (_Y - "200");
  4. _yscale = "100" + "0.2" * (_Y - "200");
  5. skrandom = random("2") + "1";
  6. skb = random("50");
  7. if("50" - (getProperty("/sk1", _Y) - "400") / "3" >= getProperty("/sk1", _X) or skb == "15")
  8. {
  9.    tellTarget("/sk1")
  10.    {
  11.       if(skrandom == "1")
  12.       {
  13.          gotoAndStop("sk-RD");
  14.          play();
  15.       }
  16.       if(skrandom == "2")
  17.       {
  18.          gotoAndStop("sk-RU");
  19.          play();
  20.       }
  21.    }
  22. }
  23. if(getProperty("/sk1", _Y) >= "240" or skb == "35")
  24. {
  25.    tellTarget("/sk1")
  26.    {
  27.       if(skrandom == "1")
  28.       {
  29.          gotoAndStop("sk-RU");
  30.          play();
  31.       }
  32.       if(skrandom == "2")
  33.       {
  34.          gotoAndStop("sk-LU");
  35.          play();
  36.       }
  37.    }
  38. }
  39. if(getProperty("/m1", _X) + "20" >= _X and _X >= getProperty("/m1", _X) - "20" and getProperty("/m1", _Y) + "20" >= _Y and _Y >= getProperty("/m1", _Y) - "20" and getProperty("/m1/hit", _currentframe) == "1")
  40. {
  41.    tellTarget("/m1/hit")
  42.    {
  43.       play();
  44.    }
  45. }
  46. soundplay = random("30");
  47. if(soundplay == "15")
  48. {
  49.    tellTarget("/monstersounds")
  50.    {
  51.       gotoAndStop("vampire");
  52.       play();
  53.    }
  54. }
  55.