View Single Post
Re: doesn't this prevent em buying grenades?
Old
  (#6)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: doesn't this prevent em buying grenades? - 28-05-2004

Okay I have changed from:
Code:
  // Needs an Item ?
   else if (pBot->iBuyCount < 7)
   {
      // Care first about buying Armor
      if (pBot->iBuyCount == 4)
      {
         if ((pBot->pEdict->v.armorvalue == 0) && (pBot->bot_money > 650))
         {
            if (pBot->bot_money > 1000)
            {
               if (g_bIsOldCS15)
                  FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 2\n");
               else
                  FakeClientCommand (pEdict, "vesthelm\n");
            }
            else
            {
               if (g_bIsOldCS15)
                  FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 1\n");
               else
                  FakeClientCommand (pEdict, "vest\n");
            }
         }
      }

      // Buy Grenade or Defuse Kit
      else
      {
         if (pBot->bot_money > 300)
         {
            // If Defusion Map & Counter buy Defusion Kit
            if ((g_iMapType & MAP_DE) && (pBot->bot_team == TEAM_CS_COUNTER) && !pBot->b_has_defuse_kit)
            {
               if (g_bIsOldCS15)
                  FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 6\n");
               else
                  FakeClientCommand (pEdict, "defuser\n");
            }

            // Else buy Grenade
            else
            {
               int iGrenadeType = RANDOM_LONG (1, 100);

               // Focus on HE Grenades
               if (iGrenadeType < 70)
               {
                  if (g_bIsOldCS15)
                     FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 4\n");
                  else
                     FakeClientCommand (pEdict, "hegren\n");
               }
               else if (iGrenadeType < 90)
               {
                  if (g_bIsOldCS15)
                     FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 5\n");
                  else
                     FakeClientCommand (pEdict, "sgren\n");
               }
               else if (iGrenadeType < 100)
               {
                  if (g_bIsOldCS15)
                     FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 3\n");
                  else
                     FakeClientCommand (pEdict, "flash\n");
               }
            }
         }
      }
to
Code:
  // Needs an Item ?
   else if (pBot->iBuyCount < 7)
   {
      // Care first about buying Armor
      if (pBot->iBuyCount == 4)
      {
         if ((pBot->pEdict->v.armorvalue < 80) && (pBot->bot_money > 650))
         {
            if (pBot->bot_money > 1000)
            {
               if (g_bIsOldCS15)
                  FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 2\n");
               else
                  FakeClientCommand (pEdict, "vesthelm\n");
            }
            else
            {
               if (g_bIsOldCS15)
                  FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 1\n");
               else
                  FakeClientCommand (pEdict, "vest\n");
            }
         }
      }

      if (pBot->bot_money > 600)
      {
         int iGrenadeType = RANDOM_LONG (1, 100);

         // Focus on HE Grenades
         if (iGrenadeType < 70)
         {
            if (g_bIsOldCS15)
               FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 4\n");
            else
               FakeClientCommand (pEdict, "hegren\n");
         }
         else if (iGrenadeType < 90)
         {
            if (g_bIsOldCS15)
               FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 5\n");
            else
               FakeClientCommand (pEdict, "sgren\n");
         }
         else if (iGrenadeType < 100)
         {
            if (g_bIsOldCS15)
               FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 3\n");
            else
               FakeClientCommand (pEdict, "flash\n");
         }
      }

      if (pBot->bot_money > 300)
      {
         // If Defusion Map & Counter buy Defusion Kit
         if ((g_iMapType & MAP_DE) && (pBot->bot_team == TEAM_CS_COUNTER) && !pBot->b_has_defuse_kit)
         {
            if (g_bIsOldCS15)
               FakeClientCommand (pEdict, "buy;menuselect 8;menuselect 6\n");
            else
               FakeClientCommand (pEdict, "defuser\n");
         }
      }
Is this what you wanted?
  
Reply With Quote