home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Estrategia / ant_war.swf / scripts / frame_11 / DoAction_15.as < prev    next >
Encoding:
Text File  |  2007-03-13  |  4.4 KB  |  110 lines

  1. function show_anttips()
  2. {
  3.    var _loc1_ = _root;
  4.    var tiptxt = "";
  5.    var _loc2_ = undefined;
  6.    var _loc3_ = undefined;
  7.    if(_loc1_.antstats[gc_nest] / _loc1_.antstats[gc_pop] < 1)
  8.    {
  9.       _loc2_ = 1;
  10.       _loc3_ = _loc1_.randomNum(_loc1_.anttip_text[_loc2_].length);
  11.       tiptxt += _loc1_.anttip_text[_loc2_][_loc3_];
  12.    }
  13.    else if(_loc1_.antstats[gc_nest] / _loc1_.antstats[gc_pop] < 1.25)
  14.    {
  15.       _loc2_ = 2;
  16.       _loc3_ = _loc1_.randomNum(_loc1_.anttip_text[_loc2_].length);
  17.       tiptxt += _loc1_.anttip_text[_loc2_][_loc3_];
  18.    }
  19.    else if(_loc1_.antstats[gc_nest] / _loc1_.antstats[gc_pop] > 1.6)
  20.    {
  21.       _loc2_ = 3;
  22.       _loc3_ = _loc1_.randomNum(_loc1_.anttip_text[_loc2_].length);
  23.       tiptxt += _loc1_.anttip_text[_loc2_][_loc3_];
  24.    }
  25.    if(_loc1_.antstats[gc_stored] < parseInt(_loc1_.antstats[gc_pop] / _loc1_.upkeepcost))
  26.    {
  27.       _loc2_ = 4;
  28.       _loc3_ = _loc1_.randomNum(_loc1_.anttip_text[_loc2_].length);
  29.       tiptxt += _loc1_.anttip_text[_loc2_][_loc3_];
  30.    }
  31.    else if(_loc1_.antstats[gc_stored] < parseInt(_loc1_.antstats[gc_nest] / 2))
  32.    {
  33.       _loc2_ = 5;
  34.       _loc3_ = _loc1_.randomNum(_loc1_.anttip_text[_loc2_].length);
  35.       tiptxt += _loc1_.anttip_text[_loc2_][_loc3_];
  36.    }
  37.    else if(_loc1_.antstats[gc_stored] > parseInt(_loc1_.antstats[gc_nest] * 0.9))
  38.    {
  39.       _loc2_ = 6;
  40.       _loc3_ = _loc1_.randomNum(_loc1_.anttip_text[_loc2_].length);
  41.       tiptxt += _loc1_.anttip_text[_loc2_][_loc3_];
  42.    }
  43.    if(_loc1_.antstats[gc_pop] > parseInt(_loc1_.poplevel[_loc1_.antlevel] * 0.9))
  44.    {
  45.       _loc2_ = 7;
  46.       _loc3_ = _loc1_.randomNum(_loc1_.anttip_text[_loc2_].length);
  47.       tiptxt += _loc1_.anttip_text[_loc2_][_loc3_];
  48.    }
  49.    if(_loc1_.antstats[gc_pop] > 500 && tiptxt == "")
  50.    {
  51.       _loc2_ = 8;
  52.       _loc3_ = _loc1_.randomNum(_loc1_.anttip_text[_loc2_].length);
  53.       tiptxt += _loc1_.anttip_text[_loc2_][_loc3_];
  54.    }
  55.    if(tiptxt == "")
  56.    {
  57.       _loc2_ = 0;
  58.       _loc3_ = _loc1_.randomNum(_loc1_.anttip_text[_loc2_].length);
  59.       tiptxt += _loc1_.anttip_text[_loc2_][_loc3_];
  60.    }
  61.    _loc1_.ant_tips.textarea = tiptxt;
  62.    _loc1_.ant_tips.textarea.scroll = _loc1_.ant_tips.textarea.maxscroll;
  63. }
  64. var anttip_text = new Array();
  65. _root.anttip_text[0] = new Array();
  66. _root.anttip_text[0][0] = "You\'re doing great!\r\n";
  67. _root.anttip_text[0][1] = "Keep up the good work!\r\n";
  68. _root.anttip_text[0][2] = "Excellent!\r\n";
  69. _root.anttip_text[1] = new Array();
  70. _root.anttip_text[1][0] = "Your nest is too small!\r\n";
  71. _root.anttip_text[1][1] = "Your nest is too small!  Get to work!\r\n";
  72. _root.anttip_text[1][2] = "Get to work!\r\n";
  73. _root.anttip_text[1][3] = "";
  74. _root.anttip_text[2] = new Array();
  75. _root.anttip_text[2][0] = "Increase your nest size!\r\n";
  76. _root.anttip_text[2][1] = "Your ants will find more food than they can keep.\r\n";
  77. _root.anttip_text[2][2] = "Your ants will find more food than they can keep. Increase your nest size.\r\n";
  78. _root.anttip_text[2][3] = "";
  79. _root.anttip_text[3] = new Array();
  80. _root.anttip_text[3][0] = "You\'re finding a good balance.\r\n";
  81. _root.anttip_text[3][1] = "Why not hatch some more ants!\r\n";
  82. _root.anttip_text[3][2] = "Grow your colony.\r\n";
  83. _root.anttip_text[3][3] = "";
  84. _root.anttip_text[3][4] = "";
  85. _root.anttip_text[4] = new Array();
  86. _root.anttip_text[4][0] = "Famine is on the horizon!\r\n";
  87. _root.anttip_text[4][1] = "Your ants are going to starve!\r\n";
  88. _root.anttip_text[4][2] = "Feed your ants!\r\n";
  89. _root.anttip_text[4][3] = "Make sure your ants are properly fed!\r\n";
  90. _root.anttip_text[5] = new Array();
  91. _root.anttip_text[5][0] = "Keep an eye on your food supply.\r\n";
  92. _root.anttip_text[5][1] = "Watch your food supply.\r\n";
  93. _root.anttip_text[5][2] = "";
  94. _root.anttip_text[6] = new Array();
  95. _root.anttip_text[6][0] = "If you dig a bigger nest, you can hold more food.\r\n";
  96. _root.anttip_text[6][1] = "I suggest you dig a bigger nest.\r\n";
  97. _root.anttip_text[6][2] = "";
  98. _root.anttip_text[6][3] = "";
  99. _root.anttip_text[7] = new Array();
  100. _root.anttip_text[7][0] = "Almost to the next level!  Hatch a few more ants!\r\n";
  101. _root.anttip_text[7][1] = "Almost to the next level!\r\n";
  102. _root.anttip_text[7][2] = "Hatch a few more ants!\r\n";
  103. _root.anttip_text[7][3] = "";
  104. _root.anttip_text[7][4] = "";
  105. _root.anttip_text[8] = new Array();
  106. _root.anttip_text[8][0] = "";
  107. _root.anttip_text[8][1] = "The store has helpful items for sale.\r\n";
  108. _root.anttip_text[8][2] = "";
  109. _root.anttip_text[8][3] = "";
  110.